-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert Entity Relationship Extraction in DSPy to using CoT #44
Merged
NumberChiffre
merged 8 commits into
gusye1234:main
from
NumberChiffre:numberchiffre/update-dspy-entity-relationship-extraction-to-cot
Sep 23, 2024
Merged
Convert Entity Relationship Extraction in DSPy to using CoT #44
NumberChiffre
merged 8 commits into
gusye1234:main
from
NumberChiffre:numberchiffre/update-dspy-entity-relationship-extraction-to-cot
Sep 23, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…erimental DSPy in notebook
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #44 +/- ##
==========================================
- Coverage 94.36% 94.25% -0.12%
==========================================
Files 11 12 +1
Lines 1189 1288 +99
==========================================
+ Hits 1122 1214 +92
- Misses 67 74 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…instructions that works for qwen2-7b
rangehow
pushed a commit
to rangehow/nano-graphrag
that referenced
this pull request
Oct 18, 2024
…4#44) * Converted TypedPredictor to CoT and removed pydantic models using experimental DSPy in notebook * Fix entity extraction unittests after removing pydantic models and changing to CoT * Add working random search fine tuning with better metrics * Still cannot get MIPROv2 to work * Working MIPROv2 with TypedChainOfThought * Updated metrics to compute all relationships at once, updated prompt instructions that works for qwen2-7b * Add updated notebooks with fine tuning using MIPROv2 and qwen2-7b as task model * Add compiled model for generate dataset with updated unittests --------- Co-authored-by: terence-gpt <numberchiffre@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
DSPy has typed predictors/CoT that uses pydantic models as schema for their return types, however this is not as reliable as non-typed like CoT (because if something goes wrong with the formatting, you can catch it and resolve it yourself, often times some JSON parsing error or response from
outputfield
ends up in theprediction.rationale
of CoT). Therefore, this PR is here to resolve these formatting issues with DSPy once and for all (hopefully) and run MIPROv2 to generate optimal prompt instructions for entity relationship extraction.Misc: