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

# Metrics

> Define custom LLM-judged metrics as config

A [custom metric](/documentation/metrics/custom-metrics) you author, graded by an LLM against a prompt. Reference it from a collector by its `name`.

```yaml theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
# yaml-language-server: $schema=https://schema.roark.ai/roark-config.schema.json
kind: metric
name: refund_policy_accuracy       # the slug a collector references
displayName: Refund Policy Accuracy
type: BOOLEAN                       # BOOLEAN | SCALE | NUMERIC | TEXT | CLASSIFICATION
prompt: |
  Using {{transcript}} and {{world_context}}, did the agent state the refund policy correctly?
trueLabel: Accurate
falseLabel: Inaccurate
```

* `name` is the metric's stable slug (its `metricId`), exactly what a collector references. `displayName` is the human name shown in the UI.
* The **prompt** is the grading criteria and must reference a transcript source (e.g. `{{transcript}}`) and `{{world_context}}`. Inline or `file://`.
* `name`, `type`, and `scope` are immutable once created (a change is create-new). Editing the prompt, labels, bounds, or options creates a new version.
* SCALE metrics add `scaleMin` / `scaleMax` (+ optional `scaleLabels`); CLASSIFICATION metrics add `options` (+ optional `maxSelections`); `scope: PER_PARTICIPANT` requires a `participantRole`.

<Note>
  **System metrics** (Roark's built-in metrics) are managed by Roark, not by you: you never define
  them in config. To collect one, just reference its slug in a collector's `metrics:` list, exactly
  like a custom metric. The same is true for derived metrics (thresholds, formulas, patterns), which
  are not yet definable in config.
</Note>

<Note>
  For the full field reference of every kind, see the [Config DSL reference](https://schema.roark.ai/roark-config.schema.json) schema.
</Note>
