Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Retrieval-Augmented Generation for Large Language Models: A Survey

Retrieval-augmented generation methods fall into three paradigms, from Naive to Modular

  • Problem Large language models hallucinate and lack knowledge beyond their training data, which limits them on knowledge-intensive tasks.
  • Method The authors sort RAG into Naive, Advanced and Modular paradigms, then review the retrieval, generation and augmentation techniques each one uses.
  • Results A cited study found that adding irrelevant documents raised accuracy by over 30%.

Why plain LLMs need outside knowledge

Large language models perform well on many tasks but fall short on domain-specific and knowledge-intensive work. When a query goes beyond the training data or needs current information, the model can produce hallucinations, meaning fluent text that is wrong.

RAG handles this by pulling document chunks from an external knowledge base. Candidates are chosen by semantic similarity to the query, and the chosen chunks are added to the model input before it answers. Because the answer can rest on external text, the chance of factually incorrect content falls.

The survey asks how the idea developed after the Transformer era, when pre-training work first added outside knowledge, and after ChatGPT, when retrieval moved into the inference stage. It covers over 100 RAG studies and groups them into three paradigms.

Three RAG paradigms and what changes between them

The earliest paradigm, Naive RAG, runs one pass of indexing, retrieval and generation. Indexing converts raw files such as PDF, HTML, Word and Markdown into plain text, splits the text into chunks and stores their embeddings in a vector database. At query time, the same embedding model encodes the question, the system scores it against the stored chunks, and the top K chunks are placed in the prompt.

The model then writes its answer from the question and these chunks.

Naive RAG has a weakness at each stage. Retrieval often has poor precision and recall, so it can pick misaligned chunks and miss key information. Generation can hallucinate, and augmentation can produce redundant or incoherent text, or output that only repeats retrieved passages. A single retrieval on the original query may also fail on complex questions.

Advanced RAG keeps the chain-like pipeline but adds work before and after retrieval. Before retrieval it refines the index with sliding windows, finer segmentation and metadata, and it rewrites or expands queries. After retrieval it reranks chunks so the most relevant ones sit near the edges of the prompt, and it compresses context to reduce information overload.

Modular RAG replaces the fixed chain with functional modules that can be swapped, added or rewired. Examples include a Search module over search engines, databases and knowledge graphs, a Memory module, Routing, a Predict module that generates context and a Task Adapter. Flows can be iterative or adaptive, as in ITER-RETGEN, FLARE and Self-RAG, which decide when retrieval is needed.

Modular RAG builds on Advanced and Naive RAG rather than discarding them.

Choices inside retrieval and generation

Most retrieval uses unstructured text, mainly Wikipedia dumps for open-domain question answering. Tables are harder to use, because text splitting can separate a table from its content and tables are awkward to match by similarity. KnowledGPT and G-Retriever work with knowledge graphs, and G-Retriever adds a Prize-Collecting Steiner Tree step to pick graph content.

Other methods have the LLM supply its own context, as GenRead does, and Selfmem builds a memory pool from its own outputs.

Retrieval units run from tokens and phrases up to propositions and whole documents. Coarse units may carry more relevant information, but they also add redundant text that can distract the retriever and the language model. Fine units are harder to retrieve reliably and may not keep enough semantic context. Fixed chunk sizes such as 100, 256 or 512 tokens are common, and Small2Big retrieves sentences but passes the surrounding sentences to the LLM as context.

Retrieval compares embeddings, for example by cosine similarity, so the embedding model shapes what is found. Hybrid retrieval combines a sparse model such as BM25 with dense retrievers, because the two capture different relevance features. REPLUG uses the LLM as a supervisory signal: it compares probability distributions over retrieved documents and trains the retriever by KL divergence.

LLMs tend to attend to the start and end of a long context and neglect the middle, so retrieved content is usually curated before generation. Reranking can be rule-based, model-based or LLM-based, and LLMLingua uses small language models to remove unimportant tokens from the prompt. RECOMP trains an information condenser with contrastive learning, using one positive and five negative samples per training data point.

In the Filter-Reranker paradigm, small models filter candidates and LLMs reorder the remaining ones.

