Skip to slide
Chapter 3 · Building the Prompt
15 / 142

CHAPTER 03 · Building the Prompt · 1 / 5

Why it matters

Three reasons, each of which becomes a whole chapter later.

First, everything the model knows comes from this prompt. It has no other window into your world. The "Inside the Agent Harness" piece phrases the design rule memorably: "if you would be lost with only the last screenshot and tool output, the model will be too." Build the prompt as if you were briefing a competent colleague who just walked in.

First-cousin to that: order matters for cost. Static content (instructions, tools) goes at the front; variable content (the latest user message) goes at the end. That ordering is what makes prompt caching work, and caching is the difference between an affordable agent and a ruinous one. Chapter 5 is devoted to it; for now, just internalize "stable stuff first."

Second, structure matters for correctness. Linking tool calls to results, tagging roles, separating instructions from history: these let the model reason about authority and causality instead of guessing.

← → arrow keys work too