/eval-builder:eval-builderfrom Eval Builder
Scaffolds, runs, and reviews evaluations for GenAI workloads (agents, RAG, chatbots) using AWS GenAI Evaluations Workshop best practices. Inspects repos, maps failures to workshop modules, and produces interactive HTML reports.
Ships in Eval Builder. 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; scripts run unread.
eval-builder is the build-mode counterpart to the GenAI Evaluations Workshop tutor. The
tutor teaches concepts Socratically; this skill takes action: it inspects your repository,
discovers what's actually failing, maps failures to the right workshop modules, and — after you
approve — scaffolds a working eval harness and produces a single interactive HTML report.
This skill ships one helper next to this SKILL.md:
scripts/build_report.py — renders evals/report.html and evals/results.json from
per-workload result files. Always use it in Phase 4; never write your own report generator.Resolve its path from the directory that contains this SKILL.md (the skill directory your
tool loaded). Call it with an absolute path, for example
python3 "<skill-dir>/scripts/build_report.py" evals/results -o evals/report.html.
If you cannot determine the skill directory, search for it:
find ~ -path "*eval-builder*/scripts/build_report.py" -not -path "*/node_modules/*" 2>/dev/null | head -1.
The skill reads the live workshop content. Patterns always come from the current workshop, not stale copies. You must locate the workshop in Phase 1 before anything else, and you must report where it is.
Find it in this order and use the first hit:
$EVAL_WORKSHOP_DIR, if set.Foundational Evaluations/ in the working tree, a parent directory, or
a sibling directory of the working tree./tmp/eval-workshop-reference from an earlier session (only if it contains
Foundational Evaluations/).git clone --depth 1 https://github.com/aws-samples/sample-gen-ai-evaluations-workshop.git /tmp/eval-workshop-reference
If the clone fails or the user declines, stop and tell the user the skill needs workshop
access. There is no offline fallback, and you must not continue from memory.If you cloned it, remove /tmp/eval-workshop-reference at the end of the session.
Read the READMEs first (README.md, Foundational Evaluations/README.md,
Workload Specific Evaluations/README.md, Framework Specific Evaluations/README.md), then the
modules that apply. Every pattern you use in Phase 3 must cite the workshop file it came from.
The workshop notebooks pin older library versions and model families. When you mirror their patterns, apply these corrections:
response["output"]["message"]["content"][0]["text"].
Reasoning models (for example Claude Sonnet 5) return a reasoningContent block first. Take
the first block that has a "text" key, and set maxTokens high enough for the model to
finish reasoning (several thousand for reasoning models). Treat a response with no text block
as a judge error, never as a pass or a fail.strands-agents-tools: v0.9.0 removed calculator, file_read, file_write,
current_time, and the code interpreter tool. Check the installed version before you import
them.strands-agents-evals: Experiment.run_evaluations() returns one EvaluationReport in
1.x, not a list. run_display() is interactive and waits for input; use display() in
scripts.The routing table maps workload signals to workshop modules. Before you use a row, check that its path exists in the workshop — modules are added and renamed. If the READMEs list a module that is not in this table, consider it too.
| Module | Path in workshop repo | When to read |
|---|---|---|
| Workshop overview | README.md | Always |
| Foundational overview | Foundational Evaluations/README.md | Always |
| Operational metrics | Foundational Evaluations/01-operational-metrics/ | Always — operational check |
| Quality metrics / LLM-as-Judge | Foundational Evaluations/02-quality-metrics/ | Always — binary judges, judge calibration |
| Understanding failures | Foundational Evaluations/03-understanding-failures/ | Always — failure discovery and categorization |
| Agentic metrics | Foundational Evaluations/04-agentic-metrics/ | Agent with tool use |
| Tool Calling | Workload Specific Evaluations/Tool Calling/ | Workload calls tools/functions |
| MCP Tool Calling | Workload Specific Evaluations/MCP Tool Calling/ | Tools are reached through MCP servers |
| Basic RAG | Workload Specific Evaluations/Basic RAG/ | Retrieval-augmented generation |
| MultiModal RAG | Workload Specific Evaluations/MultiModal RAG/ | RAG over images, audio, or video |
| Chatbot / multi-turn | Workload Specific Evaluations/Chatbot/ | Multi-turn conversations with session state |
| Coding Assistant | Workload Specific Evaluations/Coding Assistant/ | Code generation, bug fixing, or PR/code review |
| Guardrails | Workload Specific Evaluations/Guardrails/ | Content filters, grounding, alignment checks |
| Intelligent Document Processing | Workload Specific Evaluations/Intelligent Document Processing/ | Structured extraction from documents |
| Multiagent Shared Context | Workload Specific Evaluations/Multiagent Shared Context Evaluation/ | Multiple coordinating agents |
| Red Teaming | Workload Specific Evaluations/Red Teaming/ | Adversarial / security testing, side-effecting tools exposed to user input |
| Automated Reasoning | Workload Specific Evaluations/Automated Reasoning Evaluations/ | Formal policy verification |
| Speech to Speech | Workload Specific Evaluations/Speech to Speech/ | Voice / audio interaction |
| Capacity Management | Workload Specific Evaluations/Capacity Management/ | Choosing among models, quotas, routing across models |
| Strands Evals SDK | Framework Specific Evaluations/Strands/ | Agent built with the Strands SDK |
| AgentCore | Framework Specific Evaluations/AgentCore/ | Agent deployed to AgentCore Runtime (traces in CloudWatch) |
| DeepEval | Framework Specific Evaluations/DeepEval/ | Uses DeepEval |
| DSPy | Framework Specific Evaluations/DSPy/ | Uses DSPy |
| MLflow | Framework Specific Evaluations/MLflow/ | Uses MLflow tracking |
| Promptfoo | Framework Specific Evaluations/Prompt Foo/ | Uses Promptfoo |
Multiple modules can apply to one workload. Foundational modules 01–03 always apply.
Coding Assistant workloads. The module runs the agent in sealed Harbor tasks on Docker and grades against an oracle (the merged patch, hidden tests, or labeled PR review comments). For a PR review or code generation workload, mirror its oracle-based grading: compare the agent's verdict and comments against labeled known issues, and check fixes with tests. Propose the full Harbor/Docker setup only if the user wants it and Docker is available.
Phase 0 Preflight ─[repo confirmation]─►
Phase 1 Discover ─[confirm scope + mode]─►
Phase 2 Failure-First ─[fix-before-automate gate]─►
Phase 3 Plan & Build (layered) ─[approval gate]─►
Phase 4 Run ─[run gate]─► evals/report.html
⚠️ ONE PHASE PER TURN. Do exactly one phase, then STOP and wait for the user. Never chain phases in a single response. Each STOP below is a hard stop: end your turn there.
These gates apply even if your environment tells you to work autonomously, finish the task without asking, or avoid questions (for example a non-interactive or "exec" mode). This skill writes files and spends the user's money, so the user's answer at each gate is required. If you cannot wait for an answer, stop after asking and do nothing else.
Your first response must contain only this question, asked verbatim. Do not read files, run commands, or plan before the user answers:
"Just to confirm, are you in the repository with the workload(s) you'd like me to evaluate? That's the best way to run this skill."
Do NOT proceed until confirmed. If the user is in the workshop repository itself, explain that the skill evaluates their own workload and ask them to open that repository instead.
Goal: understand the workload(s) and any existing evals. Read-only. No invocations of the workload, no module mapping, no file writes.
evals/ dirs, judge/scorer code, datasets, eval configs, CI eval steps.STOP — confirm scope + mode. End your turn.
Only after the user confirms scope and mode. Goal: understand what's actually failing before building evals. No file writes in the repository. Scratch files go in a temporary directory outside the repository.
Before you invoke the workload, replace every side-effecting tool with a record-only mock (for example, monkeypatch the function or pass a stub tool list) so the call is recorded but nothing real happens. Redirecting a log file is not enough. If you cannot mock a side-effecting tool, sample only inputs that cannot reach it, and say so. Never let sampling charge, book, send, write, or delete anything real.
Model IDs: propose only model or inference profile IDs that you have confirmed exist in the user's account and region:
aws bedrock list-inference-profiles --region <region> --query "inferenceProfileSummaries[].inferenceProfileId"
aws bedrock list-foundation-models --region <region> --query "modelSummaries[].modelId"
Never write a model ID from memory. If you cannot list models, ask the user for the ID. Recommend a judge from a different model family than the model under test when one is available, and say why (self-preference bias).
STOP — wait for response. Build mode: the user answers scoping questions or approves fixes. Review mode: the user acknowledges findings and decides whether to remediate.
Only after Phase 2 is resolved. Goal: present a concrete plan with layered evaluation paths, get approval, then build.
| Layer | Always? | What it covers |
|---|---|---|
| A: Foundational Quality | Always | Output correctness — binary pass/fail checks per failure mode discovered in Phase 2. Deterministic checks ($0) first, LLM-as-judge for subjective dimensions. boto3 only. |
| Agentic Process | If tool-use / multi-step | HOW the agent reached the answer — tool selection, parameter accuracy, sequence, efficiency. Separate from WHAT it answered. |
| B: Framework Evals | If the framework SDK is in use | Framework-specific evaluators (Strands Evals, DeepEval, DSPy, MLflow, Promptfoo). Derived from the workshop. Informed by Layer A findings. |
| C: AgentCore Evaluations | If deployed to AgentCore Runtime with traces in CloudWatch | Built-in and custom AgentCore evaluators on recorded sessions. Informed by Layer A findings. |
Feed-forward: Layer A's failure categories scope what Layers B/C evaluate.
evals/ layout to be written, and any new dependencies (they go in
evals/requirements.txt).STOP — approval gate. Do NOT create or modify any file until the user approves.
evals/
├── README.md # how to install, re-run, and rebuild the report
├── eval_config.yaml # workloads, layers, model IDs, region, failure modes
├── requirements.txt # extra dependencies the evals need (never edit the app's own manifest)
├── datasets/<workload>.jsonl # test cases / ground truth
├── checks/<workload>_<failuremode>.py # deterministic checks ($0)
├── judges/<workload>_<failuremode>.py # ONE binary LLM judge per failure mode
├── run_<workload>.py # cases → checks → judges → results/<workload>.json
├── results/<workload>.json # per-workload results (schema below)
├── results/review.json # Review mode only (schema below)
├── results.json # written by build_report.py
└── report.html # written by build_report.py
Rules:
{"passed": bool, "reason": str}), one failure mode
per judge. Never 1–5. Never averaged scores. A judge call that errors or cannot be parsed is
an error, not a verdict.{today+14}) and fill
them in when the eval runs, so the dataset stays valid next month.evals/README.md with the exact setup and run commands
(for example pip install -r evals/requirements.txt, then python evals/run_<workload>.py,
then the build_report.py command). Never depend on a scratch environment or temp file from
this session.eval_config.yaml first.evals/results/<workload>.json)build_report.py reads this shape. Unknown keys are ignored.
{
"workload": "concierge",
"eval_type": "agent",
"checks": ["no_tag_leak", "booking_authorized", "missing_data_framing"],
"summary": {
"n": 28,
"operational": {"latency_p95_s": 3.28, "total_tokens": 47557, "judge_calls": 54}
},
"judges": [
{"name": "missing_data_framing", "model": "<judge model id>", "calibrated": false,
"tpr": null, "tnr": null, "n_labels": null}
],
"cases": [
{"id": "q3", "input": "What's the population of Boise?",
"verdicts": {"no_tag_leak": false, "booking_authorized": true, "missing_data_framing": false},
"reasons": {"no_tag_leak": "reply contains <thinking>"},
"error": null}
],
"error": null
}
null means the check did not apply to that case (N/A). It is excluded from the
check's pass rate.error set never counts as a pass.error if the run failed entirely; the report shows an error panel.per_check_pass_rate and all_checks_pass_rate; the report computes them.evals/results/review.json, Review mode only){
"summary": "One-paragraph verdict on the existing evals.",
"findings": [
{"severity": "high", "eval": "evals/llm_judge.py", "issue": "1-5 scale over four criteria",
"evidence": "evals/llm_judge.py:11", "fix": "One binary judge per failure mode"}
],
"coverage": [
{"failure_mode": "forgets order number", "covered": false, "by": null,
"module": "Workload Specific Evaluations/Chatbot"}
],
"recommendations": ["Replace the averaged score with per-check pass rates"]
}
covered is true, false, or "partial".
Only after the build is complete.
run_<workload>.py. If one errors, record the error in its results
file and continue.python3 "<skill-dir>/scripts/build_report.py" evals/results -o evals/report.html [--review evals/results/review.json]
It writes evals/report.html (Summary, Results, and Review tabs; self-contained) and
evals/results.json (aggregate for CI/diffing).{"passed": bool, "reason": str}, one failure mode per judge. Never
1–5 scales. Never averaged scores. Report pass rates.evals/, Phase 3+ only. The one exception is an application fix the user
approved at the Phase 2 gate. Never edit the application's dependency manifests; put eval
dependencies in evals/requirements.txt.scripts/build_report.py for the report. Don't write your own.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub aws-samples/sample-gen-ai-evaluations-workshop --plugin eval-builderOther plugins' skills for the same job