nano-graphrag
nano-graphrag copied to clipboard
Feature: prompt tuning
Hello !
Great project, so much easy to understand/hack than the microsoft one
Is there any plan to support the prompt tuning feature ? https://microsoft.github.io/graphrag/posts/prompt_tuning/overview/
It would be really nice !
Yeah, @NumberChiffre is actually on this right now. We already merged some PRs about prompt tuning and keep working on it. #44 #27
Stay tuned!
@bdecarne I'll take a look sometimes next week, in the meantime if you are interested in optimizing prompt instructions for entity and relationship extraction, take a look at:
- Generating datasets: https://github.com/gusye1234/nano-graphrag/blob/main/examples/generate_entity_relationship_dspy.ipynb
- Optimization: https://github.com/gusye1234/nano-graphrag/blob/main/examples/finetune_entity_relationship_dspy.ipynb
I used dspy-ai=2.4.16 for the above notebooks^
Thank you so much, it's look promising !!
@bdecarne some updates were made with self-refine, you can re-run the above Jupyter notebooks with your datasets to optimize your prompt instructions or use other DSPy optimizers: https://github.com/gusye1234/nano-graphrag/pull/73
Thanks for your work! But I have problem with prompt tuning. When I run this code generate_entity_relationship_dspy, it will get error with this img. How to solve this problem.