Lab · AI evaluation · interactive
Break the assistant. Watch the gate say no.
A RAG support bot, 12 golden cases, 6 adversarial probes and a CI gate with a pass-rate floor. Degrade the bot, run the gate, and see why the floor only moves one way.
The rig
01 Degrade the assistant
02 Run, then ratchet
Ratchet unlocks only after a fresh run that passes the gate.
pass rate 95% Wilson interval floor (dashed)
03 Cases pass, fail, · not run
Select a case to see the scripted answer and which judges passed or failed.
What this is
The mechanism from my llm-eval-gate template, small enough to poke. A change to a prompt, a retriever or a model is a pull request. The gate replays fixed cases, scores them, compares the pass rate to a committed floor, and exits non-zero when quality drops. A ratchet script then raises the floor after a passing run, so an improvement becomes the new minimum.
Real vs simulated
Real
The 18 judges (string, regex and citation-grounding checks in
model.js, not an LLM), the pass-rate and floor comparison, the Wilson score interval, the exit code logic and the ratchet rule all run in this page.Simulated
The assistant. Every answer is a scripted line committed in
cases.jsonfor a fictional product, selected by which toggles you flip. No model is called. The terminal imitates a promptfoo run; nothing is executed.
Why a floor that only goes up beats a one-time score
A score measured once at launch is a photograph. Prompts drift, retrievers get re-indexed and models get swapped, and each change looks fine by eye. A floor in the repo turns the score into a contract: the build fails when a change lands below it. The ratchet then converts every improvement into the new minimum, so quality can rise but can never silently slip back.
Try it: ratchet from the baseline, then flip Swap model and run. At the starting floor (15 of 18) the swap passes with 16 of 18. After the ratchet to 18 of 18, the same change is blocked. Nothing about the change moved. The bar did.
Why 18 cases is small, and what the interval says
A pass rate from a small set is an estimate, not a fact. The band under the gauge is the 95% Wilson score interval for the true pass rate given what you observed. 18 cases is small. The table shows how wide the same observed rate stays at different suite sizes.
| Suite size N | 95% interval for the true rate | Width |
|---|---|---|
| Run the gate to fill this in. | ||
What this does not prove
Passing here proves only that these scripted answers satisfy these deterministic checks. It does not measure open-ended answer quality, real model behaviour, retrieval quality on real documents, or how a production assistant performs. The answers are fixed text, so the demo shows how the gate and ratchet behave, not how good any assistant is. For the real template, limits and receipts, read the case study and the eval gate guide.
Have a system that needs to work?
Tell me the problem. I will tell you honestly whether I am the right engineer for it.
Book a 15-minute call Run a free audit Not sure what you need? Answer 3 questions