Organization
Open source
Case span
2026
Role
Author

evalproof: LLM evaluation as measurement, gated on what the data can show

An LLM judge's pass rate is a biased estimate, and a few-point drop on a small suite is mostly noise

Open source

ProblemLLM features ship on a judge model's pass rate and a 'fail if it dropped by X' gate. The judge has error rates of its own, and a few-point delta on a few dozen cases is mostly noise, so the gate either blocks harmless changes or gets loosened until it catches nothing.

DecisionTreat the judge as an instrument to calibrate, compare runs on paired cases with exact tests, and fail only when a drop is both beyond tolerance and significant, with latency and cost budgets on their own exit code.

Team
One person
Scale
An 83-question support-assistant suite on local models; a 60-ticket offline suite that CI runs on every commit
Links
Source Live
  • p = 0.39 for a 4.8-point judge drop the gate declined to fail exact McNemar on 83 paired cases — 8 worse, 4 better, 71 unchanged — qwen3:1.7b judged by qwen3:8b on Ollama, temperature 0 · measured Oct 2026
  • 1,469 → 4,422 ms p95 latency, the regression that was real system latency over the same 83 cases, sequential, one Apple M5; mean answer length went from 19 to 77 tokens · measured Oct 2026
  • 7 vs 4 judge–key disagreements where the key, not the judge, was wrong all 13 disagreements across both runs read by hand; 2 were ambiguous · measured Oct 2026
  • 42.2% pairwise verdicts that flipped with answer order 35 of 83 pairs judged in both orders (166 calls) by qwen3:8b; order-dependent verdicts are reported as ties · measured Oct 2026
Grid of 83 eval cases: 71 unchanged, 8 worse and 4 better after a prompt change, beside three gates — a delta gate that fails it, a paired gate that warns at p = 0.39, and a latency budget that fails it Grid of 83 eval cases: 71 unchanged, 8 worse and 4 better after a prompt change, beside three gates — a delta gate that fails it, a paired gate that warns at p = 0.39, and a latency budget that fails it
Twelve of 83 cases changed verdict, too few to separate a 4.8-point drop from noise, so the paired gate warned while the latency budget failed the change. Read the analysis
evalproof — the path from a golden set to an exit code
  1. Suite YAML · JSONL Every run records the dataset hash and a hash per case; a case added or edited between runs is listed, not compared.
  2. Run Ollama · httpx · SHA-256 cache Cached by content: a warm re-run took 0.05 s instead of 363 s, with identical results.
  3. Judge llm_judge · calibrate A classifier with measured error rates: TPR 92.6%, FPR 6.7% against the answer key.
  4. Compare exact McNemar · paired bootstrap Only changed verdicts count: 8 worse against 4 better on 83 cases gave p = 0.39.
  5. Gate exit codes · GitHub Actions Fails only on a drop beyond max_drop at p < alpha; a budget breach has its own exit, 3.

Context

Most LLM evaluation I have seen reports one number: the share of outputs a judge model marked as passing. A release gate then compares that number between two runs and fails if it dropped by more than a few points. Both halves of that are measurement problems presented as engineering ones.

The judge is a classifier. If it passes bad answers at a false-positive rate and good answers at a true-positive rate, its pass rate converges to a weighted mix of the two, not to the true rate — the same classify-and-count bias I worked through in the prevalence post. And a pass-rate delta on 60 or 80 cases is dominated by a handful of flipped verdicts: two flips out of sixty move a score by 3.3 points.

evalproof is the measurement layer I built for that: how much a judge’s verdict is worth, and whether a difference between two runs is real. It is deliberately narrow. Broad frameworks such as promptfoo, DeepEval, Ragas and Inspect run evaluations; evalproof’s run file is plain JSON, so it can sit beside them and do the statistics.

Who it is for

