LLMs

Context window

A context window is the maximum token span available to one model invocation.

systemhistorydocumentsquestionfree for replyEverything must fit in one fixed token limit.
A context window is the maximum token span available to one model invocation. Values shown in the worked visual are illustrative unless the labels state otherwise.

How it works

Prompt tokens, retrieved text, tool outputs, and generated tokens compete for this finite budget. Exceeding it requires truncation, compaction, or another request.

A concrete example

Illustrative: a 32,768-token window with 28,000 input tokens leaves at most 4,768 tokens for output.

Do not confuse it with Knowledge cutoff

context window is per-request capacity; knowledge cutoff is the date boundary of training knowledge.

Study the full lesson