llm-evals
Skill2 starsChanged 13 days agoMITView on GitHub
Design and run evaluation harnesses for LLM features, prompts, agents, and RAG systems, covering error analysis, golden datasets with slices, deterministic graders, LLM-as-a-judge rubrics calibrated against human labels, pairwise comparisons, bootstrap confidence intervals, and regression gates in CI. Includes a dependency-free harness script (run / compare / calibrate). Use when building or reviewing an eval suite, adding an LLM judge, comparing prompts or models, deciding whether a change is a real improvement, or gating releases on quality.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- vignesh-nagarajan-vn/claude-workflow-skillstheir own version, first seen Nov 29, 2026
- toy-crane/claude-code-playbook-templatetheir own version, first seen Nov 8, 2026
- reddygopalkrishna/developer-agent-skillstheir own version, first seen Nov 8, 2026
- krzysztofsurdy/code-virtuosotheir own version, first seen Nov 1, 2026
- VoDaiLocz/kilo-kit-mcptheir own version, first seen Aug 21, 2026
- poorvith-mp/skills-developertheir own version, first seen Aug 19, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- toy-crane/claude-code-playbook-template★ 78same name
- krzysztofsurdy/code-virtuoso★ 36same name
- VoDaiLocz/kilo-kit-mcp★ 27same name
- reddygopalkrishna/developer-agent-skills★ 8same name
- saitarrun/Devforge-ai★ 4same name
- vignesh-nagarajan-vn/claude-workflow-skills★ 4same name
- poorvith-mp/skills-developer★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- agent-observabilitySkill
- data-qualitySkill
- git-pr-workflowSkill
- langgraph-patternsSkill
- mcp-server-builderSkill
- ml-experiment-trackingSkill
- prompt-engineeringSkill
- python-qualitySkill
- rag-pipelinesSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
5
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
- Distinctive: line 24
Error analysis before metrics: Read 30-100 real traces first.
- Distinctive: line 35
Write down what "good" means for this feature in 3-6 bullet criteria (e.g., grounded, answers the question, correct format, refuses …
- Distinctive: line 41
Start with 50-200 cases. Cover every failure category, plus happy paths, edge cases, adversarial inputs (prompt injection, out-of-scope), …
- Distinctive: line 58
Use references/judge-rubrics.md: one criterion per judge, binary verdict, reasoning before verdict, few-shot examples from your error …
- Distinctive: line 63
Run the judge on the same outputs.
“Common” is measured: kept by at least 6 in 10 of the 6 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.
Files
LLM Evals
Evals are the test suite for stochastic systems. The goal is not a leaderboard number; it is a fast, trustworthy answer to "did this change make the product better or worse, and where?"
When To Use
- Standing up evals for a new LLM feature, agent, or RAG pipeline.
- Adding or auditing an LLM-as-a-judge.
- Comparing two prompts, models, retrievers, or agent designs.
- Migrating to a new model snapshot (always re-eval; behavior shifts silently).
- Turning production failures into regression tests.
Principles
- Error analysis before metrics. Read 30-100 real traces first. Metrics you invent before looking at data measure the wrong thing.
- Binary over scales. Pass/fail per criterion is easier to label, calibrate, and act on than 1-10 scores.
- Cheapest grader that works. Deterministic checks first, LLM judges only for what code can't check, humans to calibrate the judges.
- A judge is a model, so test it. An uncalibrated judge is an opinion with a confidence interval of unknown width.
- Report uncertainty. A 3-point gain on 60 cases is usually noise. Always show confidence intervals and per-slice results.
- Version everything together. Dataset, prompts, model snapshots, judge rubrics, and judge model ID belong in the same commit or results header.
Workflow
1. Define the contract and failure taxonomy
- Write down what "good" means for this feature in 3-6 bullet criteria (e.g., grounded, answers the question, correct format, refuses out-of-scope, under 200 words).
- Pull 30-100 real or realistic traces. For each failure, write a one-line note (open coding), then group notes into 4-8 failure categories (axial coding). These categories become your graders and dataset slices.
2. Build the dataset
- JSONL, one case per line:
{"id", "input", "expected"?, "slice", "metadata"?}. See assets/example_dataset.jsonl. - Start with 50-200 cases. Cover every failure category, plus happy paths, edge cases, adversarial inputs (prompt injection, out-of-scope), and every production bug you've fixed.
- Split dev (iterate on it freely) and holdout (run only before release; never tune on it).
- Store it in git next to the prompts. Never generate the whole set synthetically; synthetic cases are fine for coverage once seeded from real data, but label a sample by hand.
3. Choose graders, cheapest first
| Grader | Use for | Cost |
| Exact / regex / contains | IDs, numbers, classifications, required phrases | Free, deterministic |
| Schema validation | Structured outputs, tool-call arguments | Free, deterministic |
| Programmatic | Code executes, citations resolve, SQL returns expected rows, links valid | Cheap |
| Trajectory check | Agent called the right tools in a valid order, no loops | Cheap |
| LLM judge | Faithfulness, relevance, tone, policy adherence | Paid, needs calibration |
| Human review | Calibrating judges, high-stakes launches | Expensive |
4. Write judge rubrics
Use references/judge-rubrics.md: one criterion per judge, binary verdict, reasoning before verdict, few-shot examples from your error analysis, structured output, pinned judge model and temperature. Prefer a judge from a different model family than the system under test.
5. Calibrate every judge
- Hand-label 50-100 outputs pass/fail (two labelers on a subset; resolve disagreements to sharpen the rubric).
- Run the judge on the same outputs.
python scripts/eval_harness.py calibrate --results results.jsonl --labels human.jsonl --grader <judge>- Targets: Cohen's kappa >= 0.6 (>= 0.8 for release gates) and TNR >= 0.8, meaning the judge catches real failures. A lenient judge that passes everything has high accuracy on a mostly-good dataset and is useless.
- Iterate on the rubric using the disagreement list, not on the threshold.
6. Run and read results
python scripts/eval_harness.py run \
--dataset evals/dev.jsonl --pythonpath src \
--target myapp.eval_entry:answer \
--grader contains --grader myapp.judges:faithfulness \
--concurrency 8 --out results/candidate.jsonlThe harness prints pass rate with a bootstrap 95% CI per grader and per slice, plus latency p50/p95 and target errors. Read failures by slice, not just the headline. Track cost and latency next to quality; a quality win that triples cost is a product decision, not an automatic merge.
7. Compare against a baseline
python scripts/eval_harness.py compare \
--baseline results/main.jsonl --candidate results/candidate.jsonl --grader myapp.judges:faithfulnessPaired comparison on the same case IDs with a paired-bootstrap CI on the delta. The verdict is "improvement" only if the whole CI is above zero. Always inspect the listed regressions: a net-positive change that breaks a critical slice is still a regression.
8. Gate in CI
- Per PR: deterministic graders plus a small, fast judge subset, marked
@pytest.mark.eval(see thepython-qualityskill's markers) or run via--min-passin a CI step. - Nightly / pre-release: full dev set plus holdout, all judges, compared to the last release.
- Gate on regression vs baseline, not on an absolute number that someone will quietly lower.
9. Close the loop with production
Sample production traces (see the agent-observability skill), run the same judges online on a sample, and promote confirmed failures into the dataset as regression cases.
Bundled files
| File | Purpose |
| scripts/eval_harness.py | Stdlib-only harness: run, compare, calibrate |
| references/judge-rubrics.md | Rubric templates (faithfulness, relevance, format, safety, pairwise) and judge-bias mitigations |
| assets/example_dataset.jsonl | Dataset format example with slices and out-of-scope cases |
| assets/example_target.py | Toy target and judge for an offline smoke test |
| assets/example_labels.jsonl | Human-label format for calibrate |
Smoke test, run from scripts/:
python eval_harness.py run --dataset ../assets/example_dataset.jsonl --pythonpath ../assets \
--target example_target:answer --grader contains --grader example_target:judge --out /tmp/r.jsonl
python eval_harness.py calibrate --results /tmp/r.jsonl --labels ../assets/example_labels.jsonl \
--grader example_target:judgeTooling landscape
The bundled harness is intentionally small. For larger suites, the same workflow maps onto: promptfoo (config-driven, CI-friendly), DeepEval (pytest-style metrics), Ragas (RAG metrics), inspect_ai (agentic and safety evals), LangSmith or Braintrust or Arize Phoenix (datasets + experiments + online evals tied to traces). Pick one platform per team; the methodology above matters more than the tool.
Checklist
- Failure taxonomy written from real traces before any metric was chosen
- Dataset versioned in git with slices, adversarial cases, and a holdout split
- Deterministic graders cover everything code can check
- Each judge: one criterion, binary, reasoning-first, structured output, pinned model
- Each judge calibrated (kappa and TNR reported) against human labels
- Results report CIs and per-slice numbers, plus cost and latency
- Comparisons are paired against a baseline on identical case IDs
- CI gates on regressions; holdout untouched during iteration
Common Mistakes
- Picking metrics off a framework's menu (BLEU, generic "helpfulness") instead of from your own failure analysis.
- 1-10 judge scales averaged into a single number that moves 0.2 and gets celebrated.
- Tuning prompts on the holdout set until it stops being a holdout.
- Judge and system under test from the same model, with the judge never checked against humans.
- Comparing unpaired runs (different case sets or sampling seeds) and calling the difference real.
- Dropping cases that "always fail" instead of fixing or documenting them.
- Re-generating
expectedanswers with the new model, which turns the eval into a self-agreement test.
References
- Hamel Husain, "Your AI Product Needs Evals": https://hamel.dev/blog/posts/evals/
- Eugene Yan, "Evaluating the Effectiveness of LLM-Evaluators": https://eugeneyan.com/writing/llm-evaluators/
- Zheng et al., "Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena" (position/verbosity bias): https://arxiv.org/abs/2306.05685
- promptfoo: https://www.promptfoo.dev/docs/intro/
- Inspect AI: https://inspect.aisi.org.uk/
- Ragas: https://docs.ragas.io/
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
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.