Teams that ship an LLM feature, a retrieval pipeline or an agent and change its prompt, model, retrieval or tools often. The questions it answers are the ones that come up at review time: did this change make answers worse, or is the drop noise? Is the cheaper model good enough? Can the judge we score with be trusted, and what is the pass rate once its errors are taken out? Which model calls and tools in the codebase does no test reach?

It fits beside the tools a team already has. Test cases written for promptfoo, DeepEval, Ragas, LangSmith and others can be imported, results from several of those tools can be gated without re-running them, and the system under test can be a Python function, an HTTP service or a program in any language. It is not a tracing or monitoring service and does not watch production traffic: it scores runs of a suite, locally or in CI, and the gate can run in CI with no model calls and no secrets by checking a run file committed with the change.

Constraints

Local-first, so results are reproducible and free to re-run: Ollama is the default provider, with hosted models optional over plain HTTP and no vendor SDK. Anthropic came first, then fifteen OpenAI-compatible provider profiles in 0.3. Since 0.4 a logged-in Claude Code or Codex CLI can also be the judge, with no API key and the agent’s tools switched off. Every model call is cached by content, and each run records the dataset hash, seed, Ollama version and model digests. The statistics use numpy and the standard library only, small enough to read and to test against hand-worked values. Everything was measured on one Apple M5 with 24 GB of RAM, with qwen3:1.7b as the system under test and qwen3:8b as the judge.

Architecture

A suite is one YAML file: a JSONL golden set, the system under test, scorers, an optional judge, calibration settings and a gate. evalproof run produces a self-describing run file with every case’s output, latency, tokens and scores. Three commands read run files:

  • calibrate measures the judge against gold labels — confusion matrix, TPR, FPR, Cohen’s κ — and reports the raw pass rate beside two corrected estimates, adjusted classify-and-count and prediction-powered inference, each with an interval.
  • compare pairs two runs by case id and tests the difference: exact McNemar for pass/fail, a paired bootstrap for continuous scores. Since 0.5 every case also carries a hash, so a case added or edited between the runs is listed and left out, and the gate decides on the cases both runs share.
  • pairwise asks the judge to choose between two answers in both orders and reports order-dependent verdicts as ties.

The gate turns a comparison into an exit code: 0 pass (possibly with warnings), 1 quality regression, 3 budget breach, 4 cannot gate, 2 usage error. A composite GitHub Action runs it and writes the report to the job summary.

Later releases kept that core and widened what feeds it and what it checks:

  • import (0.3) turns per-case results from promptfoo, Inspect, DeepEval and lm-evaluation-harness into run files that compare reads.
  • The gate tests several metrics with Holm-adjusted p-values (0.3).
  • It refuses to compare runs whose judge model changed (0.4).
  • Since 0.5 it also has checks that need no baseline: a minimum pass rate, must_pass cases and a cap on newly failing cases.
  • verify checks a committed run file against its suite with no model call, and re-scores the scorers that need no model (0.5.1).
  • init (0.4) writes a suite, a CI workflow and an agent skill into a repository.
  • Agent testing (0.6): assertions on the tools an agent called and what it said, across several turns and several builds of the same system.
  • Repeated trials (0.7): each case runs several times, and the report and the gate read the trials (both are described below).
  • More importers (0.8): garak, Google ADK and Claude Code plugin eval results, and OpenTelemetry traces as agent traces.
  • 1.0 declared the public surface stable, with a versioning policy. It added a command: target, so a system in any language can be tested, JUnit reports, GitLab CI, a container image and an npm launcher.
  • import-dataset (1.2) turns the test cases already written for promptfoo, DeepEval, Ragas, LangSmith, OpenAI Evals, Inspect, Braintrust, Langfuse or Phoenix into a dataset and a suite.
  • scan (1.3) reads a repository without running it and lists the model calls, agents and tools no suite tests. draft writes inputs for them and never answers: expected answers still come from code, documentation, tests or people.
  • Adapters for seven more agent frameworks and a helper library for TypeScript and JavaScript systems in the npm package (1.4).

