Prompt regression
An answer that used to be right goes wrong after a change to the prompt or the model.
A prompt regression is an answer that used to be right going wrong after a change to the prompt or the model. Prompts are edited to fix one answer and quietly change others: a rule gets lost in a rewrite, a “be shorter” line drops a required detail, a cheaper model skips a step.
Because model output varies between runs, one failed run is not proof: run each case several times and treat a case that passes sometimes as unstable, not broken. Regressions also arrive with no edit on your side, when a provider updates the model behind an alias; model pinning to a dated version keeps that change under your control. Anthropic’s eval guide calls the suite that catches this a regression eval and expects it to pass near 100%, so any drop is worth a look before shipping.
The defense is a golden dataset run in CI/CD on every prompt or model change, with Promptfoo or a similar runner and, for open-ended answers, an LLM judge. Fixing a regression by adding one more special-case line to the prompt often creates the next one, so rerun the whole set after every fix.
Sources
- Anthropic: Demystifying evals for AI agents anthropic.com
Related terms
- Evals: A repeatable test set that scores an AI feature, so changes can be measured instead of guessed.
- LLM as judge: Using a model with a rubric to grade another model’s output.
- Model routing and fallback: Sending each request to the model that fits it, and to another one when the first fails.
- Golden dataset: A fixed set of real inputs with expected answers or checks, used to test an AI feature after every prompt or model change.
- Model pinning (model versions and deprecation): Calling an exact, dated model version instead of an alias like “latest”, so behavior does not change under you, and planning for its retirement date.
- Promptfoo: An open-source command-line tool for testing prompts and models against test cases defined in a config file, including security red teaming.
