In-Context Retrieval-Augmented Language Models

01/31/2023
by   Ori Ram, et al.
0

Retrieval-Augmented Language Modeling (RALM) methods, that condition a language model (LM) on relevant documents from a grounding corpus during generation, have been shown to significantly improve language modeling while also providing a 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 proposes an under-explored alternative, which we dub In-Context RALM: leaving the LM architecture unchanged and prepending grounding documents to the input. We show that in-context RALM which uses 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. To that end, we make our code publicly available.

READ FULL TEXT
research
01/30/2023

REPLUG: Retrieval-Augmented Black-Box Language Models

We introduce REPLUG, a retrieval-augmented language modeling framework t...
research
10/11/2022

Decoupled Context Processing for Context Augmented Language Modeling

Language models can be augmented with a context retriever to incorporate...
research
08/15/2023

RAVEN: In-Context Learning with Retrieval Augmented Encoder-Decoder Language Models

In this paper, we investigate the in-context learning ability of retriev...
research
01/26/2017

emLam -- a Hungarian Language Modeling baseline

This paper aims to make up for the lack of documented baselines for Hung...
research
06/23/2023

Long-range Language Modeling with Self-retrieval

Retrieval-augmented language models (LMs) have received much attention r...
research
07/24/2023

RRAML: Reinforced Retrieval Augmented Machine Learning

The emergence of large language models (LLMs) has revolutionized machine...
research
04/12/2023

Galactic ChitChat: Using Large Language Models to Converse with Astronomy Literature

We demonstrate the potential of the state-of-the-art OpenAI GPT-4 large ...

Please sign up or login with your details

Forgot password? Click here to reset