Corrective Retrieval Augmented Generation

Shi-Qi Yan, Jia-Chen Gu, Yun Zhu, Zhen-Hua Ling

Introduction

Retrieval-Augmented Generation (RAG) has become a cornerstone for grounding Large Language Models (LLMs) in factual, up-to-date information. By retrieving relevant documents from an external corpus, RAG helps mitigate hallucinations. However, standard RAG suffers from a "blind trust" problem: it assumes the retriever always provides accurate and relevant context. When the retriever fails—returning irrelevant noise or outdated facts—the LLM often incorporates this misinformation, leading to incorrect outputs. Furthermore, even relevant documents often contain excessive "fluff" that can distract the model or exceed its context window.

The CRAG Framework

To address these challenges, the authors introduce Corrective Retrieval Augmented Generation (CRAG). CRAG acts as a lightweight "sanity check" that evaluates retrieval quality and triggers corrective actions before the generation phase.

Overview of the CRAG framework, illustrating the Retrieval Evaluator, Knowledge Correction (Refinement and Searching), and final Generation stages.

The framework consists of three core components:

  1. Lightweight Retrieval Evaluator: Instead of relying on a large, computationally expensive LLM, CRAG utilizes a fine-tuned T5-large model (0.77B parameters). This evaluator assigns a confidence score to retrieved documents, categorizing them as Correct, Incorrect, or Ambiguous.
  2. Action Trigger: Based on the evaluator's score, the system selects an optimal path:
  3. Correct: The system trusts the documents but applies "Knowledge Refinement."
    • Incorrect: Internal documents are discarded in favor of a large-scale web search to find better information.
  4. Ambiguous: The system adopts a cautious approach, combining refined internal snippets with web search results to ensure comprehensive coverage.
  5. Knowledge Refinement (Decompose-then-Recompose): For useful documents, CRAG breaks them into fine-grained "knowledge strips." The evaluator then filters out irrelevant strips, reassembling only the most critical information for the generator. This reduces noise and improves focus.

Experimental Results

CRAG was evaluated across four diverse datasets: PopQA (short-form entity generation), Biography (long-form generation measured by FactScore), PubHealth (claim verification), and Arc-Challenge (multiple-choice science questions).

Performance comparison of CRAG against various baselines across four datasets. CRAG consistently shows superior performance, especially when integrated with Self-RAG (Self-CRAG).

The results demonstrate that CRAG significantly enhances robustness:

  • Accuracy Gains: On PopQA, CRAG improved accuracy by 7.0% over standard RAG. When integrated with Self-RAG (forming Self-CRAG), it outperformed the base Self-RAG by nearly 20% in specific configurations.
  • Factuality: In the Biography task, CRAG achieved a FactScore of 86.2%, a substantial leap from the 59.2% achieved by standard RAG.
  • Resilience: CRAG maintains stable performance even as the quality of the initial retriever decreases, whereas standard RAG performance typically collapses under poor retrieval conditions.

Key Insights

The "Ambiguous" action serves as a vital safety net, balancing internal knowledge with external web searches when confidence is middling. By treating the web as a strategic corrective tool rather than just a primary source, CRAG overcomes the limitations of finite local databases. Additionally, the "decompose-then-recompose" strategy highlights that noise reduction is just as important as relevance; even "correct" documents can be harmful if they contain distracting, irrelevant text.

Limitations and Future Work

Despite its success, CRAG has limitations. It relies on external web search APIs, which can introduce latency and costs. Furthermore, while the evaluator is lightweight, it requires specific fine-tuning. Future research may focus on making LLMs inherently better at self-evaluation or reducing dependency on external search engines.

Conclusion

Corrective Retrieval Augmented Generation provides a robust solution to the "blind trust" problem in RAG systems. By incorporating a lightweight evaluator and dynamic corrective actions, CRAG ensures that LLMs are grounded in high-quality, refined information, significantly reducing hallucinations and improving factual accuracy across a wide range of tasks.

Summary updated

BibTeX
@misc{yan2024corrective,
  author = {Shi-Qi Yan and Jia-Chen Gu and Yun Zhu and Zhen-Hua Ling},
  title = {{Corrective Retrieval Augmented Generation}},
  year = {2024},
  eprint = {2401.15884},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.15884},
}
Figure