ai-prompt-regression-testing
Lets your agent test changes to AI prompts. It compares results and checks if alterations caused unwanted regressions.
What it does
This tool helps compare how an AI answers questions before and after you change its instructions. It ensures the changes don't break old answers.
When to use it
- ✓When testing if a change to the AI's instructions broke something.
- ✓When checking if the AI still follows important rules (like not making up facts).
- ✓When recording a decision about answer quality when results are unclear.
Example of what to ask your AI
“Compare the AI's answers to these 5 questions before and after changing the instructions. Check if it still follows the rules.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
You provide a fixed set of questions and expected answers. Then, you compare the AI's answers with the new instructions against the old answers. The system records if anything went wrong.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill ai-prompt-regression-testingOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/ai-prompt-regression-testing/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
AI Prompt Regression Testing
When to Use
- Compare a prompt change with an observed baseline on a fixed evaluation set.
- Detect schema, factuality, refusal, tool-selection or task-completion regressions.
- Record a reviewable decision when results are noisy, missing or contradictory.
Workflow
- Define the task, representative cases and forbidden outcomes. Use synthetic or approved/redacted data; freeze case IDs and the dataset revision before runs.
- Record baseline/candidate prompt digests, exact available model/version, inference settings, tool versions and evaluation environment. Do not hardcode old model-family options or silently change models between comparisons.
- Predeclare checks and acceptance rules. Use deterministic schema/field checks for structured output, behavioral checks for tools and a clear human/rubric standard for open text. Similarity does not prove factual or code correctness.
- Run matched baseline/candidate cases under the same permissions and budget. Record latency/cost and repeated runs when variability matters. A timeout, missing output or judge error is incomplete, not a pass or a zero-cost result.
- Treat judge outputs as evidence with limitations. Blind/randomize presentation where feasible, calibrate against human-labeled examples, and record judge identity/rubric. Do not ask a model to verify private reasoning or accept a judge's confidence as an objective correctness measurement.
- Review differences case by case and report the denominators, failures and uncertainty. Keep mandatory safety/schema failures visible even if aggregate similarity improves. Use the predeclared rule, not a threshold selected after results.
- Store a redacted report and exact artifacts at an authorized destination. Decide retain/revise/reject for the stated dataset; deployment is separate.
Regression register
| Field | Type | Example / meaning |
|---|---|---|
| case_id | string | PTEST-001; a textual ID, not SERIAL |
| dataset_revision | immutable reference | exact case inventory, expected checks and labels |
| prompt_revision | string | baseline/candidate digest |
| model_runtime | string | exact available ID/version plus settings |
| check | string | required JSON fields or approved rubric criterion |
| result | enum | pass / fail / incomplete |
| evidence | reference | redacted actual output, tool trace or observed check |
| judge_configuration | optional object | exact judge ID/rubric/version and calibration limits |
| latency_ms | nonnegative number or null | null if not observed; never invented |
| cost | amount/currency or null | actual billing basis; unknown remains unknown |
| run_revision | immutable reference | binds the report to the actual run |
IDs and statuses must have consistent SQL/JSON/CSV representations. Do not store private prompts, user messages or tokens in a public spreadsheet or Notion register.
Worked example
Two cases test a support-answer prompt. PTEST-001 requires an answer grounded in the supplied policy; PTEST-002 requires a structured escalation when the policy is absent. The candidate sounds more helpful but PTEST-002 has no observed result. The report is incomplete, not a win. The following Python 3 helper aggregates already reviewed case statuses; it does not call models or decide correctness.
def summarize_regression(results, expected_case_ids):
if not isinstance(expected_case_ids, list) or not expected_case_ids:
return {"status": "incomplete", "reason": "missing case inventory"}
if any(not isinstance(case, str) or not case for case in expected_case_ids):
return {"status": "incomplete", "reason": "invalid case IDs"}
if len(set(expected_case_ids)) != len(expected_case_ids):
return {"status": "incomplete", "reason": "duplicate expected case IDs"}
if not isinstance(results, list) or any(not isinstance(row, dict) for row in results):
return {"status": "incomplete", "reason": "invalid results"}
by_id = {}
for row in results:
case = row.get("case_id")
if not isinstance(case, str) or case not in expected_case_ids or case in by_id:
return {"status": "incomplete", "reason": "unexpected or duplicate result"}
if row.get("result") not in ("pass", "fail", "incomplete"):
return {"status": "incomplete", "reason": "unknown result"}
by_id[case] = row["result"]
…
FAQ
What is 'regression'?
Regression means something that used to work has stopped working after a change.
Do I need a special dataset?
Yes, you need a set of questions and answers to use as a baseline for comparison. It should be fixed and reviewed.
Does this replace normal testing?
No, this is for a specific type of testing: checking if changes to instructions haven't made existing answers worse.
Details
Original description by the author
Use when comparing prompt changes against a fixed evaluation set: record actual model settings, required checks, missing results, judge limitations and case-level regression evidence.
Popularity
- GitHub stars
- 48k
- Ranking position
- #2104
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
bengali-nlp
Has your agent process Bengali text. It helps understand and work with the language, normalizing text and handling its unique characteristics.
affaan-m/ECC
prompt-caching-strategy
Helps your agent optimize how it uses prompts for language models. It analyzes how prompts are made to find ways to cut costs and make responses faster by reusing information when possible.
affaan-m/ECC
prompt-optimizer
Has your agent analyze and improve the prompts you write. It suggests how to add information or change the wording so the AI model understands better and gives the desired answer.
affaan-m/ECC