The context window is the amount of text — measured in tokens — that a large language model can attend to in a single call. It includes your system prompt, retrieved documents, chat history, and the model's own response.
2026 context windows: GPT-5 handles 200k+ tokens, Claude Sonnet 4 supports 1M tokens, Gemini 2.5 Pro handles 2M+ tokens. Larger windows let you feed entire codebases, long PDFs, and multi-hour conversations into a single call.
Bigger is not always better. Cost scales with context length, latency grows, and models frequently pay less attention to information buried in the middle of very long contexts (the "lost in the middle" phenomenon). Well-designed RAG systems retrieve only the relevant chunks rather than dumping the whole corpus in.