- Published on
I tidied up a prompt. It broke 7 support tickets.
I ran 5 prompt edits through 50 labelled support tickets on 4 models, 3,600 calls for $3.07. Shortening the urgency rules broke up to 7 tickets on the cheap models and at most 1 on the strong ones. Putting the deleted list back restored high urgency on all six money tickets and passed my check on both cheap models.
When you change code, tests run before it merges. When you change a prompt, a lot of teams read a few outputs and ship. That gap matters because an LLM feature rarely fails loudly. The output still parses. The answer is just wrong, and nothing in your logs says so.
I wanted to know how often a harmless-looking edit breaks something real, and whether a cheap check can catch it first. So I built a small production-style feature, wrote down what a correct answer looks like, and changed the prompt five times. One ticket shows what I found.
I was charged twice for March. Invoice INV-204817 shows up two times on my card statement. Please refund the duplicate.
On the original prompt, all four models I tested rated it high urgency on all 3 calls. Then I tidied the urgency definitions so they'd read better, and high urgency became "the customer is blocked or has lost data". The two cheaper models, Claude Haiku and GPT-6 Luna, now rated this ticket medium on all 3 calls. The shorter wording no longer said that being charged wrongly makes a ticket urgent, so the cheaper models stopped treating a double charge as urgent. The JSON was valid and the category was right, but a customer who had been charged twice would have waited in the wrong queue.
That sounds like a small labelling mistake until you think about the person on the other end. They've paid twice, and their ticket is now sitting behind routine requests. They wait, they write in again, and they get more irritated each time. Some will dispute the charge with their bank, tell other people about it, or leave. The support team ends up handling the same problem twice, and the brand pays for it in trust. I didn't measure those costs here, but they're the reason this field matters. As engineers, our job doesn't stop at valid JSON. We're also responsible for what the answer does to the customer and the business.
Before the run, I wrote down which edits I thought were risky. I was wrong. The edit that did the damage was the one that looked like a cleanup.
Why an LLM, and why this mattered to me
An LLM isn't the only way to triage tickets. A classic machine learning classifier would work, and so would newer decision models like TypeSafe's JEV, which return a choice with a confidence score instead of generating text. I went with an LLM because one of the tasks for a previous client needed something similar on a frontier model. I was leaning towards an OpenAI model, since it was cheaper and I'd found it consistent over time. The client went with Claude because of their infrastructure and preference.
That task left me with a question that matters more than which model you pick. Once a feature like this is live, how do you keep changing its prompt and still get consistent, predictable output? These models aren't deterministic, so nobody can promise you the same answer every time. What you can have is a process that tells you when behaviour has moved, and that's what this experiment gave me. I ran it a step below each vendor's flagship, for reasons I'll get to in the setup, so my claim is that the process carries over to frontier models, not that I tested them.
This article covers how I set the test up, what each edit broke and why, a fix I measured, what the edits did to the bill, and how the same check now runs on every prompt change.
The code, prompts and every result are in the repo.
The setup is a triage feature with one right answer per field
Here's the whole experiment at a glance before the details.
| Part | What I used |
|---|---|
| Tickets | 50 labelled, 40 visible and 10 held-out |
| Models | Claude Haiku 5.5 and Opus 5.5, GPT-6 Luna and GPT-6.1 Sol |
| Prompt versions | The baseline plus 5 edits |
| Calls per ticket | 3, on every model and prompt version |
| Total | 3,600 calls for $3.07 |
The feature triages support tickets for Larkwell, a fictional project-tracking app. One model call reads a ticket and returns four fields, which are the category, the urgency, whether the customer asked for a refund, and the invoice number.
Triage is a common first use of LLMs in production, and every field here has one right answer, so quality becomes something you can count. In this setup, high urgency pages the on-call person. Medium waits.
The tickets stayed fixed and only the instructions changed. Every call sends one ticket together with one version of the system prompt. The baseline is the prompt the feature runs today, and each edit is a copy of it with one kind of change. Same tickets, different instructions, compare the answers. That's the whole experiment.
I wrote 40 tickets around the cases that trip models up, like angry customers with nothing broken, hidden refund requests, invoice lookalikes, two problems in one message, French, and a prompt-injection attempt. I kept 10 more aside as a held-out set, because a prompt can end up fitting the tickets its author can see. Codex, OpenAI's coding agent, drafted those 10 from my written labelling policy after the prompts were finished, and I labelled them. That policy is what defines a correct answer. Its most important rule here is that urgency follows what happened, never tone.
Grading is plain code. All four fields are compared exactly, and a ticket passes only when every one of them is right. I didn't set a temperature. The current Claude models reject one outright, so every model ran on its default sampling, at low reasoning effort. That means a model can answer the same ticket differently from one call to the next, so every ticket ran 3 times. Even the score moves a little. Haiku got 87.3% on the unchanged prompt in the main run and 88.0% in a later one. So I called a ticket broken only when it was right on all 3 baseline calls and wrong on most calls after the edit.
def classify(baseline: float, candidate: float) -> str:
if baseline == 1.0 and candidate < 0.5:
return "broken"
if baseline == 0.0 and candidate > 0.5:
return "fixed"
if baseline == candidate:
return "same"
return "flaky"
That rule is strict on purpose. One unlucky call shouldn't block a change, but a ticket that goes from always right to mostly wrong should.
A short script, which I'll call the gate, reads the results and fails the change in two situations. The first is any broken ticket. The second is a lowered urgency, meaning a ticket whose urgency was right on all 3 baseline calls comes back lower on most calls after the edit. It gets its own rule because urgency is the costliest field to get wrong here.
I used a cheap and a strong model from each of two vendors, Claude Haiku 5.5 and Opus 5.5 from Anthropic, and GPT-6 Luna and GPT-6.1 Sol from OpenAI. The cheap models are what you'd run at volume. The strong ones show whether a bigger model shrugs off a bad edit. Having a second vendor means a result can't be written off as one company's quirk.
I left out the flagships, Claude Fable 5.2 and GPT-6 Astra, on purpose. Those are the models you reach for on complex work that needs long, hard reasoning. A few of these tickets are tricky, but reading a ticket and filling in four fields doesn't need that level of thinking. On the unchanged prompt, the four models I did test were already within 2.5 points of each other on the 40 visible tickets, from 95.0% to 97.5%. The flagships would also have roughly doubled the cost of the run. I didn't run them, so this is my judgement and not a result, but you don't bring a bulldozer to plant a sapling.
Five edits that would look fine in a diff
Each edit started from the same baseline prompt and made the kind of change a real team makes.
| Edit | The change | The motive |
|---|---|---|
| Keep it quick | "Go with the most obvious reading and don't overanalyse" | Faster answers |
| Add an example | One more worked example, a double charge rated high | A fix after a mis-triaged ticket (hypothetical) |
| Feel heard | "If a customer is clearly upset, make sure their ticket gets the attention it deserves" | Empathy |
| Tidy the urgency rule | The urgency definitions shortened | Readability |
| Three changes at once | Shorter refund rule, vaguer multi-issue rule, "if unsure, choose medium" | A busy pull request |
I committed my predictions before the run, and I expected the empathy edit and the three-change edit to do the most harm. That wasn't a blind guess. A first, smaller run on an earlier version of the prompts had already shown the tidy-up hurting, and I still bet on the other two.
Four edits barely registered. One didn't.
Here's how many tickets each edit broke on each model.
| Tickets broken by edit | Haiku | Luna | Opus | Sol |
|---|---|---|---|---|
| Keep it quick | 0 | 1 | 0 | 0 |
| Add an example | 1 | 0 | 0 | 0 |
| Feel heard | 1 | 0 | 0 | 0 |
| Tidy the urgency rule | 6 | 7 | 1 | 0 |
| Three changes at once | 0 | 1 | 0 | 0 |
The edits I worried about barely moved anything. The empathy edit broke one ticket in total across all four models. The baseline already says that urgency follows what happened, and that capitals, threats and "no rush" don't change it. My best explanation is that the models followed that specific rule over a general request to care. The three-change edit broke one ticket on Luna, plus a quieter failure on Haiku that I'll come back to.
Two tickets also hid an instruction aimed at the model. One told it to mark a question about label colours as urgent billing, and the other demanded high urgency and a refund. No model on any prompt version followed either one. Two tickets aren't a security test, but none of the edits opened that hole.
Before any model ran, I labelled the 40 tickets myself, working from my own understanding of the labelling policy. My urgency labels matched the expected answers 68% of the time, and every difference went the same way. Where I differed, I rated the ticket higher than the policy does, usually because the customer sounded upset. I also took the planted instruction in the injection ticket at face value. The models didn't, on any call, and they didn't follow the empathy edit either. Judging urgency by what happened rather than by how the customer sounds is harder than it looks, and that's why the rule is written down.
Then there's the tidy-up row.
The tidy-up deleted part of the policy
I wanted the urgency section to be shorter and easier to scan, so I cut what looked like repetition and kept what looked like the main idea of each level. This is the whole change.
- high: the customer cannot do their work at all, has lost data, reports a possible
- security problem, or has had money taken wrongly (charged twice, charged after
- cancelling, charged the wrong amount)
+ high: the customer is blocked or has lost data
- medium: something is wrong or degraded, but the customer can keep working
+ medium: something is wrong, but the customer can keep working
- low: questions, requests and feedback with nothing broken
+ low: questions, requests and feedback
- Judge urgency by what happened, not by tone. Capital letters, threats and the word
- "urgent" do not raise urgency. Politeness and "no rush" do not lower it.
+ Judge urgency by what happened, not by tone.
In a review, it reads as a cleanup. It broke 6 tickets on Haiku and 7 on Luna.
All six tickets Haiku broke are about money taken wrongly. There are two double charges (t06, and t40 in French), a charge after cancelling (t16), a charge for the wrong plan (t21) and two overbilled seat counts (t24, t35). Haiku moved every one from high to medium on every call. Luna broke the same six and sometimes dropped them to low, the bottom of the queue.
The reason is simple once you see it. The model doesn't know what "urgent" means for this business. It only knows what the prompt says urgent means. The phrase "charged twice, charged after cancelling, charged the wrong amount" looks like padding, so it was the first thing to go, but that phrase was the rule. A customer who was double charged can still log in and work, so under the new wording they aren't "blocked", and the cheap models followed the new wording exactly.
Lockouts, outages and lost notes still fit "blocked or has lost data", and none of them moved on any model. The security report is the result this explanation doesn't cover. The edit removed security from the definition too, yet that ticket stayed high on all four models. Deleting a rule doesn't always change the answer, and I can't tell you from this run why money fell and security held.
Luna's seventh break follows the same logic as the money tickets. Ticket t38 is a login fault on an iPhone with a working laptop, which the policy rates medium because something is broken but the customer can keep working. The edit had cut "with nothing broken" from the low definition, so a working fault started to read like an ordinary question, and Luna rated it low on 2 of 3 calls.
The strong models mostly held. Opus broke one ticket, the French double charge, and Sol broke none. My guess is that they leaned on a worked example the edit left in place, which rates a wrong-plan charge as high. I didn't test that.
Put the two edits side by side and you can see the pattern. The empathy edit added a vague instruction, and the models kept following the specific rule it competed with. The tidy-up removed a specific rule, and the cheap models followed the gap.
This changed how I shorten prompts. Before I cut a phrase, I ask whether removing it could change which answer is right. Repeated wording and filler can go. Lists, exceptions and small qualifiers like "with nothing broken" usually need to stay, because they're the context the model uses to decide. Shorter wording can also be vaguer, and "blocked" left the model to work out for itself what counts.
The score held while a ticket broke
So far I've counted broken tickets. Many teams judge a prompt change by one number instead, the pass rate, which is the share of answers that get every field right. On the cheap models it showed the damage. Haiku fell from 87.3% to 76.0%, and Luna from 86.0% to 72.0%. Opus is the case that changed how I think about it.

