Skip to main content
Menu

Context Window

The context window is the maximum amount of text, measured in tokens, that a language model can process at once in a single request.

The context window is the maximum number of tokens a language model can consider within one processing step.

Depending on the model and provider, input and potential output may share this budget or have additional separate limits. If a limit is exceeded, the application must trim, divide or reject the request.

Why the context window is limited

Supported context length depends on model architecture, training, runtime environment and the limits of the particular service.

More context generally requires additional compute and memory. The effect on processing effort, latency and cost varies by model and technical implementation.

Supported token counts vary considerably between models and may change with new versions. The documentation for the specific model version in use is therefore authoritative.

Converting tokens to words provides only a rough estimate because language, spelling and tokenisation affect the ratio.

Why bigger is not automatically better

A larger context window allows more documents or a longer history within one request. The available capacity does not establish how reliably the model will use every included piece of information.

Relevant, well-structured selection therefore remains more important than maximising context volume.

What this means for architecture decisions

For agents, document analysis or long conversations, context length is a concrete architecture constraint. More processed context also affects inference costs, latency and potentially output quality.

Define which information each step requires, how older material is condensed and when external knowledge or state storage is more appropriate.

Related terms

Related terms

Token

A token is a processing unit for text, often a word, word fragment or punctuation mark. Tokens affect cost, speed and context size.

View term

Inference

Inference is the process where an already trained AI model processes an input and produces an output, as opposed to training, where the model itself is adjusted.

View term

Related topics

Related topics

Agentic Engineering

How engineering teams can use coding agents consistently and establish shared practices for tasks, context, data and reviews.

View overview

Related services

Related services

Software development

For new products and existing systems where AI, interfaces, maintainability and operations need to be planned together.

View overview

What would you like to assess or build?

Briefly describe the situation, your objective and the systems involved. We will respond with a technical assessment and a practical next step.

Send inquiry