Lost in the Middle
Lost in the Middle is a research concept in the field of large language models (LLMs) referring to the phenomenon whereby models exhibit reduced attention and lower utilization of information positioned in the middle of a long input sequence. Identified through academic research, the concept reveals that models tend to process information at the beginning and end of a context more effectively, while showing a tendency to overlook critical content in the middle, making it an important reference for evaluating long-context comprehension capabilities.
Core Facts
LLMs exhibit a 'Lost in the Middle' phenomenon, where the model pays more attention to information at the beginning and end of the context while tending to overlook information in the middle.
When key information is placed in the middle of a long text, the model's retrieval and reasoning accuracy drops significantly, while information placed at the beginning or end can be utilized more effectively.
研究表明当上下文过长时,模型对中间部分信息的注意力会显著下降,即"Lost in the Middle"现象
Timeline (last 90 days)
The authors of "Lost in the Middle" explicitly treat the position effect as a hypothesis yet to be verified, rather than a universal conclusion that holds for all current models.
Multiple studies show that when the context window expands from zero tokens to 256K tokens, the model's accuracy in solving problems actually declines.
Context has three kinds of limits: the hard limit (an error is thrown when the context window is exceeded), the economic limit (cost and time to first token grow with tokens), and the quality limit (the longer the context, the worse the model utilizes it; the "Lost in the Middle" study shows that models utilize information at the beginning and end of a long context better and information in the middle worse).
The Lost in the Middle phenomenon was revealed by a 2024 joint study by Stanford and UC Berkeley, and its mechanism is related to the U-shaped distribution of attention weights.
Experimental method to verify the impact of position on model output: take a question with a known answer, run it once each with the correct answer passage placed at the beginning, middle, and end of the context, and if the answers are inconsistent, it indicates a position sensitivity problem.
Larger context windows (16K, 100K) do not solve the lost-in-the-middle problem, with performance almost identical to shorter-window versions.
Newer models perform significantly better than 2023 models on simple "needle in a haystack" tests, but positional effects have not disappeared in real multi-document tasks.
The most informative content should be placed at the beginning and end of long prompts, not crammed only into the middle.
A model's utilization of context follows a U-shaped curve: accuracy is highest at the beginning (primacy bias), second highest at the end (recency bias), with a notable dip in the middle.
The 'Lost in the Middle' phenomenon was systematically documented in a 2023 paper, describing how models' attention to content in the middle positions drops significantly as the number of documents in the context increases.
17 more timeline events
All Facts (20)
LLMs exhibit a 'Lost in the Middle' phenomenon, where the model pays more attention to information at the beginning and end of the context while tending to overlook information in the middle.
90%VerifiedWhen key information is placed in the middle of a long text, the model's retrieval and reasoning accuracy drops significantly, while information placed at the beginning or end can be utilized more effectively.
85%Verified研究表明当上下文过长时,模型对中间部分信息的注意力会显著下降,即"Lost in the Middle"现象
80%VerifiedResearch shows that large language models exhibit a significant "Lost in the Middle" phenomenon when processing long texts, retaining information from the beginning and end of the input text well, but showing a marked decline in attention to information in the middle.
80%Verified斯坦福大学2023年发表了研究论文《Lost in the Middle》,实验证明当关键信息被放置在长上下文的中间位置时,模型的检索准确率会大幅下降
80%VerifiedWhen processing very long contexts, models exhibit a "Lost in the Middle" phenomenon, whereby they tend to make better use of information at the beginning and end of the context.
75%VerifiedStanford University's 2023 "Lost in the Middle" study (Liu et al.) showed that when key information is located in the middle section of the context, the model's retrieval accuracy drops approximately 20–30 percentage points compared to the head and tail, and this is especially significant when the context exceeds 32K tokens.
70%VerifiedThe "Lost in the Middle" effect refers to the phenomenon where models pay less attention to content injected into the middle positions of the context than to content at the beginning and end.
70%VerifiedThe 'Lost in the Middle' phenomenon was first systematically validated by Nelson F. Liu et al. from Stanford University in a 2023 paper.
70%VerifiedThe 'Lost in the Middle' phenomenon was confirmed by research from Stanford and other institutions.
65%VerifiedResearch has found that large models perform best when key information is located at the beginning or end of the context, and performance drops significantly when it is in the middle, with accuracy declining by more than 20 percentage points on certain tasks.
65%VerifiedModels' recall of content at the beginning and end of the context window is significantly better than that of the middle portion, a phenomenon known as the "Lost in the Middle" problem.
65%VerifiedLarge language models exhibit a 'Lost in the Middle' phenomenon in long contexts, where the weight of the original task goal in the attention mechanism becomes diluted (Liu et al., 2023).
65%VerifiedThe Transformer architecture has a "Lost in the Middle" effect, where the model retains content from the beginning and end of a conversation well, but tends to lose the middle portion.
65%UnverifiedRAG systems suffer from the 'Lost in the Middle' problem, where models tend to ignore information in the middle of a long context and favor the beginning and end.
60%UnverifiedLLMs exhibit a "Lost in the Middle" phenomenon when processing ultra-long contexts, where the effective recall rate of information in the middle segment may drop by more than 40%.
60%UnverifiedA 2023 Stanford University paper titled 'Lost in the Middle' found that models pay significantly less attention to information in the middle of the context window than at the beginning and end, exhibiting a U-shaped attention distribution.
60%Unverified斯坦福大学2023年的研究将Transformer在处理超长上下文时对中间位置信息遗忘率显著高于首尾位置的现象命名为'Lost in the Middle'问题
60%UnverifiedThe authors of "Lost in the Middle" explicitly treat the position effect as a hypothesis yet to be verified, rather than a universal conclusion that holds for all current models.
50%UnverifiedMultiple studies show that when the context window expands from zero tokens to 256K tokens, the model's accuracy in solving problems actually declines.
50%