agentleFS
NikoxkxNikoxkx/Agent-Skills/skills/ai-ml/evaluation-harness/SKILL.md

evaluation-harness

Skill1 starsChanged 5 months agoApache-2.0View on GitHub

Builds an evaluation harness to measure LLM accuracy, reliability, and performance on a task. Use when benchmarking models, comparing prompts, or tracking quality regressions.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    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:

    Write a strong judge prompt with clear rubric and few-shot examples.

    line 46
  2. Distinctive:

    Ask for a score (1-5 or 0-1) + reasoning.

    line 47
  3. Distinctive:

    Run the same judge on all candidates for fair comparison.

    line 48
  4. Distinctive:

    Judge bias: Use the same judge model/version for all comparisons.

    line 75
  5. Distinctive:

    Output parsing failures: Treat as score 0 and log the raw output.

    line 76

≈ “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

Overview

Builds a robust, repeatable evaluation harness for LLMs. Covers golden dataset construction, golden answer types (exact, fuzzy, LLM-as-judge), metric selection (accuracy, BLEU/ROUGE/BERTScore, custom, faithfulness/relevance), eval runner script, LLM-as-judge prompt templates, regression tracking (diff between runs), and integration into CI or a dashboard.

When to Use This Skill

  • Comparing multiple models or prompt versions on the same task.
  • Establishing a quality baseline before shipping a feature that uses LLMs.
  • Detecting quality regressions after model or prompt changes.
  • The user wants "to measure how good this is" or "track quality over time".

Prerequisites

  • A task with clear success criteria.
  • A set of test cases (even 20-50 is valuable to start; aim for 100+ for statistical significance).
  • Access to the models being evaluated.
  • (Optional but recommended) A small amount of human-labeled "golden" answers.

Steps

  1. Construct the eval dataset:
    • Representative of real usage (include edge cases and common failures).
    • Columns: id, input, expected_output (or rubric), metadata (difficulty, category).
    • Version the dataset (git + a simple JSONL or CSV).
  2. Choose evaluation method per task:
    • Exact match / contains (for extraction, classification).
    • Fuzzy (Levenshtein, normalized edit distance).
    • BLEU / ROUGE / BERTScore (for generation, summarization).
    • LLM-as-judge (most flexible for open-ended tasks).
    • Human evaluation for high-stakes (sample).
  3. LLM-as-judge (when used):
    • Write a strong judge prompt with clear rubric and few-shot examples.
    • Ask for a score (1-5 or 0-1) + reasoning.
    • Run the same judge on all candidates for fair comparison.
    • Validate the judge against human labels on a small set.
  4. Build the eval runner:
    • Load dataset.
    • For each example: call model → parse output → compute metric(s).
    • Aggregate scores (mean, per-category breakdown, failure cases).
    • Save detailed results (JSON) + summary.
  5. Regression tracking:
    • Store results with git commit / prompt version / model version.
    • Simple diff script: "compare run A vs run B — which examples got worse?"
    • Fail CI if score drops more than X% on key metrics.
  6. Output:
    • Golden dataset template (with 10-20 examples).
    • evaluate.py script that is model- and prompt-agnostic.
    • LLM judge prompt template.
    • Results viewer (simple pandas + print or Streamlit).
    • CI integration example (GitHub Action step that runs eval and comments on PR).

Examples

A complete harness for "customer support ticket classification + draft response" task: golden dataset (JSONL), runner script, LLM-as-judge prompt for response quality, automatic metrics, and a regression diff report is included.

Edge Cases & Error Handling

  • Judge bias: Use the same judge model/version for all comparisons. Calibrate against humans.
  • Output parsing failures: Treat as score 0 and log the raw output.
  • Cost of eval: Sample or use cheaper judge models for high-volume evals; run full eval nightly.

Verification

  1. The harness runs end-to-end on the golden set without crashing.
  2. Scores are reproducible when re-running the same model + prompt.
  3. LLM judge scores correlate reasonably with human judgment on a validation subset (report the correlation).
  4. A known-better prompt/model scores higher than a known-worse one.
  5. Regression detection works (intentionally degrade a prompt and see the harness flag it).
  6. Success: You have a trustworthy, automated way to know whether a change improved, hurt, or had no effect on quality.

References

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.