Foundations

What Is Context Window?

A context window is the maximum amount of text (measured in tokens) that an AI model can process in a single conversation — including both your input and the model's responses.

The Plain-English Explanation

Think of a context window as the AI's working memory. Everything you type and everything the AI responds with must fit within this window. If a conversation exceeds the context window, the model loses access to earlier messages — it doesn't remember what you discussed at the beginning.

Context window sizes have grown dramatically. GPT-3 had 4,000 tokens (about 3,000 words). Claude 3 supports 200,000 tokens (about 150,000 words — roughly three novels). Larger context windows mean you can process longer documents, maintain longer conversations, and provide more detailed instructions.

Why It Matters

Context window size determines what you can do with an AI model. Need to analyse a 100-page report? You need a model with a large enough context window to hold it. Having a long, detailed conversation? You need enough context for the AI to remember your earlier instructions. Understanding this constraint helps you choose the right model and structure your interactions effectively.

Examples in Practice

Common Misconceptions

Myth: Larger context windows always mean better results.

Reality: Models can struggle with very long contexts — they may miss details in the middle of long documents (the 'lost in the middle' problem). Strategic structuring of your input matters more than just fitting everything in.

Myth: The context window resets between messages.

Reality: In a conversation, the context window accumulates everything — all your messages and all the AI's responses. It's a running total, not a per-message limit.

Myth: If it fits in the context window, the AI will use it all.

Reality: Models pay more attention to information at the beginning and end of the context. Important instructions should go at the start or end, not buried in the middle of a long document.

Related Terms

Further Reading

Learn Context Window in Depth

Module 3 of AI Fundamentals covers context windows and how to work effectively within them — essential knowledge for getting the most from any LLM.

Explore AI Fundamentals

Frequently Asked Questions

Which AI model has the largest context window?
As of 2025, Gemini 1.5 Pro offers up to 1 million tokens, and Claude 3 offers 200,000 tokens. These numbers grow with each model generation. For most practical tasks, 100K+ tokens is more than sufficient.
What happens when I exceed the context window?
The model drops earlier messages from its working memory. In chat interfaces, you'll notice the AI forgetting earlier context. In API usage, the request will either fail or automatically truncate the oldest content.
How do I work effectively with limited context windows?
Be concise in your prompts, focus on relevant information, break large tasks into smaller chunks, and put the most important instructions at the beginning. RAG systems can help by retrieving only the most relevant documents for each query.
Back to AI Glossary