In the code

This is the decision behind the headline result. For a pass/fail metric mc.p_value is the exact McNemar test on the cases whose verdict changed, so a drop fails only when it is both beyond max_drop and significant. With one gated metric p_adj is that p-value; with several it is Holm-adjusted. The 4.8-point drop on 83 cases took the warning branch, and the latency budget failed the change with its own exit code.

def decide(cmp: Comparison, gate: GateConfig, candidate: Run | None = None) -> GateDecision:
    # …
    many = len(names) > 1
    raw = [cmp.metrics[name].p_value for name in names]
    adjusted = holm(raw) if many else raw

    exit_code = EXIT_PASS
    for name, p_adj in zip(names, adjusted, strict=True):
        mc = cmp.metrics[name]
        # …
        drop_big = mc.delta <= -gate.max_drop
        significant = p_adj < gate.alpha
        if drop_big and significant:
            # …
            exit_code = EXIT_REGRESSION
        elif drop_big:
            # …
            warnings.append(
                f"{name} dropped {mc.delta:+.3f}, beyond the {gate.max_drop:.3f} threshold, but "
                f"{p_text} ≥ α={gate.alpha}: not distinguishable from noise "
                f"at n={mc.n_paired}. "
                "Add cases before trusting either direction."
            )
    # …
    if (
        gate.max_p95_latency_ms is not None
        and cmp.candidate.p95_latency_ms > gate.max_p95_latency_ms
    ):
        # …
        exit_code = exit_code or EXIT_BUDGET
    # …
    status = "fail" if exit_code else ("warn" if warnings else "pass")

The full function, including the checks that refuse to gate with exit 4, is in src/evalproof/gate.py.

Agents and repeated trials

The first releases scored single answers. Two later ones extend the same gate to systems that act and to systems that vary, without changing the statistics above. The documentation is a site, basantbhattarai.com.np/evalproof, with guides for testing agents and repeated trials and a command reference.

Agents (0.6). A Python system can return a trace, the record of the tools an agent called and what it said. The checks scorer asserts on it: tool_called, tool_not_called, tool_args_contain, forbidden_arg_values, tool_order, tool_succeeded, tool_call_count, rounds, output_contains, output_omits, output_regex and output_cites_tool_result, combined with any_of, not and python. Checks need no judge model, and evalproof verify re-scores them. Cases can have several turns; suite variants run the same cases, scorers and gate against another model or prompt (evalproof run --variant NAME or --all-variants); evalproof.adapters turns what Google ADK, LangChain and LangGraph, the Claude Agent SDK and the OpenAI Agents SDK return into a trace; and evalproof readiness reports which dimensions of quality a suite covers and which it does not, with no model call. The offline example, examples/agent-tools, is a plain-Python agent with two fake tools and no model, 35 cases and two variants. v1 skips a tool for one intent. The reply still reads well, so only the checks scorer sees it, and the committed run files gate v1 to v2 with exit 0 and v2 to v1 with exit 1.

Repeated trials (0.7). trials: K in a suite, or evalproof run --trials K, runs each case K times and scores every trial on its own. The report gives the pooled pass rate with an interval that resamples cases, pass@K, pass^K and the flaky cases, those with a pass and a fail among their decided trials. compare turns each case’s trials into one value with --aggregate, mean (the default), all or any, and tests the change with a paired sign-flip permutation test for mean and exact McNemar for all and any. Beside the gate decision a power line says the smallest drop the suite can detect at 80% power and how many cases max_drop would need; it is information only and never changes the status or the exit code. evalproof compare BASE CAND [CAND ...] compares several candidates against one baseline with a single Holm correction.

