Skip to main content
← Guides

How to wire evaluations into release

Evaluation

A passing pipeline does not by itself stop a bad release. This guide covers where to gate, how to fail, which exceptions get signed off, and how to roll back.

What this guide covers

Wiring evaluation into release means giving the score the power to stop a deployment. A pipeline on its own carries no authority; the gate, the failure rule and the sign-off do. This guide covers three things: which step blocks, what counts as failure, and who may grant an exception. An evaluation that never reaches the decision is dashboard decoration.

Who this is for

  • An evaluation pipeline already runs repeatably, while releases still depend on human review.
  • You ship weekly or faster, and a rollback costs more than you are willing to absorb.
  • The team disagrees about "can we ship" and needs one shared criterion.
  • You must keep evidence of what was tested before a given version went out.

Not a fit: there is no repeatable evaluation yet. Build the pipeline first, then wire the gate.

Prerequisites

  1. A stable evaluation set with its own version number and grader version.
  2. A defined critical subset: the cases that must not regress, for example permissions, compensation, privacy.
  3. A step you can insert in the release pipeline, where a failure actually stops it.
  4. Known runtime and budget for one evaluation run, or the gate gets overruled for being slow.
  5. The exception approver written into the process document, not agreed verbally.

Three gates

GatePurposeDecision formOn failure
Pre-mergeStop obvious regressionsCritical subset all pass, and total not below baselineBlock the merge with failing samples attached
Pre-productionRerun under near-live configurationFull set plus environment-consistency checkBlock the release, return to the change
Post-releaseKeep scoring real interactionsSampled online graders plus alert thresholdTrigger rollback or a downgrade review

The promptfoo CI/CD documentation frames this as two effects: finding regressions before changes reach production, and failing the build when thresholds are missed. Official text: "Fail the build when quality thresholds aren't met."

The LangSmith documentation splits evaluation by when it runs: curated datasets during development, live scoring of real production interactions. Official text: "Run evaluations on curated datasets during development." Use the same graders at both gates, otherwise the delta is attributable to the environment instead of the grader.

Six steps

  1. Pick one gate: add the pre-merge gate first, do not change three at once.
  2. Write the failure rule as an executable condition, including the critical subset and the total threshold — the numbers follow your risk appetite, and this guide does not preset them.
  3. Control runtime: set a timeout and a concurrency cap, and decide in advance whether a timeout releases with a note or blocks.
  4. Store artefacts: keep per-sample results for every run, not just a percentage.
  5. Define exceptions: who may release a block, what justification is attached, how long it stays valid.
  6. Connect rollback: the post-release alert must reach a rollback action or a downgrade switch.

The failure rule has to separate "did not pass" from "did not run". A grader service returning 401 / 403 or 429 is the second case: treat it as infrastructure, never as a quality conclusion.

Worked example: a blocked merge

The scenario and the numbers are illustrative — invented assumptions, not measured thresholds or results for any product.

  • Input: one change raises retrieved passages from 4 to 8 and edits two prompts at the same time.
  • Processing: the pre-merge gate runs 60 samples (example size) with two conditions — the 12-case critical subset must all pass, and the total pass rate must not fall more than 2 points below baseline (example threshold).
  • Judging the result (example): 1 of the 12 critical cases fails; it belongs to "must not promise compensation". The total rate is above baseline. The verdict is a block, because the critical subset has no exemption. The failing sample retrieved a clause from another region, pointing at retrieval rather than the prompt edit.
  • What to do after a failure: Split the change into two commits — rerun with only the retrieval count changed and see whether the failure disappears; if it does, the extra passages introduced conflicting evidence, so revert the count and filter the retrieval layer; if it persists, hand that sample plus the previous version's result to a grader review, checking the grader itself.

A good gate yields two things: the reason for the block and a reproducible sample. With only the reason, an exception cannot be assessed.

Acceptance

  • [ ] A deliberately broken change gets blocked by the pre-merge gate, with a clickable failure record
  • [ ] The critical subset maps to your risk list, with the reason for each case written down
  • [ ] Infrastructure failures and quality failures use different record fields, so reports do not mix them
  • [ ] Exceptions leave a trace: who, which run, why, valid until when
  • [ ] The post-release alert reaches rollback or downgrade, and this has been drilled once
  • [ ] Evaluation artefacts include per-sample results, not only summary numbers

Troubleshooting branches

  • The gate never blocks: check whether anyone can skip it in one click without a record.
  • It blocks every time: look for grader drift first, then for a baseline that was never refreshed.
  • The gate gets disabled for being slow: make the critical subset the fast gate and move the full set to pre-production.
  • Scores contradict production behaviour: check whether samples describe an old scenario, and backfill production failures into the set.
  • Graders disagree with each other: when two graders give opposite verdicts on the same output, review by hand and write the conclusion back into the grader notes.
  • Tempted to add more gates: the Anthropic engineering blog recommends starting simple and optimising with evaluation, Official text: "Start with simple prompts, optimize them with comprehensive evaluation" Confirm existing gates are not bypassed before adding another.

Next steps

  1. Backfill post-release failures into the regression set.
  2. When a new blocking point is needed, return to guardrail placement to choose the layer.
  3. Keep a pre-release evaluation record for reviewers, with versions, graders and uncovered items.
  4. Recheck the critical subset quarterly: does it still describe the things you worry about.

What was verified and what is not

On 2026-11-06 five official sources were fetched directly: the promptfoo CI/CD integration page and its intro material, the LangSmith evaluation page, the MLflow evaluation page, the Microsoft Learn red-teaming planning page and the Anthropic engineering blog. This guide reports only the purposes and conventions those pages state; no pipeline was configured or executed in any product.

Unknowns:

  • How deeply each tool integrates with your code platform and what permissions that needs — it must be tested in your CI environment.
  • Whether vendor example thresholds can serve as your release standard — this guide presets no numbers; you and your reviewers decide the risk appetite.
  • The runtime distribution of an evaluation run under real concurrency — the official pages give no comparable basis.

Sources

SourceURL
promptfoo official documentation · CI/CD integration (direct fetch 200 on 2026-11-06)https://www.promptfoo.dev/docs/integrations/ci-cd/
LangSmith official documentation · Evaluation (direct fetch 200 on 2026-11-06)https://docs.langchain.com/langsmith/evaluation
MLflow official documentation · evaluation (direct fetch 200 on 2026-11-06)https://mlflow.org/docs/latest/ml/evaluation/
Microsoft Learn · Planning red teaming for LLMs (direct fetch 200 on 2026-11-06)https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/red-teaming
Anthropic engineering blog · Building effective agents (direct fetch 200 on 2026-11-06)https://www.anthropic.com/engineering/building-effective-agents

Source snapshot: 2026-11-06; item-specific rechecks and their scope are recorded in the text or source notes. Features and terms may change; check the original sources before use.