DEV Community

Cole Halton
Cole Halton

Posted on

Your AI reviewer blocked the same PR twice. Deterministic judges fix that.

Last week I wrote that an AI reviewer reporting accuracy without recall is a half-result, and that five AI reviewers missing a bug is one model's opinion measured five times. The thread running through those pieces is the same: the judge is the weakest link, and it's stochastic.

The fix has been slowly showing up, and a release this week made it concrete. Let me walk through why a judge that changes its answer between runs is worse than a judge that's just wrong, and what the decision-model approach actually changes.

The problem with a stochastic judge

Run the same PR through an LLM reviewer twice and you can get two different verdicts. That's not theory anymore, it's measured. LangChain took one fixed weather-agent trace, replayed it across several judges a hundred times each, and compared each judge's score against human labels. The binary pass/fail accuracy against a human oracle was 100% for the decision model they tested, but 80% for one of the chat-model judges over 500 repeated decisions.

The number that matters for review hygiene is precision: does the judge give the same score when the agent behavior is unchanged. LangChain measured per-case variance on identical traces and found the chat-model judges had 433x, 913x, and 92x the score variance of the decision model.

Why does that hurt more than being wrong? A judge that is consistently wrong is at least predictable. You learn its bias, you calibrate against it, you stop trusting the number. A judge that flips between "block" and "approve" on the same input is worse, because the noise floods the signal. When the reviewer flags a PR this week but stayed quiet on an identical one last week, you can't tell whether the code regressed or the judge just drifted. Every downstream decision — which PR to hold, which agent run to gate — inherits that randomness. A flaky oracle isn't a reviewer, it's a coin flip with a token budget.

The artifact that changed the cost story

The project that made this actionable is jevals, an eval and guardrail library built on TypeSafe AI's Jev, a "System One" model that doesn't generate text. Instead of writing a paragraph of reasoning and a JSON blob, you send it state plus typed questions — a choice, a rubric score, a yes/no density — and it returns calibrated probabilities in a single parallel forward pass. Asking forty questions costs about the same latency as asking one.

Their quickstart shows the concrete cost difference. Eight evals against a trace, one HTTP request, 1,388 tokens, $0.00006, 0.33 seconds. Compare that to an LLM judge, where a single metric like answer relevancy is already multiple round trips. At that price you stop sampling 1% of your traces and start running the whole pipeline.

The bigger move is structural. Because an eval is defined once and depends only on the trace, the same class runs as an offline metric, a production monitor, and a gate inside the agent loop. The gate that blocks a harmful agent action in production enforces exactly the thing you measured offline. That closes a gap I keep running into: teams evaluate a sample of traffic nightly, and the results never touch the request path. jevals makes the judge cheap and deterministic enough to live inline.

There's an open-weight path too. Within a week of the launch, models speaking the same wire format showed up — Kev runs on a 32GB Mac, and Laya is a ModernBERT variant that runs in-process on Apple Silicon. Same eval definitions, a backend flag to switch, and a recalibration step. So the pattern isn't locked to one hosted vendor.

Keep your skepticism on

I like the direction, but I'm not here to sell you on it. Three things keep me from treating this as solved.

First, the sample is tiny. LangChain's test was five toy weather-agent traces. A judge that performs on a few trivial requests tells you little about how it handles a real codebase or a messy agent session. The variance numbers are directionally useful, not a verdict.

Second, the provenance is friendly. LangChain publishes the comparison on its own blog, and it has a live-stream collaboration with TypeSafe AI planned days later. Self-published vendor numbers in your direction are the one kind of result you should read with the most suspicion. The finding is plausible and the method is reasonable, but it's not an independent replication.

Third, confirm the core claim I keep hammering on: lower variance is not the same as accuracy. A deterministic judge can be consistently, confidently wrong. LangChain did check agreement with a human oracle, which is the right instinct. But a decision model removes judge stochasticity, not judge bias. If Jev has a blind spot — an authorization bug it never flags, a class of prompt injection it always lets through — it will now fail deterministically and consistently on every trace. That is better for debugging than a flaky judge, but it also means a biased model can silently endorse bad code at scale, every single time. The fix for that is still independent verification: cross-model checks and rule-based attention on the specific failure classes you care about.

There's also a practical note buried in the README that teams will miss. The probabilities don't line up across backends, so if you swap from Jev to the local open-weight Kev or the ModernBERT-based Laya, you re-run calibration. Same eval definitions, different probability scale. That's an easy thing to forget until your gates start misfiring after an infrastructure change.

What I'd do

If you review AI-generated code and your tool reports a single accuracy number, ask it for the precision too — the score variance across identical runs. A reviewer you can't reproduce is noise in every decision downstream. If you build your own evals, the decision-model pattern is worth a look because an LLM is a poor test suite when it changes its mind between runs.

And if you're picking a review tool for a growing volume of AI code, treat "which judge does the heavy lifting" as a first-class selection criterion, not a footnote. A deterministic, runnable-everywhere scorer beats a stochastic one for every team I've watched try to act on review output. The tools worth your time are the ones that let you reproduce the verdict. When you can't rerun the exact trace and get the exact same answer, you're not reviewing, you're gambling.

Kodus reviewers are split across independent role-scoped agents rather than one model scoring its own output, which keeps the player and the judge apart — the same separation that matters when you choose any review harness. But the principle stands on its own: judge determinism and judge separation are what make an AI reviewer trustworthy, and neither comes free from a single stochastic model.

Top comments (0)