Deep dive

Guard models vs LLM judges: the cost and latency trade-off

You can check an agent’s tool calls by asking a large language model to judge each one, or with a small model trained for the job. The judge is flexible and slow; the guard is fast and narrow. Most production setups end up using both, in a particular order.

4 min readLast updated

Checks run on our GPUs in Switzerland. Request payloads are not stored.Security

In 30 seconds

  • An LLM judge is flexible and can explain itself, but costs roughly $2–5 per 1,000 calls and about a second each (illustrative).
  • A small guard model answers a fixed set of questions in milliseconds, cheap enough to run on every call.
  • Judges are still better for novel domains, long documents and when you need a written rationale.
  • A cascade runs the guard everywhere and sends only the uncertain band to a judge or a human.

Code and dense tables are folded away. Open any of them on demand.

Two ways to ask "should this run?"

An LLM judge is a general-purpose language model given the action, the context and a rubric, and asked for a decision. It needs no training, can take any policy written in plain language, and can explain its reasoning.

A guard model is a small classifier trained on labelled examples of the specific question. MCP Guard is one: a DeBERTa-v3-base model (184M parameters) fine-tuned on about 31,000 labelled agent actions, which answers nine questions about a tool call (safe, violation type, severity, destructive, exfiltration, injected, approval policy, blast radius, argument grounding) in one forward pass. It cannot follow a new rubric you write tomorrow; it answers the questions it was trained on, quickly.

The trade-off between them is mostly about where the checks run and how many there are.

Cost and latency, side by side

Figures for a judge depend heavily on the model and the prompt length; the ones below are an illustrative reference point, not a benchmark.

LLM judge (illustrative)MCP Guard
Costroughly $2–5 per 1,000 calls$0.20 per 1,000 checks
Latency per checkaround 1 s~15 ms on an RTX 4090 (p95 ~23 ms, batch 1), plus network round trip (~100 ms typical from Europe)
Throughputlimited by provider rate limits~400 checks/s per GPU
Outputfree-text decision and rationaleverdict, calibrated scores for nine questions, short reasons
New policyedit the promptfixed questions; express specifics through constraints and context

On a CPU (8 threads) the same full check takes around 120 ms, which is why the model can also be run close to where agents run.

Latency matters more for agents than it first appears. A coding agent that runs 40 shell commands per task, each gated by a one-second judge, spends 40 seconds waiting on its guard. In code mode, where generated code can fire many tool calls in a loop, per-call judge latency either slows the program down badly or pushes teams to skip the check.

Where an LLM judge is still better

A small guard is not a replacement for a judge in every case. A judge tends to be the better tool when:

  • The domain is new. A guard generalises from its training data; a judge can apply a written policy to situations nobody labelled.
  • The input is long. Reviewing a whole document, a long diff or a multi-page contract fits a large context window better than a compact classifier.
  • You need an explanation someone will read. A rationale for an auditor or an end user is what language models are good at.
  • The policy changes often. Editing a prompt is faster than collecting labels.

Judges have their own failure modes. Zheng et al. (2023), studying LLMs as judges of other models' answers, documented position bias, verbosity bias and self-enhancement bias, and a judge reading untrusted content can itself be a target for prompt injection. Neither approach is a guarantee.

The cascade: guard everywhere, judge on the uncertain band

The two approaches combine naturally. Run the fast guard on every tool call, and escalate only what it is unsure about:

  1. The guard checks every action.
  2. allow runs immediately; block stops immediately with the reason sent back to the agent.
  3. ask goes to a slower reviewer: an LLM judge with your full policy, a human, or the judge first and a human if the judge also hesitates.
Show technical details· python sample
python
result = guard.check(action=call, intent=task, trigger=trigger)
if result["verdict"] == "allow":
    run(call)
elif result["verdict"] == "block":
    refuse(call, result["reasons"])
else:  # "ask": escalate only the uncertain band
    decision = llm_judge(call, policy=POLICY) or ask_human(call, result["reasons"])

The cost of the cascade is dominated by how many calls land in the ask band, which is something you control with thresholds (see calibrated scores and thresholds). The judge only sees the calls where its flexibility is worth paying for.

On accuracy: on R-Judge, a public benchmark of agent safety trajectories (held-out test half, 304 trajectories), MCP Guard reached an AUROC of 0.855, against 0.824 for saroku-guard, an open 184M guard model. The difference is not yet statistically significant, so read it as "on par with or better than" that baseline, not as a ranking. We have not published a head-to-head against specific LLM judges; if you run one on your own traffic, the cascade above is a good way to compare them where it matters.

Frequently asked questions

Is a guard model less accurate than an LLM judge?
It depends on the task and the judge. A trained guard can do well on the questions it was trained for; a judge can be better on new policies and long inputs. Measure both on your own labelled actions before deciding.
Can I use MCP Guard and an LLM judge together?
Yes. The common pattern is a cascade: MCP Guard on every call, and only ask verdicts escalated to a judge or a human.
Where do the LLM judge cost figures come from?
They are an illustrative reference for a general-purpose model reviewing a typical tool call with some context. Your cost depends on the model, prompt length and provider pricing.

Sources

Last updated . MCP Guard reduces the risk of harmful agent actions; it does not guarantee safety. Keep deterministic controls in place alongside it. Third-party names are used only to describe their products; we are not affiliated with them.