The example agent has a build that forgets to check the calendar on a fixed 40% of the outing trials. With five trials per case the gate fails it: the behaviour pass rate falls from 100.0% to 90.9% (exact p = 0.0078), two cases regress by majority and all eight outing cases are flaky. With one trial per case the same build fails three cases and McNemar gives p = 0.25, which cannot be told from noise. That is a planted failure in an offline example, not a measurement of a model, and a model at a fixed seed can answer identically every time, in which case the trials add nothing and the report says so. Version 0.7.1 rebuilt the documentation site and changed no behaviour.

Existing tests, untested code and other languages

The releases after 1.0 are about getting a suite in the first place, and keeping it honest as the code grows.

Starting from cases you already have (1.2). evalproof import-dataset auto FILE reads test cases written for promptfoo, DeepEval, Ragas, LangSmith, OpenAI Evals, Inspect, Braintrust, Langfuse or Phoenix, or a plain JSONL or CSV file, and writes a dataset and a suite. The suite gates the scorer that covers the most cases, and evalproof init --from FILE does the same while setting up a repository. Moving to evalproof does not mean writing the golden set again.

Finding what no suite tests (1.3). evalproof scan reads a Python or TypeScript repository without running it or calling a model. It lists the model calls, agents and tools that no suite reaches, the tools no check asserts on and the suites with few cases. evalproof draft writes inputs for those gaps, from the repository’s existing tests or from a model, tagged draft for review. It never writes an expected answer. A model that drafts both the question and the answer would be grading its own guess, so the answer has to come from code, documentation, a test or a person. The same release added a git pre-push hook that runs verify on the committed run file, and --tags and --exclude-tags to run part of a suite; the gate refuses to compare two runs made with different filters.

More frameworks and TypeScript (1.4). Adapters for LlamaIndex, CrewAI, Pydantic AI, DSPy, Haystack, AutoGen and Semantic Kernel turn what those frameworks return into the trace the checks scorer reads, bringing the total to eleven. They read each framework’s objects without importing it, so none becomes a dependency. They were written from each SDK’s source and tested with fake objects of the same shape, not yet against real runs, so they are marked experimental and warn when used. The npm package, until then a launcher, became a small library as well: runCommand and serve turn an async function into a command: or HTTP target, fromVercelAI and fromLangChain turn an AI SDK result or a LangChain.js agent’s messages into a trace, and evalproof init --node writes a starting system file.

Decisions and trade-offs

Decision Alternative considered Why What it cost
Fail only when a drop is beyond max_drop and significant Fail on any drop beyond a tolerance On small suites most few-point drops are noise, and a gate that fails on noise gets switched off A real but small regression on a small suite passes with a warning; the only fix is more cases
Paired tests on case ids Compare two pass rates or their intervals Only cases whose verdict changed carry evidence; pairing uses exactly those Only the cases both runs share are compared. Until 0.5, runs over different datasets could not be compared at all (exit 4). Now cases added or edited between runs are listed and left out, and an older run file needs evalproof rehash first
Treat the judge as a classifier and calibrate it Trust its pass rate Its count is biased by its own error rates, and the bias moves with the true rate Someone has to label a sample, and with 30 labels the corrected intervals were 1.6 to 2.2 times as wide
Gate one metric by default, and Holm-adjust the p-values when several are gated (since 0.3) Gate every metric at α each Several metrics at α = 0.05 each inflate false failures; Holm keeps the chance of any false failure at α Each metric added to the gate makes a real regression in the others harder to detect; an ungated metric is only reported
Pointwise verdicts gate; pairwise is a diagnostic Gate on pairwise preference Measured: 42.2% of pairwise verdicts flipped with answer order, with a strong length preference Pairwise sensitivity is given up for gating
Local models and a content-addressed cache Hosted APIs by default Reproducible, tied to a model digest, free to re-run Small local models are weaker judges than hosted ones

Results

The worked example is a support assistant for a product: 83 questions, 9 of them unanswerable from its facts. The change under test swaps a grounded system prompt for one that always gives “a complete answer”.

