AI CompendiumA public chart of the language
Tokens & Context

Context

Everything the model can currently see.

Definition

The information available to the model when it produces a response — the system prompt, the conversation history, retrieved documents, tool results and the current message. If it is not in context, the model does not know it.

This is the single most important mental model: the model has no memory and no access to your systems. It knows only what has been assembled into its context. Most "the AI is dumb" problems are really "the AI was not told".

The deeper point is that the model has no memory and no filesystem. Everything it can reason about had to be placed in front of it by your code, in this request. "The model forgot" always means "your code did not send it", and "the model ignored it" usually means it was crowded out.

How people use it
Debugging a wrong answer.
"It did not ignore the policy. The policy was never in context. Show me the assembled prompt."
Worked example

Debugging by printing the context

Quality is inconsistent between environments and nobody can reproduce it.

Log the fully assembled request rather than the user message. The usual finding is a difference nobody intended: a stale system prompt, a retrieval index pointed at a different corpus, or three extra tool results pushed in only in production.

Avoid

Assuming the model can look things up on its own. Only what is placed in context exists for it.

Sources
  • docsContext windows ↗Claude platform docs · 2026

    What actually consumes the window — input, tools, thinking and output — plus context rot and compaction. Authoritative for this product, not for models generally.

  • blogEffective context engineering for AI agents ↗Anthropic Engineering · 2025

    Defines context engineering as curating everything supplied at inference, names context rot, and covers just-in-time retrieval, compaction and keeping the window high-signal.

Related terms