Selecting the Best Matching Node from Multiple Documents
Selecting the Best Matching Node from Multiple Documents
At a glance
The community member has two guide documents in one index, and when querying a guide, both documents contain that guide, with nodes from both documents being returned. The community member is asking how to select the node that best matches the answer.
Another community member, @Logan M, has worked on a solution for this use case, and has shared a link to a resource on Fuzzy Citation, which helps identify the nodes used to form the answer.
The community members are also discussing whether the Fuzzy Citation solution can be combined with CondensePlusContextChatEngine and streaming, and a community member suggests modifying the Fuzzy Citation code to create a retriever and then passing it to the CondensePlusContextChatEngine.
I have 2 documents as 2 guide files on different topics in one index. When querying a guide, both documents contain that guide, and when the source returns, it also provides nodes from those 2 documents. How can I select the node that best matches the answer?
CondensePlusContextChatEngine takes in a retreiver, You can modify the Fuzzy citation code to create a retriver and then pass it on to the CondensePlusContextChatEngine