Topic 1 of 5 · 4 min read
Building a metric tree for an AI feature
Goal: Build a metric tree for an AI feature with one goal metric, its input metrics and at least two guardrails.
A metric tree puts one goal metric at the top, the input metrics your team can move beneath it, and guardrail metrics beside it that stop you winning in a way that hurts users or the business. Without a tree, a team ends up watching twenty dashboard numbers and cannot say which one matters.
Check yourself · 1 of 3
Which of these is a guardrail metric for an AI writing assistant whose goal is faster report drafting?
Why it matters
AI features are easy to count and hard to judge. Every chat tool can report messages sent, tokens used and daily users. None of those says whether the feature did its job. A tree forces you to start from the user's job and work down to things you can change in a sprint.
How to build one
- Write the user's job in one sentence. "A support agent closes a ticket without leaving the helpdesk to look up the policy." Not "use our AI assistant".
- Pick one goal metric that shows the job getting done. For the example above: share of tickets closed with a correct policy answer in the first reply.
- Break the goal into inputs. Ask what must be true for the goal to rise. Here: how often the assistant is opened on a ticket, how often its answer is used, and how often the used answer is correct.
- Add guardrails. These are numbers that must not get worse while you chase the goal. For an AI feature the usual four are cost per task, response time, user complaints or reports, and a safety or error rate such as wrong answers or policy violations.
- Set a threshold for each guardrail before launch, for example "median response under 4 seconds" and "cost under 3 cents per ticket". A guardrail with no limit is only another chart.
Before and after
Before: "Our goal is AI adoption. We track weekly active users, messages per user and thumbs-up rate."
Nothing here says the agents closed more tickets, and nothing stops the team from raising messages by making the assistant slower to answer.
After: Goal: tickets closed with a correct policy answer in the first reply. Inputs: assistant opened on at least 60% of tickets, drafted answer sent with light edits, correct-answer rate from a weekly sample of 50 tickets. Guardrails: median response time under 4 seconds, cost under 3 cents per ticket, fewer than 2 escalated complaints per week.
What goes wrong
- Several goal metrics. If three numbers all count as the goal, the team picks whichever went up this week.
- Input metrics nobody can move. "User happiness" is not an input. "Share of answers that cite a policy page" is.
- Guardrails added after the launch. By then a cost spike or an accuracy drop is already in the baseline, and nobody can tell what changed.
- Averages only. A median response time of 2 seconds can hide a tail where one request in twenty takes a minute. Track a high percentile as well.
Examples
Tree for an AI meeting-notes feature
| Level | Metric | Example target |
|---|---|---|
| Goal | Meetings where the notes are shared within 1 day | 40% of meetings |
| Input | Share of meetings where notes are generated | 70% |
| Input | Share of generated notes shared with at most 3 edits | 55% |
| Guardrail | Notes with a wrong owner or deadline, from a weekly sample | under 5% |
| Guardrail | Cost per meeting | under 12 cents |
| Guardrail | Time from meeting end to notes | under 2 minutes |
If the goal stays flat while generation is at 70%, the problem sits in the second input: people generate notes and then do not trust them enough to share.
Optional: a guardrail check in code
For engineers, a guardrail is a rule a release script can enforce.
GUARDRAILS = {"p95_latency_s": 6.0, "cost_per_task_usd": 0.03, "wrong_answer_rate": 0.05}
def breaches(metrics: dict) -> list[str]:
return [k for k, limit in GUARDRAILS.items() if metrics[k] > limit]
A rollout pauses when breaches returns anything, whatever the goal metric says.
Key points
- A metric tree has one goal metric, input metrics that explain it, and guardrails that must not get worse.
- Start from the user's job in one sentence, not from the data the product happens to log.
- An input metric is something the team can change in a sprint; an outcome like happiness is not.
- Set each guardrail's limit before launch so a breach is a decision, not a debate.
- The usual AI guardrails are cost per task, latency, complaints and an error or safety rate.
Common mistakes
- Naming adoption or usage as the goal metric, so the team celebrates a feature people open but do not rely on.
- Listing guardrails without limits, so a breach never triggers a decision.
- Watching only averages for latency and cost, which hides the slow, expensive tail.
- Choosing input metrics the team cannot influence, such as overall user satisfaction.
Check yourself · 2 of 3
A team lists six metrics and calls them all 'our goals'. What is the best fix?
Check yourself · 3 of 3
Which sentence is the best user job to start a metric tree for an AI email-reply feature?
Practice items, not counted towards your mastery.
Start here
- Measuring the user experience on a large scale: the HEART framework (Google) (opens in a new tab)PaperFree
Google's Happiness, Engagement, Adoption, Retention, Task success framework: a way to pick goal metrics.
- Trustworthy Online Controlled Experiments (Kohavi, Tang, Xu) (opens in a new tab)BookPaid
The standard book on running A/B tests that hold up: sample size, guardrails, novelty effects.
- Early-2025 AI and experienced developer productivity (METR) (opens in a new tab)PaperFree
A randomised trial where developers felt faster with AI while the clock said slower.