Context length
The maximum amount of text a model can consider at once, prompt plus answer combined.
Think of it like
The size of a desk: only so many papers fit in view before older ones fall off the edge.
Example
A 128K context length can hold a small book; exceed it and the earliest text gets dropped.
How it actually works
Context length caps the tokens the model attends to in a single call. Everything — instructions, retrieved docs, history, output — competes for that budget. Longer contexts unlock bigger tasks but cost more and can suffer “lost in the middle” attention issues.
For product teams
It’s a hard budget you’re always managing — long docs, history, and output all share it.
For engineers
Max sequence length the model can attend over; bounded by positional scheme and attention cost.
Related
- Tokens — Measured in tokens.
- Context window — The window itself is the context window.
- Sequence length — Compared with sequence length.
Read anything AI without the jargon
Look up any term in plain English, or save terms as you read with the free Chrome extension.
Open DecoderAdd to Chrome