Skip to content
Back to skills

Coding

ASecurity

Build an offline eval suite for LLM or agent output: golden dataset, tiered checks, pass@k and pass^k, and a CI gate against a baseline. Use when output quality is probabilistic and unit tests cannot score it, or after a prompt change.

  • 24 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added October 14, 2026
ai-agentsgotesting

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned November 22, 2026

npx -y skills add andreibesleaga/GABBE --skill coding --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Coding?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Coding
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/andreibesleaga-coding-27d778e4/badge)](https://www.skillsdirectory.com/skills/andreibesleaga-coding-27d778e4)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: eval-driven-development
description: "Build an offline eval suite for LLM or agent output: golden dataset, tiered checks, pass@k and pass^k, and a CI gate against a baseline. Use when output quality is probabilistic and unit tests cannot score it, or after a prompt change."
triggers: [build eval suite, score llm quality, golden dataset eval, eval-driven ci, prompt drift regression, pass at k reliability]
tags: [coding, ai, evaluation, testing]
core: false
context_cost: medium
---
# Eval-Driven Development

## Goal
Build offline evaluation suites that *score* the quality of probabilistic LLM and agent
outputs, as opposed to tests that *verify* deterministic code. A unit test asserts a fixed
truth (`add(2,2) == 4`). An eval measures a distribution: "across 200 diverse inputs, how
often does the agent produce an acceptable answer, and how reliable is that across repeated
runs?" Evals raise confidence in a behavior that has no single correct output. They do not
prove correctness — be explicit about that throughout.

## Steps
1. **Define a golden dataset.**
   - Collect 100-300 input→expected cases that are *diverse* (cover edge cases, failure
     modes, and the long tail — not just the happy path) and *mutually exclusive* (no two
     cases test the same behavior, so a single regression does not silently fail ten rows).
   - Source from real production logs, known past bugs, and adversarial hand-authored cases.
   - Version-control the dataset alongside code so every change is reviewable and revertible.
   - Record, per case, the input, the expected output (or acceptance criteria), and which
     assertion tier applies.
2. **Apply the 3-tier assertion ladder.** Layer cheapest-and-strictest first.
   - **Tier 1 — Deterministic** (exact string match, regex, JSON-schema validation). Run at
     `temperature=0`. Fully reproducible, near-zero cost. Use whenever the output has a
     verifiable structure (valid JSON, contains a required field, matches a pattern).
   - **Tier 2 — Semantic similarity** (embedding cosine distance against a reference answer,
     threshold-gated). Near-deterministic. Use when wording may vary but meaning must match.
   - **Tier 3 — LLM-as-judge** (a model scores open-ended quality against a rubric). Most
     expensive and least reproducible; reserve for subjective criteria. Delegate the judge
     design to `llm-as-judge.skill` and inherit its bias controls.
3. **Handle nondeterminism with statistical gating.**
   - LLM/agent outputs vary run-to-run, so a single run is *noise*: single-run estimates of
     agent quality commonly swing 2-6 percentage points between runs. One green run proves
     nothing about reliability.
   - Run each case N times (e.g. N=5). Report **pass@k** (succeeds in at least one of k
     trials — measures capability) and **pass^k** (succeeds in *all* k trials — measures
     reliability). For production gating, pass^k matters far more than pass@k.
4. **Build eval-driven CI.**
   - Order checks by cost: run all Tier 1 deterministic checks first, then Tier 2, then run
     expensive Tier 3 judge evals only on the subset that actually needs subjective scoring.
   - Store a baseline (the accuracy of the current main branch). Gate on a *threshold drop*
     vs. that baseline — e.g. fail the build if aggregate accuracy drops more than 5% — rather
     than demanding a fixed absolute score, which would be brittle.
5. **Guard against prompt-drift regression.**
   - When you tweak a prompt to fix one failing case, re-run the *entire* golden set before
     accepting the change. Prompt edits routinely fix one row and silently break fifty others.
   - Track the per-case pass/fail diff vs. baseline so a +1/-50 trade is impossible to miss.

## Constraints
- Evals **sample** the input space; they raise confidence, they do not prove correctness.
  Never report or claim "100% correct" — at most "100% on the current golden set of N cases."
- Keep golden datasets version-controlled and reviewed like code; an unreviewed dataset edit
  can quietly redefine "passing."
- Always layer cheap deterministic checks before expensive judge calls to control token cost
  and latency.
- A single eval run is statistically meaningless for a stochastic system; always report N and
  pass^k, never a one-shot number.
- Named external tools/patterns worth knowing (not dependencies of this skill): **promptfoo**
  (declarative eval configs and CI gating) and **DeepEval** (pytest-style LLM assertions).

## Output Format
Produce an **eval report** containing:
- Per-tier pass rates (Tier 1 / Tier 2 / Tier 3) with the assertion type for each.
- pass@k and **pass^k** reliability figures with the value of N used.
- Drift-vs-baseline delta (per-case diff and aggregate accuracy change), and the CI verdict
  (pass/fail against the threshold).
- An explicit disclaimer that the suite samples the input space and does not certify
  correctness.

## Limits and safety
- Review dataset changes like code; accept no generated case without a traceable origin, and remove personal data from production logs before they become cases.
- Keep the baseline read-only during a gating run; update it only in a separate step the human reviews.
- Before a large judge run, state the number of model calls and set a cap; run cheap checks first.
- Pass the text under evaluation to the judge as quoted data, never mixed into the rubric (see `llm-as-judge.skill`).
- Hold out cases not used while tuning prompts and report them separately; say "passed N cases", never "correct".

Files in this skill

  • agent-trajectory-eval.skill.md5.7 KB
  • artisan-commands.skill.md3.7 KB
  • browser-tdd.skill.md7 KB
  • chaos-fault-injection.skill.md8.1 KB
  • ci-autofix.skill.md4.2 KB
  • clean-coder.skill.md4.5 KB
  • code-review.skill.md6.1 KB
  • debug.skill.md6.5 KB
  • documentation.skill.md7.3 KB
  • eval-driven-development.skill.md6.9 KB
  • evals/code-review.eval.yaml1 KB
  • excalidraw.skill.md3.7 KB
  • file-processing.skill.md4.3 KB
  • git-workflow.skill.md7.2 KB
  • metamorphic-testing.skill.md7.8 KB
  • mobile-dev.skill.md4.2 KB
  • nodejs-expert.skill.md1.6 KB
  • output-validation.skill.md5.4 KB
  • pbt-strategy.skill.md8 KB
  • performant-ai.skill.md3.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.