Home/Glossary/Context Window
Prompting

Context Window

The maximum number of tokens a model can process in a single input-output interaction.

Full Definition

The context window defines how much text — including the system prompt, conversation history, retrieved documents, and the model's own output — a model can 'see' at once. Tokens inside the window are available for attention; tokens outside are simply invisible. Modern models range from 4k tokens (older GPT-3.5) to over 1 million tokens (Gemini 1.5 Pro). A larger context window lets you include more examples, longer documents, and richer history, but also increases compute cost and can introduce 'lost in the middle' effects where the model pays less attention to content buried in the centre of a very long context.

Examples

1

Pasting a 50-page PDF into Claude's 200k-token context window and asking questions about specific sections.

2

A customer support chatbot keeping the last 10 conversation turns in context so it doesn't ask the user to repeat themselves.

Apply this in your prompts

PromptITIN automatically uses techniques like Context Window to build better prompts for you.

✦ Try it free

Related Terms

Prompt Compression

Reducing prompt length while preserving the information needed for accurate resp

View →

Token

The basic unit of text a language model processes, roughly corresponding to a wo

View →

Context Length

The maximum number of tokens a model can handle in a single forward pass.

View →
← Browse all 100 terms