agentleFS
mattstrublemattstruble/skills/agent-evaluation/SKILL.md

agent-evaluation

Skill2 starsChanged 4 months agoMITView on GitHub

You MUST consult this skill when building evaluation systems for autonomous agents, designing rubrics for LLM-as-Judge, choosing evaluation paradigms (tool-calling verification vs user-simulator vs LLM-as-Judge), selecting metrics (Pass@k vs Pass^k), building eval datasets, or determining statistical significance of results. Also trigger when agent scores fluctuate between runs, a stronger model doesn't improve scores, or evaluation results don't match production behavior. NOT for testing code correctness (see test-design), evaluating skill effectiveness specifically (see skill-creator), or deciding whether/when to post-train based on eval results (→ agent-post-training; Ch6 §6.11 establishes that evaluation environments become training environments — the decision to cross that bridge lives in agent-post-training).

21 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use tool-design, kubernetes and 4 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • mjunaidcaSkill

    tool-design

    Design tools that agents can use effectively. Use when creating new tools for agents, debugging tool-related failures, or optimizing existing tool sets.

    Also in 3 projects that use this

  • mjunaidcaSkill

    kubernetes

    Production-grade Kubernetes manifests and debugging for containerized applications. This skill should be used when users ask to deploy to Kubernetes, create K8s manifests, containerize for K8s, set up Deployments/Services/Jobs/StatefulSets/CronJobs, create namespaces with resource quotas, set up multi-team isolation, configure ResourceQuota/ LimitRange, secure with RBAC (ServiceAccount, Role, RoleBinding), configure init containers (model download, db wait, migrations), set up sidecars (logging, metrics), or debug pods (CrashLoopBackOff, logs, exec, describe, events). Auto-detects from Dockerfile/code, generates hardened manifests with educational comments. CKAD-aligned.

    Also in 3 projects that use this

  • MicrosoftSkill

    github-actions

    Use when creating, editing, reviewing, or troubleshooting GitHub Actions workflows in Scope.

    Also in 3 projects that use this

  • xenitV1Skill

    clean-code

    Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments

    Also in 3 projects that use this

  • BlockSkill

    frontend-design

    Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 17 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every eval score is a joint measurement of model capability AND harness quality.

    line 12
  2. Distinctive:

    When: tasks with verifiable outcomes — CRUD operations, workflow completion, state transitions

    line 65
  3. Distinctive:

    When: conversational agents, customer service, advisory roles

    line 74
  4. Distinctive:

    When: creative output, open-ended tasks, subjective quality assessment

    line 80
  5. Distinctive:

    Practical principle: when the score difference between two configurations is smaller than the noise bandwidth, do NOT make a switching …

    line 183
  6. Distinctive:

    Mental math sieve: if you need > √2× improvement to clear the noise floor, the eval set is too small.

    line 197

“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Agent Evaluation

The object of evaluation is model + harness combined, not the model alone.

Every eval score is a joint measurement of model capability AND harness quality. Improving either changes the score.


Framing — Evaluate the System, Not Just the Model

Bojie Li argues the model-swap experiment is the primary diagnostic: fix the harness, swap to a stronger model. If the score doesn't rise, the bottleneck is the harness (prompts, tools, context strategy), not the model. This reframe prevents the most common mistake — blaming the model when the harness is broken.

Corollary: before spending on a better model, run the model-swap experiment. A broken harness will waste the upgrade.


Symptom Table

SymptomSection
Agent passes tests but fails in production§2 — Dataset (authenticity gap)
Scores fluctuate wildly between runs§5 — Statistical rigor
Stronger model doesn't improve scoresFraming — model-swap diagnostic
Agent games the metric without solving the task§4 — Rubric design (reward hacking)
Can't tell if improvement is real or noise§5 — Statistical rigor
Open-ended output can't be scored automatically§4 — LLM-as-Judge

YAGNI Gate

Does this agent need formal evaluation? Formal eval pays off when:

  • Tasks are diverse (>10 distinct types)
  • Failures are costly (financial, safety, user trust)
  • You're iterating on harness or prompt
  • You need to compare models or configurations

Otherwise: start with manual review + lightweight assertions. Don't build infrastructure you won't run regularly.


§1 Evaluation Paradigm

Choose by output type. Many tasks need a combination.

Tool-calling verification (rule-based):

  • Agent calls tools; verification checks observable state change (DB row inserted, file modified, API called with correct params)
  • Verdict: deterministic pass/fail from code assertions
  • When: tasks with verifiable outcomes — CRUD operations, workflow completion, state transitions
  • Environment hierarchy: SingleTurnEnv → ToolEnv → StatefulToolEnv → SandboxEnv

User simulator (LLM plays the user):

  • Simulated user with progressive information disclosure — reveals info gradually, not all at once
  • Dual verification: DB state checks + dialogue content analysis + process compliance
  • When: conversational agents, customer service, advisory roles
  • Key design: the user-simulator LLM must follow a persona script and reveal information only when the agent prompts correctly

LLM-as-Judge (scores open-ended output):

  • Judge LLM evaluates agent output against a rubric
  • When: creative output, open-ended tasks, subjective quality assessment
  • Requires calibration against human annotations before trusting at scale (see §4)

Selection heuristic:

Output typeParadigm
Deterministic verifiable outcomeTool-calling verification
Dialogue quality mattersUser simulator
Open-ended / creativeLLM-as-Judge

