eval-harness-first
Skill này làm gì
Công cụ này xây dựng một bộ kiểm thử để kiểm tra xem mô hình AI có hoạt động tốt không. Nó giúp tìm và sửa lỗi trước khi huấn luyện mô hình.
Khi nào nên dùng
- ✓Khi bạn bắt đầu huấn luyện một mô hình AI.
- ✓Khi bạn chuyển các ví dụ hội thoại thành bộ kiểm thử.
- ✓Khi bạn so sánh hiệu năng mô hình với đánh giá của con người.
Liên kết skill
https://github.com/wshobson/agents/blob/main/plugins/llm-finetuning/skills/eval-harness-first/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
“Tạo một bộ kiểm thử để đánh giá mô hình chatbot mới của chúng tôi.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ phân tích các ví dụ hội thoại để tìm các loại lỗi phổ biến. Sau đó, nó tạo các kiểm thử cụ thể cho từng loại lỗi và kiểm tra xem mô hình có cải thiện sau khi huấn luyện không.
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.
Eval Harness First
The Phase 0 gate for the whole plugin:
finetuning-method-selection and every downstream
skill assume this harness exists before a training
config gets written. The harness is not a run-end
side artifact — it is the data-curation engine. The
same labeled traces that build the goldens feed
training data, minus an explicit holdout.
Input: production/agent traces if they exist, or
a task spec if they don't, plus labelers willing to
grade ≥100 examples.
Output format: the eval/ directory below —
goldens, graders, drift suite, and the base-model
baseline that later phases gate on.
The Gate
No eval harness, no fine-tune. Skip to a training config and there is nothing to measure against, nothing to catch regressions, and no labeled data to train on. The flywheel:
- Collect traces — production/agent spans, or synthetic tasks if none exist yet.
- Error analysis — open coding on ≥100 traces, axial coding into 4–8 failure buckets.
- One grader per bucket — deterministic first; calibrated LLM-judge only for genuinely subjective criteria.
- Prioritize by frequency × severity × value.
- The labeled traces feed dataset curation, minus
an explicit holdout. Every
eval/goldens.jsonlID stays excluded from training data by ID. - Train.
- Re-run the same harness on the checkpoint — not a different, looser one.
- Drift detection feeds back to step 2 — new production failure modes re-open error analysis.
Steps 2–4 build the harness; steps 5–8 are why it must exist first — it is both the training data source and the checkpoint's exit gate.
Building Goldens
- From traces, when they exist: run error analysis — open coding on ≥100 real traces (read them, tag failures in your own words, no fixed taxonomy yet), then axial coding to collapse those tags into 4–8 named failure buckets. Fewer than 4 means the coding pass was too shallow; more than 8 means buckets need merging. Exception: single-failure-surface tasks (e.g. strict-schema extraction) may land at 1–2 buckets with per-field sub-metrics inside one grader — don't invent artificial splits with no evidence behind them.
- Synthetic, when traces don't exist yet: dimension-based generation — enumerate the axes that matter (task type, difficulty, edge case, persona) and sample the cross-product; free- generated prompts cluster around whatever's easiest to write.
- Goldens are versioned like code — commit
eval/goldens.jsonl, diff it in review, tag it per release. It doubles as the CI regression suite.
Graders
One grader per failure bucket from error analysis — not one for the whole eval set. A single blended score hides which bucket regressed.
- Deterministic first. Regex, schema validation, or execution checks are cheaper, reproducible, and need no calibration.
- LLM-judge only for genuinely subjective criteria — tone, faithfulness, "which response is better" — where no deterministic check can express it.
- Binary pass/fail over Likert. A 1–5 or 1–10 scale is noisier to calibrate and harder to apply consistently; collapse to pass/fail.
- Drift-suite MMLU-style scoring: prefer logprob
over generate-and-extract — a tight token budget
makes generate-and-extract parse-brittle for models
that preamble, conflating format compliance with
the knowledge being measured. Templates for all
four grader shapes and this scoring note:
references/grader-templates.md.
Judge Calibration Is a Prerequisite
Any bucket routed to an LLM-judge needs calibration before its verdicts count for anything beyond exploration — a hard prerequisite, not a nice-to-have. N/A when no bucket routes to a judge — an all-deterministic harness has nothing to calibrate; state that rather than leaving this section unaddressed.
- Label ≥100 items, split train/dev/sealed test (report once, no re-touching after).
- Report TPR and TNR, not one blended accuracy number — a judge can hit 90% by always saying "pass" on a skewed set.
- Pin the judge to a fixed model snapshot and recalibrate on judge-model change, quarterly regardless.
- The judge must come from a different model family than the model under test.
- A judge that misses the agreed TPR/TNR bar ships advisory-only — flags for human review, never gates a promotion. Full protocol, bias correction,
…
Câu hỏi thường gặp
“Goldens” là gì?
“Goldens” là những ví dụ hoàn hảo về cách mô hình nên trả lời, dùng làm chuẩn tham chiếu cho các kiểm thử.
“Graders” là gì?
“Graders” là các công cụ chấm điểm tự động, kiểm tra xem câu trả lời của mô hình có đúng trong từng nhóm lỗi hay không.
Tại sao “baseline” lại quan trọng?
“Baseline” là điểm số ban đầu của mô hình trước khi huấn luyện. Nó là mốc so sánh để biết việc huấn luyện có thực sự cải thiện mô hình hay không.
Chi tiết
Mô tả gốc của tác giả
Build the evaluation harness that gates every fine-tuning run — golden sets, per-failure-mode graders, judge calibration, and base-model baselines. Use when starting a fine-tuning effort, when converting traces into an eval set, or when calibrating a judge against human labels.
repo: wshobson/agents
Độ phổ biến
- Sao GitHub
- 41k
- Vị trí xếp hạng
- #6730
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
screen-reader-testing
41kGiúp agent của bạn kiểm thử website bằng trình đọc màn hình để đảm bảo chúng có thể truy cập được.
wcag-audit-patterns
41kGiúp agent của bạn kiểm toán website về khả năng truy cập và sửa các vấn đề theo hướng dẫn WCAG.
multi-reviewer-patterns
41kCho phép agent của bạn điều phối các đợt rà soát mã song song, loại bỏ phát hiện trùng lặp và tổng hợp báo cáo.
parallel-debugging
41kCho phép agent gỡ lỗi các vấn đề phức tạp bằng cách điều tra song song và phân tích nguyên nhân gốc.
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.