GENERATIVE AI / CONTEXT / FIELD GUIDErequest → budget → response
Back to field guides

FIELD GUIDE 07

A context window is
one request’s workspace.

It is the amount of information a language model can work with while producing one response.

In one lineInput + conversation + generated output must fit the model’s context budget.
Updated October 1, 2026Beginner-first / source-linked / no hype

01 Start here

What is a context window in AI?

Think of it as the space available to a model during one generation request.

A request-sized working space

A context window is the maximum amount of information a language model can use for a particular request. Providers usually express that capacity in tokens, the units produced by a tokenizer. The window is shared by the information sent to the model and, depending on the model and interface, some or all of what it generates.

“Window” does not mean a fixed number of words. Different tokenizers split text differently, and model limits vary. A long document, several previous turns, structured tool instructions, or image and audio inputs can use capacity in ways that are not obvious from a plain-text word count. For a specific service, check its model documentation.

request input+generated output≤context limit

For example, imagine an application that sends a question, several earlier messages and a few retrieved pages. All of that is part of the request context. The model then needs enough remaining room to produce the answer. The numbers in this example are not a model specification; real capacity and accounting depend on the endpoint.

02 Inside the budget

What can take up
the space?

The visible prompt is only one part of many requests.

Common pieces of a request

instructions

Rules and prompt

System or developer instructions, the current question and any formatting requirements.

conversation

Earlier turns

Messages carried forward by the application when it sends a multi-turn exchange.

extra input

Files and tools

Retrieved passages, document content, tool definitions and other supported input.

generation

Room for the response

Output tokens—and, for some reasoning models, internal reasoning tokens—can also use capacity.

The details are provider-specific. OpenAI’s API documentation, for example, describes the context window as covering input, output and, for some models, reasoning tokens. It also notes that message structure and multimodal inputs can affect token counts. Another provider may use different rules or expose different limits.

Do not confuse the context window with an output limit. An API may set a separate maximum for generated tokens, and both limits can matter: the answer cap cannot make an oversized request fit.

03 A useful distinction

Context is not
long-term memory.

The model sees what the request supplies within its current limits.

One request versus information stored elsewhere

A large context window does not by itself mean a model remembers every past conversation. It describes what can be included while processing a request. If a chat product keeps history, summarizes earlier turns, or searches a document collection, that behavior comes from the surrounding application and its state-management system.

The same distinction helps explain retrieval-augmented generation. A retrieval system can find a few relevant passages and add them to the model’s current context. That gives the model source material for this answer; it does not turn those documents into permanent model memory or guarantee that the answer is correct. See our guide to retrieval-augmented generation.

CONTEXT / NOW

What this request includes

Prompt, supplied messages and other inputs the model can consider for this response.

STATE / BETWEEN

What the application keeps

History, files or summaries that a product may store and send again later.

WEIGHTS / TRAINING

What the model learned

Patterns encoded during training; a normal prompt does not rewrite those parameters.

04 Work within it

Keep the useful parts.
Leave answer room.

More context is only useful when it helps with the current task.

A practical way to manage a context window

  1. 01 / checkLook up the exact model and interface.

    Context size, input limits, output limits and multimodal accounting can differ across model versions and APIs.

  2. 02 / trimKeep instructions and history relevant.

    Remove repeated background, stale turns and documents unrelated to the question. A short summary can preserve what matters.

  3. 03 / retrieveBring in a focused set of passages.

    For a large library, search for the material needed now rather than sending every file in every request.

  4. 04 / reserveLeave headroom for the response.

    Set output limits deliberately, while remembering that the model may also need capacity for reasoning or formatting.

  5. 05 / countUse the provider’s counting tools.

    A plain-text estimate can miss message structure, image processing or tool schemas. Use the exact model’s tokenizer or token-count endpoint when precision matters.

If the request is too large, applications handle it differently: an API may return an error, a product may shorten or omit older material, or generation may stop incomplete. Check the relevant documentation and inspect the actual request rather than assuming every chat product behaves the same way.

To learn why those limits are counted in pieces of text rather than words, continue to how LLM tokens work.

FAQ Context / quick answers

Questions,
answered.

Short explanations with the limits left visible.

· informational guide

01 / answerWhat is a context window in AI?

It is the amount of information a model can use while generating one response, measured in tokens. The exact contents and accounting depend on the model and interface.

02 / answerIs a context window the same as an AI’s memory?

No. It is a per-request limit. A product may store or retrieve information between requests, but that is application behavior separate from the model’s context window.

03 / answerWhat counts toward an LLM context window?

Prompt and instructions, conversation history, supplied documents or other inputs, and generated output can use the budget. Some models also count reasoning or request-structure tokens.

04 / answerWhat happens when a context window is full?

The interface or API may reject a request, shorten or omit content, or return an incomplete answer. Behavior differs, so check the relevant documentation.

05 / answerHow can I fit more useful information into a context window?

Keep only relevant instructions and history, summarize older material, retrieve a focused set of passages and leave room for the answer. Use the exact model’s counting tool for a reliable estimate.

Sources Official model documentation

Check the
specific limit.

These are examples of documented OpenAI interfaces, not universal rules for every model provider. Always verify the model and API you are using.

↗keep exploring

More explainAI
field guides.