Skip to main content

Envisioning is an emerging technology research institute and advisory.

LinkedInInstagramGitHub

2011 — 2026

research
  • Observatory
  • Newsletter
  • Methodology
  • Origins
  • Vocab
services
  • Signals Session
  • Bespoke Projects
  • Build Sessions
  • Use Cases
  • Readinessfree
  • Signals
  • Free scan↗free
impact
  • ANBIMAFuture of Brazilian Capital Markets
  • IEEECharting the Energy Transition
  • Horizon 2045Future of Human and Planetary Security
  • WKOTechnology Scanning for Austria
solutions
  • Innovation
  • Strategy
  • Consultants
  • Foresight
  • Associations
  • Governments
resources
  • Partners
  • Coding for Non-Coders
  • How We Work
  • Data Visualization
  • Multi-Model Method
  • FAQ
  • Security & Privacy
about
  • Manifesto
  • Community
  • Events
  • Support
  • Contact
ResearchServicesSignalsAbout
ResearchServicesSignalsAbout
  1. Home
  2. Vocab
  3. Lost-in-the-Middle

Lost-in-the-Middle

LLMs systematically underuse information positioned in the middle of long contexts.

Year: 2023Generality: 104
Back to Vocab

Lost-in-the-Middle is a documented failure mode in large language models where performance degrades when relevant information is located in the middle of a long input sequence, as opposed to near the beginning or end. Empirical studies have shown that models consistently perform better on retrieval and reasoning tasks when the key information appears at the edges of the context window, suggesting that attention mechanisms do not distribute focus uniformly across long inputs. The phenomenon was formally characterized in a 2023 paper by Liu et al., which systematically tested models across varying context lengths and key-information positions, finding a pronounced U-shaped performance curve.

The root cause lies in how transformer attention operates over long sequences. While transformers theoretically attend to all positions, in practice the attention weights learned during training tend to favor recency and primacy — patterns reinforced by the structure of training data and the way positional encodings interact with attention scores. As context length grows, the signal from middle tokens becomes increasingly diluted relative to tokens at the boundaries, making it harder for the model to surface and integrate that information during generation.

This limitation has significant practical consequences for applications that depend on processing long documents, such as multi-document question answering, legal and scientific document analysis, retrieval-augmented generation, and long-form summarization. When a system retrieves multiple passages and concatenates them as context, the ordering of those passages can dramatically affect answer quality — a subtle but critical engineering consideration that is easy to overlook.

Addressing Lost-in-the-Middle has become an active area of research. Proposed mitigations include reranking retrieved passages to place the most relevant content at context boundaries, training models with explicit objectives that reward attending to middle positions, and architectural modifications such as sliding-window attention or memory-augmented transformers. As context windows continue to expand — reaching hundreds of thousands of tokens in some models — ensuring uniform and reliable utilization of the full context remains an open and important challenge.

Research this in Signals

Scan Lost-in-the-Middle for yourself.

Signals turns a topic into a sourced research record you can inspect and rerun. Your first scan is free, and this one starts with Lost-in-the-Middle already loaded, so edit it or scan as is.