In-Context Retrieval-Augmented Language Models
Языковые модели с дополнением извлечённой информацией в контексте
2023-01-01
SCID: 54.1/p2vpnf2h
Discuss with AI
document retrieval and rankingin-context RALMlanguage model groundingretrieval-augmented language modelingsource attribution
Figures from the paper
Abstract (AI)
Abstract Retrieval-Augmented Language Modeling (RALM) methods, which condition a language model (LM) on relevant documents from a grounding corpus during generation, were shown to significantly improve language modeling performance. In addition, they can mitigate the problem of factually inaccurate text generation and provide natural source attribution mechanism. Existing RALM approaches focus on modifying the LM architecture in order to facilitate the incorporation of external information, significantly complicating deployment. This paper considers a simple alternative, which we dub In-Context RALM: leaving the LM architecture unchanged and prepending grounding documents to the input, without any further training of the LM. We show that In-Context RALM that builds on off-the-shelf general purpose retrievers provides surprisingly large LM gains across model sizes and diverse corpora. We also demonstrate that the document retrieval and ranking mechanism can be specialized to the RALM setting to further boost performance. We conclude that In-Context RALM has considerable potential to increase the prevalence of LM grounding, particularly in settings where a pretrained LM must be used without modification or even via API access.1
Key Findings
1
In-Context RALM incorporates retrieved grounding documents by prepending them to the input, requiring no language-model architectural changes or additional training.
2
In-Context RALM is particularly suitable when pretrained language models cannot be modified, including deployment through API access.
3
Specializing document retrieval and ranking for the RALM setting further improves performance beyond general-purpose retrieval.
4
The approach can reduce factually inaccurate generation while naturally supporting source attribution through retrieved documents.
5
Using off-the-shelf general-purpose retrievers, In-Context RALM delivers substantial language-model performance gains across different model sizes and diverse corpora.
Research Object
In-Context Retrieval-Augmented Language Modeling (In-Context RALM) systems that prepend retrieved grounding documents to a language-model input
Research Subject
Language-modeling performance, factual accuracy, and source attribution enabled by retrieval and ranking of grounding documents without modifying or retraining the language model
Publication Details
Publication Date
2023-01-01
Journal
Publisher
ISSN
Cited by
549
Open access PDF
Access Type
Author Information
Download PDF
Subscribe to digest
References available in scid.ai6
LLaMA: Open and Efficient Foundation Language Models2023
Transformers: State-of-the-Art Natural Language Processing2020
Dense Passage Retrieval for Open-Domain Question Answering2020
Leveraging Passage Retrieval with Generative Models for Open Domain Question Answering2021
REALM: Retrieval-Augmented Language Model Pre-Training2020
Atlas: Few-shot Learning with Retrieval Augmented Language Models2022
Cited by14
Retrieval-Augmented Generation for Large Language Models: A Survey2023
Lost in the Middle: How Language Models Use Long Contexts2024
A Comprehensive Overview of Large Language Models2025
🧜Siren’s Song in the AI Ocean: A Survey on Hallucination in Large Language Models2025
Unleashing the potential of prompt engineering for large language models2025
Active Retrieval Augmented Generation2023
Retrieval-Augmented Generation for AI-Generated Content: A Survey2026
A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Models2024
Benchmarking Retrieval-Augmented Generation for Medicine2024
Almanac — Retrieval-Augmented Language Models for Clinical Medicine2024
The Power of Noise: Redefining Retrieval for RAG Systems2024
When Large Language Models Meet Vector Databases: A Survey2025
Improving accuracy of GPT-3/4 results on biomedical data using a retrieval-augmented language model2024
Retrieval-Augmented Generation: Architecture, Techniques, and Evaluations2025