Corrective Retrieval Augmented Generation

Shi-Qi Yan, Jia-Chen Gu, Yun Zhu, Zhen-Hua Ling
1/29/2024
cs.CL

No official code found. Best implementation: HuskyInSalt/CRAG (465 stars, last commit 2024-10-08). 1 more below.

Abstract

Large language models (LLMs) inevitably exhibit hallucinations since the accuracy of generated texts cannot be secured solely by the parametric knowledge they encapsulate. Although retrieval-augmented generation (RAG) is a practicable complement to LLMs, it relies heavily on the relevance of retrieved documents, raising concerns about how the model behaves if retrieval goes wrong. To this end, we propose the Corrective Retrieval Augmented Generation (CRAG) to improve the robustness of generation. Specifically, a lightweight retrieval evaluator is designed to assess the overall quality of retrieved documents for a query, returning a confidence degree based on which different knowledge retrieval actions can be triggered. Since retrieval from static and limited corpora can only return sub-optimal documents, large-scale web searches are utilized as an extension for augmenting the retrieval results. Besides, a decompose-then-recompose algorithm is designed for retrieved documents to selectively focus on key information and filter out irrelevant information in them. CRAG is plug-and-play and can be seamlessly coupled with various RAG-based approaches. Experiments on four datasets covering short- and long-form generation tasks show that CRAG can significantly improve the performance of RAG-based approaches.

View on arXivView PDF

Code Implementations(2)

HuskyInSalt/CRAGCommunity100%

Corrective Retrieval Augmented Generation

46552Shell, PythonJan 29, 20242 years ago
MIT

CRAG API é uma API RESTful desenvolvida utilizando o conceito de Corrective Retrieval-Augmented Generation.

83Shell, PythonJan 7, 20251 years agoMIT

Cite this paper

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

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2401.15884.svg)](https://codeofpaper.com/paper/2401.15884)

Discussion