The quality drop was not distinguishable from noise. The judge’s pass rate fell 4.8 points, from 8 answers getting worse and 4 getting better while 71 kept their verdict. Exact McNemar gives p = 0.39, so the gate passed the change with a warning naming the sample size. A delta-only gate with a three-point tolerance would have failed it. The arithmetic of the same test shows why: on 83 cases, no drop smaller than six net cases can reach significance.

The latency regression was real. Mean answer length went from 19 to 77 tokens, and p95 latency went 1,469 → 4,422 ms. With a 2,500 ms budget the gate exits 3 and still prints the quality warning.

The judge was good; the gold was worse than it looked. Against the regex answer key the 8B judge scored TPR 92.6%, FPR 6.7% and κ 0.78. Of 13 disagreements between them, read by hand, the key was wrong 7 times and the judge 4 — the key could see that the right fact was present but not that a wrong one was absent. Corrected on those cases, the key lands within about a point of the raw judge.

Pairwise judging preferred the worse prompt. 42.2% of pairwise verdicts flipped with the order of the answers. Of the consistent ones, the judge preferred the lower-scoring candidate 42 to 6, mostly where both answers were right and the candidate’s was about five times longer.

It reproduces. With the cache off, 20 re-run cases gave 20 identical outputs, verdicts and judge reasons. A warm-cache re-run took 0.05 s instead of 363 s. CI runs an offline ticket router on every commit and asserts the gate’s exit codes: 1 for a real regression of 11 tickets worse and none better, 0 for 2 worse out of 60.

The analysis behind the gate’s design is in The eval score fell 4.8 points. Twelve answers decided whether it meant anything., and every table is in MEASUREMENTS.md.

What the measurements refused to show

That calibration helps at this size. Over 200 random gold samples of 30 labels, both corrections removed the judge’s 3.6–4.8-point offset on average, but their intervals were far wider than the raw rate’s, which already covered the truth every time. Calibration earns its keep on large suites, where the raw interval is narrow and the bias dominates.

That the gate can see a 4.8-point regression. Taking this run’s rates as the truth, a Monte Carlo simulation with a fixed seed caught it 13% of the time at 83 cases and needed about 520 cases for an 80% chance. The gate is honest about that rather than sensitive.

Anything about other models or domains. One machine, two small local models, one product domain, 83 cases, and a judge with thinking disabled. The numbers describe this setup; the method is what transfers.

The first CI runs also caught one of my own bugs: the Wilson interval’s lower bound at zero passes came out as 2.8e-17 on x86_64 Linux and 0.0 on arm64 macOS, a subtraction of two equal quantities rounding differently by platform. Version 0.1.1 pins the boundaries exactly. Building the browser app caught another: the exact McNemar test summed binomial terms in floating point, and past about 1,030 changed verdicts, a size a large suite can reach, comb(n, i) no longer fits in a float and the comparison raised OverflowError. Version 0.1.2 sums the tail as integers and divides once.

What I’d do differently

Label with people, not a regex. The answer key was written before any model output was seen and never changed, which kept it honest, but it was wrong more often than the judge. Calibration is only as good as its labels; a real deployment should calibrate against human review.

Stratify the gold sample. Five of the answer key’s seven errors were on the nine unanswerable questions, where telling an abstention from an invention matters most, and a uniform sample of 30 holds only about three of them. Per-tag sampling and per-tag calibration are on the roadmap.

Measure a reasoning judge sooner. The judge ran without thinking to keep runs fast and deterministic. When I later switched thinking on (MEASUREMENTS.md §8), I read every contested case against the rubric. The thinking judge passed no wrong answer in either run, against three for the judge without it, at 6.7 times the judge time. It also caught two reference answers that claimed more than the product facts, now corrected. The gate’s decision did not change: 6 worse and 1 better, p = 0.125, a pass with a warning.

See the full career record, or get in touch about a senior data, platform, or AI engineering role.