Source-linked AI summary
A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Models
Wenqi Fan, Yujuan Ding, Liangbo Ning, Shijie Wang, Hengyun Li, Dawei Yin, Tat-Seng Chua, Qing Li
TL;DR
LLMs can hallucinate or lack up-to-date internal knowledge, motivating RA-LLMs that incorporate external information. This survey synthesizes RA-LLM architectures, training strategies, and applications, while reviewing challenges and future directions. It concludes that RAG is being used across diverse applications to supplement LLM generation and address these limitations.
Problem
LLMs face limitations including hallucinations and outdated internal knowledge, while retrieval-augmented systems can also be misled by irrelevant or low-quality external knowledge.
Method
The survey reviews RA-LLMs across architectures, training strategies, application areas, retrieval processes, generation, augmentation, and retrieval necessity.
Results
The survey synthesizes representative RA-LLM methods and applications, including retrieval-based approaches for question answering, scientific tasks, molecular discovery, and conversational systems.
Takeaways & Limitations
RA-LLMs use external knowledge to augment LLM generation across applications, but reliable use requires attention to retrieval relevance, knowledge quality, trustworthiness, and privacy.
Takeaways & Limitations
RA-LLMs remain vulnerable to unreliable external knowledge, malicious or unintended manipulation, and leakage from private retrieval databases.
Abstract
from arXiv · showhide
As one of the most advanced techniques in AI, Retrieval-Augmented Generation (RAG) can offer reliable and up-to-date external knowledge, providing huge convenience for numerous tasks. Particularly in the era of AI-Generated Content (AIGC), the powerful capacity of retrieval in providing additional knowledge enables RAG to assist existing generative AI in producing high-quality outputs. Recently, Large Language Models (LLMs) have demonstrated revolutionary abilities in language understanding and generation, while still facing inherent limitations, such as hallucinations and out-of-date internal knowledge. Given the powerful abilities of RAG in providing the latest and helpful auxiliary information, Retrieval-Augmented Large Language Models (RA-LLMs) have emerged to harness external and authoritative knowledge bases, rather than solely relying on the model's internal knowledge, to augment the generation quality of LLMs. In this survey, we comprehensively review existing research studies in RA-LLMs, covering three primary technical perspectives: architectures, training strategies, and applications. As the preliminary knowledge, we briefly introduce the foundations and recent advances of LLMs. Then, to illustrate the practical significance of RAG for LLMs, we systematically review mainstream relevant work by their architectures, training strategies, and application areas, detailing specifically the challenges of each and the corresponding capabilities of RA-LLMs. Finally, to deliver deeper insights, we discuss current limitations and several promising directions for future research. Updated information about this survey can be found at https://advanced-recommender-systems.github.io/RAG-Meets-LLMs/
1 INTRODUCTION
LLMs provide strong language understanding and generation but can struggle with out-of-scope, unreliable, or outdated knowledge. This survey reviews how RAG augments LLMs through architectures, training strategies, and applications.
- Retrieval-Augmented Generation: RAG retrieves relevant external documents and uses them as context to enhance the generation process.The approach can be adapted to various generation tasks by modifying the retrieval component.
- Motivation: LLMs demonstrate strong language understanding and generation but may perform poorly on queries requiring unseen or up-to-date information.RAG addresses this by supplying relevant information from external databases.
- Applications: RAG has been applied to scientific question answering, molecular discovery, and conversational systems requiring reliable or current knowledge.The cited examples include dynamically retrieving scientific literature, enhancing ChatGPT’s molecular-discovery in-context learning, and reducing conversational hallucinations.
- Survey Scope: The survey systematically reviews RA-LLMs through architecture, training-strategy, and application perspectives.Its architecture review covers retrieval, generation, augmentation, and retrieval necessity; later sections address training techniques, applications, challenges, and future directions.
- Survey Scope: Unlike related surveys with narrower or broader RAG emphases, this survey organizes RA-LLM research by architecture, training paradigm, and application tasks.The comparison is explicitly framed as a distinction from surveys focused on multimodal RAG, AIGC, or general RAG for LLMs.
2 BACKGROUND
The background introduces LLMs, prompting, and in-context learning before motivating RAG as a way to address insufficient demonstrations and missing task knowledge. It also situates RAG and RA-LLM methods by design focus and impact.
- Large Language Models: LLMs are foundation models pretrained on extensive data with billion-level parameters for human-like text understanding and generation.The background notes their use across tasks including text generation and information retrieval.
- Research Landscape: Figure 2 organizes RAG and RA-LLM methods by design focus, proposal time, and citation-based impact.The figure’s author, year, and model labels identify the corresponding references.
- Prompting Engineering: Prompt learning guides LLMs through designed inputs rather than extensive fine-tuning.Manual templates can lack effectiveness guarantees, motivating trainable continuous prompt embeddings such as prefix prompts.
- In-Context Learning: In-context learning provides a few task demonstrations within the prompt so pretrained LLMs can solve novel tasks without fine-tuning.Its effectiveness depends heavily on demonstration quality and available task information.
- Retrieval-Augmented Generation: RAG is introduced to address cases where demonstrations are suboptimal or lack the information needed for accurate responses.It integrates retrieval with generation to provide additional knowledge for the model.
3 RETRIEVAL-AUGMENTED LARGE LANGUAGE MODELS (RA-LLMS)
The RA-LLM framework comprises retrieval, generation, augmentation, and a mechanism for deciding whether retrieval is needed. The section introduces techniques associated with each process.
- Framework Overview: The RAG framework for LLMs consists of retrieval, generation, augmentation, and retrieval-necessity determination.These processes define the main technical components reviewed in the section.
3.1 Retrieval
Retrieval supplies relevant external information to RA-LLMs through sparse or dense retrievers, with choices about indexed granularity and pre- or post-retrieval processing. These designs affect relevance, efficiency, and compatibility with generation.
- Retriever Type: RA-LLM retrieval measures query-document relevance using sparse or dense information encoding, with optional pre- and post-retrieval procedures.Sparse retrieval is word-based, whereas dense retrieval embeds queries and documents into vector spaces.
- Retriever Type: DPR fine-tuning on target datasets outperformed both untuned Contriever and BM25 for open-domain QA with InstructGPT.Contriever without fine-tuning achieved comparable performance to BM25, but both were worse than fine-tuned DPR.
- Retrieval Granularity: Retrieval granularity determines the indexed unit, including documents, passages, tokens, and entities, influencing database storage and search computation.Text chunks commonly balance compact information against redundancy and irrelevance, while token retrieval suits rare patterns or out-of-domain data.
- Pre-retrieval and Post-retrieval Enhancement: Pre-retrieval methods rewrite, expand, or augment queries, while post-retrieval methods rerank, filter, compress, or otherwise process retrieved documents before generation.These strategies aim to improve query disambiguation, retrieval-generation alignment, and robustness against irrelevant or noisy knowledge.
- Pre-retrieval and Post-retrieval Enhancement: Query augmentation achieved overall better performance among query-enhancement strategies by combining the original query with preliminary generated outputs.The combined query is used to retrieve information that can help the model rethink and improve its generated results.
3.2 Generation
RA-LLM generators are organized by whether their parameters are accessible and by their dominant architecture. White-box generators can be optimized for retrieval integration, whereas black-box generators accept inputs and return outputs without internal modification.
- Generator Architectures: Decoder-only and encoder-decoder structures are the two dominant generator architectures for most text-generation tasks.Encoder-decoder models connect input and target representations through cross-attention, while decoder-only models concatenate them.
- Parameter Accessibility: White-box generators expose parameters for optimization, enabling adaptation to different retrieval and augmentation approaches.Their parameter accessibility supports training for improved generation performance.
- Parameter Accessibility: Black-box generators do not disclose internal structures or permit parameter updates, allowing only input queries and output responses.The survey identifies GPT series, Codex, and Claude as examples of such models.
3.3 Retrieval Integration for Generation Augmentation
Augmentation integrates retrieved information with generation at the input, output, or intermediate generator layers. These designs trade integration simplicity and flexibility against document limits or added model complexity.
- Augmentation Designs: Augmentation is the essential RA-LLM process that connects retrieval with generation at input, output, or intermediate layers.The three designs differ in where retrieved information enters the generator.
- Input-layer Integration: Input-layer integration concatenates retrieved documents with the original query as a joint generator input.Its effectiveness is limited by the number of retrieved documents that can be included.
- Input-layer Integration: Prompt retrieval uses retrieved natural-language prompts or demonstrations to support in-context learning and reasoning without delicate prompt engineering.It can boost the zero-shot ability of LLMs.
- Output-layer Integration: Output-layer integration combines retrieval and generation results, such as by interpolating language-model and nearest-neighbor next-token distributions.Linear integration can plug into most generation models without additional training.
- Intermediate-layer Integration: Intermediate-layer integration inserts retrieved information into internal generator layers through a semi-parametric module, adding complexity while offering training-based capability enhancement.A Transformer module is typically introduced to leverage encoded retrieved information.
3.4 Retrieval Augmentation Necessity and Frequency
RA-LLMs must decide when and how often to retrieve because irrelevant knowledge can override correct internal knowledge, while insufficient retrieval may leave long outputs unsupported. Retrieval frequency therefore creates an efficiency–effectiveness trade-off.
- Retrieval Necessity: Irrelevant retrieved passages can make LLMs produce incorrect responses, so robust RA-LLMs should selectively incorporate external information when necessary.A human-annotated evaluation found that LLMs may double their hallucination rate on non-relevant retrieved passages compared with relevant ones.
- Retrieval Necessity: Existing methods assess retrieval necessity from preliminary answers or internal reasoning, including Self-RAG’s special tokens and iterative prompts.These methods control whether additional information or retrieval actions are invoked during generation.
- Retrieval Frequency: Retrieval frequency controls reliance on retrieved information and affects both model efficiency and effectiveness.Common settings are one-time, every-n-token, and every-token retrieval.
- Retrieval Frequency: More frequent retrieval can improve performance but increases computing cost, making retrieval frequency a trade-off between the two.In-generation retrieval is useful when one-time pre-retrieved documents cannot support the whole output sequence.
4 RA-LLMS TRAINING
RA-LLM training methods divide into training-free and training-based approaches. Training-based methods are further organized by whether retriever and generator training is independent, sequential, or joint.
- Training-free: Training-free methods insert retrieved knowledge into prompts during inference without extra training, making them computationally efficient.Their limitation is that retriever and generator components are not specifically optimized for downstream tasks.
- Training-based: Independent training trains retriever and generator separately, sequential training trains one module before freezing it while tuning the other, and joint training optimizes both simultaneously.These categories differ in the degree of coordination between retrieval and generation during training.
- Motivation: Retrieval mechanisms help LLMs acquire external knowledge without frequently fine-tuning knowledge stored in model parameters.Frequent fine-tuning is challenging because it requires considerable time and computational resources.
- Training-based: Training-based approaches fine-tune retrieval and generation components to enhance generation performance.They comprise independent, sequential, and joint training strategies.
- Training-free: Training-free retrieval can either refine the original prompt or calibrate token generation with retrieved information.Prompt-based methods combine retrieved texts with the original query, while token-generation methods adjust the model’s output distribution.
4.2 Independent Training
Independent training treats the retriever and LLM as separate training processes. This approach improves how models use external knowledge while preserving offline training and off-the-shelf model use.
- Definition: Independent training trains the retriever and LLM as entirely separate processes without interaction during training.The components therefore do not coordinate their optimization objectives.
- Effect: Training the LLM to leverage retrieved knowledge or the retriever to bridge retrieval and generation can enhance RAG-empowered model performance.The passage presents these as two ways independent training improves the interaction between external knowledge and generation.
- Efficiency: Retrievers and generators can be trained offline, allowing off-the-shelf models to be used without extra training costs.This makes independent training an efficient way to exploit external knowledge during generation.
4.3 Sequential Training
Sequential training coordinates retriever and generator development by training one module first and fixing it while tuning the other. Joint training instead optimizes both components simultaneously in an end-to-end paradigm.
- Sequential Training: Sequential training first independently pre-trains either the retriever or generator, then fixes that module while training the other.The trainable component benefits from assistance provided by the fixed component.
- Sequential Training: Sequential approaches are divided into Retriever First and LLMs First according to the order of module training.Existing models such as BERT, CLIP, and T5 can serve directly as fixed components.
- Retriever First: Retriever-First methods fix a pretrained retriever and train LLMs to incorporate retrieved knowledge into predictions.RETRO uses an independently pretrained BERT retriever with an encoder-decoder trained to integrate retrieval chunks.
- LLMs First: LLM-First methods use a trained language model to supervise subsequent retriever tuning through signals such as attention scores or generated labels.DKRR derives synthetic document-relevance labels from a sequence-to-sequence reader, while AAR uses a small language model for supervision.
- Joint Training: Joint training optimizes retriever and generator simultaneously, strengthening both external-knowledge retrieval and retrieved-information use.RAG jointly trains the two components by minimizing negative log-likelihood.
5 APPLICATIONS
RA-LLMs are applied across NLP applications, downstream tasks, and domain-specific settings. The survey highlights uses in question answering, conversational systems, verification, recommendations, software engineering, science, and finance.
- NLP Applications: NLP applications include question answering, chatbots, and fact verification.These applications use retrieval to supplement language generation with relevant external knowledge or evidence.
- Question Answering: In question answering, RA-LLMs retrieve and synthesize relevant information to produce coherent, contextually relevant answers.REALM retrieves from a large corpus during pre-training, fine-tuning, and inference, while Fusion-in-Decoder fuses retrieved passages with questions.
- Chatbots: For chatbots, RA-LLMs retrieve external and dynamically changing information to support more engaging, context-rich conversations.Some systems retrieve from internet search and search engines when generating responses.
- Fact Verification: Fact-verification systems use retrieved evidence, including self-reflective assessment of its helpfulness and reliability, to improve verification accuracy.Self-RAG incorporates a mechanism that evaluates whether retrieved information is useful and reliable.
- Downstream Tasks: Downstream applications include personalized recommendation and software-engineering tasks such as code generation, program repair, tabular processing, and Text-to-SQL.Recommendation methods retrieve knowledge or collaborative information, while software tools retrieve code or summaries from codebases.
- Domain-Specific Applications: Domain-specific applications include molecular and protein tasks in AI for Science and information-intensive financial analysis.Finance systems retrieve external news and social-media information for financial sentiment analysis and other financial question-answering tasks.
6 FUTURE CHALLENGES AND OPPORTUNITIES
The survey identifies trustworthiness and external-knowledge quality as central challenges for RA-LLMs, alongside future research opportunities in an early-stage field.
- Future Research: Because RA-LLM research remains in an early stage, the survey presents potential directions for future investigation.The paper frames future research directions as opportunities for continued development of RA-LLMs.
- Trustworthy RA-LLMs: RA-LLMs require robustness, fairness, explainability, and privacy to mitigate unreliable decisions, human harm, and private-database leakage.The survey highlights malicious or inadvertent manipulation, safety-critical consequences, and privacy risks as motivations for trustworthy systems.
- Quality of External Knowledge: Variable reliability and factual accuracy in external corpora such as Wikipedia can mislead generation and reduce output quality.Filtering low-quality or unreliable information is presented as a way to support more accurate and reliable outputs.
7 CONCLUSION
The survey reviews how retrieval-augmented large language models address hallucinations and outdated internal knowledge through external information. It organizes research by architecture, training strategy, and application area, and discusses limitations and future directions.
- Conclusion: RAG has achieved success across recommendation, molecule generation, protein representation, and software engineering by supplying supplementary information for generation.The conclusion attributes these gains to retrieval’s ability to provide additional information that enhances generation performance.
- Conclusion: The survey systematically reviews RA-LLMs from the perspectives of architecture, training strategy, and application area.It aims to provide researchers with an in-depth understanding of the rapidly developing field.
- Conclusion: The paper also discusses current limitations and potential directions for future RA-LLM research.These directions reflect that RA-LLM studies are still in an early stage.