Method for building, auditing, and iteratively improving AI/LLM evaluation suites without overfitting or grader drift. Use when creating an eval for a model-powered flow, auditing an existing benchmark before trusting its scores, or hillclimbing prompts, tools, models, or parameters against measured quality, cost, or latency.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Ai Evals?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/byheaven-ai-evals)
---
name: ai-evals
description: "Method for building, auditing, and iteratively improving AI/LLM evaluation suites without overfitting or grader drift. Use when creating an eval for a model-powered flow, auditing an existing benchmark before trusting its scores, or hillclimbing prompts, tools, models, or parameters against measured quality, cost, or latency."
---
# AI Evals
An evaluation suite earns deployment decisions only when its cases reflect real work, its harness isolates model behavior from plumbing, its grader checks the real outcome, and its headline score comes from held-out cases never inspected during tuning. This skill covers AI/LLM capability and regression evals; real-build product verification belongs to [`qa`](../qa/SKILL.md), single-defect isolation to [`diagnosing-bugs`](../diagnosing-bugs/SKILL.md), and multi-family independent comparison to [`roundtable`](../roundtable/SKILL.md).
## 1. Audit the eval before trusting or climbing
Before a full paid pass or Round 1 of hillclimbing, verify the eval against its actual code, config, and data across five axes (never trust the README alone):
- **Task and case set:** run programmatic checks over all cases (exact/near duplicates, schema validity, missing fields, length outliers, class balance) plus a stratified close read of 20–50 cases. Confirm unambiguous criteria, verified ground truth (never score model A vs. B against model A's outputs), zero label leakage into prompts or sandboxes, and both-directions coverage (when to act and when not to).
- **Harness hygiene:** invoke the real production entry point (stubbing only unsafe external side effects); isolate clean state per `(case, rep)`; separate infra/serving errors, hard per-case wall-clock timeouts, and output-limit truncation into error/status fields rather than averaging plumbing failures in as `0`; distinguish "no answer" from a valid negative answer; assert the served model in each response matches the requested model. Prove wiring end to end with an **oracle** (~100%) and a **null** baseline (~0%).
- **Metric hygiene:** capture full transcript, served model, token usage (including cache and judge tokens), model latency (final successful request, excluding retry sleeps), and grade from the **same single run**—never grade one call and inspect another. Back off transient rate limits with jitter; score strict per first attempt by default (a pass only on retry counts as fail) while counting every retry and failed attempt in true cost. Recompute headline aggregates directly from raw per-case rows.
- **Grader design:** grade final outcomes and end states rather than trajectories or narration—prefer deterministic code checking the resulting workspace, schema, or outputs. Where judgment requires an LLM grader, use atomic binary rubrics (one checkable property per criterion), isolated context treating candidate text as untrusted data, randomized A/B order for pairwise comparisons, a model distinct from the one under test where available, negative-input sanity checks (empty string, refusal, off-topic), and calibration against a human-labeled gold set before trusting scores.
- **Headroom and sensitivity:** compare the eval's noise floor (paired CI half-width at `n × reps`, roughly `1/sqrt(n·reps)` for pass rates) against remaining headroom and the smallest change worth acting on. When baseline already sits at `>= 95%`, stop chasing quality—top-end deltas mostly reflect noise or format quirks—and either harden the suite or shift optimization to cost or latency while holding quality.
## 2. Human sign-off before full paid runs
Confirm both **cases** and **grading** with the user before spending on a full run. Show the actual cases (or a stratified sample alongside programmatic stats for large sets), then run a small pilot and show raw outputs beside grades and judge reasoning:
1. Ask the user as [Asking](../task-owner/references/runtimes.md#asking) says and end the turn: `"Here are the proposed eval cases (<N> cases). Are they representative, and should any be added, changed, or removed?"`
2. After the pilot, ask the user as [Asking](../task-owner/references/runtimes.md#asking) says and end the turn: `"Here are the pilot outputs and grades. Would you score any differently, and do you approve running the full eval (<N> cases × <R> reps)?"`
Resolve every disagreement on pilot grades before the full pass.
## 3. Train and held-out test split
Before iterating, split cases randomly (stratified by primary category—never by baseline score, which induces regression to the mean) into **train** and **held-out test**, verifying baseline means agree within noise.
- **Strict inspection wall:** during iteration, read and diagnose **only train transcripts**. Keep held-out test transcripts out of the proposer's context.
- **Held-out promotion gate:** judge every round and the final headline strictly on the **held-out test delta** (with confidence intervals). Revert any round where train rises while held-out test stays flat or drops.
- When a set is too small to split, label deltas **directional** and tighten variance with multiple reps.
## 4. Capability vs. regression suites
Separate two suites by purpose:
- **Capability suite:** low-pass, genuinely hard tasks where you hillclimb to discover new gains.
- **Regression suite:** near-100% locked tasks that guard against backsliding.
Once capability cases pass reliably across variants, graduate them into the regression suite and add harder capability cases rather than climbing a saturated suite.
## 5. Single-variable iteration and plateau triage
Run each round as **analyze train transcripts → one hypothesis / one change → run full set → record & decide**:
- Ground every proposal in cited train traces, generalize the underlying failure behavior rather than memorizing case-specific nouns, and strip prompt fluff before applying.
- Spend a round only on a change large enough to clear the eval's noise floor, keeping off-limits constraints intact. When optimizing cost or latency, verify caching health and audit dated prompts (see [`prompt-audit.md`](../writing-for-agents/references/prompt-audit.md)) first, then search model × effort before tuning prompts on the frozen model.
- **Plateau root-cause triage:** when held-out test scores stay inside the noise band for 2–3 consecutive rounds, stop grinding edits and classify every remaining train failure into **artifact gap**, **grader disagreement**, **harness/infra**, **structural** (unreached or conflicting context), or **variance/noise** before picking the next action.
## 6. Harness integrity (protect the ruler)
Pin and hash the eval runner, cases, and grader files before unattended or multi-round runs. Never silently alter the harness or grader to rescue a failing round. Whenever an iteration requires editing the harness or grader itself, pause, ask the user as [Asking](../task-owner/references/runtimes.md#asking) says, and end the turn: `"This change modifies the eval harness or grader (<files>). Review the diff and confirm whether to update the eval and re-baseline?"` After any approved grader change, re-grade prior variants on stored outputs so cross-round comparisons stay apples-to-apples.
Done when the final report states the held-out test delta with confidence intervals, per-round guardrail/cost/latency metrics, failure taxonomy, before/after trace pairs, and only changes that beat baseline outside noise remain applied.