§2 Dataset Design

Five challenges, each requiring a deliberate choice:

  1. Clarity vs openness — tasks must be clear enough for reproducibility but open enough for creative solutions. Ensure answer uniqueness: if multiple valid approaches exist, the verifier must accept all of them.
  2. Authenticity vs controllability — real tasks have noise and ambiguity; controlled tasks are reproducible. Bridge: parametric generation from real task templates (vary names, numbers, context while keeping structure).
  3. Diversity vs systematization — cover typical scenarios AND edge cases, organized by capability dimension so results diagnose specific weaknesses, not just an aggregate score.
  4. Cost vs coverage — complex agent tasks take minutes or hours each. Hierarchical complexity levels:
    • Level 1 (smoke tests): run on every change
    • Level 2 (standard tasks): run on every PR
    • Level 3 (complex multi-step): run weekly
  5. Preventing contamination — models train on public benchmarks. Defenses: unique answers, dynamic parameter generation, canary GUIDs in test cases, temporal freshness (tasks requiring current information).

§3 Metrics

Outcome metrics:

MetricMeasuresUse when
Pass@kAt least one of k attempts succeedsCapability ceiling — "can it do this at all?"
Pass^kALL k attempts succeedReliability — "will it work every time?"
Best@kScore of best of k attemptsOpen-ended tasks where quality varies

Process metrics:

  • Tool call correctness rate
  • Path efficiency (steps taken vs optimal)
  • Retrieval coverage
  • Cost and latency per task

Safety — zero-tolerance principle. A single serious violation (data leak, unauthorized action) vetoes the entire evaluation regardless of other scores.

Dual coverage: Evaluate BOTH the execution trajectory AND the final outcome. Two failure modes that single-signal evaluation misses:

  • "Said it but didn't do it" — claims success, state unchanged
  • "Did it but broke something else" — state changed, but collateral damage

§4 Rubric Design & LLM-as-Judge

Four Rubric Principles (industry practice from Scale AI):

  1. Expert Guidance — domain expert defines what good looks like
  2. Comprehensive Coverage — including pitfalls and failure modes, not just the happy path
  3. Standard Importance Weights — Essential / Important / Optional / Pitfall (veto). A Pitfall item at any severity vetoes the entire score.
  4. Self-Contained — each rubric item is independently actionable; the scorer needs no external context

LLM-as-Judge design:

  • Define objectively verifiable scoring levels with concrete examples and edge cases
  • Guard against reward hacking: if the metric can be gamed by length/verbosity/formatting without substance, the rubric is broken
  • Length bias defense: penalize verbosity in rubric; bring candidates to similar lengths in pairwise comparisons; audit length-score correlation
  • Same-family model problem: a model judges its own family's output favorably. Use heterogeneous judges (different model families)
  • Calibration: build a human-annotated gold standard (100–200 cases). Measure judge agreement with humans before deploying at scale. If agreement is below threshold, fix the rubric before trusting results.

Pairwise comparison (for relative ranking): Elo/Bradley-Terry from matchups. Mitigate position bias by evaluating each pair twice with swapped order.


§5 Statistical Rigor

Standard error of binomial success rate: √(p(1-p)/n). At 100 cases with 70% success → ±9 percentage points. That is your confidence interval.

Practical principle: when the score difference between two configurations is smaller than the noise bandwidth, do NOT make a switching decision.

Paired analysis (McNemar's test): more sensitive than comparing independent success rates because it uses per-case matches — which specific cases flipped?

Multiple comparisons trap: testing 6 hypotheses at 95% confidence each → 26% chance of at least one false positive. Correct with Bonferroni or control false discovery rate.

Run multiple times (3–5 per configuration), report mean and spread. A single run is an anecdote, not evidence.

Mental math sieve: if you need > √2× improvement to clear the noise floor, the eval set is too small.


Routing Map

These are companion skills in the ai-agents family. Load the relevant one when building that layer.

ConcernCompanion Skill
Agent architecture & orchestrationagent-architecture
Designing training for broad transferrl-generalization
Coding agent patterns (uses "tests pass" as completion criterion)coding-agent-design
Multi-agent verification loopsmulti-agent-collaboration (Loop Engineering)
Skill effectiveness evaluation (applies these principles to skill quality)skill-creator
Code testing (unit/integration/e2e for code, not agent behavior)test-design
Context strategy (affects eval scores)context-engineering

NOT For

Litmus: Is the question about evaluating an autonomous agent's behavior on tasks? → here.

  • Writing unit tests or integration tests for code → test-design
  • Evaluating whether a specific skill improves agent output → skill-creator's eval loop (which implements these general principles for that specific case)

Co-triggering note: both this skill and test-design should fire when someone asks "how do I evaluate whether my coding agent writes good tests?" — test-design covers what good tests look like; this skill covers how to score the agent's test-writing behavior.


References

ReferenceWhen to read
references/eval-methodology.mdImprovement loop, three-layer hypothesis framework, model selection framework, cost analysis, benchmark report reading
references/eval-infrastructure.mdEnvironment component taxonomy, observability and tracing, ablation/A/B/feature-flag infrastructure, simulation environments and fidelity spectrum
references/breadth-measurement.mdPass@k vs pass@1 interpretation, answer entropy tracking, held-out ratio reporting, cross-task interference, fake-reward sanity checks, multi-family validation

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.