> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ada.cx/llms.txt.

# Metrics-driven improvement loop

Custom Metrics and the improvement loop are available on every account. Write a standard for your AI Agent in plain language, and Ada scores every conversation against it. Then one prompt starts a loop that finds why conversations fail, stages a fix, tests it, and rolls it out. The loop stops only to ask for your approval.

```mermaid
flowchart LR
    W[1. Write a metric] --> M[2. Measure]
    M --> F[3. Find why]
    F --> X[4. Find the fix]
    X --> T[5. Test it]
    T -->|Repeat until<br />every test passes| X
    %% Fern needs this second link to keep the steps in order.
    X --> T
    T -->|You approve| R[6. Roll out and track]
    R -->|The metric shows<br />if the fix worked| M
```

## Write your own metrics

A custom metric scores each conversation against a standard that you write.

* **Write a metric from a sentence**: Describe the behavior in **Generate from description**, and the dashboard drafts the metric. A quality check finds wording that the judge can't apply the same way on every conversation.
* **Read the results**: Each conversation gets a verdict, with the judge's reason and a quote. Each metric shows its pass rate over time, by channel, and by Intent.
* **Start with history**: When you activate a metric, score up to 10,000 past conversations.
* **Ada standard metrics**: **Asks once** and **Acknowledges upset first** score every AI Agent with no setup.

## Improve with one prompt

The improvement loop turns a failing metric into a tested fix. The loop needs no setup of its own. An AI assistant gets the steps from the Ada MCP server, or from the `ada-optimize` skill with the Ada CLI.

To start the loop, give your AI assistant one prompt:

`Improve the "<metric name>" metric. Use the Ada MCP tools.`

To carry your date range and filters, copy the prompt from the metric on the **Metrics** page instead. The assistant then does these steps:

1. **Finds why**: It reads the failing conversations and groups them by cause. First, it checks whether the metric or the judge changed on the day the pass rate moved.
2. **Finds the fix**: It stages the smallest set of edits on a change set. Nothing changes on your live AI Agent.
3. **Tests it**: It runs test cases in Simulations. If a test fails, it revises the fix and tests again, for up to 3 rounds.
4. **Rolls it out**: It shows you simulated conversations, then recommends a live test or a promotion.

The assistant asks for your approval before it creates a test, before each test run, and before any rollout or promotion. After the rollout, the metric's pass rate shows whether the fix worked.

Learn more about [Custom Metrics](/docs/optimization/performance/custom-metrics) and the [improvement loop steps](/docs/optimization/performance/custom-metrics#improvement-loop-steps).