25.6 Revising from a failing regression case, and keeping it closed
- Approved by
- Panaversity ·
In everyday life. A school's timetable has a clash. One class has two lessons at 10:00 on Tuesday. The secretary moves one lesson and the clash is gone. But the teacher of that lesson now has two classes at once, and a room is booked twice. A careful secretary changes one thing, then checks the whole timetable, not only the class that complained.
What you will learn. You practice this in Lab 25, Tasks 1 and 2.
- What are the steps?
- How do I name the failure?
- How do I find the missing piece?
- What does the builder do before the prompt changes?
- What is the one change?
- Why the whole suite, when one case failed?
- What does "keeping it closed" mean?
- What does this cost?
Why it matters. A person who changed a prompt read the next answers again. Nobody reads 41 answers again, so nobody sees a fix that breaks another case.
At work. Monday, April 19, 2027. Ana Morales has read the morning report, and INV-8340 waits, and 25.7 takes it up. First the builder runs the suite as Lab 24 left it, all 41 cases. One is red: the red case.
What are the steps?
There are six, and the order matters.
- Reproduce it. Run the failing case alone and see it fail. The exam guide's words are a gap "that regression evaluations have exposed".1 A regression case is a case in the suite that is there to show when something that worked stops working.
- Name the failure. Say what went wrong in the answer.
- Find the missing piece. Say what the prompt lacks.
- Change one thing (25.1).
- Run the whole suite. Not the one case.
- Keep the case. It stays in the suite, so every later change is read against it.
Anthropic's prep course for the exam teaches the middle steps in four words: diagnose before you re-prompt. To diagnose is to find the cause. A missed output is not fixed by more words. A prompt that grows longer with each try is a sign that nobody named the failure. After three failed tries in a row, the course says, stop adding text.2
How do I name the failure?
With one of 24.7's six names, where one fits. The six are hallucination, refusal, under-acting, context loss, format drift and inconsistent output. In a hallucination, the answer states what no source holds. A refusal is what this book calls a decline. In under-acting, the model does less than asked. In context loss, it leaves out a rule or a fact it was given. In inconsistent output, the decision changes from run to run. The "Net 30 days" answer fits well. The terms came back in words the code did not expect, which is format drift: the answer left the form.
The red case fits none of the six well. It is not format drift, because the shape is right. It is not a hallucination, because the number is printed on the invoice. The six names say what went wrong in the answer. They do not say what the prompt was missing, and that is what you must change.
How do I find the missing piece?
Match what you see to a row of the prep course's table. Each kind of failure points to one missing piece of the prompt.2 The last column is this book's, and shows where the six names meet it.
| What you see | What the prompt lacks | Nearest of the six names |
|---|---|---|
| The wrong shape: a sentence where a label was expected, prose where JSON was expected | An output constraint: the form, the field names, where to stop (25.3) | Format drift |
| The content drifts: the scope, the tone, a wider question answered, worse as the conversation goes on | A system prompt, or a more specific one (25.2) | Context loss, when it gets worse as the conversation grows |
| The task is right and the structure is invented | Examples: one correct pair of input and output shows the exact shape (25.4) | Format drift, or a hallucination when a field is invented |
| Clean on the tested inputs, broken on a variant | A constraint or an example that names the variant | None of the six |
The table has no row for a decline, for under-acting or for inconsistent output. More words in the prompt are not their usual fix, and 24.9 gives a recovery for each cause.
The red case is in the last row. The prompt was clean on the other 14 extraction cases and broke on this one. The builder reads the prompt beside the invoice and finds the gap: the prompt asks for "the total" and never says which amount that is. The instruction was unclear. The exam guide's name for the fix is instruction clarity.
What does the builder do before the prompt changes?
The builder adds the check that would have stopped this answer live. It is plain code: the total must be the subtotal plus tax. The red case is now stopped at that check (25.9 builds the rest of it).
What is the one change?
Four words in one instruction: "the total, including tax". The builder changes nothing else. The whole suite runs, and every case passes.
Why the whole suite, when one case failed?
Because a change that fixes one case can break others, and only the suite re-reads them. Anthropic's own worked example shows it. A second version of a prompt added a broad rule, "Apply this rule before any other consideration". It fixed the tickets it was written for. Scored against a labeled test set of 20 tickets, it made the billing tickets worse. So the tutorial rolls it back, which means it returns to the earlier version.3
In Lab 25 you see the same thing on Brightline's suite. A recorded run shows a broad rewrite that turns the red case green and turns two passing cases red. Run on the one case, that rewrite looks finished.
Figure 25.6 shows what the full run finds.
Figure 25.6. One change, the whole suite. The revision fixes the failing case and breaks two others, and only the full run shows it.
What does "keeping it closed" mean?
The case stays in the suite permanently. The red case was already there, with Ana's values. A failure found in live work joins the set the same way: Ana labels it, as she does for INV-8340 in 25.7. From then on, every change to the prompt, by anyone, is read against it. That is the exam guide's "closing the gap and keeping it closed".
What does this cost?
Money and a wait. Each full run calls the model once for every extraction case. Running only the failing case is fine while you look for the cause, in step 1. It is never the last run before a change is merged.
The operating rule: reproduce the failure, name it, find the one piece the prompt lacks, change that one thing, run the whole suite, and keep the case.
Do this now. Ask your coding agent to show you a failing case before anyone edits anything. Copy this line:
Run only the extraction case that is red. Show me the invoice's text, the extraction prompt and the model's answer side by side, and Ana's value for each field. Change nothing.
Before you ask for a fix, write two lines in your notes. The first is the name of the failure, or "none of the six fits". The second is the one piece the prompt lacks. Check: your second line names a row of the table above.
Check yourself
Question 1 / 7
0 answered
The builder changed one line of the prompt and the failing case now passes. What comes next?
Sources
- Owner
- Panaversity