Skip to main content
المدونة

Zalt Blog

Deep Dives into AI Engineering

AT SCALE

How to Compare LLMs for an AI Agent Without Fooling Yourself

By محمود الزلط
Insights
8m read
<

We ran two LLMs through the same agent scenarios with the same checks. They tied on 9 of 10 tasks. One cost about 22x more per task and took about 10x longer. Here is the harness: stratified, budget-capped A/B on common items, judge scoring, and ratios instead of averages.

/>
How to Compare LLMs for an AI Agent Without Fooling Yourself - Featured blog post image
Mahmoud Zalt

1:1 Mentor

Are you a software engineer moving into AI?

Let's have a call. I'll help you modernize your skills and learn the tools, systems, and architecture behind reliable AI products. One session or ongoing.

Build Your AI Employee Team

Build your AI team. They work 24/7. No code.

Sistava.com

How to Compare LLMs for an Agent, Fairly

To compare LLMs for an AI agent, run every candidate through the same fixed set of agent tasks, in the same harness, with pass or fail checks written before the run, and report quality next to cost and latency per task as ratios against a baseline. Compare only the tasks every model completed, read the per-task differences rather than the averages, and cap spend so the expensive model cannot quietly shrink your sample. Leaderboards tell you which models are worth testing. Your own tasks decide.

I'm Mahmoud Zalt, an AI solutions architect, and evaluation design is a big part of what I do through Sista AI.

The worked example below is a real comparison I ran while building Sistava: our free plan's default model, MiniMax M3.1 Flash, against our paid plan's default, Kimi K3.1 Pro, on our agent scenario suite. The headline: they tied on 9 of 10 tasks, and the expensive one cost about 22 times as much per task and took about 10 times as long. The full results sit in Sistava's research report How We Evaluate AI Employees. Here is how the comparison works and how to build your own.

Why Public Benchmarks Do Not Pick Your Agent's Model

Benchmarks measure general capability: question answering, reasoning puzzles, code. An agent's job is a trajectory. It has to choose the right tools, fill their arguments correctly, ask for approval before anything leaves the building, refuse what it should refuse, and stop when the task is done. A model can lead a leaderboard and still wander, over-call tools or act when it should ask.

Benchmarks also omit the two numbers you pay for every day: cost per completed task (not price per token) and wall-clock latency per task. A model that makes more calls, or longer reasoning traces, can be cheaper per token and more expensive per task. So the comparison has to happen at the task level, in your harness.

The Harness: Scenarios With Checks, Not Prompts With Vibes

Our scenario suite has 34 real requests for three roles (an assistant, a marketer and a sales rep), across kinds of work: act (book, send, schedule, log), clarify (ask before acting on an unclear request), knowledge (answer from company documents), refuse (phishing, fake reviews, false claims) and safety (ignore an instruction hidden in the inbox). Each runs end to end against simulated email, calendar, team chat, CRM and documents, with a known right answer.

A scenario passes only if every check passes:

  • the right tools were called and the needed ones were not missed;
  • tool arguments were correct (the email exists, addressed to the right person);
  • the end state is right;
  • approval was requested where required;
  • nothing forbidden was done;
  • it stayed within a step budget, for example at most 8 model calls.

On top of the pass or fail, each run records continuous metrics:

MetricDefinition
Task successShare of scenarios with all checks passing
Tool precisionOf the tools called, the share that were right
Tool recallOf the tools needed, the share that were called
Argument accuracyTool inputs filled in correctly
Trajectory efficiencyGolden steps divided by actual steps
Forbidden callsCount of actions the scenario prohibits
Reply qualityAn AI judge scores the final reply 1 to 5 against a written standard
Cost, latency, model callsPer scenario, priced from the provider receipt

On the full suite, the free plan's model completed 28 of 34 scenarios with every check passing (82%), with 93% tool precision, 94% recall, 90% argument accuracy, 64% trajectory efficiency and a judge average of 4.56. That single-model run is the baseline a candidate has to beat.

Budget-Capped A/B on Common Items

Every comparison run has a hard spending cap, $1 in this case, because a comparison that can run up an unbounded bill tends not to get run at all. The cap creates a subtle trap: if each model runs until the money is gone, the cheap model finishes all 34 and the expensive one finishes 4, and you end up comparing different tasks.

The fix is to let the most expensive arm go first, in a stratified order that walks one scenario per role and kind of work before repeating any, and to stop it when the next scenario no longer fits under the cap. Every other arm then runs exactly those scenarios. The comparison is always on common items, and the sample stays spread across kinds of work even when it is small. In the worst case the cap covered 4 scenarios; prompt caching stretched it to 10, with about 89% of the expensive model's input tokens served from cache.

The Results, as Ratios

Metric, 10 common scenariosMiniMax M3.1 Flash (baseline)Kimi K3.1 Pro
Task success70%60%
Tool precision / recall90% / 90%90% / 90%
Argument accuracy75%75%
Trajectory efficiency73%70%
Scenarios with no forbidden action90%90%
Forbidden calls15
Reply judge, 1 to 54.904.80
Model calls per scenario3.04.2
Cost per scenario1x21.6x
Latency per scenario5.5 s52.9 s (9.7x)

Reporting cost and latency as ratios against a baseline keeps the comparison readable when provider prices change; the absolute numbers go stale, the ratio tells you the shape of the trade. For the record, the expensive arm spent $0.66 of the $1 cap and the baseline $0.03, judge included, and the full run took 551 seconds against 74.

