Evaluation Skill: Building a Reproducible Evaluation Framework for Agent Systems

Preface

After an agent goes live, determining whether “a new prompt revision or a model swap actually improved things” often relies on gut feel or scattered trial runs. Traditional software has unit tests and CI, but agent decision paths are not fixed; the same question may yield different results across runs, and there often isn’t a single standard answer. The evaluation Skill described below comes from the open-source collection Agent Skills for Context Engineering and focuses on building an evaluation system for agents: deterministic checks, regression suites, multi-dimensional scoring rubrics, quality gates, and ongoing production observability with baseline comparisons.

What This Is

evaluation is a guide document that conforms to the Agent Skills specification in SKILL.md (Skill metadata lists version 1.2.0, maintained by Agent Skills for Context Engineering Contributors). It doesn’t write evaluation code for you; instead, when you design or implement evaluations, it provides a checkable methodology and operational sequence.

Unlike the common “throw an LLM in as the judge first” approach, this Skill emphasizes: first perform deterministic validation on machine-checkable structure; only after the multi-dimensional rubric is stable should you scale model-based judging. Designing judge prompts, pairwise comparisons, calibration, and bias mitigation are delegated to the companion advanced-evaluation Skill in the same repository.

Core Capabilities

All capabilities below are taken from the official SKILL.md and the collection README.

When to Use This Skill

Activate the Skill in scenarios like:

  • Systematically testing agent performance
  • Verifying whether context engineering changes meet expectations
  • Measuring improvement over time and catching regressions before release
  • Building quality gates for an agent pipeline
  • Comparing different agent configurations
  • Running continuous evaluation for production systems

Explicitly do not use this Skill for: advanced-evaluation (designing the judge itself), harness-engineering (autonomous control planes and rollback boundaries), context-degradation (diagnosing specific context failures before measuring them).

Evaluation Principles

  1. Outcome-oriented, not path-bound: Agents may reach the same goal via different tool chains. Evaluate based on outcome criteria such as correctness, completeness, and quality; execution paths are reference only.
  2. Multi-dimensional rubric; avoid a single total score: Score dimensions such as factual accuracy, completeness, citation accuracy, source quality, and tool efficiency, then weight them according to business needs. A single number can mask severe failures in one dimension.
  3. Deterministic checks before LLM judging: When artifacts have validate-able structure, run checks such as schema validity, duplicate keys, rubric math, checklist synchronization, retrieval status, and required evidence paths. Reject quickly on failure to avoid wasting tokens or “absolving” invalid outputs with subjective scores.
  4. Match evaluation budgets to production: The referenced agent research shows token usage, tool call counts, and model choices significantly affect measured variance. Evaluate under token budgets close to production; for multi-agent architectures, compare against single-agent baselines.

Methodology Highlights

  • Test sets: Start with 20–30 cases; as the system matures, 50+ is recommended for a more stable signal. Stratify by complexity (simple / medium / complex / very_complex) and report scores per tier.
  • Scoring: Map each dimension to 0.0–1.0 and compute a weighted aggregate. A typical pass threshold is 0.7; high-risk scenarios often use 0.9. Preserve per-dimension scores alongside the aggregate.
  • LLM-as-Judge: For scaled use, include in the judge prompt: task description, the output under test, ground truth (if available), a tiered rubric with descriptors, and structured judgments with rationale. Prefer a judge from a different model family than the agent under test to reduce self-preference bias.
  • Human spot checks: Route boundary cases, anomalous queries, and random production samples to humans to catch issues that automation misses, feeding back into evaluation criteria.
  • Stateful agents: For agents that modify files, databases, or configurations, validate with end-state assertions rather than prescribing intermediate steps.
  • Continuous evaluation: Trigger automatic runs on changes, compare versions, and block releases when key metrics regress. Sample production traffic for evaluation; the reference material provides sample alert thresholds—pass rate below 0.85 is a warning, below 0.70 is critical—paired with trend dashboards.

Division of Responsibilities with Other Skills

This Skill focuses on outcome measurement and quality gates. advanced-evaluation, harness-engineering, context-degradation, context-optimization, multi-agent-patterns, tool-design, and memory-systems cover specialized evaluation scenarios such as judge design, control loops, degradation detection, optimization effects, collaboration, and tooling. The Skill also points to references/metrics.md in the same directory (useful when designing specific metrics and weighting schemes).

Installation and Activation

Agent Skills require a directory structure; you can’t flatten a standalone SKILL.md as a single file without breaking relative paths like references/.