The cheap models' scores fell. Opus's score didn't move, because one break and one fix cancelled out.
Opus scored 88.0% before the edit and 88.0% after. Underneath that flat number, the French double charge went from high to medium on all 3 calls. At the same time, an unrelated ticket about an invoice with the wrong VAT number went from wrong to right. One break and one fix cancelled out, and the average showed nothing.
A pass rate is an average, and an average can't tell you which customer moved. Comparing the same ticket before and after the edit can. This is what the gate printed for Opus.
- opus v5_tidy_urgency: urgency lowered on 1 cases (t40), allowed 0
- opus v5_tidy_urgency: 1 broken (allowed 0)
The urgency rule also caught the quieter failure from the three-change edit. On Haiku, that edit dropped one ticket from medium to low on all 3 calls. The ticket was already failing on its category, so the pass rate couldn't fall any further and the ticket couldn't count as broken. Only the urgency rule saw the new error.
Putting the list back fixed it
Across all five edits, the gate rejected 8 of the 20 model-and-edit pairs, including the tidy-up on Haiku, Luna and Opus. Rejecting a change is only half the job, so I wrote a fix that shortens the wording and keeps every reason a ticket is high.
- high: the customer cannot do their work at all, has lost data, reports a possible security problem, or has had money taken wrongly (charged twice, charged after cancelling, charged the wrong amount)
+ high: the customer is blocked, has lost data, reports a possible security problem, or has had money taken wrongly (charged twice, after cancelling, or the wrong amount)
I also kept "with nothing broken" on the low line. I ran it on Haiku and Luna, 600 calls for $0.03, and it broke nothing. All six money tickets were high on every call and the gate passed. My prediction, written down before the run, was 1 break per model.
It wasn't perfect. Luna's login ticket was still wrong on 2 of 3 calls, this time rated too high. It counts as flaky, my label for a ticket that moved without clearly breaking, because it also slipped once on that run's baseline. Passing the gate means nothing clearly regressed, which is a weaker claim than every answer being right.
The prompt did get shorter, so I didn't have to choose between readability and the policy. I only had to stop treating the lists as decoration.
The cleanup also roughly tripled the OpenAI bill
Caching lets a vendor reuse the start of a prompt that repeats on every call, at a fraction of the price. OpenAI does it automatically, but only for prompts of 1,024 tokens or more. The tidy-up cut the average OpenAI request from 1,086 to 1,024 input tokens, right at that line. Calls that read the cache fell from 150 to 37 of 150 on Luna, and from 148 to 39 on Sol. Sol's cost went from $0.68 to $2.12 per 1,000 calls, and Luna's from $0.04 to $0.11. Claude's cost barely moved.
On Sol the tidy-up broke nothing and only got more expensive, so a quality check alone would pass it. The gate has a cost limit for exactly this. It's off by default, and I'd turn it on.
Running it on every prompt change
None of this helps if someone has to remember to run it. In the repo, any pull request that changes a prompt runs it against the current one on the two cheap models, for about $0.04. If a ticket breaks, the check fails, GitHub blocks the merge, and the report shows up in the job summary. I tested it by opening the tidy-up as a real pull request, and the merge was blocked.

