A useful LLM quality gate is a versioned decision contract: run deterministic checks first, evaluate open-ended behavior with judges validated against labeled cases, preserve the evidence, and map the result to PROMOTE, HOLD, or ROLLBACK. The score is an input. The decision—and its owner—is the gate.
Whether evidence is strong enough to change release state
A versioned gate policy and auditable HOLD record
A labeled evaluation slice and named release owner
- 01InvariantsSchema · auth · tools
- 02BehaviorRubric · slices · abstention
- 03EvidenceVersions · traces · owner
- 04DecisionPROMOTE · HOLD · ROLLBACK
The operating model
Four layers, one release decision#
- 01
Tests
Schemas, policy rules, fixtures, and invariants catch failures that do not require interpretation.
- 02
Judge
A rubric evaluates qualities such as groundedness or task completion and returns a verdict, evidence, and an explicit uncertainty state.
- 03
Gate
A policy combines signals, handles uncertainty, and produces PROMOTE, HOLD, or ROLLBACK.
- 04
Release
A named owner accepts the evidence, records the decision, and monitors the real outcome.
Judge contract
Ask for a verdict you can audit#
A judge prompt is not a quality system. Treat the judge as a versioned component with a narrow criterion, anchored examples, a structured output, and an abstain path. Store the rubric version beside each result.
The minimum useful result is not a bare number. Keep the verdict, the supporting evidence, an uncertainty state whose meaning is defined by the rubric, and enough execution context to reproduce the case. G-Eval is an early public example of using explicit evaluation steps and a form-filling structure instead of an unstructured opinion.
A policy the pipeline can enforce
This illustrative contract keeps hard blockers separate from aggregate signals. Replace criteria with product-specific, calibrated ones.
{
"policy_version": "release-policy@1",
"required": ["schema", "critical_safety", "task_completion"],
"hard_blockers": ["schema", "critical_safety"],
"on_missing_evidence": "HOLD",
"allowed_verdicts": ["PROMOTE", "HOLD", "ROLLBACK"]
}node -e "JSON.parse(require('fs').readFileSync('release-policy.json'))"Expected output
{
"verdict": "HOLD",
"failed": ["critical_safety"],
"missing": [],
"policy_version": "release-policy@1"
}Failure exercised. Missing or failed critical evidence resolves to HOLD; an average never overrides the blocker.
Production boundary. The values are illustrative. The useful pattern is the explicit policy and replayable evidence, not a universal threshold.
Gate policy
Thresholds are policy, not truth#
Do not hide several risks inside one average. A release can have a healthy aggregate score and still fail a critical security or factuality invariant. Define hard blockers separately from soft signals, and document what happens near a threshold.
Use PROMOTE when required invariants pass and the evidence is within the validated operating range. Use HOLD when evidence is missing, conflicting, or uncertain. Use ROLLBACK when production evidence crosses a predefined safety or reliability boundary. No universal cutoff works for every product; calibrate against labeled cases and the cost of each error.
Judge the judge
LLM judges need their own tests#
MT-Bench documents position, verbosity, and self-enhancement biases in LLM-based judging. Counter them with position swaps, length-controlled cases, blinded model identity, adversarial examples, and periodic comparison with human labels.
Track disagreement and abstention, not only pass rate. A judge that always sounds certain can be more dangerous than one that exposes its uncertainty. When the rubric, judge model, or prompt changes, replay a stable calibration set before promotion.
Evidence trail
Make failures replayable without collecting everything#
Connect evaluation records to the run, model and prompt versions, tool outcomes, latency, cost, and relevant retrieval context. Common semantic conventions help teams correlate evidence across services, but conventions evolve—pin the version you implement.
Do not record prompts and responses by default. OpenTelemetry explicitly warns that GenAI message attributes can contain sensitive information. Apply redaction, access controls, retention limits, and opt-in content capture before storing payloads.
Dogfooding loop
Turn real friction into the next regression case#
Before users find the failure, run the product through its own critical journeys: the awkward prompt, the failed tool call, the partial answer, the language switch, the recovery path. Convert every confirmed failure into a minimal replayable case.
This closes the loop: production and dogfooding produce evidence; triage produces labels; labels extend the evaluation set; the set protects the next release. A gate is useful when it learns from failure without quietly changing the meaning of success.
What this can—and cannot—prove
A passing gate is evidence, not a guarantee#
CAN
- Catch known regressions before release
- Make release reasoning reviewable
- Expose judge disagreement and missing evidence
- Create a repeatable rollback trigger
CANNOT
- Prove behavior outside the evaluated distribution
- Replace user research or domain experts
- Eliminate model and judge bias
- Guarantee production outcomes from offline scores
Release checklist
A small gate worth operating#
- Version the dataset, rubric, judge, prompt, and policy.
- Run deterministic invariants before probabilistic evaluation.
- Return verdict, evidence, a defined uncertainty state, and abstention.
- Validate with labeled cases and test known judge biases.
- Separate critical blockers from aggregate indicators.
- Redact sensitive trace content and set retention rules.
- Assign a release owner and record the decision.
- Replay production failures before the next promotion.
Primary sources
Primary sources
- G-Eval: NLG Evaluation using GPT-4 with Better Human Alignment
Structured criteria and form-filling for LLM-based evaluation.
- Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena
Capabilities and documented position, verbosity, and self-enhancement biases.
- NIST AI 600-1: Generative Artificial Intelligence Profile
Risk management actions for generative AI across the lifecycle.
- OpenTelemetry GenAI attributes
Message attributes, evaluation fields, and sensitive-content warnings.
From concept to an executable harness