Context Window
The maximum amount of text an AI model can process in a single conversation.
Definition
The context window is the total amount of text (measured in tokens) that an AI model can "see" at once during a conversation. It includes everything: your system prompt, the conversation history, your current message, and the AI's response. When a conversation exceeds the context window, the AI starts "forgetting" earlier parts of the conversation — it literally can't see them anymore.
Context window sizes have grown dramatically: early GPT-3 had 4K tokens, GPT-4 offers 128K tokens, and Claude supports up to 200K tokens. A larger context window means longer conversations, bigger documents, and more complex prompts are possible.
Examples
Claude's 200K token context window can process roughly a 500-page book in a single conversation
If your system prompt is 2,000 tokens and the context window is 8,000 tokens, you have 6,000 tokens left for the conversation and responses
Related Terms
Frequently Asked Questions
What happens when I exceed the context window?
Does a bigger context window mean better responses?
Build prompts using this concept
Explore our prompt library and put context window into practice with ready-to-use templates.
Build prompts using this concept