AI Glossary

Context Window

A context window is the token budget a model can use for a request and its response. Instructions, conversation history, documents, tool results, and generated output compete for that budget; exact accounting depends on the model and API.

Also known as: context length

· Chain of Thought

Context Management

The context window limits what a model can work with during a response. It includes more than the user’s latest message: instructions, conversation history, tool definitions, and tool results also consume space. Generated output needs room too.

Exceeding the budget does not always silently drop the oldest text. Behavior depends on the API, model, and application. A request may be rejected, generation may stop at the limit, or the application may shorten the input through truncation or compaction. Compaction changes the information the next request receives; it does not enlarge the model’s window.

Anthropic’s context-window documentation explains its input/output accounting and model-dependent overflow behavior. Check the documentation for the particular model you deploy.

For builders, the useful check is whether the request preserves the instructions and evidence needed for the task while leaving room for the answer. A larger budget gives you more space, but does not tell you which information belongs there.

Go deeper

From the conversation