agentleFS
patonkikhpatonkikh/APES/skills/ai/ai-evaluation-builder/skill.md

ai-evaluation-builder

Skill3 starsChanged 4 months agoMITView on GitHub

Design an offline and online evaluation harness: datasets, metrics, baselines, regression gates, and production monitoring for AI system quality. Use when working on prompt engineering, AI workflows, agents, context design, or LLM optimization.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    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:

    Document human eval protocol when automated metrics are insufficient.

    line 54
  2. Distinctive:

    Start with 50 high-quality golden cases before scaling dataset size.

    line 133
  3. Distinctive:

    Run eval on every prompt or model change in CI.

    line 136

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

AI Evaluation Builder

Purpose

Design an offline and online evaluation harness: datasets, metrics, baselines, regression gates, and production monitoring for AI system quality.

Input: AI architecture or workflow spec, quality requirements, sample inputs/outputs (optional), risk level
Output: Evaluation Plan with dataset spec, metric definitions, harness design, and rollout gates Examples: See examples.md for worked input/output.


Workflow

Step 1: Define evaluation objectives

Map business requirements to measurable quality dimensions:

DimensionBusiness impactPriority
Accuracy / correctnessUser trustHigh
LatencyUXMedium
CostMarginMedium
Safety / refusalComplianceHigh
ConsistencyReproducibilityMedium

Step 2: Design offline evaluation

Dataset specification

SplitSizeSourceRefresh cadence
Golden set50–200 casesHuman-curatedPer release
Regression set500+ casesProduction samplesWeekly
Adversarial set20–50 casesRed-team / edge casesPer major change

Metrics

MetricDefinitionThresholdAggregation
Exact matchOutput equals reference≥90%Mean
LLM-as-judge scoreRubric 1–5≥4.0Mean
Tool call accuracyCorrect tool + args≥95%Per tool

Document human eval protocol when automated metrics are insufficient.

Step 3: Design online evaluation

SignalCollectionAlert threshold
User thumbs downFeedback widget>5% daily
Escalation rateSupport tickets tagged AI>2% weekly
Latency p95APM> SLA target
Cost per requestBilling API> budget +10%

Plan A/B or shadow deployment for model changes.

Step 4: Build harness architecture

Test cases → Runner → Model/Workflow under test → Scorers → Report → Gate

Components:

  • Runner — batch and single-case execution with config versioning
  • Scorers — deterministic + model-based + human queue
  • Reporter — diff vs baseline, trend charts, failure clusters
  • Gate — pass/fail criteria blocking deployment

Step 5: Define regression gates

GateConditionAction on fail
Golden setNo metric drops >2% vs baselineBlock merge
Safety setZero critical failuresBlock release
Latencyp95 within SLAWarn or block
CostPer-request within budgetWarn

Step 6: Validate

Run Validation checklist.


Decision Rules

ConditionAction
No quality requirements definedStop; request targets from ai-solution-architect output
High-risk use caseRequire human eval on 10% of golden set minimum
Subjective output (creative writing)Use rubric-based LLM-as-judge + human spot-check
Tool-using agentAdd tool-call accuracy and argument validation metrics
No production traffic yetOffline-only harness; plan online metrics before launch
Metric gaming risk (LLM judge)Calibrate judge against human labels quarterly

Validation

  • Quality dimensions mapped to metrics with thresholds
  • Golden, regression, and adversarial datasets specified
  • Offline harness components documented
  • Online monitoring signals and alert thresholds defined
  • Regression gates with block/warn actions
  • Baseline version identified for comparison
  • Human eval protocol defined where automation insufficient
  • Per-agent or per-stage eval for multi-agent workflows

Anti-patterns

  • Vibe-based eval — "looks good" without numeric thresholds.
  • Train-test leakage — eval cases drawn from fine-tuning data.
  • Single metric obsession — optimizing accuracy while ignoring safety or cost.
  • Stale golden set — dataset never updated after product changes.
  • No baseline — comparing only to previous broken version.

Best Practices

  • Start with 50 high-quality golden cases before scaling dataset size.
  • Store eval runs with model version, prompt version, and config hash.
  • Cluster failures by error type for targeted fixes.
  • Run eval on every prompt or model change in CI.
  • Pair with ai-cost-optimizer and ai-latency-optimizer for full NFR coverage.

Output Structure

# Evaluation Plan: [System Name]

## Objectives
| Dimension | Metric | Threshold |
|-----------|--------|-----------|

## Offline Datasets
| Split | Size | Source | Refresh |
|-------|------|--------|---------|

## Scoring Methods
| Metric | Method | Calibrated |
|--------|--------|------------|

## Harness Architecture
[Component diagram and config]

## Online Monitoring
| Signal | Source | Alert |
|--------|--------|-------|

## Regression Gates
| Gate | Criteria | Action |
|------|----------|--------|

## Baseline
[Version, scores, date established]

Next Skills

OutcomeRecommended Skill
Optimize cost after evalai/ai-cost-optimizer
Optimize latency after evalai/ai-latency-optimizer
Fix prompt quality issuesai/prompt-reviewer
Review AI security risksai-security/llm-threat-modeler
Adjust workflow based on failuresai/ai-workflow-builder

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.