3

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.

The Context Window

Type messages and watch the window fill up

Context Window
System13 tok

You are a helpful, harmless, and honest assistant.

AI SEES THIS

Empty — type a message below

Visible: 13 tokens
Your Messages

Start typing messages below. Watch the context window fill up on the left. After a few messages, the oldest ones will blow away — that's the AI "forgetting."

Key insight: The system prompt stays pinned at the top. Everything else competes for space. Once the window fills up, early messages vanish from the AI's view.

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.

1

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.

2

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.

3

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.

4

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.

5

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.

The Forgetting Experiment

Each strategy fixes a different problem

You've chatted about a Tokyo trip for 15 messages. You mentioned being vegetarian (msg 4), planned Hakone + Kamakura day trips (msg 8), set a $3K budget (msg 5), and briefly considered Osaka (msg 11, then dropped it). Now you ask:

"Give me my day-by-day itinerary."

Remembers your planned day tripsVegetarian diet gets priorityRemoves the "maybe Osaka?" confusionBudget is firm, not vagueOutput becomes a usable day-by-day plan
What the AI sees
...15 messages about Tokyo trip planning...
"Give me my day-by-day itinerary."

No strategies applied — the AI only sees recent messages. Key details from earlier have scrolled away.

AI Response5 problems
Share this course
You see the whiteboard now. You feel the edges of the window. That changes every conversation you have with AI.

You've learned the fundamentals — prompting, asking, and context. Next up: your cheat sheet of power prompts to take with you.

Vibe Check

New tool unlocked!