01

One-sentence definition

Maximum number of tokens a model can consider across input, history, tools, and output in a request.

How to interpret this concept

The context window limits the sequence a model can process in an interaction. Depending on the API and model, the budget may include instructions, history, documents, tool results, and output. The input maximum and generation maximum should not be confused: both limits must be consulted in the specific documentation.

A large window does not guarantee the model uses all details with the same reliability. Including irrelevant material may increase cost and latency, and truncating without criteria may eliminate an essential condition. It is advisable to reserve space for the response, prioritize evidence, and preserve the provenance of selected fragments.

Practical example: when analyzing a long contract, it is not enough to check that the file fits. Applicable annexes, instructions, and questions must be included, and it must be verified that the response respects scattered exceptions. If the document is split, the application must track which parts were left out; summarizing or trimming does not equate to preserving the content entirely.

02

Quick examples

03

Related concepts

04

Sources consulted