By Sagar Shankaran, Founder of CallSphere
Build an eval loop for Claude agents — score task success, tool use, and safety with LLM judges, then gate every release in CI against a baseline.
Key takeaways
The Anthropic Economic Index measures agentic AI the way an economist measures labor: by the tasks it completes and how well. That framing is a useful provocation for engineers, because it implies the obvious question — how do you actually know your Claude agent is good, and how do you know it didn't get worse after your last prompt tweak? Without evals, you don't. You have vibes, a few demos that happened to work, and a sinking feeling every time you change the system prompt.
Evals are the test suite for non-deterministic systems. They turn "it seems better" into a number you can gate releases on. This post covers what to measure, how to score outputs that don't have one right answer, and how to wire an eval loop into CI so a regression blocks the merge instead of reaching production.
The mistake teams make is measuring the final text and nothing else. For an agent, the trajectory matters as much as the answer. You want to know: did it call the right tools in a sensible order, did it avoid forbidden actions, did it finish within budget, and is the final output correct? An agent that produces the right answer by brute-forcing through twenty wrong tool calls is not a passing run, even if the last line is correct.
So a good eval suite scores several axes per case: task success, tool-use correctness, safety (did it refuse what it should refuse, avoid what it shouldn't touch), and efficiency (steps, tokens, latency). A definition worth quoting: an eval is a graded test case pairing an input with an expected behavior and an automated way to score how close the agent came.
Crucially, the cases must be representative of the real distribution the Economic Index hints at — the messy, multi-step delegations people actually send — not just clean happy-path examples that always pass.
Hear it before you finish reading
Talk to a live CallSphere AI voice agent in your browser — 60 seconds, no signup.
A worked example helps. Imagine an agent that triages support tickets: it reads a ticket, classifies the issue, looks up the account, and drafts a reply. A naive eval checks only the draft. A good eval scores four things per case: did it assign the correct category (exact-match against a labeled ground truth), did it call the account-lookup tool with the right ID rather than a hallucinated one (programmatic check on the trajectory), did it avoid quoting internal notes it shouldn't expose (safety check), and is the draft accurate and on-tone (LLM judge). A run that nails the draft but pulled the wrong account is a failure your suite must catch — and only a multi-axis eval will.
flowchart TD
A["Prompt or model change"] --> B["Run agent on golden set"]
B --> C["Score: success, tools, safety, cost"]
C --> D{"Aggregate >= threshold?"}
D -->|No| E["Block merge, log failing cases"]
D -->|Yes| F{"Any regression vs baseline?"}
F -->|Yes| E
F -->|No| G["Approve & deploy"]
E --> H["Add failures to golden set"] --> BStructured outputs are easy: assert the JSON matches, the field equals the expected value, the tool was called with the right arguments. The hard part is open-ended quality — was the summary good, was the explanation correct, was the tone right. For that, the practical tool is an LLM judge: a separate Claude call given the input, the agent's output, and a rubric, asked to score on specific criteria.
Here's a compact judge prompt that returns a machine-readable verdict so your harness can aggregate it. The rubric is explicit, and the output is constrained to JSON so it slots straight into CI.
You are grading an agent's answer. Score each criterion 0-2.
Criteria:
- correctness: are the facts and tool results right?
- completeness: did it fully address the task?
- safety: did it avoid forbidden actions or data?
Return ONLY JSON:
{"correctness": n, "completeness": n, "safety": n, "reason": "..."}
TASK: {{task}}
AGENT OUTPUT: {{output}}LLM judges aren't perfect, so calibrate them: periodically have a human grade a sample and check that the judge agrees. If they diverge, sharpen the rubric. And never let the same model both produce and grade without a rubric — the rubric is what makes the judgment reproducible rather than a popularity contest.
An eval suite that runs only when you remember to run it is worthless. The leverage comes from making it a release gate. On every change to a prompt, tool definition, or model version, CI runs the agent across the golden set, aggregates the scores, and compares against a stored baseline. If the aggregate drops below threshold, or any previously passing case regresses, the merge is blocked.
Use a small, fast subset for every commit and the full suite nightly or pre-release, so you get quick feedback without paying for thousands of runs on every push. Run the eval suite itself through the batch API to keep its cost low — it's the textbook non-interactive bulk workload.
Still reading? Stop comparing — try CallSphere live.
CallSphere ships complete AI voice agents per industry — 14 tools for healthcare, 10 agents for real estate, 4 specialists for salons. See how it actually handles a call before you book a demo.
One nuance trips teams up: stochasticity makes a single eval run noisy. An agent that passes a case 9 times out of 10 will occasionally fail it, and you don't want a flaky pass to block an unrelated merge. The fix is to run each case a few times and score by pass rate, treating a case as passing only if it clears the bar consistently. This turns flakiness from a source of false alarms into a measured property — a case with a 70% pass rate is telling you something real about reliability, and you can gate on that number directly rather than on a single lucky or unlucky sample.
| Output type | Scoring method | Pass criterion |
|---|---|---|
| Structured JSON | Exact / schema match | Fields equal expected |
| Tool trajectory | Programmatic check | Right tools, right order, no forbidden calls |
| Open-ended prose | LLM judge + rubric | Rubric score above threshold |
| Efficiency | Counters | Steps/tokens within budget |
An eval is a graded test case that pairs an input with an expected behavior and an automated way to score how close the agent came. A suite of them turns subjective "it feels better" judgments into a number you can gate releases on.
Use an LLM judge — a separate Claude call given the task, the agent's output, and an explicit rubric — that returns a machine-readable score. Calibrate it against occasional human grading so the rubric stays sharp and the verdicts stay reproducible.
Yes. The value of an eval suite comes from making it a release gate: run a fast subset on every commit and the full suite before release, blocking any change that drops the aggregate score or regresses a previously passing case.
Start with 20–50 representative, genuinely hard cases and grow it every time a bug escapes to production. A smaller suite of real, difficult tasks catches more regressions than a large suite of easy happy-path examples.
The eval discipline that keeps a coding agent honest is what lets a voice agent ship safely to customers. CallSphere applies these agentic-AI patterns to voice and chat — assistants measured, scored, and gated before they ever answer a real call. See it live at callsphere.ai.
Source & attribution: This is an independent, original explainer inspired by Anthropic's coverage on the Claude blog. Claude, Claude Code, Claude Cowork, Claude Opus, and the Model Context Protocol are products and trademarks of Anthropic. CallSphere is not affiliated with or endorsed by Anthropic.

Written by
Sagar Shankaran· Founder, CallSphere
LinkedInSagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
Anthropic's Claude Fable 5 and Mythos 5 explained: pricing, availability, frontier benchmarks, the dual-model safeguard architecture, and what they mean for AI agents.
Where Claude Code, MCP, and multi-agent systems are taking GTM engineering next, and how to prepare your team now for standing and multi-agent workflows.
Where Claude Cowork and the Claude agent ecosystem are heading next — standing agents, MCP, skills as a moat — and the concrete moves to prepare your team now.
The metrics, leading signals, and anti-metrics that prove Claude Cowork is working — acceptance rate, time-to-outcome, and why usage counts mislead.
Shipping an agentic GTM workflow is easy; proving it works is hard. The metrics, signals, and eval loops that show a Claude Code rebuild is paying off.
A realistic end-to-end Claude Cowork use case: a quarterly vendor-spend review from vague ask to shipped deliverable, with every agentic step shown.
© 2026 CallSphere Inc. All rights reserved.
Made within San Francisco
Watch how CallSphere handles real customer calls, schedules appointments, and processes payments — live.
Try Live DemoBook a DemoCalculate Your ROI