Find answers from the community

Updated 6 months ago

I have metadata stored in my Vector

At a glance

The community member has metadata stored in their Vector store for files in the "docs" and "pdfs" directories. The "docs" files have "document_link" metadata, while the "pdfs" files have "file_name" metadata. The community member needs to include either the "document_link" or "file_name" in their chatbot's response, and is asking where they should go about this and if there are any relevant documentation they can follow.

In the comments, another community member suggests that the community member can prompt the language model to include the metadata in the response, or they can directly access it using print(response.source_nodes).

I have metadata stored in my Vector store for each file as so:
documents in the docs directory have the "document_link" metadata
documents in the pdfs directory have the "file_name" metadata

At the end my chat bot's response I need it to give either the document_link or file_name from which it used to answer the question it was asked, where would I go about this, and is there any docs I can follow?
T
1 comment
You can prompt the LLM to include them in the response. Or alternatively you can directly access them:

Plain Text
print(response.source_nodes)
Add a reply
Sign up and join the conversation on Discord