Lost in the Middle: How Language Models Use Long Contexts

07/06/2023
by   Nelson F. Liu, et al.
0

While recent language models have the ability to take long contexts as input, relatively little is known about how well the language models use longer context. We analyze language model performance on two tasks that require identifying relevant information within their input contexts: multi-document question answering and key-value retrieval. We find that performance is often highest when relevant information occurs at the beginning or end of the input context, and significantly degrades when models must access relevant information in the middle of long contexts. Furthermore, performance substantially decreases as the input context grows longer, even for explicitly long-context models. Our analysis provides a better understanding of how language models use their input context and provides new evaluation protocols for future long-context models.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/15/2021

What Context Features Can Transformer Language Models Use?

Transformer-based language models benefit from conditioning on contexts ...
research
09/01/2023

BatchPrompt: Accomplish more with less

As the ever-increasing token limits of large language models (LLMs) have...
research
08/28/2023

LongBench: A Bilingual, Multitask Benchmark for Long Context Understanding

Although large language models (LLMs) demonstrate impressive performance...
research
01/31/2023

Large Language Models Can Be Easily Distracted by Irrelevant Context

Large language models have achieved impressive performance on various na...
research
12/18/2022

Language model acceptability judgements are not always robust to context

Targeted syntactic evaluations of language models ask whether models sho...
research
10/08/2022

KALM: Knowledge-Aware Integration of Local, Document, and Global Contexts for Long Document Understanding

With the advent of pre-trained language models (LMs), increasing researc...
research
12/30/2022

Black-box language model explanation by context length probing

The increasingly widespread adoption of large language models has highli...

Please sign up or login with your details

Forgot password? Click here to reset