ai-prompt-regression-testing
Fungsinya
Alat ini membantu membandingkan cara AI menjawab pertanyaan sebelum dan sesudah Anda mengubah instruksinya. Alat ini memastikan perubahan tidak merusak jawaban lama.
Kapan dipakai
- ✓Saat menguji apakah perubahan pada instruksi AI merusak sesuatu.
- ✓Saat memeriksa apakah AI masih mengikuti aturan penting (seperti tidak mengarang fakta).
- ✓Saat mencatat keputusan tentang kualitas jawaban ketika hasilnya belum jelas.
Link skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ai-prompt-regression-testing/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Bandingkan jawaban AI untuk 5 pertanyaan ini sebelum dan sesudah instruksinya diubah. Periksa apakah AI masih mengikuti aturan.”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Anda menyediakan kumpulan pertanyaan tetap beserta jawaban yang diharapkan. Lalu, Anda membandingkan jawaban AI dengan instruksi baru terhadap jawaban lama. Sistem mencatat jika ada yang salah.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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"]
…
Pertanyaan umum
Apa itu 'regresi'?
Regresi berarti sesuatu yang dulu berfungsi dengan baik menjadi tidak berfungsi lagi setelah ada perubahan.
Apakah saya memerlukan dataset khusus?
Ya, Anda memerlukan kumpulan pertanyaan dan jawaban sebagai acuan pembanding. Kumpulan ini sebaiknya tetap dan sudah ditinjau.
Apakah ini menggantikan pengujian biasa?
Tidak, alat ini untuk jenis pengujian tertentu, yaitu memeriksa apakah perubahan instruksi tidak membuat jawaban yang sudah ada menjadi lebih buruk.
Detail
Deskripsi asli dari pembuat
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.
Popularitas
- Bintang GitHub
- 48k
- Peringkat
- #3718
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- …
Skill lain dari repositori ini
00-andruia-consultant
48kMembantu agent Anda memulai atau meningkatkan proyek AI. Agent menganalisis kode, menyarankan tools, dan membuat rencana aksi dalam bahasa Spanyol.
007
48kMemungkinkan agent Anda melakukan audit keamanan dan threat modeling. Berguna untuk melindungi proyek dari serangan dan celah keamanan.
10-andruia-skill-smith
48kMembantu agent Anda membuat atau meningkatkan tools AI. Agent mendefinisikan cara kerja tools, menulis dokumentasi, dan memvalidasi strukturnya.
20-andruia-niche-intelligence
48kMemungkinkan agent Anda membuat ringkasan industri tertentu. Berguna untuk memahami konteks, aturan, pola penggunaan, dan risiko proyek dengan sumber terpercaya.
Skill serupa
writing-skills
311kMengajari agent Anda menulis skill baru dan menguji setiap skill lebih dulu, memastikan skill itu benar-benar mengubah perilaku agent.
writing-for-agents
310kMenjelaskan cara menulis instruksi yang jelas untuk agent AI, termasuk file skill, AGENTS.md, dan CLAUDE.md, agar perilaku agent dapat diprediksi.
bengali-nlp
280kMembuat agent Anda memproses teks Bahasa Bengali. Membantu memahami dan mengolah bahasa tersebut, termasuk normalisasi teks dan karakteristik uniknya.