04 Trust in productionLesson 2 of 410 minBeginnerHelps to have seen:Evals
Prompts in production: versions and regressions
- + prompt v2
- + exchange request
The diagram shows: Prompt v2 (warmer), "Exchange the T-shirt" ("from 4802 for M"), Agent (the loop: model and tools) and Case by case (v1 × v2).
Highlighted: "Exchange the T-shirt" and Agent.
Prompt v2 sends to Agent carrying "offer a refund".
"Exchange the T-shirt" sends to Agent carrying "exchange for M".
Added: prompt v2. Added: exchange request.
Step 1 of 8: A prompt improvement breaks the exchange
- Why the prompt deserves versions, like code
- How to run two versions on the same eval
- Why the average hides regressions
- What to do when the eval does not cover the change
Cases that got worse from prompt v1 to v2 on the store’s 50 test conversations
Coming soon: I will measure this on the example agent and publish the number with the report.
The whole lesson as textEvery step, to read at once, search or print.
A prompt improvement breaks the exchange
Someone makes the agent warmer: "if the customer is unhappy, offer a refund". They test three complaint conversations and all of them get better.
The next day, a customer asks to exchange the T-shirt from order 4802 for an M. The agent offers a refund instead of opening the exchange. Nobody tested the exchange.
Changing the prompt changes behavior in cases you were not looking at.
A prompt is code: file, version and history
The agent’s prompt lives in a file, such as atendente-v1.md, and changes through a review, like any code. The model also has its version pinned.
That way you can tell which version was live when a conversation went wrong, compare two versions line by line and roll back in minutes.
If you do not know which prompt was live, you do not know what to fix.
Both versions go through the same yardstick
v1 and v2 run on the same 50 conversations, with the same : tools and arguments checked in code, and the rest by an .
Only the prompt changes. If the result changes, the cause is the prompt.
Compare one thing at a time: same agent, same cases, same yardstick, different prompt.
The average hides the regression
v2 can get more conversations right overall and still get wrong the exchange that v1 got right: a . The improvements on complaints hide the drop in the average.
That is why the eval output is a case-by-case table: what used to pass and now fails, what used to fail and now passes.
Look first at the cases that got worse. The average comes after.
A rule for the new version to go in
Before putting v2 live, agree on the rule: no case that used to pass may get worse without someone reading the conversation and accepting it.
The 10 malicious conversations accept no regression at all. An improper refund costs more than a less friendly reply.
Decide the entry criterion before seeing the result, so you do not bargain with the number.
The eval passes, but does not measure what changed
Suppose v2 fixes s08 and the eval turns all green. It still tells the agent to please the customer, and none of the 50 conversations measures whether it gives away too much when the customer insists.
The eval is green because it does not look there. Every prompt change calls for the question: which case measures this behavior?
Behavior changed? Create the test case before celebrating the number.
The update OpenAI rolled back
In April 2025, OpenAI rolled back a GPT-4o update that made the model sycophantic. According to the company, the offline evals and A/B tests looked good, and there was no specific eval for sycophancy.
It committed to blocking launches based on qualitative signals, even with good A/B results. Our reading: the eval only protects what it measures.
A good number on an eval that does not cover the change is false security.
A new prompt goes in like new code
v1 and v2 run on the same 50 conversations. You first read what got worse, apply the entry rule agreed on beforehand, and create a case for each new behavior.
Zero regressions does not mean v2 is good. It means it did not break what the eval covers.
A new prompt goes live like new code: with a version, tests and someone looking at the regressions.
Questions in this lesson
- Why keep the prompt in a versioned file?
- To know what was live, compare and roll back. Without versions, you cannot link a bad conversation to the prompt that caused it.
- v2 gets more right overall, but the size exchange started failing. What do you look at first?
- The cases that got worse. The average hides the regression. Every regression needs someone reading the conversation.
- The new prompt tells the agent to please the customer, and the eval stays green. What is missing?
- A test case that measures whether the agent gives away too much. The eval only protects what it measures. New behavior calls for a new case.
- OpenAI, Sycophancy in GPT-4o (Apr 2025) ↗
- OpenAI, Expanding on what we missed with sycophancy (May 2025) ↗
- Anthropic, Demystifying evals for AI agents (Jan 2026) ↗
- Anthropic, Model IDs and versions ↗
- OpenAI, Prompting ↗
- OpenAI, Evaluation best practices ↗
- Hamel Husain, Your AI Product Needs Evals (Mar 2024) ↗