PhyseaWiki How AI actually works physea.ai →

Context windows

Do bigger context windows mean the model uses all of it well?

Long-context models now hold a million tokens or more, but a bigger window is not used evenly. Models tend to find information at the start and end of the context better than information buried in the middle.

Last updated 2026-07-25 · Physea Labs

Windows have grown a lot. Google DeepMind’s Gemini 1.5 report describes models “capable of recalling and reasoning over fine-grained information from millions of tokens of context” and reports “near-perfect recall (>99%) up to at least 10M tokens” on a retrieval test where a single fact is hidden in a very long input.[1] So a model can, in the right test, find a needle in a haystack of millions of tokens.

A bigger window is not used evenly, though. The study “Lost in the Middle” examined how models handle information placed at different spots in a long input and found 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.”[2] The authors note this held “even for explicitly long-context models.”[2] A document can be inside the window and still get less attention because of where it sits.

Anthropic’s documentation makes a related point about quantity: “more context isn’t automatically better,” and “as token count grows, accuracy and recall degrade, a phenomenon known as context rot.”[3] The practical takeaway is that what you put in the window, and where, matters as much as how much fits. Putting the most important material near the start or end, and trimming what the model does not need, tends to help.

Researchers do not have full agreement on why the effect is shaped this way, but two candidate explanations come up often: positional encodings make it harder for attention to resolve a precise relative distance once two tokens are far apart, and causal masking means early tokens accumulate attention from every token that follows them, while tokens stuck in the middle compete for a limited attention budget from both directions at once. Whatever the exact mechanism, the practical shape of the problem is what a prompt writer has to work around day to day; the prompting section covers that from the writing side, not the architecture side.

Tested capacity – >99% recall on a single planted fact– Held up to 10M tokens– Best case, one needle, one haystack Real-world usage – Start and end favored over the middle– More tokens can mean worse recall– Anthropic calls this context rot
Near-perfect recall on an isolated planted fact is not the same test as using a full window of real, related content well.

References

  1. Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context (arXiv:2403.05530) — Google DeepMind
  2. Lost in the Middle: How Language Models Use Long Contexts (arXiv:2307.03172) — Liu et al. (TACL 2024)
  3. Context windows (Claude API docs) — Anthropic