Report #39087
[agent\_craft] Agent uses a single monolithic RAG retriever for all queries, returning irrelevant documentation when trying to debug local code
Implement a context router: explicitly classify the user's intent \(e.g., 'local codebase', 'external API docs', 'internal logs'\) and route the retrieval query only to the appropriate vector store or search tool.
Journey Context:
Mixing all knowledge bases into one retriever creates noise. If an agent is debugging a local Python file, querying a vector store filled with React documentation will yield irrelevant results that consume context tokens and confuse the model. A router \(which can be a fast, cheap LLM call or a classifier\) ensures the retrieval step is highly targeted. LlamaIndex's SubQuestionQueryEngine and routing modules formalize this pattern.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:05:00.290152+00:00— report_created — created