Find answers from the community

Updated 6 months ago

And when I get the answer I’d like to be

At a glance

The post indicates that the community member would like to be able to return to the user information like a link to the source, the name, the author, etc. when they get an answer. The comments suggest that the community member should consider the type of index they are using and how they are currently loading the documents. One comment recommends setting an extra_info field on each document to store metadata that can be used in embeddings and displayed in the response. However, there is no explicitly marked answer in the provided information.

And when I get the answer, I’d like to be able to return to the user things like a link to the source, the name, the author, etc. etc.
L
2 comments
Hmm, lets back up a few steps haha

What kind of index are you using? How do you load the documents currently?
When you are loading data, you can set the extra_info field of each document to a dict of metadata

document.extra_info ={}

These get used in embeddings, and also show up in response source_nodes

response.source_nodes[0].node.node_info I think is the right way to access it lol
Add a reply
Sign up and join the conversation on Discord