# Context Window

> The context window is the maximum number of tokens a language model can attend to in a single call, covering both the prompt and the generated output.

- Identifier: PTL-0004
- Category: Foundations
- Canonical URL: https://protologue.com/t/context-window/
- Also known as: context length, context size

## Description

Anything outside the context window is invisible to the model unless it is re-inserted. Larger windows allow whole documents or codebases to be included, but research shows models do not use all positions equally well, which motivates retrieval, summarization, and careful placement of key information.

## Related terms

- [Token](https://protologue.com/t/token/)
- [Lost in the Middle](https://protologue.com/t/lost-in-the-middle/)
- [Needle in a Haystack](https://protologue.com/t/needle-in-a-haystack/)
- [Context Engineering](https://protologue.com/t/context-engineering/)

## Sources

- Vaswani et al. (2017). Attention Is All You Need. https://arxiv.org/abs/1706.03762
- Liu et al. (2023). Lost in the Middle: How Language Models Use Long Contexts. https://arxiv.org/abs/2307.03172

## Cite this entry

Protologue. (2026). Context Window. In Protologue: A Taxonomy of Prompting and LLM Techniques (v1.0.0, PTL-0004). https://protologue.com/t/context-window/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
