Corrective RAG (CRAG)
Corrective RAG is a 2024 retrieval pattern that adds a relevance-grading step between retrieval and generation: every retrieved document is scored by a lightweight evaluator for how well it answers the query, and the pipeline branches on the aggregate confidence. If confidence is high, the documents flow straight into the generator. If confidence is low, the system does not answer from weak context — instead it rewrites the query, falls back to web search, or refuses. If confidence is ambiguous, it mixes internal documents with web results. The pattern addresses a core failure mode of naive RAG, where the retriever returns the best-available documents even when none of them are good, and the generator dutifully hallucinates on top of that weak context. CRAG trades one extra evaluator call per query for much better behavior on out-of-corpus questions.
Example
A pharmaceutical knowledge assistant is indexed on internal clinical dossiers. A user asks about a compound the company has never worked on. Naive RAG returns the five least-bad chunks and the generator invents plausible mechanism claims. With CRAG, the evaluator marks all five as low relevance, the router triggers a web-search fallback on a regulator-approved source list, and the final answer cites that source while clearly noting the compound is not in the internal corpus. The hallucination rate on out-of-corpus queries drops from illustrative 38% to 6%.
Put this into practice
Build polished, copy-ready prompts in under 60 seconds with SurePrompts.
Try SurePrompts