Find answers from the community

Updated last month

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.

Useful resources
Hi @All

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?
W
B
4 comments
@Logan M worked on something for this particular usecase: https://llamahub.ai/l/llama-packs/llama-index-packs-fuzzy-citation?from=

This helps you to identify the nodes which have been used to form the answer
Can it be combined with CondensePlusContextChatEngine and streaming? give me an example
CondensePlusContextChatEngine takes in a retreiver, You can modify the Fuzzy citation code to create a retriver and then pass it on to the CondensePlusContextChatEngine
@WhiteFang_Jr Do you have an example. I haven't found a way to handle it yet.
Add a reply
Sign up and join the conversation on Discord