agent-regression-evals
Skill này làm gì
Skill này khiến agent kiểm tra xem một agent AI có tốt hơn hay tệ đi sau một thay đổi, bằng thống kê thay vì một lần chạy duy nhất. Skill dành cho các đội đưa thay đổi lên agent AI và cần một kết luận rõ ràng trước khi phát hành.
Khi nào nên dùng
- ✓Khi bạn sắp đưa một thay đổi về prompt, mô hình hoặc công cụ dùng bởi agent lên production.
- ✓Khi tỷ lệ đạt của một agent giảm và bạn cần biết điều đó có thật không.
- ✓Khi một số ca kiểm thử có vẻ lúc đạt lúc hỏng ngẫu nhiên và cần được tìm ra.
Liên kết skill
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agent-regression-evals/skills/agent-regression-evals/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Chúng tôi đã đổi mô hình đằng sau agent hỗ trợ khách hàng. Hãy chạy các kiểm thử nhiều lần và cho tôi biết phiên bản mới có thực sự tệ hơn không.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent chạy từng ca kiểm thử nhiều lần trên phiên bản cũ và mới, đồng thời kiểm tra các bước agent đã thực hiện qua công cụ của nó. Nó tìm các ca không ổn định, sau đó một cổng thống kê so sánh hai phiên bản theo từng ca và đưa ra kết luận.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
- A statistically significant drop (CI upper bound below zero, or McNemar p < 0.05).
- A critical case that passed every baseline trial and failed any candidate trial.
- A baseline case missing from the candidate run. Dropping a case is the cheapest fake fix.
- A quarantine entry with no owner or expiry, or covering a critical case.
- 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
references/eval_statistics.md— pass@k vs pass^k, per-case averaging, paired CI, McNemar, power (7 sources)references/trajectory_grading.md— outcome vs path, match modes, grader types (6 sources)references/flaky_cases_and_quarantine.md— flake causes, quarantine with expiry, clean trials (6 sources)assets/eval_case_spec.example.json— trajectory spec for step 1assets/sample_baseline.jsonl,assets/sample_candidate.jsonl— results format- [
assets/ci_eval_gate.example.yml
Câu hỏi thường gặp
Vì sao phải chạy mỗi ca nhiều lần?
Agent cho câu trả lời khác nhau qua các lần chạy, nên một lần thử không thể cho thấy một hồi quy thật.
Skill có kiểm tra cách agent đạt được câu trả lời không?
Có. Skill kiểm tra đường đi của các lệnh gọi công cụ, chẳng hạn một bước tra cứu bắt buộc có xảy ra không.
Một kiểm tra thất bại có thể chặn việc merge không?
Có. Cổng trả về mã lỗi có thể chặn việc merge.
Chi tiết
Mô tả gốc của tác giả
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.
Độ phổ biến
- Sao GitHub
- 29k
- Vị trí xếp hạng
- #9526
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agent-launcher-orchestrator
29kGiúp agent của bạn lên kế hoạch, xây dựng, kiểm thử và lên lịch một Claude managed agent trong tài khoản riêng, từng bước một, bắt đầu từ một mục tiêu rõ ràng.
grade-iterate
29kCho phép agent của bạn chấm kết quả một managed AI agent theo bảng tiêu chí và cải thiện qua số vòng cố định, nên không bao giờ lặp vô tận.
interview
29kCho phép agent của bạn phỏng vấn bạn về ý tưởng agent AI và biến câu trả lời thành một kế hoạch xây dựng đơn giản trước khi khởi chạy bất cứ điều gì.
run-without-you
29kGiúp agent của bạn thiết lập một managed AI agent chạy theo lịch hoặc khi có sự kiện xảy ra, với thời gian cron được kiểm tra trước khi khởi chạy.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.