본문으로 건너뛰기
Skillpedia
에이전트29k · #9526

agent-regression-evals

하는 일

이 스킬은 단일 실행이 아니라 통계를 사용해 변경 후 AI 에이전트가 나아졌는지 나빠졌는지 시험하게 합니다. 출시 전에 명확한 판정이 필요한 AI 에이전트 변경 팀을 위한 스킬입니다.

사용하는 경우

  • ✓에이전트가 쓰는 프롬프트, 모델, 도구를 바꿔 출시하기 직전일 때.
  • ✓에이전트의 통과율이 떨어져 그것이 실제인지 알아야 할 때.
  • ✓어떤 테스트 사례가 무작위로 통과하고 실패하는지 찾아야 할 때.

스킬 링크

https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agent-regression-evals/skills/agent-regression-evals/SKILL.md

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

사용 방법

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

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

Use this skill to help me: https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agent-regression-evals/skills/agent-regression-evals/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개. 읽는 데 1분.

작동 방식

에이전트는 각 테스트 사례를 이전 버전과 새 버전에서 여러 번 실행하고, 에이전트가 도구를 통해 밟은 단계를 점검합니다. 불안정한 사례를 찾은 뒤, 통계적 게이트가 두 버전을 사례별로 비교해 판정을 내립니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Agent Regression Evals — prove the change did not make it worse

Portability: 3 stdlib scripts, no APIs, no LLM calls. You run the agent; these grade, count and gate.

"Pass rate went from 82% to 79%" is not a finding until you know whether three points is outside the noise. Agents are non-deterministic, so one trial per case cannot tell a regression from a coin flip, and a final answer can be right while the path to it called a tool it never should have.

Workflow

# 0 - Run every case k times (k >= 3) on baseline and candidate, from a clean
#     environment per trial. Write one JSONL row per trial:
#     {"case_id": "refund-lookup", "trial": 1, "passed": true, "critical": true,
#      "cost_usd": 0.012, "trajectory": [{"tool": "get_order", "args": {...}}]}
# 1 - Grade the path where the path matters (safety, required lookups).
python scripts/trajectory_checker.py --spec cases.json --results candidate.jsonl
# 2 - Separate flaky cases from stable ones before trusting any comparison.
python scripts/flake_detector.py --results candidate.jsonl --k 3 --quarantine-out q.json
# 3 - Gate: paired per-case comparison against baseline. Exit 4 blocks the merge.
python scripts/regression_gate.py --baseline baseline.jsonl --candidate candidate.jsonl --quarantine q.json

Step 1 uses match modes strict | unordered | subset | superset. Default to superset (required steps present, harmless exploration allowed); grade the outcome, not the path, unless order is the requirement. forbidden tools block in every mode.

Step 2 reports pass@k (succeeds at least once in k) and pass^k (succeeds all k times). A user meets every trial, so pass^k is the reliability number. Cases marked critical are never quarantine candidates.

Step 3 averages trials within each case first (trials of one case are correlated), then tests paired per-case differences with a t-based 95% CI and a one-sided exact McNemar test. When the drop is real but the sample is too small to show it, the gate says how many cases it would take.

The gate blocks on

  1. A statistically significant drop (CI upper bound below zero, or McNemar p < 0.05).
  2. A critical case that passed every baseline trial and failed any candidate trial.
  3. A baseline case missing from the candidate run. Dropping a case is the cheapest fake fix.
  4. A quarantine entry with no owner or expiry, or covering a critical case.
  5. A forbidden tool call (trajectory checker, exit 4).

It warns, and a human decides, on an underpowered drop above --tolerance or a cost rise above --max-cost-increase.

Hard rules

  • Never compare single trials. Under 3 trials per case the flake detector refuses (exit 4).
  • Never pool trials as independent samples. Average per case, then compare cases.
  • Never quarantine without owner and expiry. An expired entry re-enters the gate automatically.
  • Never delete a failing case to go green. The gate counts what is missing.
  • Never call "no significant drop" a pass on 8 cases. Report the power note with the verdict.
  • Start the suite from real failures (20-50 cases), balanced between "should do" and "should not do".

Scripts

Script Role Exit codes
scripts/trajectory_checker.py Grades tool-call paths: match modes, args modes, forbidden tools, call ceilings 0 · 2 deviations · 3 bad input · 4 forbidden tool
scripts/flake_detector.py STABLE_PASS / STABLE_FAIL / FLAKY per case, Wilson CI, pass@k, pass^k, quarantine stubs 0 · 2 flaky · 3 · 4 too few trials
scripts/regression_gate.py Paired CI, exact McNemar, critical cases, dropped cases, quarantine validity, cost 0 PASS · 2 WARN · 3 · 4 BLOCK

All support --sample and --output json.

References and assets

자주 묻는 질문

왜 각 사례를 여러 번 실행하나요?

에이전트는 실행마다 다른 답을 주므로, 한 번의 시행으로는 실제 회귀를 보여 줄 수 없습니다.

에이전트가 답을 얻은 과정도 점검하나요?

네. 도구 호출 경로를 점검하며, 예를 들어 필요한 조회가 실제로 일어났는지 확인합니다.

실패한 점검이 병합을 막을 수 있나요?

네. 게이트가 실패 코드를 반환하므로 병합을 막을 수 있습니다.

상세 정보

작성자의 원본 설명

Use before shipping any agent, prompt, model or tool change, or when a pass-rate drop needs a verdict. Runs repeated trials, gates candidate vs baseline with paired statistics in regression_gate.py, checks tool-call trajectories and finds flaky cases.

repo: alirezarezvani/claude-skills

인기도

GitHub 스타
29k
순위
#9526
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