Show sources for RAG query

How can I get an agent to show the sources used for a document database?

Hi @sgardiner
Thank you for reaching out and using Phidata! I’ve tagged the relevant engineers to assist you with your query. We aim to respond within 24 hours.
If this is urgent, please feel free to let us know, and we’ll do our best to prioritize it.
Thanks for your patience!

Hello @sgardiner please set debug_mode = True in your agent config to take a look at the sources used for generating the RAG response.

For example:

agent=Agent(search_knowledge=True, debug_mode=True)

In the debug logs you can take a look at the documents selected to answer your query. Let me know if you have any further questions