Fine-tuning can adapt an LLM to particular data formats and output styles. RA-DIT aligns the scoring functions of retriever and generator with KL divergence.

RAG compared with fine-tuning

The survey places RAG, fine-tuning and prompt engineering on two axes: how much external knowledge is needed and how much the model must be adapted. Prompt engineering needs little of either, RAG suits precise information lookup, and fine-tuning suits reproducing a specific structure, style or format.

RAG supports real-time knowledge updates and offers interpretability, but it adds latency and raises ethical questions about retrieved data. Fine-tuning is more static, since updates need retraining, but it allows deep customisation of behaviour and style. Fine-tuning needs substantial compute for data preparation and training, and it may struggle with unfamiliar data, although it can reduce hallucinations.

A cited study compared the two across knowledge-intensive topics and found that RAG outperformed unsupervised fine-tuning for knowledge seen in training and for entirely new knowledge.

The authors treat RAG and fine-tuning as complementary rather than mutually exclusive. Their combined use may give the best performance, but reaching a satisfactory result can take several iterations.

How RAG systems are evaluated

Task-level metrics are the usual starting point: EM and F1 for question answering, Accuracy for fact checking, and BLEU and ROUGE for answer quality. The authors observe that research concentrates on methods, with little work on the characteristics specific to evaluating RAG models.

Retrieval quality is measured with search and recommendation metrics such as Hit Rate, MRR and NDCG. Generation quality is split by content type: for unlabelled content it covers faithfulness, relevance and non-harmfulness, and for labelled content it focuses on accuracy. Both can be assessed manually or automatically.

Three quality scores are used: context relevance, answer faithfulness and answer relevance. Context relevance and noise robustness bear mainly on retrieval, while the other abilities bear mainly on generation.

The survey covers 26 tasks and nearly 50 datasets for assessing RAG. RGB, RECALL and CRUD are benchmarks for the abilities of RAG models, while RAGAS, ARES and TruLens are tools that use LLMs to judge quality scores. Table III lists the traditional metrics that fit each aspect, and the authors state that these do not yet form a mature or standardised approach.

Limits the authors point to

The authors name weak precision and recall, hallucination and overreliance on retrieved text as problems of Naive RAG. Structured databases need effort to build, validate and maintain, and coarse retrieval units can add redundancy.

A cited study by Cuconasu et al. analysed document type, relevance, position and number, and found that including irrelevant documents could raise accuracy by over 30%. That result runs against the expectation that irrelevant documents lower quality, and the authors use it to call for further robustness research.

LLMs can now manage contexts exceeding 200,000 tokens, which raises the question of whether RAG is still needed. The authors argue RAG stays useful because large contexts slow inference, and because retrieved references let users check answers while long-context generation remains hard to inspect.

The evaluation material in this excerpt summarises tasks, metrics and tools from prior work.

Paper info

Authors
Yunfan Gao, Yun Xiong, Xinyu Gao, Kangxiang Jia, Jinliu Pan, Yuxi Bi, Yi Dai, Jiawei Sun, Meng Wang, Haofen Wang
Venue
arXiv · Preprint
First published
2023-12-18
Added
2026-11-11
Updated
2024-3-27
Version
v5
arXiv
2312.10997
Category
cs.CL · cs.AI
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Yunfan Gao, Yun Xiong, Xinyu Gao, Kangxiang Jia, Jinliu Pan, Yuxi Bi, Yi Dai, Jiawei Sun, Meng Wang, Haofen Wang (2023). Retrieval-Augmented Generation for Large Language Models: A Survey. arXiv:2312.10997v5. https://arxiv.org/abs/2312.10997v5

BibTeX
@misc{gao2023retrieval,
  title = {{Retrieval-Augmented Generation for Large Language Models: A Survey}},
  author = {Yunfan Gao and Yun Xiong and Xinyu Gao and Kangxiang Jia and Jinliu Pan and Yuxi Bi and Yi Dai and Jiawei Sun and Meng Wang and Haofen Wang},
  year = {2023},
  eprint = {2312.10997},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.10997v5}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up