/ai-evals:llm-alignfrom ai-evals
Analyzes alignment between LLM judge scores and human labels in eval datasets. Calculates TPR/TNR, builds confusion matrices, investigates disagreements, and helps improve scorer prompts across platforms like Braintrust or LangSmith.
Ships in ai-evals. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are helping analyze how well an LLM-based judge aligns with human labels in an eval dataset. Work through the five phases below in order, confirming with the user at each ambiguous step before proceeding.
The methodology works regardless of eval platform (Braintrust, LangSmith, custom CSV/JSONL, or any other format). Phase 1 covers how to get the data you need from different sources.
Goal: Figure out what score fields exist and which are human labels vs. LLM judge scores.
Ask the user how their eval results are stored:
Option A — Local file (CSV or JSONL)
Read the file directly. Look for columns or fields that contain numeric or categorical scores.
Common patterns: human_score, llm_score, <judge_name>_score, label, rating.
Option B — Eval platform (Braintrust, LangSmith, etc.) Ask for the experiment/run ID or URL. Use the platform's API or MCP tools to fetch rows. You want: each row's input, the human label field, and the LLM judge score field.
Typical Braintrust query (adapt syntax to other platforms):
select: id, span_id, scores
object_type: experiment
object_ids: ["<experiment-id>"]
where: is_root = true
limit: 500
Option C — The user pastes results directly Accept a JSON array, CSV snippet, or any structured format. Parse it in-context.
From the data, extract all score fields. For each:
human_*, ground_truth, label are likely human; criterion-named fields are likely LLM)Present your findings and ask the user to confirm: "Which field is the human label and which is the LLM judge score? I'll skip rows where either is missing — is that OK?"
scores["metric-scope"] not scores.metric-scope. Root spans are where scores aggregate — filter is_root = true. The id field ≠ span_id; select both for later trace lookups.Goal: Compute the full confusion matrix and key classification metrics.
Group rows into four cells:
| LLM: Positive | LLM: Negative | |
|---|---|---|
| Human: Positive | TP = N | FN = N |
| Human: Negative | FP = N | TN = N |
Then:
Interpret the numbers — don't just show the math. E.g.: "TPR of 85% means the judge misses 15% of cases your human reviewers would pass."
Goal: Understand why the LLM got each disagreement wrong by reading the scorer's reasoning.
Filter to rows where human label ≠ LLM score (accounting for threshold if continuous). Show up to 20 disagreements — enough to find patterns without overwhelming.
For each row, gather:
If your eval platform stores scorer reasoning (a critique or rationale alongside the score):
root_span_id = '<span_id>' and look for output.metadata.rationale or similarcritique, rationale, or reason field in the eval outputIf no reasoning is stored, re-run the judge on the disagreement rows locally and capture the reasoning output.
Group errors into patterns — don't list them one by one. Common patterns:
Goal: Suggest targeted, surgical edits to the scorer prompt — not a full rewrite.
Based on the disagreement patterns from Phase 3:
Format for each suggestion:
Issue: [what's going wrong and in which cases]
Current prompt text: "[relevant excerpt]"
Suggested change: "[replacement or addition]"
Why this helps: [which disagreements it would fix, and why it won't break the passing cases]
Aim for 2–4 suggestions. Don't suggest rewriting the whole prompt.
Goal: Identify the best 2–3 disagreement rows to add as labeled examples to the scorer prompt.
Good few-shot examples have these properties:
For each suggested example, draft the text to add to the scorer prompt:
### Example N — [PASS/FAIL]
Input: "[input]"
Output excerpt: "[relevant part of the AI output]"
{"critique": "[why this is PASS/FAIL — in the voice of the scorer]", "score": "[PASS/FAIL]"}
Explain why you chose each example and what failure mode it targets.
scores["field-name"], never scores.field-name.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub calibre-labs/reforge-ai-evals --plugin ai-evals10 skills in this plugin
/eval-coachAnswer questions about AI evals from the Reforge AI Evals course (its FAQs, course reader and live sessions), and teach the plugin's skills through short hands-on lessons on Mapper, the course agent. Use this skill whenever someone asks a concept or "why/how/when" question about evals, agents, harnesses, traces, rubrics, user input grids, trace codes, code checks, LLM judges, TPR/TNR, judge alignment, datasets, release thresholds, online evals, monitoring or agent success rate; asks "what does the course say about...", "explain...", "what's the difference between..."; or says "teach me evals", "how do I learn this plugin", "quiz me", "continue the tour" or "eval coach". Draws diagrams when an idea has a shape. Do NOT use when the person wants eval work done on their own files (write a rubric, cluster notes, write a judge): load that skill.
/eval-codeWrite deterministic, code-based evaluator functions for an AI product. Use this skill whenever you need to write evaluators that check structural properties of AI outputs (format, count, presence, schema compliance) without calling another LLM. Also use when auditing existing code-based evaluators for brittleness, coverage gaps, or false positives.
/eval-guideEntry point for eval work. Use when someone asks for help with evals in general, does not know where to start, asks "what should I do next", or asks for something no other skill in this plugin matches. Do NOT use when a more specific skill in this plugin already matches the request. Load that skill directly.
/eval-llm-judgeWrite LLM-as-judge evaluator prompts for AI products. Use this skill whenever you need to evaluate semantic properties of AI outputs that cannot be checked programmatically — output quality, tone, factual accuracy, edge case handling, reference alignment. Also use when auditing existing judge prompts for bias, vagueness, or compound criteria. Output is a judge prompt and a runner in the project's own scorer format (a Python runner when the project has none), saved where the project keeps its evaluators.
/eval-rubricWrite or update the eval rubric for an AI agent or AI feature: the pass/fail criteria that define good behavior, in four groups (outcome, trajectory, governance, experience), plus the release thresholds that belong in the PRD. Use this skill whenever someone asks to "write an eval rubric", "define what good looks like", "add evals to my PRD", "what should we evaluate", "turn this PRD into a rubric", "update the rubric from these traces", or shares a PRD, agent spec, system prompt or trace codes and wants evaluation criteria. Also use to audit an existing rubric. Output is an HTML page and a markdown file saved next to the PRD.
/ticket-to-evalStrip PII from a customer support ticket or eval trace and convert it into eval dataset rows. Produces two outputs: a regression dataset row (close to the original input, tagged with failure_mode) and a generalized dataset row (abstracted for broader coverage). Works with local CSV files or any eval platform. Use this skill whenever someone shares a support ticket, user complaint, or raw trace and wants to turn it into eval data. Trigger on: "add this ticket to the dataset", "convert this trace to an eval", "strip PII from this complaint", "turn this into a test case".
Other plugins' skills for the same job