Environment
Thank you for open-sourcing this project! Today I spent a lot of time debugging an issue related to RAG: I found that even though my question was explicitly mentioned in the documentation, the system still couldn't answer it correctly. After debugging, I discovered that the retrieval step successfully found relevant chunks, but an error occurred during the filtering step in types.py (and the error was not printed). Specifically, the where parameter passed to the filter contained 2 conditions, but the code checks for len(where) != 1. I don't understand the design rationale behind this. Also, I'm not sure how to resolve this issue. Could you please provide some guidance on how to get the RAG test to work properly? Thank you very much!
Full Code
from praisonaiagents import Agent
agent = Agent(
name="RAG Agent",
instructions="Answer questions using the knowledge base",
knowledge=["docs/manual.pdf"] # Your documents
)
results = self.knowledge.search(
query=query,
user_id=user_id,
agent_id=agent_id,
run_id=run_id,
**kwargs,
)
-
pipeline.py
results = self.knowledge.search(
query=query,
user_id=user_id,
agent_id=agent_id,
run_id=run_id,
**kwargs,
)
-
knowledge.py
results = self.memory.search(query, user_id=user_id, agent_id=agent_id, run_id=run_id, rerank=rerank, **kwargs)
-
factories.py
- CollectionCommon.py
- types.py

Environment
Provider (select one):
PraisonAI 4.6.46
praisonai-tools 0.2.30
praisonaiagents 1.6.46
Operating System: Windows 11
Thank you for open-sourcing this project! Today I spent a lot of time debugging an issue related to RAG: I found that even though my question was explicitly mentioned in the documentation, the system still couldn't answer it correctly. After debugging, I discovered that the retrieval step successfully found relevant chunks, but an error occurred during the filtering step in types.py (and the error was not printed). Specifically, the where parameter passed to the filter contained 2 conditions, but the code checks for len(where) != 1. I don't understand the design rationale behind this. Also, I'm not sure how to resolve this issue. Could you please provide some guidance on how to get the RAG test to work properly? Thank you very much!
Full Code
from praisonaiagents import Agent
agent = Agent(
name="RAG Agent",
instructions="Answer questions using the knowledge base",
knowledge=["docs/manual.pdf"] # Your documents
)
results = self.knowledge.search(
query=query,
user_id=user_id,
agent_id=agent_id,
run_id=run_id,
**kwargs,
)
pipeline.py
results = self.knowledge.search(
query=query,
user_id=user_id,
agent_id=agent_id,
run_id=run_id,
**kwargs,
)
knowledge.py
results = self.memory.search(query, user_id=user_id, agent_id=agent_id, run_id=run_id, rerank=rerank, **kwargs)
factories.py