Corrective RAG (CRAG) is a plug-and-play RAG strategy that introduces a lightweight retrieval evaluator to assess the relevance of fetched documents before generation. Unlike static RAG, which blindly feeds all retrieved context to the LLM, CRAG classifies documents into Correct, Incorrect, or Ambiguous confidence tiers. This classification dynamically triggers downstream actions: highly relevant documents proceed directly to generation, while irrelevant results are discarded in favor of a web search fallback to source external knowledge.
Glossary
Corrective RAG (CRAG)

What is Corrective RAG (CRAG)?
Corrective RAG (CRAG) is an agentic Retrieval-Augmented Generation architecture that implements a self-correcting loop to evaluate the quality of retrieved documents and automatically trigger corrective actions, such as web searches, when the initial retrieval is irrelevant.
For ambiguous documents, CRAG employs a knowledge refinement step, decomposing the text into fine-grained knowledge strips, filtering noise, and recombining only the factual segments. This self-correcting loop transforms RAG from a passive retrieval system into an active, agentic architecture that autonomously verifies and improves its own grounding context, significantly reducing hallucination rates on complex or knowledge-intensive queries.
Key Features of CRAG
Corrective RAG implements a self-correcting loop that evaluates retrieval quality and triggers corrective actions when documents are irrelevant.
Retrieval Evaluator
A lightweight classifier that assesses the relevance of each fetched document against the user query. It assigns a confidence score to every retrieved passage, categorizing them as correct, ambiguous, or incorrect. This evaluation gate determines whether the retrieved context is sufficient for generation or requires correction. The evaluator is typically fine-tuned on a dataset of query-document pairs labeled for relevance, enabling it to detect subtle mismatches that would otherwise lead to hallucination.
Knowledge Refinement
When documents are flagged as ambiguous, CRAG triggers a targeted decomposition step. The query is broken into sub-queries and re-executed against the knowledge base. Retrieved passages are then segmented into granular knowledge strips, and the evaluator re-scores each strip. Only strips that pass the relevance threshold are retained, effectively filtering noise from partially relevant documents and extracting the precise factual nuggets needed for grounding.
Web Search Fallback
If the evaluator classifies all retrieved documents as incorrect or irrelevant, CRAG abandons the internal knowledge base entirely. It triggers an external web search via a search API, treating the open web as a supplementary knowledge source. The retrieved web results are then fed into the knowledge refinement pipeline for strip-level evaluation. This ensures the system never generates from poor context, gracefully degrading to broader search when proprietary data is insufficient.
Self-Correcting Loop
The architecture operates as a closed feedback loop rather than a linear pipeline. After any corrective action—refinement or web search—the evaluator re-assesses the new context. This iterative cycle continues until sufficient high-confidence knowledge strips are assembled. The loop design prevents cascading errors by ensuring that only verified, relevant information reaches the generation phase, making CRAG inherently more robust than static retrieve-then-generate architectures.
Arbitration Logic
A deterministic arbitration layer governs the transition between CRAG's operational modes. It consumes the evaluator's confidence scores and enforces a rule-based policy:
- Correct documents → proceed directly to generation
- Ambiguous documents → trigger knowledge refinement
- Incorrect documents → trigger web search fallback This explicit control flow makes the system's behavior auditable and predictable, unlike implicit model-based routing.
CRAG vs. Standard RAG vs. Self-RAG
A feature-level comparison of three retrieval-augmented generation paradigms, highlighting differences in retrieval evaluation, self-correction mechanisms, and adaptive behavior.
| Feature | Standard RAG | Self-RAG | CRAG |
|---|---|---|---|
Retrieval Trigger | Always retrieves before generation | Adaptive; retrieves on-demand per token | Always retrieves; evaluates post-hoc |
Retrieval Evaluator | |||
Self-Correction Loop | |||
External Web Search Fallback | |||
Knowledge Refinement Step | |||
On-Demand Retrieval | |||
Reflection Tokens | |||
Primary Hallucination Mitigation | Static context grounding | Critique & selective generation | Iterative document quality assessment |
Frequently Asked Questions
Clear, technically precise answers to the most common questions about the self-correcting retrieval architecture known as Corrective RAG (CRAG).
Corrective RAG (CRAG) is an agentic RAG architecture that implements a self-correcting loop to improve the factual grounding of a language model's output. It works by introducing a Retrieval Evaluator component that assesses the quality of documents fetched from a knowledge base before they are used for generation. If the evaluator deems the retrieved documents irrelevant or unhelpful for the user's query, CRAG dynamically triggers a corrective action, such as a fallback to a broader web search or knowledge graph refinement. This ensures the model only synthesizes an answer from high-confidence, relevant context, directly addressing the 'garbage in, garbage out' problem in standard RAG pipelines.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Core architectural components and evaluation metrics that enable self-correcting retrieval loops in agentic RAG systems.
Retrieval Evaluator
The gatekeeper module in CRAG that assesses the quality of fetched documents before they reach the generation step. It classifies retrieved results into three confidence tiers:
- Correct: Documents are relevant and sufficient; proceed directly to generation
- Incorrect: Documents are irrelevant; trigger an external web search fallback
- Ambiguous: Partial relevance detected; combine internal and external sources
The evaluator typically uses a fine-tuned Natural Language Inference (NLI) model or a lightweight cross-encoder to compute relevance scores between the query and each retrieved passage.
Knowledge Refinement
The post-retrieval optimization step triggered when the evaluator deems documents ambiguous. Rather than discarding partially relevant content, CRAG decomposes the retrieved text into atomic statements and filters out those with low entailment scores.
This process:
- Strips irrelevant or contradictory sentences from passages
- Preserves only factual segments that directly support the query
- Passes the refined knowledge to the generator alongside any supplementary web search results
The refinement step prevents the model from being distracted by noise in long documents.
Web Search Fallback
The external grounding mechanism activated when the retrieval evaluator flags documents as incorrect. CRAG reformulates the original query into optimized search terms and queries public search APIs to fetch fresh, relevant content.
Key design considerations:
- Query rewriting to maximize search engine recall
- Deduplication against already-retrieved internal documents
- Re-ranking of web results using the same evaluator model
- Caching frequently accessed external sources to reduce latency
This fallback transforms CRAG from a closed-book to an open-domain verification system.
Self-RAG Comparison
While both Self-RAG and Corrective RAG implement self-critique loops, they differ architecturally:
- Self-RAG trains special reflection tokens directly into the language model, making retrieval decisions and critique an intrinsic part of token generation
- CRAG uses an external evaluator module decoupled from the generator, allowing plug-and-play swapping of retrieval assessment models without retraining the LLM
- Self-RAG critiques output during generation; CRAG evaluates documents before generation begins
CRAG's decoupled design offers greater modularity and easier debugging of retrieval failures.
Entailment Scoring in CRAG
The mathematical backbone of the retrieval evaluator. For each retrieved document-passage pair, an NLI model computes:
- Entailment probability: The passage logically supports the query's information need
- Contradiction probability: The passage directly conflicts with known facts
- Neutral probability: No logical relationship detected
CRAG aggregates these scores across all retrieved documents to assign the overall confidence tier. A passage with entailment score > 0.7 typically qualifies as Correct, while scores < 0.3 trigger the web search fallback.
Agentic RAG Integration
CRAG functions as a specialized reasoning step within broader agentic RAG architectures. In an agent loop:
- The agent decomposes a complex query into sub-questions
- Each sub-question triggers a CRAG pipeline for verified retrieval
- The agent synthesizes verified answers from multiple CRAG cycles
- If all retrieval attempts fail, the agent can escalate to a human or request clarification
This hierarchical design combines CRAG's document-level self-correction with agentic task-level planning, creating a robust multi-hop reasoning system that verifies facts at every step.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us