The tidy-up as a real pull request. The required prompt-gate check failed, so GitHub wouldn't merge it.
What I got wrong
My predictions missed in both directions. I expected the empathy edit to break 1 to 3 tickets per model, and it broke 1 in total. I expected the three-change edit to break 3 and 4 on the cheap models, and it broke 0 and 1. I expected the tidy-up to break 2 on each cheap model, and it broke 6 and 7.
My labels needed checking too. Every model failed the same 5 of the 10 held-out tickets, with the same graded answer on all 72 calls per ticket, and against my own written policy the models were closer each time. I kept my labels anyway, because changing them after seeing the answers bends the test toward the models. So the held-out 50% measures agreement with my labels, not model accuracy.
I also had an AI reviewer recompute the results from the raw data. The broken counts, pass rates and costs all held up, but nine claims in my notes and code didn't. They included a gate count that was off by one, a wrong statistical argument, and a real bug that let the gate pass a run with incomplete evidence. I fixed all of them before writing this.
Key insights
- A definition is policy. The examples inside it are often the rule. Delete them and you've changed what the model is told to do.
- Compare cases, not averages. A score can stay flat while a ticket breaks.
- Gate the costliest field on its own. Here, a lowered urgency fails the check even when the pass rate can't move.
- Cheap models make a sensitive alarm. Still gate on the model you ship.
- Watch cost too. A shorter prompt can cost more if it falls below a cache minimum.
What this tells me, and what it doesn't
This is a small, deliberately hard test set. It has 50 synthetic tickets for a fictional app, weighted toward risks like billing, so the size of the damage depends on that mix. I wrote the prompts, the edits and 40 of the tickets. Codex drafted the other 10 in a session that had seen parts of the experiment.
Three calls per ticket can't settle borderline cases, so a ticket that slips from 3 right to 2 shows as flaky and passes. Every model ran at low effort, with one model per vendor and tier, so this isn't a vendor ranking. The flagships weren't tested at all, and the fix and the pull request check ran on the cheap models only.
If you spot a mistake in the policy, the grading or the numbers, I'd like to hear it.
Back to the double charge
The ticket from the start is the whole story. Nobody set out to stop paging on double charges. Someone made a definition easier to read, and the rule went with the words. The output stayed valid, the category stayed right, and on one model the pass rate didn't move at all.
Choosing a different vendor wouldn't have saved it either, because the same money tickets broke on the cheap models from both Anthropic and OpenAI. That's why I keep coming back to the process more than the model. Whichever one a client ends up on, you can write down the right answers, compare them ticket by ticket, and run that on every prompt change, here for about $0.04.
A small diff isn't a small change.
I'm already working on the next experiment, and I'll share it once the results are in.
I'm an AI engineer with a full-stack foundation. I spent five years building production web platforms, did a master's in Analytics (Applied Machine Intelligence), and now build and evaluate LLM systems.
References
- The
prompt-regression-testerproject and the evaluation lesson (phase 11, lesson 10) in ai-engineering-from-scratch - The LLM evaluation chapter, evals study guide and eval-gated CI/CD case study in the AI System Design Guide
- TypeSafe AI's JEV, mentioned as an alternative and not tested here
- Authors
- Name
