LLM Eval Suite Scaffolder
Stand up an evaluation suite for an LLM feature from scratch — a representative dataset, the right metrics, a baseline score, and a CI gate — using DeepEval, promptfoo, or RAGAS. Use when a feature has no evals, before tuning a prompt, or when adding an LLM feature to CI.
Turns 'we should add evals' into a first running suite in one pass: a frozen dataset of 20 to 50 real cases, two or three metrics, a committed baseline, and a CI step, in promptfoo, DeepEval, or RAGAS. It stops once the baseline is recorded; judge calibration and prompt iteration belong to its two sibling agents.
Install to ~/.claude/skills/llm-eval-suite-scaffolder/SKILL.md
npx agentscamp add skills/llm-eval-suite-scaffolderThe hardest part of LLM evaluation is starting. This skill scaffolds a first, runnable eval suite for one feature: dataset file, metric configuration, baseline record, and CI step, using the framework that fits the stack (DeepEval for Python/pytest, promptfoo for config-driven CLI, RAGAS for RAG-specific metrics).
Its job ends when the suite runs and a baseline is committed. Two siblings pick up from there:
- eval-driven-developer (agent) uses a suite to improve the feature, one scored change at a time.
- llm-evaluation-engineer (agent) makes a suite trustworthy at depth: judge calibration against human labels, run-to-run noise, dataset governance, gating policy.
When to use this skill
- An LLM feature ships with no evals and you need a gate before changing it further.
- You're about to tune a prompt or swap a model and want to measure the change, not guess.
- You're adding an LLM feature to CI and need a suite that fails on regressions.
If a suite already exists, do not scaffold a second one. Run it with the Run Evals command, or extend its dataset.
Instructions
-
Find the call and pin the scoring unit. Locate the function that makes the LLM call and note its inputs, output type, and prompt location. State how one output is judged: exact match, valid against a JSON schema, numeric tolerance, a set of required facts, or a rubric. An ambiguous success criterion is the real bug; resolve it with the user before writing any file.
-
Build a representative dataset. Collect 20 to 50 real inputs with expected behavior from logs, support tickets, fixtures, or the user. Aim for roughly half typical cases and half hard ones: empty or very long input, ambiguity, the format that broke last time, a prompt-injection attempt, an input where the right answer is "I can't tell". Give every case an ID and a tag so failures can be grouped. Freeze the file under version control. For RAG, capture the gold passages too.
-
Pick the few metrics that matter. Choose two or three, deterministic first:
Feature type Start with Extraction, classification exact or field-level match, schema validity RAG answers faithfulness to retrieved context, answer relevancy, plus a retrieval hit check against gold passages Open-ended generation required and forbidden content checks, then a rubric judge (llm-as-judge-scorer) -
Choose the framework and scaffold it. Match the repo: promptfoo when the prompt is a template and the team is not Python-first; DeepEval when the feature is Python and already tested with pytest; RAGAS metrics when retrieval quality is the question. Put everything under one directory such as
evals/<feature>/.promptfoo (
evals/summarizer/promptfooconfig.yaml):description: ticket summarizer prompts: - file://../../prompts/summarize_ticket.txt providers: - <provider>:<model-id> # the model the feature uses in production defaultTest: assert: - type: is-json tests: - description: refund-request-typical vars: ticket: "I was charged twice for order 1042. Please refund one charge." assert: - type: javascript value: JSON.parse(output).sentiment === 'negative' - type: llm-rubric value: Mentions the duplicate charge and order 1042, and invents no other facts - description: empty-ticket vars: ticket: "" assert: - type: javascript value: JSON.parse(output).summary.length < 80npx promptfoo@latest eval -c evals/summarizer/promptfooconfig.yaml -o evals/summarizer/results.jsonDeepEval (
evals/summarizer/test_summarizer.py):import json import pytest from deepeval import assert_test from deepeval.metrics import GEval from deepeval.test_case import LLMTestCase, SingleTurnParams from app.summarizer import summarize_ticket # the function under test CASES = [json.loads(line) for line in open("evals/summarizer/dataset.jsonl")] correctness = GEval( name="Correctness", criteria="The actual output states the same facts as the expected output and adds none.", evaluation_params=[SingleTurnParams.ACTUAL_OUTPUT, SingleTurnParams.EXPECTED_OUTPUT], threshold=0.7, ) @pytest.mark.parametrize("case", CASES, ids=[c["id"] for c in CASES]) def test_summarizer(case): test_case = LLMTestCase( input=case["input"], actual_output=summarize_ticket(case["input"]), expected_output=case["expected"], ) assert_test(test_case, [correctness])deepeval test run evals/summarizer/test_summarizer.pyCheck the installed framework version's docs for class and flag names before writing files; these libraries rename things between releases.
-
Record a baseline. Run the current prompt and model over the full set and commit the result next to the suite as
evals/<feature>/BASELINE.md: date, commit, model, prompt version, score per metric, and the IDs of failing cases. Every later number is compared to this. Do not fix the feature in the same change; a baseline with red in it is the point. -
Set thresholds from the baseline, then wire the CI gate. Start each threshold at or slightly below the baseline so the gate catches regressions without failing on day one. Add a CI step that runs the suite when prompts, model configuration, or the feature's code change. promptfoo's
evalexits with code100when any test fails, anddeepeval test runfails like a pytest run, so either can gate a merge directly. Provider API keys go in CI secrets.
WARNING
Don't generate hundreds of synthetic cases and call it an eval set. Twenty real, well-chosen cases, including the adversarial ones, beat a thousand bland synthetic ones. Quality and coverage of failure modes, not volume.
Output
A runnable eval suite committed to the repo, reported as:
## Eval suite: ticket summarizer
Files: evals/summarizer/promptfooconfig.yaml, evals/summarizer/BASELINE.md, .github/workflows/evals.yml
Dataset: 32 cases (16 typical, 9 edge, 4 adversarial, 3 "cannot tell"), frozen at commit abc1234
Metrics: valid JSON (deterministic), sentiment match (deterministic), fact coverage (rubric judge)
Baseline: 27/32 passing (84%); failing IDs: empty-ticket, two-orders, injection-2, long-thread-1, long-thread-3
Gate: CI fails on any test failure for deterministic checks; rubric threshold 0.7
Run locally: npx promptfoo@latest eval -c evals/summarizer/promptfooconfig.yaml
Not covered: judge has not been calibrated against human labels; scores from a single runAlways include the "Not covered" line. It tells the next person which of the two sibling agents to bring in.
Filed under
Related
- ToolDeepEvalAn open-source Python framework for evaluating LLM apps: pytest-style tests, ready-made metrics for RAG, agents, chat and voice, and a CLI that gates CI.
- AgentLLM Evaluation EngineerUse this agent to make an LLM feature's quality measurable — building the dataset, choosing metrics, setting a baseline, and turning evals into a CI gate so prompt and model changes are scored, not guessed. Examples — "we changed the prompt and don't know if it's better, set up evals", "add a regression gate for our extraction feature", "our RAG quality is drifting, build an eval suite".
- GuideWrite Evals for an LLM App: From Zero to a CI GateHow to evaluate an LLM feature — build a dataset, choose metrics, set a baseline, score offline, add an LLM judge, and gate CI so quality changes are measured.
- SkillLLM As Judge ScorerDesign a reliable LLM-as-judge metric — a calibrated rubric, a clear scoring scale, and bias controls — and validate it against human labels before trusting it. Use when grading open-ended LLM output (summaries, answers, tone) that exact-match can't score.
- AgentEval Driven DeveloperUse this agent to drive AI feature development with evals the way TDD drives code with tests — define success criteria and a representative eval set BEFORE iterating on prompts/models, then optimize against measured scores instead of vibes. Examples — "make the summarizer better" (turn it into measurable criteria first), "our prompt change keeps regressing quality, set up a loop that catches it", "add an eval gate to CI so a model swap can't silently degrade output", "we tweak prompts and pray — give us a baseline and a change-by-change scoreboard".
- CommandRun EvalsRun the project's LLM evaluation suite (DeepEval, promptfoo, or RAGAS) and report scores against thresholds before a merge.
- ToolpromptfooAn open-source CLI for testing, comparing, and red-teaming LLM prompts, models, and apps.
- Guide8 Best Claude Skills for LLM EvalsCompare Claude skills and commands for eval suites, prompt regression harnesses, LLM-as-judge rubrics, groundedness checks, agent trajectories, and CI gates.