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
408
Open access PDF
Access Type
Author Information
Download PDF
Subscribe to digest
References available in scid.ai5
Transformers: State-of-the-Art Natural Language Processing2020
LLaMA: Open and Efficient Foundation Language Models2023
Dense Passage Retrieval for Open-Domain Question Answering2020
Leveraging Passage Retrieval with Generative Models for Open Domain Question Answering2021
Atlas: Few-shot Learning with Retrieval Augmented Language Models2022
Cited by5
Lost in the Middle: How Language Models Use Long Contexts2024
A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Models2024
Unleashing the potential of prompt engineering for large language models2025
The Power of Noise: Redefining Retrieval for RAG Systems2024
Improving accuracy of GPT-3/4 results on biomedical data using a retrieval-augmented language model2024