Skip to content

What is context rot?

Context rot is the decline in a language model's answer reliability as its context grows, even when that context fits within the provider's stated capacity.

Context rot is the potential decline in a language model's answer quality as its context grows: the instructions, conversation and documents supplied with a request. The model may receive all the information it needs and still fail to use it well, overlooking a clause, confusing similar documents or missing connections between facts spread across the text. The issue is actual performance on a task, not the maximum amount of text the context window accepts. The two measures differ: a request can fit within the stated limit and still produce an unreliable answer. There is, however, no universal threshold at which every model deteriorates in the same way. The model, the task, the position of the information and the presence of distracting text all matter. Choosing a solution therefore means scoring answers on documents and questions like the organization's own rather than relying on the capacity listed on the spec sheet alone.

See also: Context windowThe context window is the limit, measured in tokens, on how much information an AI model can use for a request, including the response that the model generates.

How it works

The context often contains much more than the answer requires. When a question and the document use different words, finding the relevant passage can require a semantic link. In the NoLiMa study, the authors designed questions that share few words with the relevant passages: at 32,000 tokens, 11 of the 13 models tested fell below half their short-context baseline. That figure is specific to the test, not a forecast for every application.

The evidence

Position can matter too. In the 2023 Lost in the Middle study, the models evaluated often performed better when the relevant passage appeared at the beginning or end rather than in the middle. The RULER benchmark also shows that finding a single hidden fact does not prove a model can combine information. In its experiments, almost all models degraded on longer contexts despite near-perfect scores on simple retrieval. Degradation also appears when a request arrives piece by piece: in the LLMs Get Lost In Multi-Turn Conversation study, across more than 200,000 simulated conversations, every model tested performed 39% worse on average over six tasks than with the same request given in full, mostly because it became less reliable: it made assumptions in early turns and did not recover.

How it differs from the context window

The window sets the maximum input; context rot describes a performance risk within that limit. Context poisoning is different too: it involves harmful information or instructions placed in the context, while context rot can arise even with legitimate material.

An enterprise example

A customer service team uses an assistant that reads the full history of a complaint: emails, agent notes and spec sheets. In an internal trial, the team prepares expert-verified reference answers and asks the same questions with histories of different lengths, moving the key information and adding spec sheets for similar products. The team compares each answer with the reference and checks that the answer cites the correct document. If the assistant confuses products only in long histories, that does not prove every long history will fail, but it flags a case to fix and retest before production use.

Why it matters for decision makers

During procurement, asking for results by context length, position and question type is more useful than comparing advertised window sizes alone. RAG, the retrieval of relevant documents before answering, can reduce the material sent, but must also be evaluated for what it fails to retrieve. Context engineering, the organization of information sent to the model, calls for tests after each significant change: selection and summarization can remove exactly the information that matters. For decisions affecting customers or contracts, human review against the source is still advisable.

Frequently asked questions

No. Answer quality can drop even when the request fits within the stated limit; the outcome depends on the model and task.

No. Accepting more text does not guarantee the model will use every detail correctly; real use cases need testing.
  • Context windowThe context window is the limit, measured in tokens, on how much information an AI model can use for a request, including the response that the model generates.
  • Context engineeringContext engineering designs the information supplied to an AI model, selecting the instructions, documents, and history that each specific request needs.
  • Just-in-time retrievalJust-in-time retrieval fetches information during a task when needed, rather than loading every potentially useful document into the context in advance.
  • Reasoning modelsReasoning models are language models designed to work through intermediate steps before answering; their costs and results must be measured on the actual task.
  • Context poisoningContext poisoning alters the information an AI agent consults while working and can steer its answers and actions, including during later interactions.

See it in the universe

If you need the AI in production, not in a demo, that is my job.

See AI integrations

Or write to me.