Report #42338
[frontier] RAG retrieves irrelevant documents causing agent hallucination on bad context
Implement Corrective RAG \(CRAG\): add a retrieval evaluator \(LLM or confidence score\) that grades retrieved docs. If confidence is low, dynamically rewrite the query or fallback to web search/knowledge graph instead of using bad context.
Journey Context:
Naive RAG assumes top-k similarity equals relevance. In production, user queries are ambiguous and vector similarity fails on domain-specific jargon. CRAG adds a 'triage' step: an LLM grades whether retrieved documents actually answer the query. If the grade is poor, the system triggers corrective actions—query decomposition, web search via Tavily, or routing to a different retriever. This pattern is replacing static RAG chains in 2025 because it gracefully degrades rather than confidently hallucinating.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:32:14.071428+00:00— report_created — created