Healthy AI First · Episode 12 · 17 min
Practice 4, The Prompting Playbook, With and Without Code

A prompt runs in production, you switch the model, and suddenly it gets worse. Anthropic showed in a public talk how to repair that: "The prompting playbook" by Margot van Laar, Code with Claude London, May 2026. In this practice episode I walk through the talk step by step, on two tracks. The first is the example from the talk, a support bot with evals, XML tags, a stop sequence and a tool. The second is our own example with no code: a quote assistant in a project in Claude or ChatGPT, with instructions that have grown over months.
Listen on
Companion document
All studies, sources and claims from this episode in one PDF, to read along or look things up later.
Download the companion document (PDF)Chapters
- 0:00Opening
- 1:01Welcome
- 2:08Measure First
- 3:43Clean Up
- 5:34The Old Safety Rule
- 7:16State Both Sides
- 8:50A word from us
- 9:41A Tool Instead of Mental Math
- 11:13A New Agent
- 13:02The Loop
- 14:36Limits and the Order
- 15:49Closing
Show notes
A note on the data
Everything in the video is rebuilt with made-up data. The eval views show, in simplified form, what the speaker reports in the talk. The English lines marked "as spoken in the talk" are from our own transcript of the talk. Everything under "Our example" is our transfer and not a statement by Anthropic. We did not measure our examples.
Part 1: A prompt gets worse after a model change
The example in the talk is a support bot for a telco called Meridian Mobile, miniaturized and inspired by real prompts.
- Measure first. An eval with three kinds of cases: a control case that must always pass, edge cases where the model has failed before, and cases where it should hand off to a human or refuse. After a model change there are two causes: the model is capable and behaves differently, or it is less capable.
- Clean up. An honest role (the bot is not a human), pasted website text removed, sections with XML tags for role, guidelines, policy and tone. The speaker's rule of thumb: if you cannot tell guidelines from policy from data when reading, the model most likely cannot either.
- Output contract. Define the format in the prompt. In the API call, a stop sequence on the closing tag; for complex schemas, structured outputs.
- The old safety rule.
Never give a customer the wrong plan details.Because of it, the model does not state the 5 GB from the customer data and points to the account page instead. New version: the customer data is the source of truth. Lesson: a model can withhold information it has. - State both sides. A rule that only names the cost of a handover (about 8 dollars) makes the model avoid the handover. New version: the cost of a handover and the cost of a wrong answer (a refund, customer trust).
- A tool instead of mental math.
Critical, always calculate any prorated amounts correctly.does not help. Instead a tool: a line in the prompt, a schema in the API call, the math in your own code. "Instructions don't add capability."
Part 2: A new agent from zero
An agent builds the weekly schedule for eight employees with hard rules. A Python function counts the violations, every setup runs five times. As in the talk (May 2026):
| Setup | Result in the talk |
|---|---|
| Sonnet 4.6, simple prompt | all trials fail |
| Opus 4.7, same prompt | all fail, far fewer violations |
| Opus 4.7 with adaptive thinking | seems reliable, about three times the tokens and latency (100 seconds mentioned) |
| Sonnet 4.6, better prompt | two of five, the rest hit the output limit |
| Generate, evaluate, repair (three small prompts) | all pass, far fewer tokens and lower latency than Sonnet 4.6 with the better prompt |
The loop allows soft requirements at runtime in the evaluation prompt, without changing the code.
Our example without code: the quote assistant
- Write down five test questions: one that must always work, three that have gone wrong before, one with the answer "a human decides that". Ask them again after every change, in a new chat.
- Clean up the instructions: pasted clutter out, four headings (role, rules, tone, data).
- Replace "never state prices" with: prices only from the attached price list, with the date of the list.
- Replace "pass complaints to the team lead only in an emergency" with both sides of the trade-off.
- Do not let the model compute totals in its head: use code or the spreadsheet.
- A check round in a new chat: have the draft checked against five points, then ask for targeted fixes.
The order (our own count)
- The test list first
- Clean up
- Define the output format
- One failure mode at a time, measure again each time
- Remove old patches, note the reason for every safety rule
- State both sides of a trade-off
- Add capability instead of demanding it: a tool
- For new tasks, compare prompt, model and harness, and split the work
Sources
- Anthropic: "The prompting playbook", Margot van Laar, Code with Claude London, 19 May 2026 (recording). https://www.youtube.com/watch?v=G2B0YWuJUgI
- Anthropic: session page for the talk. https://claude.com/code-with-claude/session/ldn-the-prompting-playbook
The episode is based on our own transcript of the recording. Models and figures are those of the talk in May 2026.
Healthy AI First is AI-researched and AI-generated, narrated in an AI version of my voice and reviewed by me (Björn).
Bringing AI into your team?
Björn is one of the founders of CLN Work. CLN Work helps companies adopt AI in small, verifiable steps: finding where real capacity is, which processes can be automated, and how to use AI interactively. The decisions stay with you.
Book a free 30-minute conversation