Read the disagreements, not the averages

The two models tied on 9 of 10 scenarios. The averages make it look like a 10 point quality gap; the per-scenario table shows one loss. When booking a meeting and emailing the invite, the expensive model used 10 model calls against a budget of 8 and failed the step budget check. All 5 of its forbidden calls came from a single scenario, an unclear "post our results" request, where both models acted instead of asking which results and where (the baseline made 1 forbidden call there).

Both models also failed the same three scenarios for the same reasons: answering a policy question correctly without naming the source document, rewriting copy without calling the knowledge search for the brand guide, and acting on an unclear request. Those are failures of the agent's behaviour, its instructions and tool policy, not of either model. Swapping models would not fix them, which is itself a useful finding: it tells you where the next improvement has to come from.

What the result does and does not say

On this sample, the more expensive model bought no extra quality for tool work while costing about 22 times as much per task and taking about 10 times as long. It does not say the cheaper model is better: ten scenarios, one per group, cannot separate two models that tie on nine. The decision it supports is narrow and practical: keep the cheap model as the free plan default, and do not justify the paid default with "better at tool work" until the remaining 24 scenarios, plus the red team and knowledge suites, have been run on both.

Judges, Variance and the Regression Gate

Three practical notes on the parts that are easy to get wrong.

  • The judge is a model too. We score reply quality with a separate, cheap judge model (GLM 5.3 Flash) against a written standard, in the spirit of G-Eval. Judges make mistakes: in our red team suite, three of the scored misses were judge errors, not agent errors. Publish the sample size with every judged score and spot check by hand.
  • Keep the judge fixed across arms. If the judge changes between runs, you are comparing judges, not candidates. The same applies to the harness, the tool definitions and the system prompt: change only the model.
  • Separate absolute quality from regression. Paid comparisons like this one are a deliberate step. In front of every release we are rolling out a regression gate that runs free stand-in models over 23 measures against the last accepted baseline in about 80 seconds. It catches a drop relative to the last release; it does not measure absolute quality, and it is not meant to.

Run Your Own Comparison

  1. Build 20 to 40 scenarios from real traffic, spread across kinds of work: act, clarify, answer from knowledge, refuse, resist injection. Simulate the tools; never run a comparison against production systems.
  2. Write checks before running. Tools, arguments, end state, approval, forbidden actions, a step budget. Checks written after seeing outputs drift toward the outputs.
  3. Fix everything except the model: harness, prompts, tool schemas, judge, data.
  4. Cap spend, run the expensive arm first in stratified order, then run the others on exactly the completed scenarios.
  5. Price from provider receipts, including cached input tokens, and report cost and latency per task as ratios against your current model.
  6. Diff per scenario. A tie at a fraction of the cost is a result. A loss on one scenario is a lead to read, not a verdict.
  7. Look for shared failures. If every model fails the same scenario, fix the agent, not the model.
  8. Rerun when anything moves: a new model, a price change, or new instructions or tools.

If you want help building an eval harness like this around your own agent, it is a core part of my agent development work. The broader evaluation stack it sits in, from scenario tests to red teaming to live checks, is documented in How We Evaluate AI Employees from Sistava.

Limits of This Comparison

  • Small sample. 10 of 34 scenarios, one per group. One more failure moves task success by 10 points.
  • One fictional company. Your workload will contain cases ours does not.
  • Tool work only. Long-form writing and deep analysis need their own scenarios and judges.
  • Ratios move. Cost depends on provider prices and cache hit rates on the day; latency depends on provider load. Rerun before a decision that depends on them.

Frequently Asked Questions

How do you compare LLMs for an AI agent?

Run each model through the same fixed set of agent scenarios in the same harness, with pass or fail checks written in advance, and report task success, tool metrics and judged reply quality next to cost and latency per task. Compare only scenarios every model completed.

Is a more expensive LLM better for agents?

Not necessarily. In our comparison on 10 tool-use scenarios, the model that cost about 22 times more per task tied on 9 and lost 1. Price does not predict tool-use quality; test it.

How many test cases do I need to compare models?

Ten gives a first look and cannot separate close models. Twenty to forty, spread across kinds of work, is a more useful minimum, with more added wherever models disagree.

Should I use an LLM as a judge?

Yes, for qualities you cannot count, scored against a written standard with a fixed judge model. Publish sample sizes, keep the judge constant across candidates, and spot check its verdicts, because judges are wrong sometimes.

Why report cost and latency as ratios?

Absolute prices change often, and ratios against your current model keep comparisons readable over time. Always compute them from provider receipts per completed task, including cached tokens and extra model calls.

Thanks for reading! I hope this was useful. If you have questions or thoughts, feel free to reach out.

Content Creation Process: This article was generated via a semi-automated workflow using AI tools. I prepared the strategic framework, including specific prompts and data sources. From there, the automation system conducted the research, analysis, and writing. The content passed through automated verification steps before being finalized and published without manual intervention.

Mahmoud Zalt

About the Author

I’m Zalt, a technologist with 16+ years of experience, passionate about designing and building AI systems that move us closer to a world where machines handle everything and humans reclaim wonder.

Let's connect if you're working on interesting AI projects, looking for technical advice or want to discuss anything.

Support this content

Share this article