Claude Code (Plugin Marketplace)

Register the plugin marketplace in Claude Code:

/plugin marketplace add muratcankoylan/Agent-Skills-for-Context-Engineering

Install the collection plugin (includes all published Skills such as evaluation):

/plugin install context-engineering@context-engineering-marketplace

The Skill activates automatically based on task context.

Cursor

  1. Install via the Cursor Plugin Directory entry for context-engineering, or clone the repository and point Cursor to the plugin root.
  2. Cursor discovers skills/ in the repository root via the Open Plugins manifest .plugin/plugin.json.
  3. To install evaluation manually in your current project, copy the entire skills/evaluation directory into your project:
mkdir -p .cursor/skills
cp -R skills/evaluation .cursor/skills/

(You need the skills/evaluation directory locally from the repository; the writing workflow for this article prohibits using git clone, so please download or copy the directory yourself.)

Codex and Generic Agent Skills Directory

  • Codex project level: copy to .codex/skills/
  • Generic layout: copy to .agents/skills/
  • Claude Code project level: copy to .claude/skills/

The collection README notes: the repository is distributed as Open Plugins, with the manifest at .plugin/plugin.json.

Typical Usage

The official SKILL.md includes reproducible pseudocode and configuration snippets to illustrate the evaluation pipeline shape, not to bind you to a specific framework.

Multi-dimensional weighting and pass decision (simplified example):

def evaluate_agent_response(response, expected):
    rubric = load_rubric()
    scores = {}
    for dimension, config in rubric.items():
        scores[dimension] = assess_dimension(response, expected, dimension)
    overall = weighted_average(scores, config["weights"])
    return {"passed": overall >= 0.7, "scores": scores}

Organize test sets by complexity (excerpt):

test_set = [
    {
        "name": "simple_lookup",
        "input": "What is the capital of France?",
        "expected": {"type": "fact", "answer": "Paris"},
        "complexity": "simple",
        "description": "Single tool call, factual lookup"
    },
    {
        "name": "medium_query",
        "input": "Compare the revenue of Apple and Microsoft last quarter",
        "complexity": "medium",
        "description": "Multiple tool calls, comparison logic"
    },
    # ... complex / very_complex cases
]

Run deterministic gates first, then quality scoring:

def evaluate_pr_candidate(candidate):
    structure = run_validate_repo(candidate)
    if not structure.ok:
        return {"passed": False, "reason": "deterministic validation failed", "details": structure.errors}

    quality = run_rubric_eval(candidate)
    return {"passed": quality.overall >= 0.8, "scores": quality.dimensions}

Example quality gate dimensions (YAML):

gate:
  deterministic:
    - schema_valid
    - required_files_present
    - no_duplicate_ids
  quality:
    factual_accuracy: min 0.85
    completeness: min 0.80
    source_traceability: min 0.90

Recommended setup order (summarized from the official Practical Guidance): define business-relevant quality dimensions → write clear tiered rubric descriptors → build a stratified test set from real usage and boundary cases → implement change-triggered automation pipelines → establish baselines before making changes → track trends continuously with human reviews → separate deterministic failures from quality judgments.

Who It’s For and What to Watch Out For

Suitable for: teams moving agents from demo to production—needing regression suites, release gates, or evidence that a context/tool/multi-agent change truly improves outcomes rather than being noise.

Common pitfalls (selected from the official Gotchas):

  • Overfitting evaluations to a fixed code path or surface patterns; write outcome and semantic criteria and rotate inputs regularly.
  • Judge and tested models from the same family inflate scores.
  • Contamination of evaluation sets with training or prompt data.
  • Optimizing only the aggregate score leads to “good scores, bad experience”; regularly cross-validate with human judgment.
  • Too-small evaluation sets (official guidance suggests at least ~50 items) or lack of difficulty stratification, letting easy questions pull up overall scores.
  • Treating evaluation as a one-time pre-release check; re-run evaluations continuously as models, tools, and usage evolve.

This Skill is a platform-agnostic principles document; the collection README notes examples are mostly Python pseudocode for cross-environment understanding and do not require installing specific dependencies.

Closing

Whether an agent “gets better with each change” depends on your ability to quantify outcomes, catch regressions, and detect drift in production. The evaluation Skill breaks this work into actionable dimensions, gates, and pipeline steps, while clarifying boundaries with other Skills in the repository. See the official directory for full content and references/:

https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/tree/main/skills/evaluation

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye