In-Context Retrieval-Augmented Language Models

Языковые модели с дополнением извлечённой информацией в контексте
Yoav Shoham, Kevin Leyton‐Brown, Ori Ram, Yoav Levine, Itay Dalmedigos, Dor Muhlgay, Amnon Shashua
2023-01-01

document retrieval and rankingin-context RALMlanguage model groundingretrieval-augmented language modelingsource attribution
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
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.

In-Context Retrieval-Augmented Language Modeling (In-Context RALM) systems that prepend retrieved grounding documents to a language-model input

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
Access Type
Author Information
Authors
Yoav Shoham
Kevin Leyton‐Brown
Ori Ram
Yoav Levine
Itay Dalmedigos
Dor Muhlgay
Amnon Shashua
Explore further
Open the scid.ai AI chat with a ready-made request: it will find papers on a similar topic and help build a literature review.
Find similar papers in the chat →
Make a presentation
100%