Find answers from the community

Updated 11 months ago

hi there! how can i add the source of

hi there! how can i add the source of the obtained embeddings in the final prompt? I mean, the pages where information is obtained from PDF
T
a
5 comments
You can do
Plain Text
print(response.source_nodes)
That's where they're contained, there is also the CitationQueryEngine if you want the references to be in the LLM response: https://docs.llamaindex.ai/en/stable/examples/query_engine/citation_query_engine.html
yes, but i was thinking about the llm response containing the filepath and pages not that way
do u thinks there is any way?
The retrieved source nodes will have the information, you can phrase your prompt to ask for these details if you want them in the LLM response (if you don't want to just print them directly)
Add a reply
Sign up and join the conversation on Discord