Context Engineering

Context Window: AI's Working Memory

Module 5 · Context Engineering · Page 1. Drag the slider below to experience window overflow firsthand.

What is the context window?

The context window is everything the model can see in a single call. Anything beyond the window is completely gone — not blurry, not vague, simply invisible.

Mainstream model context windows compared (2025)
256K
Kimi K2.5
~200K Chinese characters
The entire Romance of the Three Kingdoms
256K
Qwen3.6-Plus
Native 256K
Expandable to 1M
400K
GPT-5
~320K Chinese characters
Available for Pro users
1M
Claude Sonnet 4.6
~800K Chinese characters
Dream of the Red Chamber ×5
1M
Gemini 2.5 Pro
~800K Chinese characters
2M coming soon
💰 Larger window = higher cost:
LLMs are billed by input + output Token count. Uploading a 100-page PDF (≈50K Tokens) adds roughly $0.07 per conversation (GPT-5 reference price).
After multiple turns, conversation history also accumulates and fills the window. Context is a finite, priced resource.
Interactive demo · Drag the slider to experience overflow

Context breakdown for one request (128K window)

0K / 128K
System PromptChat HistoryUploaded DocCurrent QueryReserved for Reply
System Prompt (10K)
Chat History (20K)
Uploaded Doc (variable)
Current Query (5K)
Reserved Reply (10K)
Window is sufficient — 83K Tokens remaining
Simulated upload size (drag to experience overflow) 0K Tokens
📏 The window is a finite resource. Using it costs money; exceeding it causes truncation. See the next page for three strategies when the window overflows.