Corrective RAG (CRAG)
Corrective RAG: retrieve, let an LLM critic check relevance, consistency, hallucination, completeness and contradictions, then filter, rewrite or re-retrieve before generating, with the critic workflow, correction types, strategies, techniques, trade-offs, data flow, metrics, variants and use cases.
Cheat sheet · Offered as a template
In this diagram
- Corrective RAG (CRAG)
- Corrective Retrieval-Augmented Generation
- What is Corrective RAG (CRAG)?
- Improves upon traditional RAG by verifying and correcting retrieved context before generation.
- Detects irrelevant, incomplete or inconsistent information.
- Uses LLM as a critic to refine context, re-retrieve or filter.
- Produces more accurate, reliable and trustworthy answers.
- Core Components
- User Query
- Retriever (Get Initial Documents)
- Context Corrector / Critic (Verify & Refine)
- Generator (LLM)
- Response
- Retriever : Fetches relevant documents.
- Corrector/Critic : Evaluates, filters, or rewrites context for correctness.
- Generator : Generates final answer using corrected context.
- CRAG Pipeline
- Raw Documents
- Vector DB / Knowledge Base
- Indexing
- Retrieve Top-k Documents → Initial Context
- Retrieval
- LLM as Critic • Relevance Check • Consistency Check • Hallucination Check • Completeness Check • Contradiction Check
- Correction (Critic)
- Filter Irrelevant
- Rewrite / Refine
- Re-Retrieve
- Generate Answer with Corrected Context
- Generation
- Correction (Critic) Workflow
- Retrieved Context (Chunks)
- Critic Prompts (Verify & Validate)
- Critic Actions • Keep • Remove • Rewrite • Re-rank • Re-retrieve
- Corrected Context
- Types of Corrections
- 1. Relevance
- Remove irrelevant chunks.
- 2. Consistency