Chapter Three
Context
Engineering
AI doesn't forget — it was never
remembering in the first place.
Every time you send a message to an AI, it reads your entire conversation from scratch — every message you've sent, every response it gave — generates a reply, and then forgets everything. Next turn, same thing. The whole transcript gets fed in again. It's the world's most diligent but amnesiac reader: completely thorough each time, starting from zero every single turn.
The Window Has Edges
That transcript the AI re-reads each turn? It lives inside something called a context window — measured in tokens (roughly one token per three-quarters of a word). Claude's window holds about 200,000 tokens — a 500-page book. Sounds huge, but every message you send, every response you receive, and every hidden system instruction all eat from the same budget. It fills up faster than you'd think.
When the budget runs out, the oldest messages fall off the edge. You mentioned your dietary restrictions in message three? By message fifteen the AI may no longer see them. It's not being careless — it literally cannot see what's no longer in front of it. The AI is only as good as the information currently in its window.
This is why the best AI users don't just write good prompts — they manage what goes into the window. Summarize periodically so key details stay visible. Front-load what matters. Start fresh when the topic shifts. Use structured formats so the AI can parse your context efficiently. Context engineering is the new prompt engineering.
Key insight
Writing a great prompt is step one. Deciding what information to put in front of the AI — and how to structure it — is where the real leverage is. The best prompt in the world fails if the context is wrong.
Watch the context window fill up, overflow, and forget — in real time.
Strategies for Managing Context
Now that you understand the window, here's how to manage it like a pro. These are the techniques that separate people who "use AI" from people who get extraordinary results from it.
Summarize as you go
Every 5-10 messages, ask the AI to write a brief recap of key decisions and details. Then paste that summary into your next message. This "resets" the context with the most important information front and center.
Front-load what matters
Put the most critical information at the beginning of your message, not buried at the end. AI pays more attention to what comes first and last — the middle can get lost, especially in long prompts.
Start fresh strategically
Don't be afraid to start a new conversation when the topic shifts significantly. Carry over a summary of what you decided, not the full history. A clean context is often better than a cluttered one.
Be explicit about what to remember
"Important: the user is vegetarian. Do not forget this." Sounds silly, but it works. Explicit reminders act as anchors that the AI weighs more heavily.
Use structured formats
Bulleted lists, headers, and clear labels help the AI parse your context more efficiently. A well-organized prompt is worth twice its token count compared to a wall of prose.
You've learned the fundamentals — prompting, asking, and context. Next up: your cheat sheet of power prompts to take with you.