Skip to content
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

Add multi-turn self-refine for entity relationship extractor #73

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

NumberChiffre
Copy link
Collaborator

@NumberChiffre NumberChiffre commented Oct 8, 2024

Description

One-pass of the input text may not always return the full entities and relationships, so we can ask the LLM to refine its response via critique. The tradeoff for quality is to call the LLM several times more (perhaps parts of this can be substituted with distilled HF models in the future).

Here's a basic version that intends to improve mathematical solutions over multiple turns via critique:
https://github.com/NumberChiffre/mcts-llm/blob/main/mcts_llm/mctsr.py#L36-L86

We'd have to make sure the refined entities and relationships are unique each.

@NumberChiffre NumberChiffre self-assigned this Oct 8, 2024
@NumberChiffre NumberChiffre added dspy enhancement New feature or request labels Oct 8, 2024
@NumberChiffre NumberChiffre marked this pull request as ready for review October 10, 2024 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dspy enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant