test infrastructure for probabilistic systems

Ship LLM changes without guessing

evalharness is pytest for LLM outputs — golden sets, LLM-as-judge scoring, and a regression gate that fails the build when quality drops. Pick one of 10 AI features, edit its prompt, and watch your prompt quality move the score — live.

Pick a feature
Edit the prompt
Score vs golden set
Compare baseline
Pass / FAIL gate

Golden test sets

Versioned datasets of inputs, expected answers, and grading rubrics — your ground truth, in YAML or JSONL.

⚖︎

LLM-as-judge

A strong model grades open-ended output against a rubric and returns a schema-validated verdict — not brittle string matching.

Five scorers

Exact, regex, contains, local semantic embedding, and LLM-judge — composed per suite, each measuring one thing.

Regression detection

Compare any run to a saved baseline. Catch cases that flip pass→fail and aggregate drops beyond your tolerance.

CI quality gate

One command exits non-zero when quality drops. A prompt or model change that regresses turns the build red.

Cheap & reproducible

A content-addressed response cache makes re-runs free and gate decisions deterministic despite model randomness.

Most evals are a script that prints outputs.

This is the opposite: a reusable framework with a pinned, cached, reproducible pipeline; composable scorers including a structured LLM judge; an explicit regression algorithm; and a gate that actually fails the build.

# save a baseline, then gate every change
$ evalharness baseline suite.yaml
$ evalharness gate suite.yaml \
--baseline baseline.json
GATE FAILED
- case 'australia' regressed pass → fail
- pass rate 100% → 75%
# exit code 1 → build turns red

Two outcomes, one gate

Every change is graded against your baseline. If quality holds, the gate is green and you ship. If it slips, the gate goes red and tells you exactly what broke — down to the case.

Quality held → ship it
Gate passed
No regression against the baseline. Safe to ship.
Quality dropped → build fails
Gate failed
3 regression signals — this change would fail CI.
  • Case regressioncase 'australia' regressed pass → fail (contains: missing expected)
  • Pass-rate droppass rate dropped 100.0% → 75.0% (delta 25.0% > tolerance 0.0%)
  • Scorer dropscorer 'llm_judge' mean dropped 0.950 → 0.750

Want to trigger both yourself? Open the dashboard and use the one-click guided demo.