본문으로 건너뛰기
Skillpedia
프롬프트 및 LLM48k · #3718

ai-prompt-regression-testing

하는 일

AI에게 지시문을 바꾸기 전과 후에 같은 질문을 했을 때 답변이 어떻게 달라지는지 비교하는 데 도움을 줍니다. 기존 답변이 깨지지 않았는지 확인합니다.

사용하는 경우

  • ✓AI 지시문을 바꾼 후 무언가 잘못되었는지 테스트할 때.
  • ✓AI가 여전히 중요한 규칙(예: 사실을 지어내지 않기)을 지키는지 확인할 때.
  • ✓결과가 명확하지 않을 때 답변 품질에 대한 판단을 기록할 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ai-prompt-regression-testing/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ai-prompt-regression-testing/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“지시문을 바꾸기 전과 후에 이 질문 5개에 대한 AI 답변을 비교해 주세요. 여전히 규칙을 지키는지도 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

고정된 질문 세트와 기대 답변을 준비합니다. 그다음 새 지시문으로 받은 AI 답변을 기존 답변과 비교합니다. 시스템은 문제가 생겼는지 기록합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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

  1. Define the task, representative cases and forbidden outcomes. Use synthetic or approved/redacted data; freeze case IDs and the dataset revision before runs.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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"]

…
자주 묻는 질문

'회귀(regression)'란 무엇인가요?

예전에는 잘 작동하던 것이 변경 후에 작동하지 않게 되는 것을 말합니다.

특별한 데이터셋이 필요한가요?

네, 비교 기준으로 사용할 질문과 답변 세트가 필요합니다. 이 세트는 고정되어 있어야 하며 검토를 거쳐야 합니다.

이것이 일반 테스트를 대신하나요?

아니요, 이것은 특정 유형의 테스트입니다. 지시문 변경으로 기존 답변이 나빠지지 않았는지 확인하는 용도입니다.

상세 정보

작성자의 원본 설명

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.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#3718
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