Lost in the Middle: How Language Models Use Long Contexts

By Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, Percy Liang. 2023

4,355 citations recorded by the source corpus.

While recent language models have the ability to take long contexts as input, relatively little is known about how well they use longer context. We analyze the performance of language models on two tasks that require identifying relevant information in their input contexts: multi-document question answering and key-value retrieval. We find that performance can degrade significantly when changing the position of relevant information, indicating that current language models do not robustly make use of information in long input contexts. In particular, we observe 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, 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 language models.

Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, Large Language Models, Prompting & Reasoning

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Mohit Bansal
  2. Jianfeng Gao
  3. Luke S. Zettlemoyer
  4. Quoc V. Le
  5. Yoshua Bengio
  6. Kyunghyun Cho
  7. Percy Liang
  8. Caiming Xiong

In Computer Vision and Pattern Recognition

  1. Luc Van Gool
  2. Dacheng Tao
  3. Ming-Hsuan Yang
  4. Trevor Darrell
  5. Xiaogang Wang
  6. Jitendra Malik
  7. Andrew Zisserman
  8. Alan L. Yuille

In Large Language Models

  1. Xiao Liu
  2. Julian McAuley
  3. Ion Stoica
  4. Naman Jain
  5. Canwen Xu
  6. Tianjun Zhang
  7. Aleksandra Piktus
  8. Matei A. Zaharia

In Prompting & Reasoning

  1. Matei A. Zaharia
  2. Mohit Bansal
  3. Patrick Lewis
  4. Donald Metzler
  5. Xiao Liu
  6. Sheng Shen
  7. Tim Rocktaschel
  8. Arash Vahdat

Citations in the corpus