Report #29180
[frontier] Agent retrieves irrelevant documents and generates hallucinated answers because it cannot verify retrieval quality
Implement a corrective retrieval loop: after initial retrieval, use a grader LLM to evaluate document relevance on a scale; if relevance is low, rewrite the query and re-retrieve \(web search or vector store\); only generate once documents pass the relevance threshold or max iterations reached
Journey Context:
Standard RAG is single-shot; if the retriever fails, the generator hallucinates or gives up. Corrective RAG \(CRAG\) adds a reflection step: an LLM grades retrieved chunks with Yes/Maybe/No. On No, it decomposes the query and uses web search or alternative retrieval. On Maybe, it rewrites the query for better vector search. This self-correction loop increases accuracy significantly on complex QA tasks by preventing the 'garbage in, gospel out' problem and allowing the agent to recover from poor initial retrievals.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:22:24.653708+00:00— report_created — created