That's the failure mode nobody tests for. Unit tests check code. Nothing checks what the model actually says after a prompt change, a system message edit, or a model upgrade — until the support tickets arrive.
I built a small free skill that closes the gap: the LLM Prompt Regression Suite.
How it works
- Golden set — a fixed list of prompts with recorded baseline outputs.
- Compare —
main_pipeline.pycompares each new output to its baseline: exact match, drift within tolerance (difflib similarity, default threshold 0.85), or drift/fail. Diffs are shown as unified diffs. - Validate —
validate_output.pychecks the report's schema and that pass/fail counts are consistent. - Triage — classify each failure as a real regression, an acceptable rewording, or a bad baseline.
- Gate — block the release while
overallis FAIL.
Everything runs offline and deterministic: no live LLM calls, no API keys, stdlib-only Python.
The proof
I ran it on the bundled fictional 6-prompt sample (classification, FAQ, tone, extraction, JSON format, yes/no). Real dry-run result: overall FAIL — 4/6 passed, 2 failed.
- P-01 support-ticket-classifier: PASS, exact match, 1.0000
- P-02 faq-answer-concise: PASS, 0.8901
- P-03 product-summary-tone: FAIL, drift, 0.1421
- P-04 extract-order-id: PASS, exact match, 1.0000
- P-05 json-format-greeting: FAIL, drift, 0.5333
- P-06 refund-policy-yes-no: PASS, 0.9897
Validator confirmed: 6 cases, 4 passed, 2 failed, 0 errors.
The two failures are exactly the kind that slip through: a product summary that lost its key fact and friendly tone, and a JSON-only greeting that came back as plain text.
A golden set is just JSON: cases with an id, name, prompt, baseline output, and new output, plus a meta.threshold (default 0.85). Swap the bundled fictional sample for your own set in the same shape and the same two commands run it. The sample covers classification, FAQ, tone, extraction, JSON format, and yes/no — six cases that exercise the exact failure modes teams actually hit.
Limits, honestly
It compares recorded outputs — it doesn't call a live model, grade factual truth, or judge creative quality. Similarity is text overlap (difflib), not a semantic judge: a paraphrase can score low and a wrong answer can score high. Triage every failure.
Try it
Free (MIT):
- Agensi: https://agensi.io/skills/llm-prompt-regression-suite
- GitHub: https://github.com/VIKRAM-1318/llm-prompt-regression-suite
The workflow to steal: golden set, compare, validate, triage, gate the release.
