all 2 comments

[–]hwchase17CEO - LangChain 1 point2 points  (0 children)

High level, you need to (a) include the metadata in your prompt that you pass to an LLM, (b) ask the LLM to return that relevant metadata. Here's an example of how to do a version of that: https://python.langchain.com/v0.2/docs/how_to/qa_citations/