AdalFlow
AdalFlow copied to clipboard
[Multi-hop RAG opt + improvement] [V0.2.4 Cycle Graph]
- fix the api in the word count code and generate better diagnose report
- multi-hop RAG will have cycles, we can create a copy to every node that is a cycle to unroll the DCG to DAG, but hard to do as we have to recreate the component such as Retriever or Generator. DsPY simply does not support cycle yet.
Design choice: (1) support cycle, we treat it as a component where its prompt has to be adapted to multiple sets of inputs and outputs, in practical this make sense (2) user not creating a cycle, they treating each repeating as a new copy node and has its own parameter.
For (2) its easy, everything works out of box, users just need to know that they are doing this intentional for (1) we have to carefully design how the gradient works, and how the demo works (demo should aggregate both parts)
- (2) User try not to create a cycle
Multi-hop retriever
Multi-hop RAG (works by simplify replace the retriever if we simplify follow the retriever api)