Lost in the Middle: How Language Models Use Long Contexts

Author:

Liu Nelson F.1,Lin Kevin2,Hewitt John3,Paranjape Ashwin45,Bevilacqua Michele4,Petroni Fabio4,Liang Percy3

Affiliation:

1. Stanford University, USA. nfliu@cs.stanford.edu

2. University of California, Berkeley, USA

3. Stanford University, USA

4. Samaya AI, UK

5. Samaya AI, USA

Abstract

Abstract 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.

Publisher

MIT Press

Reference47 articles.

1. Where to stop reading a ranked list? Threshold optimization using truncated score distributions;Arampatzis,2009

2. Longformer: The long-document transformer;Iz;ArXiv:2004.05150,2020

3. Scaling instruction-finetuned language models;Chung;ArXiv:2210.11416,2022

4. Transformer-XL: Attentive language models beyond a fixed-length context;Dai,2019

5. Frustratingly short attention spans in neural language modeling;Daniluk,2017

Cited by 38 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. SelfCP: Compressing over-limit prompt via the frozen large language model itself;Information Processing & Management;2024-11

2. Neurosymbolic Repair of Test Flakiness;Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis;2024-09-11

3. Guardian: A Runtime Framework for LLM-Based UI Exploration;Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis;2024-09-11

4. Enhancing RAG Performance Through Chunking and Text Splitting Techniques;International Journal of Scientific Research in Computer Science, Engineering and Information Technology;2024-09-10

5. Language Model Crossover: Variation through Few-Shot Prompting;ACM Transactions on Evolutionary Learning and Optimization;2024-09-05

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3