Eval harness: regression tests for LLM apps and agents in CI

We run this harness on every change to a prompt, model or tool in the AI systems we build. It scores your test set with deterministic and model-graded checks, compares the result with the last release and fails the build when quality drops.

What's inside.

How it fits together.

  1. 01

    Load

    The runner reads the test sets and the configuration for the prompt, model and tools under test.

  2. 02

    Run

    Each case goes to your application through a small adapter, with concurrency limits and retries for provider errors.

  3. 03

    Grade

    Deterministic checks run first. Cases that pass them go to the model grader where a rubric applies.

  4. 04

    Compare

    Scores, cost and latency are compared with the baseline, a report is written and CI passes or fails.

A look at the code.

The gate at the end of a run: compare each suite with the baseline and fail CI on a regression.

Python
import json
import sys
from pathlib import Path

TOLERANCE = 0.02  # allowed drop in pass rate before the build fails

current = json.loads(Path("reports/current.json").read_text(encoding="utf-8"))
baseline = json.loads(Path("reports/baseline.json").read_text(encoding="utf-8"))

problems = []
for suite, result in current["suites"].items():
    base = baseline["suites"].get(suite)
    if base is None:
        continue
    if base["pass_rate"] - result["pass_rate"] > TOLERANCE:
        problems.append(f"{suite}: pass rate {result['pass_rate']:.1%} (baseline {base['pass_rate']:.1%})")
    new_critical = set(result["failed_critical"]) - set(base["failed_critical"])
    if new_critical:
        problems.append(f"{suite}: new critical failures {sorted(new_critical)}")

if problems:
    print("\n".join(problems))
    sys.exit(1)
print("No regressions against the baseline.")

Built with.

All technologies

Hear when it is public.

We are preparing the eval harness for release. One email when it is out, and our occasional notes.

Occasional emails, unsubscribe any time. See our privacy policy.

Start working with Vantion.