By Sagar Shankaran, Founder of CallSphere
Measure agent quality and gate releases with an eval loop on the Message Batches API: fixed sets, exact-match plus LLM-as-judge, no-regression gates.
Key takeaways
The hardest question in shipping an agentic system is not "does it work?" — it is "did my last change make it better or worse?" When a workflow processes thousands of inputs through the Message Batches API, you cannot eyeball quality. A prompt tweak that fixes the case you were staring at can quietly regress a dozen you were not. The only way to ship with confidence is an eval loop: a fixed set of representative inputs, a way to score the outputs, and a gate that blocks a release if the score drops. This post is about building that loop for batched Claude agents and using it to turn "it felt better" into a number you can defend.
An evaluation, in this context, is a repeatable measurement of agent quality against a fixed dataset with known-good expectations. It has three parts that must all exist: the dataset (representative inputs, ideally drawn from real traffic), the scorer (how you turn an output into a number), and the gate (the threshold below which you do not ship). Skip any one and the loop collapses — a dataset with no scorer is just vibes, a scorer with no gate is a dashboard nobody acts on.
The loop runs like this: you change a prompt or a tool, you run the full eval set, you compare the new score to the baseline, and you ship only if it improved or held while fixing what you intended. The Message Batches API is what makes this affordable. Your eval set might be hundreds or thousands of cases; running them as a single batch on every candidate change costs little and finishes well within a development cycle.
flowchart TD
A["Prompt / tool change"] --> B["Run eval set via Batches API"]
B --> C["Score each output"]
C --> D{"Aggregate >= baseline?"}
D -->|No| E["Block release, inspect regressions"]
D -->|Yes| F{"Any critical-case failure?"}
F -->|Yes| E
F -->|No| G["Promote & update baseline"]
E --> A
Different outputs need different scorers. For structured fields — a routing label, an extracted date, a chosen tool — use exact or normalized equality against a gold answer. These are cheap, deterministic, and unambiguous. For open-ended outputs — a summary, a drafted reply — equality is meaningless, so you use an LLM-as-judge: a separate Claude call that scores the output against a rubric you define.
{
"model": "claude-sonnet-4-6",
"max_tokens": 256,
"messages": [{
"role": "user",
"content": "Rubric: Is the summary faithful (no invented facts) and complete (covers all key points)? Output JSON: {\"faithful\": bool, \"complete\": bool, \"score\": 0-5, \"reason\": \"...\"}.\n\nSOURCE:\n...document...\n\nSUMMARY:\n...candidate..."
}]
}
Run the judge itself as a batch over all your candidate outputs and you get a quality distribution for the whole set at once. Keep the rubric narrow and concrete — vague rubrics produce noisy scores — and spot-check the judge against human labels periodically so you trust its numbers.
Hear it before you finish reading
Talk to a live CallSphere AI voice agent in your browser — 60 seconds, no signup.
A single average score hides the failures that matter most. A change can lift the mean while breaking your most important cases. So gate on two conditions: the aggregate must meet or beat the baseline, and a curated set of critical cases must all still pass. Tag the cases you cannot afford to get wrong — a billing question routed to the wrong queue, a safety-relevant refusal — and treat any regression among them as a hard block regardless of the average.
This two-part gate is what makes the loop trustworthy. It lets you accept changes that genuinely improve overall quality while refusing changes that trade your worst-case behavior for a better mean. Over time, the critical set becomes the institutional memory of every painful production incident you never want to repeat.
Track not just whether you pass the gate but by how much, and in which direction the changes moved. A score that creeps up over many releases tells you the loop is working; a score that plateaus while you keep editing prompts tells you that you have hit the ceiling of what prompting can fix and the next gain needs a different tool, a better retrieval step, or a stronger model. The eval history is a roadmap as much as a gate — it shows you where effort is paying off and where you are polishing a surface that will not get smoother.
For agentic workflows, the final answer is only half the story. Two agents can produce the same correct output while one took three tool calls and the other took fifteen, looped twice, and nearly hit the token cap. If you only score the end result, you reward the wasteful path equally and miss a regression that is quietly inflating your cost and latency. Add trajectory checks to your eval: assert that the agent called the expected tools, did not exceed a turn budget, and did not repeat a tool with identical arguments. These checks catch the loops and wrong-tool failures that a pure output score would let through, and they keep the agent honest about how it reaches an answer, not just whether it does.
You can run these trajectory assertions in the same batch eval job that scores outputs — capture each run's full tool-use trace and evaluate it alongside the final message. The result is a richer pass/fail signal that ties efficiency and correctness together, so a change that improves answers but balloons tool calls does not sail through unnoticed.
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.
| Output type | Scorer | Gate signal |
|---|---|---|
| Routing label / tool choice | Exact match vs gold | Accuracy % |
| Extracted field | Normalized equality | Field-level F1 |
| Summary / draft reply | LLM-as-judge rubric | Mean rubric score |
| Critical cases | Either method | Zero regressions allowed |
Big enough to be representative and stable, small enough to run often. For most agentic tasks a few hundred well-chosen cases give a score that moves meaningfully when quality changes and stays steady when it does not. Prioritize coverage of distinct input types and hard edge cases over raw count — a hundred diverse cases beat a thousand near-duplicates.
With a concrete rubric and periodic calibration against human labels, yes, for relative comparisons. You are mostly asking "did this change improve or hurt?" rather than computing an absolute truth, and a consistent judge answers that well. Keep the rubric narrow, and never let the judge be the only gate on safety-critical cases — back those with deterministic checks.
Cost and convenience. Your eval set runs as one asynchronous job at the batch discount, so evaluating every candidate change is cheap enough that you do it routinely instead of rationing it. The latency is irrelevant because evals are an offline gate, not a user-facing path.
Feed it from production. Every time the agent fails in a way that matters, distill that input into a new eval case with a gold answer. The set then evolves alongside your real traffic, and your gate keeps measuring the failures that actually occur rather than the ones you imagined at the start.
CallSphere runs this same eval discipline behind its voice and chat agents — fixed test sets, rubric-based scoring, and release gates — so every update to an agent that answers calls and books work is measured before it ships. See how it holds up 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