Context Window
Definition
The maximum amount of text (measured in tokens) that a language model can process in a single forward pass.
The context window defines how much text a language model can 'see' at once. Early transformer models had context windows of 512-2048 tokens. Modern models support 8K, 32K, 128K, or even longer contexts. Tokens in the context window include both the input prompt and the generated output.
Context window size matters for text refinement because longer contexts allow the model to maintain coherence over longer passages, reference earlier content, and apply consistent style. However, attention computation scales quadratically with context length, making very long contexts computationally expensive.