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).
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.