Context rot

Context rot is the decline in a language model's accuracy and reliability as the amount of text in its context window grows, even when the task itself stays simple.

Model makers advertise ever larger context windows, and a model that accepts a very long input will process all of it. That does not mean it uses all of it equally well. Context rot is the informal name for the gap: as more tokens are added, answers become less accurate and less consistent, and the decline sets in long before the window is full.

The term is the title of a technical report from the company Chroma, published on July 14, 2025 by Kelly Hong, Anton Troynikov and Jeff Huber. They tested 18 models, including GPT-4.1, Claude Opus 4, Gemini 2.5 Pro and Qwen3-235B, on deliberately simple tasks while increasing input length. Performance became less reliable as inputs grew. It fell faster when the question and the relevant passage were phrased differently, and distracting passages that looked relevant did more damage the longer the input. On a conversational memory test, models did much better with a short, focused prompt than with the full history of about 113,000 tokens.

Some results were odd. Haystacks of shuffled sentences gave better results than coherent text, which suggests the structure of the surrounding material affects how a model searches it. In a task asking models to copy long runs of repeated words with one different word inserted, output quality fell with length, with models refusing, producing random words or putting the different word in the wrong place.

Anthropic's engineering team gives part of the explanation. In a transformer every token attends to every other token, so the number of pairwise relationships grows with the square of the input and the model's attention is spread thinner. Models have also seen fewer very long sequences during training. Anthropic describes the result as a gradual decline across models rather than a sudden cliff.

The practical advice is to treat context as a limited resource. Give a model the material it needs rather than everything available, put long documents first and the question last, summarise or start a fresh session when a conversation grows long, and test on inputs as long as the ones you will really use. Simple needle-in-a-haystack scores, where the question shares exact words with the hidden fact, can make long-context performance look better than it is in everyday use.

Common questions

What causes context rot?

In a transformer each token attends to every other, so attention is spread more thinly as input grows, and models see fewer very long examples in training. Chroma's 2025 study also found that distracting, similar-looking passages and loose wording between question and answer make the decline worse.

Does a bigger context window fix context rot?

No. A bigger window raises how much a model can accept, not how well it uses it. Chroma tested 18 recent models in 2025 and found performance became less reliable as inputs grew, even on simple tasks.

How can I avoid context rot?

Keep inputs focused: retrieve only relevant material, summarise long conversations or start new ones, and place long documents before your question. Agent builders use compaction, notes stored outside the context and sub-agents with separate windows for the same reason.

Is context rot the same as "lost in the middle"?

They are related. Lost in the middle, from a 2023 paper, is about position: models use information at the start and end of a long input better than in the middle. Context rot is about length more broadly: performance degrades as input grows, wherever the key information sits.

Finding more

Search for "context rot", "long-context evaluation" or "effective context length" to find studies of how models handle long inputs. The best sources are technical reports and papers that publish their test data and code, and engineering guidance from model makers on structuring long prompts. Be cautious with headline context window sizes and single needle-in-a-haystack scores in product announcements, since they measure what a model can accept rather than how well it reasons over it.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.