Why prompt regression matters

When you edit a prompt, you usually mean to improve it. But an edit can also drop a constraint that was doing quiet, important work — a citation rule, a safety boundary, an approval gate. The agent does not error; it just behaves differently, and nobody notices until an incident.

A regression check exists to catch that. It compares version A and version B and asks one question: did B lose a guardrail or instruction that A had?

How the check works

  • Input: prompt version A and version B, plus the behavior you care about (citation, safety, approval).
  • Compare: the check surfaces semantic drift — not just changed characters, but changed obligations.
  • Flag: if B drops a constraint present in A, it is flagged before you ship.
  • Gate: a clean check becomes a merge condition, the same way a unit test gates code.

For agents in high-risk uses, this dovetails with EU AI Act Art. 15 (accuracy / robustness) — a regression check is the artifact that shows a guardrail was not lost between versions.

What regression testing does not do

It reduces obvious failure modes — lost instructions, dropped boundaries — and makes drift visible. It is not a guarantee the agent is safe, injection-proof, or compliant, and it is not a legal opinion. Conformity stays the deployer's responsibility across the full system.

Using AgentPrompt in the loop

Paste version A and B, choose "Regression," and AgentPrompt returns whether a guardrail was lost, with the specific instruction called out. Keep the history, roll back a bad edit, and export versions for audit.

Authoritative references

  • EU AI Act (Reg. 2024/1689), Art. 15 (robustness): https://eur-lex.europa.eu/eli/reg/2024/1689/oj
  • AI Act explorer: https://artificialintelligenceact.eu/
  • OWASP LLM Top 10 (2025), LLM01 Prompt Injection: https://owasp.org/www-project-top-10-for-large-language-model-applications/