-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traditional RAG not working #1843
Comments
FYI, I tried add_references=True and that works but nowhere in cookbooks do I see add_references = True, also what does it even do as compared to add_context? how is it different? If add_references work, then what is add_context used for? |
@alaap001 |
That's what I am saying, add_context is not doing anything. Model is not able to use it at all. In the cookbook, I saw knowledge and add context being used, but that is not working Basically this combo isn't working for RAG, which is what I saw in cookbook.
|
@alaap001
|
Thanks, I'll check this out and report soon. And if so, can we please add this to the docs or cookbook? https://github.com/phidatahq/phidata/blob/main/cookbook/rag/01_traditional_rag_pgvector.py it says, Enable RAG by adding context from the |
Hey,
Thanks for the good work.
I noticed that the traditional rag is not working as expected.
Problem statement: A lot of SOTA open source llms don't use tool support, making Agentic RAG use a limitation. However, we can use traditional RAG on them and still get some relevant context. So I tried to use Traditional RAG on gpt4o and few open source models.
Observation: Wheen setting search knowledge = True, our Agent is able to generate proper SQL queries using schema from knowledge base as expected. However when I set it to False and set add context = True, Agent is not able to add any context to prompt at all and is not able to access knowledge base.
Code for reference:
for add context=True and search knowledge=False, it is not adding any context to prompt, prompt is as it is and then it is assuming column and table names from the question instead of from knowledge base.
On the other hand when search knowledge is True, it is referencing to the knowledge base and able to generate correct query.
Logs for traditional RAG:
Can you please test this at your end and update?
If Traditional RAG doesn't work on a simple use case such ass this then this an be a big trouble as that is the most common usecase for any Agentic application.
Thanks.
The text was updated successfully, but these errors were encountered: