T03-L03 · Prompting & context · Level 3 Builder · 17-minute read, plus 3 hours of doing

The improvement nobody tested

A PhD student in a clinical research group maintains the prompt that pulls study details out of abstracts for the group's systematic review: study ID, sample size, primary outcome. Three colleagues run it every week, and the rows go straight into the review table. One of them "improves" the prompt so that it fills fewer fields with unknown. It works: fewer unknowns. Two months later, during data checking, the group finds eleven sample sizes that no abstract reports. The prompt had learned to guess.

In a company it's the prompt that sorts incoming support emails into queues. The team lead adds one sentence so that urgent emails are flagged better. From the next morning, invoice questions start landing in the returns queue, and nobody notices for a week, because each email still gets a queue.

In both cases the prompt had been checked once, by looking at a few good answers. Nobody could say what it did before the change and what it did after. You are at Level 3 Builder: colleagues depend on this prompt, and they don't check each output. This book shows you how to put a test set under it, so that every change, including a new model, is compared against known answers before anyone relies on it.

After this you can

  • Write a prompt's contract: what the output must contain, what it must never do, and what counts as a pass.
  • Build a set of 15 cases with known answers, including missing, ambiguous and hostile inputs and every past failure.
  • Grade with the cheapest check that decides each rule, and read every failure yourself.
  • Compare prompt or model versions side by side, changing one thing at a time, and decide from a rule you set before running.
  • Leave a test folder with pinned versions and a README that a colleague reruns with one command and gets the same result.

Before you start