Corrective RAG (CRAG) is a retrieval-augmented generation architecture that incorporates a dedicated retrieval evaluator to assess the quality of initially fetched documents before generation. The system classifies retrieved legal documents into Correct, Incorrect, or Ambiguous confidence tiers, ensuring that irrelevant or outdated case law does not contaminate the model's context window.
Glossary
Corrective RAG (CRAG)

What is Corrective RAG (CRAG)?
A self-reflective architecture that evaluates the relevance of retrieved legal documents and triggers a corrective web search or knowledge graph lookup if the initial retrieval quality is low.
When retrieval quality falls below a confidence threshold, CRAG triggers a corrective action loop—executing a refined web search, querying a structured legal knowledge graph, or reformulating the search with canonical citations. This self-correcting mechanism transforms static RAG pipelines into closed-loop systems capable of knowledge refinement, making it essential for high-stakes legal reasoning where citation integrity is non-negotiable.
Key Features of Corrective RAG
Corrective RAG (CRAG) introduces a self-reflective evaluation loop that assesses the quality of retrieved legal documents and triggers corrective actions—such as web search or knowledge graph lookups—when initial retrieval confidence is low.
Retrieval Relevance Evaluator
A lightweight classifier or confidence scoring module that assesses the relevance of each retrieved document chunk against the user's legal query. This evaluator acts as a gatekeeper, assigning a confidence score—high, ambiguous, or incorrect—to the initial retrieval set before generation begins. Documents scored as incorrect are discarded entirely, while ambiguous results trigger corrective action. This prevents the language model from hallucinating based on irrelevant or tangentially related case law.
Knowledge Graph Fallback
When the retrieval evaluator flags results as ambiguous, CRAG triggers a structured lookup against a legal knowledge graph rather than relying solely on vector similarity. This fallback queries deterministic relationships—such as statutory hierarchies, citation networks, and doctrinal classifications—to inject grounded factual context into the generation prompt. For example, if a query about 'promissory estoppel elements' retrieves only dissenting opinions, the knowledge graph can surface the canonical Restatement section and its interpreting majority holdings.
Web Search Augmentation
For queries where the internal legal corpus lacks sufficient coverage, CRAG automatically formulates a corrective web search query. The system extracts key legal terms of art and canonical citations from the original query, executes a search against external legal databases or the open web, and integrates the retrieved content back into the context window. This ensures that even novel or rapidly evolving legal questions—such as recent regulatory changes—receive grounded, current responses rather than outdated or absent internal knowledge.
Knowledge Refinement & Filtering
After corrective retrieval, CRAG applies a secondary filtering step to the combined document set—original high-confidence chunks, knowledge graph data, and web search results. This refinement process:
- De-duplicates redundant information across sources
- Re-ranks passages by composite relevance and authority scores
- Segments content into distinct knowledge strips for granular selection Only the most salient, non-redundant passages survive to populate the final generation context, preventing context window bloat and improving citation precision.
Self-Reflective Generation Loop
CRAG implements a generate-then-verify cycle where the model's output is scrutinized against the retrieved evidence. If generated claims lack direct support in the provided context, the system can trigger a secondary corrective retrieval pass—reformulating the query based on the model's own reasoning gaps. This recursive loop mirrors a legal associate's process of checking citations and filling logical holes, ensuring that every proposition in the final output is traceable to a specific, verifiable source document.
Confidence-Gated Routing
CRAG employs a dynamic routing mechanism that directs queries along different processing paths based on retrieval confidence:
- High confidence: Direct generation from retrieved documents without corrective action
- Ambiguous confidence: Knowledge graph augmentation before generation
- Low confidence: Full corrective web search pipeline This gating optimizes latency and compute cost, reserving expensive corrective operations only for queries where the initial retrieval quality is demonstrably insufficient. The routing decision is logged for observability and audit trails.
Frequently Asked Questions
Clear, technical answers to the most common questions about self-correcting retrieval-augmented generation architectures for high-stakes legal AI systems.
Corrective RAG (CRAG) is a self-reflective retrieval-augmented generation architecture that evaluates the quality of initially retrieved documents and triggers a corrective fallback—such as a web search or knowledge graph lookup—when the retrieval relevance score falls below a defined confidence threshold. The system operates in a loop: a retrieval evaluator component scores each fetched document chunk for relevance to the query, assigning confidence levels of Correct, Incorrect, or Ambiguous. If the aggregate score is low, CRAG discards the poor results and executes a corrective action. This ensures the language model only conditions its generation on high-quality, grounded evidence. In legal applications, this prevents the model from hallucinating case law based on irrelevant or tangentially related precedents, instead forcing a fresh search for binding authority before generating an answer.
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
Explore the key architectural components and related retrieval strategies that constitute the self-reflective Corrective RAG framework, designed to ensure high-fidelity legal evidence grounding.
Retrieval Quality Assessment
The core self-reflective mechanism in CRAG that evaluates the relevance of initially retrieved documents before generation. A lightweight confidence scorer classifies retrieval quality as Correct, Ambiguous, or Incorrect, triggering different downstream actions. This prevents the model from reasoning over irrelevant or misleading legal texts.
Knowledge Graph Lookup
When initial retrieval is deemed Ambiguous, CRAG triggers a structured query to a legal knowledge graph. This deterministic lookup fetches canonical entity relationships, statutory definitions, and citation links, providing a factual grounding anchor that compensates for the limitations of unstructured semantic search.
Web Search Fallback
If retrieval is scored as Incorrect, CRAG seamlessly pivots to a web-scale search for the most current public legal information. This corrective step is critical for accessing newly published opinions or regulations not yet indexed in the private vector database, ensuring the system never generates from a knowledge vacuum.
Adaptive RAG Routing
A broader architectural pattern where a query is dynamically routed to different processing paths based on assessed complexity. While CRAG corrects after retrieval, Adaptive RAG pre-classifies the query to choose between direct generation, single-hop retrieval, or multi-hop reasoning, optimizing for both latency and accuracy.
FLARE Retrieval
Forward-Looking Active REtrieval is a complementary corrective strategy that monitors generation confidence token-by-token. If the model anticipates a low-probability token, it proactively generates a search query to retrieve missing information mid-generation, correcting knowledge gaps before a hallucination occurs.
Self-RAG
A related architecture that trains an LM to adaptively retrieve passages on-demand and generate reflection tokens to critique its own outputs. Unlike CRAG's external assessment module, Self-RAG internalizes the critique, outputting tokens for relevance, support, and completeness to filter or correct its own generated text.

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