A practical tour of context engineering. One character runs through the whole talk: a brilliant new hire with no memory.
Prepared byAmir Zahedi · fleetguru.ai
Act 1 · Meet the brilliant amnesiac
Vague askMush.
Same ask, right contextSharp.
Same model. Two answers.
One variable changed · not the model · what you put in front of it
02 · Context is the craft
Same model, two answers
Act 1 · The character03
Leila · day one
You've hired a genius with no memory.
Brilliant in general. Her name is Leila. But every morning she walks in knowing nothing about you, your work, or what happened yesterday. That's the model. The whole job is managing her well.
Anthropic say it plainly. Treat the model as "a brilliant but new employee who lacks context on your norms and workflows."
Act 1 · Name the craft
Prompt engineeringis the words you type.
Context engineeringis everything else the model sees.
The docs, the memory, the tools, the history: everything loaded in front of the model when it answers. Prompt engineering is now a subset.
Jun 2025 Lütke names it→Karpathy amplifies it→Sep 2025 Anthropic formalises it
The words are a sliver · the context is the rest
04 · Context is the craft
"The job used to be picking the model. Now it's designing the context."
Act 1 · The analogy that sticks
CPUthe model · fixed, powerfulRAMthe context window · small, preciousOScontext engineering · decides what loads, and when
The model is the CPU. The context window is the RAM.
Karpathy's framing, and it's the one that sticks. The processor is fixed. The working memory is small and precious. Context engineering is the operating system: it decides what to load into that memory, and when.
Model = CPU · Context = RAM · context engineering = the OS
05 · Context is the craft
Hero analogy
Act 1 · Why it matters06
The skill that lasts
When AI fails, it's usually not too dumb.
It just wasn't told what it needed to know. As models get smarter, the failures stop being about the model and start being about the context. So the skill that lasts, for users and builders alike, is context.
Managing the new hire · Don't overload her07
Don't dump the filing cabinet
More context can make it worse.
Tip every document onto her desk on day one and she drowns. So does the model. Chroma tested 18 frontier models and every one degraded as the input grew, before the window was even full. A bigger desk is not the answer. A tidier one is.
Managing the new hire · Lost in the middle
Models forget the middle.
Startfound
Endfound
Middle−30% or more
Position of the key fact in the context
Recall
Smaller windowLarger window: deeper sag
Put the key fact at the start or the end and the model finds it. Bury it in the middle of a long context and accuracy drops 30% or more. And the bigger the window gets, the deeper the sag.
Strong at the edges · weak in the middle · put what matters where it looks
08 · Context is the craft
Liu et al. · lost in the middle
Managing the new hire · The freezer and the stove
Keep a big freezer. Only cook what's new.
The deep freezerStable stuff you keep ready and barely touch: the system prompt, the docs, the examples.
The stoveThe hot part you're cooking right now: this turn's question. Cook only what's new.
Under the hood that's the KV cache. The model does the expensive work once for the frozen part, then reuses it: prefix caching. Change one token early and it all goes back on the stove.
Stable stuff frozen · only the new bit cooks
09 · Context is the craft
KV cache · prefix caching
Managing the new hire · The money slide
90%
cheaper · same tokens · same model
Cached: stable first, query last~10%
Uncached: a changing value at the top100%
10,000-token system prompt, 100 questions. Order it right and every call after the first reuses the frozen prefix at about a tenth of the price, replies in milliseconds not seconds. Every serious provider now rewards ordering the context this way. Anthropic's own rule is the long, stable stuff at the top, the question at the end, and it can lift quality by up to 30%.
10 · Context is the craft
Order it right
Managing the new hire · The toolkit
Five levers. One stack. Not rivals.
Fetch
RAG
What to fetch. Keep bookmarks, not the whole library.
Remember
Memory / notes
What to remember. Write it down, reload later.
Forget
Compaction
What to forget. Summarise and move on.
Do
Tools
What it can do. The myth-buster is next.
Divide
Sub-agents
Divide and conquer. Anthropic's multi-agent setup beat a single agent by 90.2%, and token usage alone explained 80% of the difference.
Different jobs, one stack · fetch · remember · forget · do · divide
11 · Context is the craft
You are here
Managing the new hire · Tools, the myth-buster
The model never uses a tool. It just asks.
Modelasks for a tool
request
Your systemmakes the actual call
run
Context windowresult flows back in
return
Tools feel like the model "doing things". They're not. The model only asks. Your system makes the call and feeds the result back into the context. A tool is really a context-builder.
Pile on too many tool definitions and you hurt the model's odds of picking the right one. Accuracy degrades as the catalogue grows, and every schema costs hundreds of tokens, so dozens of tools burn tens of thousands of tokens of working memory before anyone has spoken. OpenAI's own guidance is fewer than twenty. Anthropic put it best: if an engineer can't choose between two tools, neither can the model.
Tools build context · the model requests, your system runs it · fewer, sharper tools win
12 · Context is the craft
Request → run → return
Managing the new hire · Forgetting on purpose13
Forget on purpose
Every so often: summarise, and start fresh.
Claude Code auto-compacts at 95% of the window. In plain ChatGPT or Claude you get no view of how full it is, so be the harness yourself: once a chat gets long, ask it to summarise, copy that, paste it into a fresh chat. It is lossy. The big decisions survive, the buried specifics do not.
Managing the new hire · How to forget well
There's a right way and a wrong way to forget.
Naive
Drop the oldest tokens
Cheap. But it bins the start of the context, and we just saw the model reads the start best.
Better
Keep the edges, summarise the middle
The direct fix for lost in the middle. Protect the edges, compress the sag.
State of the art
Clear the noise
Strip the old tool calls and results the model no longer needs, keep the reasoning. You trim the context without losing the thread.
Forget on purpose · keep the edges, cut the noise · don't summarise a summary to death
13b · Context is the craft
The compaction spectrum
Managing the new hire · Model collapse13c
The photocopy problem
A copy of a copy of a copy.
Compact from the source, not by re-compressing your own compressions.
Managing the new hire · The notebook that compounds
The fix for amnesia is a notebook that compounds.
Give the new hire a notebook they keep and re-read, one that gets richer every day instead of being rewritten from scratch.
RAG rentsre-derives knowledge every query, forgets after.
The wiki ownscompiled once, cross-linked, contradictions flagged.
It's just a git repo of markdown. Three layers: raw sources, the wiki, the schema. Three moves: ingest, query, lint. She does the filing; you decide what it means.
RAG rents, the wiki owns · compiled once, kept current
14 · Context is the craft
The LLM wiki
Act 2½ · The war story15
Not in a paper. On my screen.
A big refactor. And the further it went, the worse it got.
A while back I was running a large refactor across a big codebase. Quality held early, then drifted. The agent started repeating mistakes and losing the thread. That's context rot. Live, on a real job.
Act 2½ · The fix
So I built a loop that never lets the context rot.
01
Chunk
The plan into phases, each with clear acceptance criteria.
→
02
Fresh context
A harness spawns a brand-new session per phase, so no single window rots.
→
03
Exit gate
It only signals done when criteria verify, otherwise it retriggers fresh. Circuit breakers stop it spinning.
→
04
Distil findings
A lighter model harvests verified patterns into a compounding skillbook, promoted only after seen twice, and feeds later phases just the relevant slice.
findings loop back in
Fresh context each phase · a notebook carried forward · no rot
16 · Context is the craft
The smart Ralph loop
Act 2½ · The punchline
I'd hand-built the entire textbook. By accident.
What I builtThe official name
Fresh context per phase→Sub-agent isolation (+90.2%)
The skillbook→Structured note-taking · the LLM wiki
Lighter model distilling→Compaction
Relevant-slice injection→Just-in-time RAG
"Seen twice before it's kept"→The guard against a wrong fact getting cemented in
I built every lever because the quality was rotting and I had no choice. Months later, Anthropic published the same playbook. This isn't theory. It's what you reach for when it breaks.
Necessity first · the textbook caught up
17 · Context is the craft
Homemade → official
Act 2½ · The gift to the room18
The hard part is done
I had to build the operating system. For you, it's already in the kernel.
Auto-compaction, sub-agents, a memory tool, built-in context management. It ships now. The one move left is to switch it on.
Act 3 · The honest bit
Be honest about the limits.
Wiki cites sources accurately~52%
RAG cites sources accurately~5%
But the wiki cost 21× more per question and ran 6.6× slower. Small sample, directional.
Contamination. A wrong fact, once written, gets read as truth by everything after. My "seen twice" gate helps. It isn't free.
Scale wall. Lovely at 50 to 100 sources. At thousands it's a knowledge base with no editors.
Vibe thinking. The understanding forms while you do the filing. Outsource that and you get a tidy wiki you never learned.
It's not free · trust, cost, scale, and the thinking you skip
Every version died on the same rock: maintenance is a chore humans abandon. The model is the first tireless librarian.
Act 3 · One more thing
18of20flagged the same problem
I didn't just talk about the five levers tonight. I used every one of them to build this.
The panel of twenty that reviewed this talk. Eighteen flagged the same problem. They were right, and what you just watched is the fix.
Fetch. Research agents read the 2026 papers, so each slide only carried the facts it needed.
Remember. What I learned went into notes and a notebook the next session could read. I never argued the same point twice.
Forget. When a session filled up it wrote a handover note and started fresh. The morning handover from the war story, on this deck.
Do. The skills did the real work. One narrated this whole script. One drew every photo of Leila, the same face every time, on purpose.
Divide.53 agents reviewed it, because I didn't trust my own opinion on its own.
I argued with a focus group of twenty about my own talk, and I lost. Very 2026.
Every one of them did the filing. Not one could tell me what the talk was about, which joke to keep, or that she should be Leila, a person with a name.That part stayed mine.
20½ · Context is the craft
One more thing
Act 3 · The thesis
The machine can do all the filing. The one job it can't do for you is decide what it means. And that was always the point.
Context is the craft
21 · Context is the craft
The close
Act 3 · Over to you
Try it tonight.
Anyone
Before a big ask, give the context first. Paste the brief, the goal, the constraints. And start a fresh chat when it drifts. Watch the answer change.
Hands-on
Point Claude Code or Codex at one folder, ingest five things into a markdown wiki, ask one question. That's a wiki, and you didn't have to build a Ralph loop.
Give context first · start fresh often · build one tiny wiki
22 · Context is the craft
A move you can make tonight
fleetguru.ai
Thank you.
The talk
The model is a given. The context is the craft. A practical tour of context engineering.
Prepared by
Amir Zahedi · fleetguru.ai
Sources
Anthropic, context engineering (Sep 2025) · Chroma, context rot · Karpathy · Liu et al., lost in the middle · Lütke (qmd) · Bush, Memex · Luhmann, Zettelkasten · Forte, Second Brain · LOCA-bench (2026) · Lost in the Noise (2026) · Wu et al., position bias (MIT, ICML 2025) · Anthropic, server-side compaction + Memory for Managed Agents (2026).