LLM vs Jev: a controlled comparison on LLM guardrailing

September 19, 2026 · View on GitHub

One decision spec. One policy. Several perception backends. The question is whether TypeSafe's System One model, Jev, can screen every message going into an LLM app as well as a frontier LLM can, and for how much less.

What the numbers say

Scored through one shared spec (77f2a821072b1862) and one shared threshold policy, on items drawn from four public datasets:

backendmodelnstrict accuracyECEp99 latency$/1000 screens
jevjev-1.13.0240x377.9%0.053679 ms$0.0444
openaigpt-5.1240x368.8%0.2292824 ms$1.2636
openai-minigpt-5-mini240x369.3%0.2803912 ms$0.2994
anthropic-opusclaude-opus-5240x183.8%0.0515731 ms$5.2453
openai-astragpt-6-astra120x185.8%0.1077703 ms$8.7300

Cost is the warm-cache figure, the best case for the LLM. Accuracy is strict: an item is an error if the action is wrong. Full table, per-class breakdown, gate sweep, reliability diagram and every single disagreement are in RESULTS.md.

Nothing wins outright. On the three axes that decide a guardrail — accuracy, cost per 1000 screens and p99 latency — jev, anthropic-opus, openai-astra are not beaten on all three by anything else here. Every other backend is strictly dominated.

Jev is the cheap end of the frontier. It is beaten on accuracy by anthropic-opus, openai-astra and beats openai, openai-mini, while costing up to 196x less per 1000 screens and running up to 11x faster at p99 than the models above it. On the 120 items every backend saw, Jev is 81.1% against 83.3% for anthropic-opus, 85.8% for openai-astra.

Its calibration is the quieter result: ECE 0.053 against 0.229 for openai, 0.280 for openai-mini, 0.051 for anthropic-opus, 0.107 for openai-astra. It matches a frontier model's calibration at a fraction of the price, which is what RLCD training is supposed to buy.

And most of them can be argued out of guarding. Appending one sentence that asserts the classification it wants moved the final action on anthropic-opus 14.3%, jev 10.7%, openai-mini 7.1%, openai 0.0%. anthropic-opus is the most steerable at 14.3%; openai held against all four suffixes. That is the finding to act on before any of the rest matters; see RESULTS.md.

TypeSafe's own claim is similar intelligence on System One tasks with large cost and latency gains. These numbers do not contradict that, and this repo does not make a stronger claim on their behalf.

Reproducing

uv sync
cp .env.example .env   # TYPESAFE_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY
uv run data/build_corpus.py --per-class 200
uv run eval/harness.py --seeds 3 --items 240 --backends jev,openai,openai-mini
uv run eval/harness.py --seeds 1 --items 240 --backends anthropic-opus
uv run eval/harness.py --seeds 1 --items 120 --backends openai-astra
uv run eval/adversarial.py --backends jev,openai,openai-mini,anthropic-opus
# not probed: openai-astra - see Deviations
uv run eval/cost_curve.py --items 20
uv run eval/metrics.py && uv run eval/plots.py && uv run eval/report.py

tests/test_spec_parity.py asserts every backend imported the same spec object and that no backend file defines its own question text or thresholds. The harness aborts on a spec-hash mismatch.

How it is built

filewhat it owns
src/spec.pythe decision spec: one Choice, one Score, three Nouls. Frozen, hashed.
src/policy.pyprobabilities to PASS / REVIEW / BLOCK. Identical thresholds for everyone.
src/backends/perception only. No question text, no thresholds; the parity test enforces it.
eval/harness.pyinterleaved multi-seed runner, one worker thread per backend.
eval/metrics.pystrict accuracy, ECE, latency percentiles, cost, escalation.
eval/adversarial.pycan the message argue its way past the guardrail?

The LLM backends go through TypeSafe's own system-one-adapter, which renders the same spec object into a prompt and enforces the answer with native structured outputs. Using the vendor's recommended adapter is deliberate: it removes the argument that the LLM was handicapped.