> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oumi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# DIAGNOSING FAILURE MODES

> Group an evaluation's failed rows by cause, review them, and act on what you find

A score tells you how often a model fails, but not why. A failure mode is a group of failed rows that share a cause, such as two intents the model keeps confusing, a format it keeps breaking, or a tool it calls with the wrong arguments. Oumi reads every failed row of an evaluation, groups the rows by cause, and gives each group a name, a description, and a row count.

## WHY USE FAILURE MODES

An evaluation of a few thousand rows can fail hundreds of them. Reading them one at a time is slow, and it is easy to miss a pattern or to overreact to a single striking example. Failure modes turn those rows into a short list of causes, ranked by how many rows each one affects. That ranking tells you:

* **What to fix first:** The largest failure modes move the score the most.
* **What kind of fix it needs:** Some causes call for more training data, some for a clearer prompt, and some show that the evaluator itself is wrong.
* **Whether a fix worked:** After you retrain, evaluate again and check whether the failure mode shrank.

Failure modes also feed [synthesis](https://docs.oumi.ai/guides/synthesis/how-it-works.md#generate-from-failure-modes). Oumi can generate training data aimed at the exact rows a failure mode covers.

## GENERATE FAILURE MODES

Failure mode analysis runs after an evaluation, as a separate billed job. Start it in one of two ways:

* **When you run the evaluation:** In the **Failure Mode Analysis** section, check `Generate failure modes after evaluation`.
* **On a finished evaluation:** Click `Generate Failure Modes`. The job starts right away, without a confirmation.

The analysis runs in the background, and you can leave the page. When it finishes, the button changes to `Review Failure Modes`, with the number of failure modes found. If the analysis finds none, the evaluation shows **All clear** instead.

## REVIEW FAILURE MODES

Click `Review Failure Modes` to open the **Failure Modes** page.

![Failure Modes page with two failure modes of the banking77-accuracy evaluator selected, 220 failures in total](https://mintcdn.com/oumi/LXYdbfPPBaMyLoza/images/synthesis-failure-modes-page.jpg?fit=max\&auto=format\&n=LXYdbfPPBaMyLoza\&q=85\&s=05012063a06031966fa5ba89b5951987)

The page has three parts:

* **Heatmap:** Shows how the responses scored across the dataset. Each block covers a group of responses, and its color shows their average: green for mostly passing, yellow for mixed, and red for mostly failing. Use it to spot whether failures cluster in one part of the dataset.
* **Evaluators:** Lists each evaluator with the number of rows it failed. Select an evaluator to see its failure modes.
* **Failure modes:** Lists the selected evaluator's failure modes, with a name, a description, and the number of rows each one covers.

### READ THE ROWS IN A FAILURE MODE

The name and description of a failure mode are a summary written by a model. Read some of its rows before you act on it, to confirm what actually went wrong.

Click a failure mode to expand it. Each row shows the conversation in **Content** and the evaluator's reasoning in **Evaluation**.

![An expanded failure mode listing its rows, each with the conversation and the evaluator's reasoning](https://mintcdn.com/oumi/5eBJSZOshiPI5WMs/images/evaluations-failure-mode-rows.jpg?fit=max\&auto=format\&n=5eBJSZOshiPI5WMs\&q=85\&s=383d282d680199d05aac0ee5b9dd312b)

In this example, the failure mode describes an off-by-one indexing error. The rows show something more specific: the model answers `12`, `card_delivery_estimate`, when the correct label is `11`, `card_arrival`. These are two intents that customers phrase almost the same way. The fix is training data that separates them, not a change to how labels are numbered.

Click a row to open it in **Review Line**. The panel shows every message of the conversation and the feedback from each evaluator, so you can check whether the model or the judge got it wrong.

![Review Line panel with the conversation and the feedback from both evaluators](https://mintcdn.com/oumi/5eBJSZOshiPI5WMs/images/evaluations-failure-mode-row-detail.jpg?fit=max\&auto=format\&n=5eBJSZOshiPI5WMs\&q=85\&s=18712e8d999c320d74413c9a88531eae)

To check what the judge was asked to do, click `View evaluator prompt` above the failure modes.

## ACT ON FAILURE MODES

What you do depends on what the rows show:

* **The model gets the task wrong:** Generate training data that targets the failure. Select the failure modes, or individual rows inside them, then click `Generate Dataset...`. You can also click `Select All`. Oumi writes new conversations that avoid each failure. See [Generate from failure modes](https://docs.oumi.ai/guides/synthesis/how-it-works.md#generate-from-failure-modes).
* **The judge gets it wrong:** If the rows show correct answers marked as failures, [refine the evaluator](https://docs.oumi.ai/guides/evaluators/judge.md), then run the evaluation again. Fix the evaluator before you train on its judgments.
* **The instructions are unclear:** If the model fails because the system prompt is ambiguous, such as a label list with overlapping meanings, improve the prompt in your dataset and evaluate again.

After you act, run the same evaluation on the new model or prompt, and [compare](https://docs.oumi.ai/guides/evaluations/results.md#compare-evaluations) it with the previous run. Generate failure modes again to check whether the failure mode shrank.

Failure modes also appear on a deployment's **Failure Modes** tab, built from [monitored](https://docs.oumi.ai/guides/deployment/monitoring.md) production traffic.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.