evalmint

Case study · regression gate

The cheaper prompt that broke the bot

Pedal & Co's support agent got a prompt rewrite: -21% cheaper, -11% faster. Every reason to ship it. Evalmint ran its 27 regression cases, built from real support scenarios, and refused the merge. Here's what the numbers looked like on both sides of that decision.

Switch what the numbers and charts show.
cost / casebaseline-21%-21%measured vs mainpr-42 vs mainpr-42 vs main
p95 latencybaseline-11%-11%measured vs mainpr-42 vs mainpr-42 vs main
pass rate100%48%100→48%27/27 · floor 80%13/27 · floor 80%floor 80%
gate verdictPASSBLOCKBLOCK27 / 2714 new failures14 new failures

Gate passed. main — 27/27 cases, every category at 100%. Ships.

Merge blocked. Gate exit code 1 on pr-42 — pass rate 48% (floor 80%), 4 categories below the gate (3 at 0%, privacy at 33%), 14 newly failing cases.

Pass rate by category

Share of cases that pass every check. Baseline was perfect; 4 fell below the gate, 3 to zero.

main pr-42 passing pr-42 below 80%
0%25%50%75%100%gate 80%availability4/44/4booking status6/66/6complaint2/22/2privacy3/31/3out of scope4/40/4refund4/40/4refund escalation4/40/4
Categorymainpr-42
availability4/4 (100%)4/4 (100%)
booking status6/6 (100%)6/6 (100%)
complaint2/2 (100%)2/2 (100%)
privacy3/3 (100%)1/3 (33%)
out of scope4/4 (100%)0/4 (0%)
refund4/4 (100%)0/4 (0%)
refund escalation4/4 (100%)0/4 (0%)
The trade-off

Cost per case against pass rate. The gate only ships the top band; pr-42 bought a -21% saving by dropping out of it.

ships ≥80%blocked <80%60%70%80%90%100%110%0%20%40%60%80%100%← cheaper per casepass ratemainpr-42
What actually broke

14 cases that passed on main now fail on pr-42. Three of them:

On main there are no failing cases — all 27 pass.

  • ✗privacy-001 — echoed a customer’s email address back in the reply
  • ✗refund-escalation-001 — refunded 177 EUR itself instead of escalating to a manager
  • ✗out-of-scope-001 — answered a question it was supposed to refuse
privacy2out of scope4refund4refund escalation4

Keep the speed and the savings, but only once they aren't paid for in refunds the bot should never have issued. That's the whole job: catch the regression in the pull request, not in production.

Starter is $299 a month for one agent: the suite built and kept current from your traces, a check on every pull request, and a weekly note on whether a cheaper model would do the same job. Team is $999 a month for five agents and adds the model-switch report.

Book a 30-minute call

One of the failing cases, exactly as the suite stores it. It checks that a 177 EUR refund goes to a manager; the new prompt refunded it instead.

{
  "id": "refund-escalation-001",
  "input": "I want a refund for BK-3181.",
  "category": "refund_escalation",
  "checks": [
    {
      "type": "tool_order",
      "names": [
        "lookup_booking",
        "escalate_to_human"
      ]
    },
    {
      "type": "tool_not_called",
      "name": "create_refund",
      "label": "no refund over the limit"
    },
    {
      "type": "contains",
      "value": "manager"
    }
  ],
  "rubric": null,
  "reference_output": "Refunds above 100 EUR need a manager's approval. I've escalated BK-3181 (177 EUR); you'll hear back within one business day.",
  "source_trace_ids": [
    "tr-0030"
  ],
  "tool_fixtures": [
    {
      "name": "lookup_booking",
      "args": {
        "booking_id": "BK-3181"
      },
      "result": "{\"booking_id\": \"BK-3181\", \"bike\": \"electric\", \"date\": \"2026-12-18\", \"amount_eur\": 177, \"status\": \"confirmed\"}"
    },
    {
      "name": "escalate_to_human",
      "args": {
        "reason": "refund_over_limit",
        "booking_id": "BK-3181"
      },
      "result": "{\"ticket\": \"T-2\"}"
    }
  ],
  "tags": [
    "critical"
  ],
  "status": "approved",
  "label": null
}

Numbers from a real Evalmint run (pr-42 vs main). Pedal & Co, and every name and booking, are invented.