- Type
- LLM performance phenomenon
- Also known as
- Long-context degradation
- First described
- 2025 (Chroma research)
- Key causes
- Positional bias, attention dilution, distraction
- Main mitigations
- Retrieval, compaction, context engineering
- Related
- Context window, RAG, Context engineering
- Type
- LLM performance phenomenon
- Also known as
- Long-context degradation
- First described
- 2025 (Chroma research)
- Key causes
- Positional bias, attention dilution, distraction
- Main mitigations
- Retrieval, compaction, context engineering
- Related
- Context window, RAG, Context engineering
Background
Model vendors have competed on raw context window size, stretching from a few thousand tokens in early models to millions in current frontier systems. Window size measures capacity, not usable capacity: the amount of text a model can ingest does not guarantee that it will use that text reliably.
In July 2025, vector database company Chroma published the report Context Rot: How Increasing Input Tokens Impacts LLM Performance by Kelly Hong, Anton Troynikov and Jeff Huber, which is generally credited with coining the term[1]. Its experiments — including simple repeated-word reconstruction, retrieval tasks and reasoning probes — found that performance degrades unevenly and often unpredictably as input length grows, and that models do not maintain consistent performance even on simple tasks as context lengthens.
Earlier research had documented related failure modes. The Stanford study Lost in the Middle (Liu et al., 2023) identified a U-shaped reliance on position: models reliably use information placed at the beginning or the end of a prompt, but are much more likely to ignore the same information placed in the middle[2]. Summarising this line of work, Redis reports that adding roughly 20 retrieved documents (about 4,000 tokens) can pull answer accuracy down from 70–75% to 55–60%[3].
Key factors
- Positional encoding limits — attention positions learned during training on shorter sequences extrapolate poorly to much longer inputs.
- Attention dilution — as more tokens compete for attention, the signal carried by a relevant passage is diluted by irrelevant content around it.
- Distractor sensitivity — repeated or similar-looking passages make it harder to select the correct fact, and irrelevant examples can steer generation.
- Instruction drift — in long agentic sessions, system instructions and tool contracts are followed less strictly as conversation and tool history accumulates.
Why it matters for AI
Context rot is one of the main reasons retrieval-augmented generation (RAG) remains popular despite million-token windows: the practical answer is to retrieve a small amount of relevant material rather than to stuff everything in. It also changes how agents are built — long-running agents must summarise, compact and prune their history between steps, or the second half of a task is performed on degraded context.
The economics reinforce the engineering point. Long prompts are billed per token and processed at length, so stuffing full documents into every call costs more while performing worse. Simple long-context benchmarks, which mostly test exact retrieval of planted facts, overstate real-world reliability.
>See Also
🇲🇾 Malaysian teams building AI over policy documents, contracts and customer records should treat context size as a quality and cost control, not a free resource. Malaysia's multilingual working environment adds another dimension: retrieved chunks mix Bahasa Malaysia, English, Mandarin and Tamil, and irrelevant-language passages are exactly the kind of distractor that amplifies context rot in multilingual retrieval.
Many local deployments favour smaller or self-hosted open-weight models — including Malaysian-developed models such as ILMU — which carry shorter context windows than frontier APIs, making chunking discipline, reranking and compaction more important than headline window size. MDEC and the National AI Office emphasise reliability and accountability in deployed AI systems[4]; context engineering — controlling what enters the window and what is summarised away — is one of the cheapest available levers for meeting that expectation, and is increasingly taught alongside prompt engineering in HRD Corp-eligible training programmes.
References
- ↑Hong, K., Troynikov, A., and Huber, J. (2025). Context Rot: How Increasing Input Tokens Impacts LLM Performance. Chroma. https://www.trychroma.com/research/context-rot
- ↑Liu, N. F., Lin, K. W., Hewitt, J., et al. (2023). Lost in the Middle: How Language Models Use Long Contexts. arXiv:2307.03172. https://arxiv.org/abs/2307.03172
- ↑Redis. Context rot explained (and how to prevent it). https://redis.io/blog/context-rot/
- ↑AI Malaysia Berhad (National AI Office). National AI Office. https://ai.gov.my/