QA Over documents to return not only text but also the file reference

Hi we are implement the Q&A over documents feature. We are using pinecone as our vector database and we are processing a few pdfs. When we store our embeddings in the vector db, we also store the metadata to be able to filter not only for similarity but also for some metadata fields and then we submit our results to openai to give us the best answer.
I was wondering if there is a way where the openai api might return not only the best response based on my documents but the reference of where this text is, as i have stored the metadata with the file name.

Any idea of best practices to solve this challenge ?

This is the prompt LangChain uses to return the source along with the answer:

thanks Novaphil… appreciate your suggestion.