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

# custom-metrics

Create, grade, and read the [Custom Metrics](/docs/optimization/performance/custom-metrics) of your AI Agent. A custom metric describes a pass and a fail in your own words, and a judge grades each conversation against them.

## Commands

### Write a metric

| Command                                 | What it does                                                                  |
| --------------------------------------- | ----------------------------------------------------------------------------- |
| `custom-metrics list`                   | Lists the custom metrics, with their direction, subject, and state.           |
| `custom-metrics get <id>`               | Shows a metric, its authoring review, any held edit, and its backfill status. |
| `custom-metrics draft <description...>` | Drafts metrics from a description in your own words. It saves nothing.        |
| `custom-metrics create`                 | Creates a metric. With `--draft`, saves it as a draft that does not grade.    |
| `custom-metrics update <id>`            | Changes the fields that you pass.                                             |
| `custom-metrics delete <id>`            | Deletes a metric.                                                             |

### Turn grading on or off

| Command                            | What it does                                                                |
| ---------------------------------- | --------------------------------------------------------------------------- |
| `custom-metrics activate <id>`     | Makes a metric grade. If the metric has a held edit, `activate` applies it. |
| `custom-metrics deactivate <id>`   | Stops a metric grading. The metric keeps its results and its held edit.     |
| `custom-metrics discard-edit <id>` | Deletes the held edit. The live version does not change.                    |
| `custom-metrics backfill <id>`     | Grades an active metric on past conversations, one time.                    |

### Test a metric

| Command                              | What it does                                                                                    |
| ------------------------------------ | ----------------------------------------------------------------------------------------------- |
| `custom-metrics evaluate <id>`       | Starts a job that grades up to 500 conversations. It does not change the results of the metric. |
| `custom-metrics evaluation <job_id>` | Shows the status, the counts, and a page of verdicts of an evaluation job.                      |

### Read the results

| Command                                     | What it does                                                                                            |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `custom-metrics pass-rate <id>`             | Shows the pass count, the fail count, and the pass rate for a date range, as the dashboard counts them. |
| `custom-metrics latest-verdicts <id>`       | Lists the conversations whose latest verdict is `pass` or `fail`, newest first.                         |
| `custom-metrics conversations <metric_id>`  | Lists conversations by result: `pass`, `fail`, `null`, `unjudged`, or `undecided`.                      |
| `custom-metrics verdicts <conversation_id>` | Shows the latest verdict of each metric on one conversation, with the reasoning and quote of the judge. |

## Examples

Draft a metric from a description:

```bash
adacli acme custom-metrics draft "Check that the AI Agent states the 30-day refund window"
```

Create a metric that measures the AI Agent:

```bash
adacli acme custom-metrics create --name "Refund window stated" --subject ai_agent \
  --pass-description "The AI Agent states the 30-day refund window" \
  --fail-description "The AI Agent answers a refund question without the refund window" \
  --scoring-guidance "Grade only conversations about refunds"
```

Test the metric on a sample of 100 conversations from two weeks, then read the failures:

```bash
adacli acme custom-metrics evaluate <metric-id> --start 2026-11-01 --end 2026-11-14 --size 100
adacli acme custom-metrics evaluation <job-id> --verdict fail
```

Show the pass rate of one week for conversations in English:

```bash
adacli acme custom-metrics pass-rate <metric-id> --start 2026-11-03 --end 2026-11-09 --filter LANGUAGE:IS:en
```

List the IDs of the conversations that failed the metric in the last 30 days:

```bash
adacli acme custom-metrics conversations <metric-id> --result fail --ids-only
```

## Details

* `create` requires `--subject`: `ai_agent`, `human_agent`, or `customer`. It also needs the pass description, the fail description, and the scoring guidance.
* An authoring review checks a metric before it grades. A new metric that fails the review saves as a draft. If an edit to an active metric fails the review, the edit is held, and the live version keeps grading. `get` shows each blocking issue.
* `pass` and `fail` name the raw score. On a `higher_is_worse` metric, a `pass` is a conversation where the unwanted behavior happened.
* A change to `--direction` changes the meaning of every existing chart for the metric.
* `pass-rate`, `latest-verdicts`, and `conversations` count test conversations. `pass-rate` counts a conversation on each day that it has activity.
* An account can start 10 backfills in a calendar month. A metric can have one backfill. `backfill` asks before it starts. Use `--dry-run` to check first.
* An AI Agent can evaluate 2,000 conversations in 24 hours, across its metrics. An evaluation job expires 7 days after it starts.
* `delete` does not ask for confirmation.

For every option of a command, run it with `--help`, for example `adacli acme custom-metrics create --help`.

## Related commands

* [`conversations`](/adacli/commands/conversations): read the conversations that a metric grades.
* [`topics`](/adacli/commands/topics): get the intent IDs for `--intent-ids`.
* [`changesets`](/adacli/commands/changesets): manage the testing change set that `create --changeset` pins a metric to.

---

Have any questions? Contact your Ada team, or email us at [](mailto:help@ada.cx?subject=Help%20Docs%20inquiry).