What is context rot?
Context rot is the decline in large language model performance as input tokens increase even at constant task difficulty, a decline that is often uneven. It contradicts the assumption that the 10,000th token is handled as reliably as the 100th.
Lost in the middle is a position effect; context rot is broader, covering input length, irrelevant content and distractors.
- Topic
- Prompts, context, reasoning and generation
- Also known as
- Long-context degradation
- Origin
- 2025, a technical report testing 18 models
How context rot works
- The common needle-in-a-haystack test mainly measures lexical matching, so strong scores there suggested long context was solved.
- Lower semantic similarity between question and target information makes performance fall faster with length.
- On-topic distractors that do not answer the question hurt unevenly, more so as input grows.
- Models that succeed on focused prompts of about 300 tokens degrade consistently on full prompts of about 113,000 tokens.
In more detail
Attention without literal matches
A 2025 benchmark used a dataset that minimises lexical overlap between the question and the target information. A model with an almost perfect short-context baseline fell from 99.3% to 69.7%. The study attributes such declines to the increased difficulty the attention mechanism faces in longer contexts when literal matches are absent.
Commonly confused terms
| Term | How it differs |
|---|---|
| Context window | The context window is the input length a model supports. Context rot is the drop in performance as input grows even within that limit; models can degrade well below the length they claim to support. |
Why context rot matters for on-premises AI
A 2025 technical report tested 18 models and found that performance degraded with input length in all experiments. In another study 11 of 13 models claiming at least 128,000 tokens fell below half their short-context performance at 32,000 tokens. The report argues that how information is presented matters more than whether it is present, making context engineering essential; business assistants should pass only relevant passages rather than fill the context window.
A law firm's in-house contract assistant retrieves relevant clauses and passes only those to the model instead of the whole archive; the team regularly tests the same questions with full and focused context.
Common questions
Does a larger context window solve the problem?
No. In one benchmark only half of the models claiming 32,000 tokens or more maintained satisfactory performance at 32,000 tokens.
Are reasoning models affected?
Yes. In the 2025 report thinking modes brought notable gains on both focused and full prompts, but the performance gap between the two lengths remained.
How can context rot be reduced?
The report points to context engineering, the careful construction and management of a model's context window. In practice this means putting only relevant passages into the context and testing how information is presented.
Related terms
- AI lost in the middle
- Context window
- Context engineering
- AI needle-in-a-haystack test
- Long-context model
Sources
- Context Rot: How Increasing Input Tokens Impacts LLM Performance, Chroma technical report, 2025
- NoLiMa: Long-Context Evaluation Beyond Literal Matching, ICML, 2025
- RULER: What's the Real Context Size of Your Long-Context Language Models?, COLM, 2024
- Lost in the Middle: How Language Models Use Long Contexts, TACL, 2023
In the glossary: Glossary, A to D