# Context Rot

> A model gets worse at its task as the text you give it grows longer.

**Field:** Artificial Intelligence  
**Category:** LLMs  
**Also known as:** Context Degradation, Long-Context Decay

## Think of it like

It is like a messy desk. The more you pile on, the less you can find.

## Definition

Context rot is when a language model gets worse as you give it more text to read. The context window may hold far more, but quality still slides as the input grows. A 2025 study tested 18 models and found this in all of them, even on simple tasks. Text that looks like the answer but is not makes it worse. It is why long chats and huge prompts can drift.

## Example

Lucy pastes ten long files into one chat and asks about one line. The model mixes up two files. In a fresh chat with only the right file, it answers well.

## Why it matters

A bigger context window is not a free pass. Giving the model less, and the right text, often works better.

## Common mistake

Filling the window because it fits. Each extra page can pull quality down.

## Three principles

- **More is worse.** Quality slides as input grows.
- **Near misses hurt.** Text that looks right but is not.
- **Trim the input.** Give only what the task needs.

## Related terms

- [Context Window](https://learn.benibix.com/term/ai/context-window)
- [Lost in the Middle](https://learn.benibix.com/term/ai/lost-in-the-middle)
- [Context Engineering](https://learn.benibix.com/term/ai/context-engineering)
- [Hallucination (AI)](https://learn.benibix.com/term/ai/hallucination)
- [Token (AI)](https://learn.benibix.com/term/ai/token)
- [Context Compaction](https://learn.benibix.com/term/ai/context-compaction)

## Told apart from

- [Context Rot vs Lost in the Middle](https://learn.benibix.com/compare/context-rot-vs-lost-in-the-middle): People think context rot and lost in the middle are one problem, and they are not. Lost in the middle is about where a fact sits. The model misses facts in the middle of a long input more than ones at the start or the end. Context rot is about how much text there is. The more you add, the worse the model does, wherever the fact sits.

## Taught in

- [Long Context Problems](https://learn.benibix.com/learn/ai-llms/long-context-problems): LLMs, 15/15
- [Context Engineering](https://learn.benibix.com/learn/ai-working-with-ai/context-engineering): Prompt Engineering, 9/16

![Two small charts side by side. Context rot, on the left: answer quality starts good and slides down as more text goes into the window. Lost in the middle, on the right: quality is good for facts at the start and the end of the input, and dips for facts in the middle.](https://learn.benibix.com/diagrams/ai2-context-rot.svg)

---

Source: https://learn.benibix.com/term/ai/context-rot
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
