---
title: "How to Fix Flaky and Nondeterministic AI Evaluations"
description: "Separate application variance, grader variance, infrastructure failure, and threshold sensitivity before adding retries."
canonical: "https://www.evalgate.com/guides/fix-flaky-ai-evals"
date-published: "2026-09-02"
last-updated: "2026-09-02"
category: "Production quality"
keywords: "flaky AI evals, nondeterministic LLM tests, stabilize LLM evaluation"
---

# How to Fix Flaky and Nondeterministic AI Evaluations

Separate application variance, grader variance, infrastructure failure, and threshold sensitivity before adding retries.

**Question:** Why do my AI evaluations pass and fail on different runs?

## Short answer

Replay identical evidence and vary one component at a time to locate the variance: application output, model judge, external dependency, parser, or threshold. Use repeated samples and uncertainty-aware decisions; retries should expose instability, not convert failures into passes.

## Key takeaways

- Measure variance before choosing a retry count.
- Pin every input and version that can affect the result.
- Use review bands when uncertainty overlaps the threshold.

## Signs this is the problem

- The same stored output receives different judge labels.
- Rerunning until green is accepted release practice.
- Infrastructure errors are mixed with quality failures.

## Step-by-step approach

### 1. Freeze the evidence

Pin cases, outputs, prompts, models, parameters, tools, source data, graders, mappings, and thresholds.

### 2. Isolate each layer

Replay stored outputs through graders, then repeat application generation separately to locate variance.

### 3. Quantify uncertainty

Measure disagreement, score spread, parse failures, and decision flips near the boundary.

### 4. Redesign the decision

Prefer deterministic checks, clearer rubrics, repeated estimates, review bands, or quarantined unstable cases.

## What to measure

| Metric | What it measures | How to use it |
| --- | --- | --- |
| Decision flip rate | Identical conditions producing different pass, warn, or fail decisions. | Make blocking gates stable enough for their risk. |
| Layer-specific variance | Output and score variation attributed to each component. | Fix the dominant layer rather than increasing all retries. |
| Invalid-run rate | Infrastructure, parsing, or missing-evidence runs that cannot support a quality decision. | Report these as invalid, never as passes. |

## Common mistakes

- Rerunning only failed candidates until they pass.
- Averaging invalid and valid results together.
- Widening thresholds without revisiting the product risk.

## Practical checklist

- [ ] Freeze the evidence: Pin cases, outputs, prompts, models, parameters, tools, source data, graders, mappings, and thresholds.
- [ ] Isolate each layer: Replay stored outputs through graders, then repeat application generation separately to locate variance.
- [ ] Quantify uncertainty: Measure disagreement, score spread, parse failures, and decision flips near the boundary.
- [ ] Redesign the decision: Prefer deterministic checks, clearer rubrics, repeated estimates, review bands, or quarantined unstable cases.

## Where EvalGate fits

EvalGate can preserve scorer versions, repeated results, calibration evidence, and explicit invalid or uncertain states for release review.

[Calibrate unstable judges](https://www.evalgate.com/docs/platform/calibration-control-plane) or [start with the EvalGate quickstart](https://www.evalgate.com/docs/quickstart).

## Related guides

- [https://www.evalgate.com/guides/calibrate-llm-judge](https://www.evalgate.com/guides/calibrate-llm-judge)
- [https://www.evalgate.com/guides/set-ai-eval-pass-fail-thresholds](https://www.evalgate.com/guides/set-ai-eval-pass-fail-thresholds)
- [https://www.evalgate.com/guides/catch-llm-regressions-in-ci](https://www.evalgate.com/guides/catch-llm-regressions-in-ci)
