The maximum amount of text (measured in tokens) that a model can read and reason over in a single interaction, including your prompt, any documents, and previous conversation history.
The context window is one of the most important practical limits of any language model. It defines the 'working memory' available to the model — everything it can see and reason about at once. A model with a 128K context window can process roughly 100,000 words, or about 350 pages of text, in a single request.
Context windows have grown dramatically in recent years. Early GPT models had 4K token limits. By 2024, Claude and GPT-4 reached 200K. Google's Gemini models now offer 1 million token context windows, and Meta's Llama 4 Scout pushes this to an extraordinary 10 million tokens — enough to process entire large codebases in a single prompt.
A larger context window doesn't automatically mean better performance. Models can struggle with the 'lost in the middle' problem, where information placed in the center of a very long context is less reliably retrieved than content at the edges. Effective retrieval within long contexts remains an active area of model research.
What context windows are, why they matter for building AI applications, how they've grown from 4K to 10M tokens, and how to manage them effectively.
Everything you need to know about tokens — how LLMs split text into pieces, why tokenization matters for cost and performance, and how different languages tokenize.
A clear, jargon-free introduction to large language models — what they are, how they work at a high level, and why they're transforming software and society.