A better reranker raised answer quality and lost $1,040 a month. Every metric sits on a ladder from a model score to revenue, and a release can break a rung you did not watch.
Drag the quality gain and the latency, then press Ship. Watch the gain climb the rungs and leak out at retention. Then we build each part: the ladder, the driver tree, the guardrails, the telemetry, the failure loop, the dashboard and the memo.
You need percentages and a little Python. We build the rest from zero. It helps to know Metric Design and Experiment Design.
An illustrative docs assistant: 50,000 weekly users, 30% retention, $8 a month per retained user. Each point of completion buys half a point of retention. Each half second of median latency above 1.5 s costs 0.8 points. Chapter 0 works the numbers.
Chapter 0
Follow one release from a better eval score to a loss, and find the rung that broke
A startup sells a docs assistant: a chat box next to an API's documentation. Fifty thousand engineers use it each week. The team ships a bigger reranker, the part that puts the most useful documentation chunks first. Offline, graders prefer the new answers 66% of the time, up from 62%.
Six weeks later, retention is down. The new reranker is slower. It raised the median response time from 1.2 s to 2.6 s. A developer in the middle of a task does not wait 2.6 s. They switch to a search engine.
The eval was right. It measured one thing: answer quality. Between "the answer got better" and "the company made money" sits a metrics ladder: a chain of outcomes, each one a cause of the next. Here the chain is answer quality, then task completion, then retention, then revenue. Each link is a guess about your product, not a law.
Name the parts first. The completion gain is the change in the share of sessions that finish their task, in percentage points: call it Δc. An elasticity is how much one rung moves when the rung below moves one point: call it e. Latency above a tolerance L0 costs retention: p points for each half second over. Call the median latency L.
Delta r equals e times delta c, minus p times the larger of zero and L minus L-nought, divided by one half.
Multiply the completion gain Δc by e to get the retention you earn. Count the half seconds L sits above L0 and multiply by p. Subtract the second number from the first.
With made-up numbers: Δc = 3, e = 0.5, so the gain is +1.5 points. L = 2.6 s is 1.1 s over, which is 2.2 half seconds, so the penalty is 2.2 × 0.8 = 1.76 points. Δr = 1.5 − 1.76 = −0.26 points.
Now turn retention into money. Revenue is users times retention times the ARPU, the average revenue per retained user.
The failure, in three parts. The symptom is an eval win followed by a business loss. The measurement is to write each rung's number before and after the release. The fix is to ship behind guardrails that watch the rungs the eval does not see. In the hero, the model breaks even at 2.44 s.
pythondef ladder_revenue(users, ret, arpu, dc, e, lat, tol, p): base = users * ret * arpu # $ per month dr = e * dc - p * max(0, lat - tol) / 0.5 # points of retention new = users * (ret + dr / 100) * arpu return round(dr, 2), round(new - base) print(ladder_revenue(50_000, 0.30, 8, 3, 0.5, 2.6, 1.5, 0.8)) # (-0.26, -1040)
Chapter 1
Place every metric on one of four rungs and watch a module gain lose most of its size before it reaches the business
Where does "recall@5" live, and how far is it from revenue? Metrics live at four altitudes.
| Altitude | What it scores | Docs assistant example | Readable after |
|---|---|---|---|
| Module | one part, alone | retrieval recall@5 | minutes |
| System | the whole pipeline, on an eval set | answer correctness | hours |
| Product | real users using it | task completion rate | a week |
| Business | the company | retention, revenue | four weeks or more |
Two things grow as you climb: the lag and the noise. Recall is fixed once the eval set is fixed. Revenue also moves with prices, seasons and competitors. A leading indicator moves early and predicts a later one, the lagging indicator you care about. The ladder is a chain of leading and lagging pairs.
Each higher rung has causes your change never touched. So each link keeps only part of the gain. Take the retrieval link. Call the recall r: the chance that the right chunk is in the top five. If the chunk is there, the answer is correct with chance a. If it is missing, the answer is correct with chance b.
q equals a times r, plus b times one minus r.
Split the questions into "chunk found" (share r) and "chunk missed" (share 1 − r). Weight each share by its chance of a correct answer, a or b. Add the two.
With made-up numbers: at r = 0.72, q = 0.85 × 0.72 + 0.20 × 0.28 = 0.668. At r = 0.80, q = 0.680 + 0.040 = 0.720. Recall rose 8 points; quality rose 5.2, because a gain in r is worth only a − b = 0.65 in q.
The next link is weaker. Say completion is 0.75 × q + 0.10: some users finish even after a wrong answer. Then completion goes from 0.601 to 0.640, a gain of 3.9 points. With the elasticity 0.5 from Chapter 0, retention gains 1.95 points. The module gain of 8 points arrives as less than 2.
Each bar is the same gain, one rung higher. Drag the new recall and read how much of it reaches retention.
Illustrative link strengths: a = 0.85, b = 0.20, completion = 0.75 × q + 0.10, retention elasticity 0.5. Measure your own; they drift as the product changes.
This is why a team that watches only module metrics overrates its impact. Debugging runs the other way: when retention falls, climb down. Did completion fall? Did quality? Or did something outside the ladder move, like a price change?
The failure: a link you never measured. The symptom is a module win with no product effect. The measurement is an A/B test of the middle link. The fix is to write the ladder before the code. Give each rung its metric, its lag and your best guess of the link strength. A blank link is the project's biggest risk.
Chapter 2
Pick the one product number that tracks value, then split it into parts that each team can own
The ladder says how a low win climbs. The reverse question: given the number the company cares about, what should each team push this quarter?
Start with a north star: the one product metric that rises only when users get more value. For the docs assistant it is weekly completed tasks. Revenue is too slow to steer by. Total queries is volume, and a worse model inflates it, because users retry. A good north star measures value to users, moves within a quarter, leads revenue, and is hard to inflate.
Now split it. A driver tree writes the north star as a product of inputs that teams own. Call weekly active users W, sessions per user S, tasks per session T and the completion rate C.
N equals W times S times T times C.
Multiply users W by their sessions S to get sessions. Multiply by T to get attempts. Multiply by C to keep only the attempts that finish. That count is N.
With made-up numbers: 40,000 × 3.2 = 128,000 sessions; × 1.5 = 192,000 attempts; × 0.6 = 115,200 completed tasks a week.
The tree is a product, so a 10% lift on any one leaf lifts N by 10%. Every leaf has the same pull on N. So fund the leaf that is cheapest to move. If ML can lift C by 5% this quarter and growth can lift W by 2%, fund ML.
Last quarter N grew 8.17%: W +1%, S +5%, T 0%, C +2%, and 1.01 × 1.05 × 1.02 = 1.0817. Which leaf drove it? Take the logarithm of each factor. Logs of a product add up, so each leaf's share is its log divided by the log of the total. S gave 62% of the growth, C 25%, W 13%.
Never report growth without this split.
The sliders start at last quarter's moves. Drag a leaf, or switch to the growth split. Push sessions past +10% and see what happens to completion.
Illustrative numbers. The sag above +10% sessions is a made-up cross-term. Each extra point of sessions costs half a point of completion, because spammy sessions finish less often.
The failure: leaves are not independent. The symptom is a leaf that rises while the north star stalls. The measurement is to watch the other leaves when a team pushes one. The fix is a guardrail on each neighbour, the subject of Chapter 3. This is Goodhart's law: a number that becomes a target stops measuring what it measured.
Chapter 3
Name the numbers you may not trade away, and turn reliability into a budget you can spend
Pay a team to raise completion and leave latency free. Latency will rise. A bigger model, more retrieval and longer reasoning all trade latency for quality. A guardrail is a metric you may not make worse, whatever the main metric does.
| Class | Guardrails for an AI product |
|---|---|
| Performance | P50 and P95 latency, availability |
| Economic | cost per query, gross margin |
| Trust | hallucinated citations, safety incidents, complaints |
A formal guardrail is an SLO (service level objective): "99.9% of requests succeed over a rolling 30 days." Its complement is the error budget: the 0.1% that may fail. Thirty days hold 43,200 minutes, so the budget is 43.2 minutes of full outage. A deploy that takes 20 minutes to roll back spends 46% of it.
How fast are you spending? Call the error rate you observe e. Call the target SLO s, so 1 − s is the error rate the budget allows.
b equals e divided by one minus s.
Divide the errors you see, e, by the errors the budget allows, 1 − s. At b = 1 the budget runs out exactly at the end of the 30 days. At b = 10 it runs out ten times sooner.
An incident at e = 1.44% errors, with s = 99.9%: b = 0.0144 / 0.001 = 14.4. A 30-day window has 720 hours, so the budget is gone in 720 / 14.4 = 50 hours. One hour at that burn spends 14.4 / 720 = 2% of the month's budget.
That last line is where 14.4 comes from. Google's SRE workbook pages an engineer when one hour burns 2% of the budget (b ≥ 14.4) and a 5-minute window confirms it. It also pages when six hours burn 5% (b ≥ 6). A plain "error rate > 1%" rule pages for a 30-second blip. Burn rate weighs size and duration against the promise.
The tank holds this month's budget. Inject an incident and see which alert lamp lights. Then tighten the SLO.
The alert rules (2% of the budget in 1 hour, 5% in 6 hours) follow Google's SRE workbook, chapter "Alerting on SLOs". The incidents are illustrative; "minutes" means full-outage minutes, so 1% errors for an hour counts as 0.6 minutes.
The failure: an SLO tighter than users can feel. At 99.99% the budget is 4.3 minutes, and a 30-second blip pages someone. Each extra nine cuts the budget tenfold and costs far more to engineer. Set the SLO where users notice, and no tighter.
The rule at review time: one primary metric, three to six guardrails, each with an SLO and an owner. A launch that wins the primary but breaks a guardrail is a no by default. The only override is a written escalation.
Chapter 4
Design the events that feed every rung, then read a funnel and a cohort
Every rung above "system" comes from telemetry: the events the product records. If the events are wrong, every number above them is wrong.
A starting set: session_started, query_submitted, answer_rendered (with latency, tokens and model version), citation_clicked, answer_copied, thumbs, regenerate_clicked, session_ended. Each carries a user id, a session id, a time and the app version. Three rules:
regenerate_clicked, not user_unhappy.Behaviour is the main quality signal. Thumbs are rare, and annoyed users click more. Regenerate, quick exit and copy cover every user. Any signal you train on can mislead: OpenAI's April 2025 GPT-4o update added a reward from thumbs up and down. OpenAI wrote that this likely made the model more sycophantic, and rolled it back on April 28.
A funnel is an ordered list of steps, each with a conversion rate. Call the number of sessions n and the step rates s1 to s4.
K equals n times s-one times s-two times s-three times s-four.
Start with n sessions. At each step keep only the share s that goes on. What is left after the fourth step is K. Raising one step from s to s + 0.1 multiplies K by (s + 0.1)/s, so the lowest rate gives the biggest lift.
10,000 × 0.72 = 7,200; × 0.85 = 6,120; × 0.40 = 2,448; × 0.80 = 1,958 completed. Raise the 40% step to 50%: K = 2,448, a lift of 0.5 / 0.4 = 1.25, or +25%.
The ringed step leaks the most. Pick a step to raise by ten points and compare the completed tasks.
Illustrative weekly funnel for the docs assistant.
A cohort is the users who signed up in the same week. Track the share of each cohort that comes back in week 1, 2, 3 and 4. A cohort that returns 45%, 34%, 30%, 28% is flattening: a habit has formed. Its week-4 to week-1 ratio is 28/45 = 62%. Compare that ratio across cohorts. It separates "the new users were worse" from "the product got stickier".
The failure: telemetry breaks without a sound. A release drops an event, and completion "falls". The measurement is to watch event volumes by type and app version. The fix is to alert on those volumes like any metric.
Chapter 5
Open up an average, sort the failures into buckets, and fix the bucket with the largest expected yield
The dashboard says completion is 64%. That number does not say what to build. It is a summary of thousands of sessions. To improve it, open the summary: pull the failures, read them, and let them name what is broken. This is error analysis.
Read before you name the buckets. If you name them first, you find only what you expected.
For each bucket, name three numbers. Its frequency f is its share of the failures. Its severity s is the harm of one failure, from 0 to 1. Its fixability x is the chance that one quarter of work fixes it, from 0 to 1.
y equals f times s times x.
Multiply how often the bucket happens, f, by how much it hurts, s, by how likely you are to fix it, x. Multiply, do not add: a frequent bucket you cannot fix yields little, and so does a fixable bucket that is rare.
With made-up numbers: retrieval misses have f = 0.38, s = 0.8, x = 0.7, so y = 0.213. Made-up citations have f = 0.12, s = 1.0, x = 0.5, so y = 0.060. Retrieval wins by 0.213 / 0.060 = 3.5 times.
| Bucket | f | s | x | y |
|---|---|---|---|---|
| Retrieval miss | 0.38 | 0.8 | 0.7 | 0.213 |
| Made-up citation | 0.12 | 1.0 | 0.5 | 0.060 |
| Over-refusal | 0.10 | 0.6 | 0.8 | 0.048 |
| Formatting | 0.25 | 0.2 | 0.9 | 0.045 |
| Timeout | 0.15 | 0.7 | 0.4 | 0.042 |
The score beats the pull of the scariest bucket. It does not capture strategic risk: one viral screenshot of a made-up citation can justify a different order. If you override the score, write the reason down.
Across is frequency, up is severity, size is fixability. Press Fix and watch the shares change and the ranking reshuffle.
Illustrative. A fix removes the share x of that bucket's failures; the fixed bucket's x then drops to 0.3, because the easy cases are gone.
Then close the loop: fix the top bucket, re-run the eval suite, sample failures again, and re-bucket. The buckets change every cycle. Run it weekly for a young product.
The failure: swapping models in place of reading failures. The symptom is a flat metric after three model upgrades. The measurement is the bucket table: if the top buckets are retrieval, UX or latency, a bigger model barely touches them. The fix is to fund the top bucket.
Chapter 6
Cut the dashboard to the numbers that drive decisions, and let a z-score separate a real move from noise
Everyone has seen the 40-tile dashboard. Every tile is green-ish, none has a target, and the number that mattered is on tab 3. Dashboards fail by addition.
An exec dashboard holds six numbers at most: the north star, two or three driver-tree leaves, and two or three guardrails. Each tile shows:
A tile with no target and no owner is decoration. A metric is vanity if no decision changes with its value. Cumulative sign-ups only go up, so they decide nothing. The test: "what would we do if this were 20% lower?" No answer, no tile.
Completion fell this week. Panic? Compare the new value with the recent past. Call this week's value x, the mean of the last seven weeks m, and their standard deviation (their typical spread) sd.
z equals x minus m, divided by s-d.
Subtract the normal level m from this week's x. Divide by the normal spread sd. If the size of z is above 2, investigate; above 3, page someone.
With made-up numbers: the last seven weeks read 60.2, 59.8, 60.5, 60.1, 59.9, 60.4, 60.0, so m = 60.13 and sd = 0.26. This week x = 57.9: z = (57.9 − 60.13) / 0.26 = −8.7, an incident. A reading of 59.9 gives z = −0.9: noise.
The same test cuts the other way. Last month the team cheered a +2.1% week. The weekly spread was 1.8%, so z = 1.2: a normal week.
A year of weeks: pure noise, plus one real drop of 2.2 points in week 44. Red dots are badges. Move the threshold until you catch the drop with few false alarms.
Illustrative series from a fixed random seed. The badge compares each week with the seven before it. With only seven past weeks, sd is itself noisy, so a few false badges remain even at 3.
The weekly business review is 30 to 45 minutes, the same six tiles in the same order. Each owner states the move and its one-line cause from the driver tree. An anomaly gets an owner and a deadline, not a debate. For an AI product, every model or prompt release gets a vertical line on every chart. The top failure bucket from Chapter 5 gets a standing slot.
The failure: a silent change to a metric's definition. The symptom is a step in a trend that no release explains. The measurement is the tile's version history. The fix is to treat tile changes like API changes: versioned, announced and re-baselined.
Chapter 7
Turn a model result into the decision units an executive uses, with its uncertainty and a plan
You have four minutes with a VP. "Accuracy 84.3 ± 0.8, up from 82.1" means a lot to an engineer and nothing to the VP. "2.2 points better" drops the meaning and the uncertainty. The skill is to change the units, not to remove content.
Take a document extraction service. Its accuracy is the share of documents it extracts with no error. The conversion runs metric, then errors, then events, then dollars:
That is 22 of 179 error tickets, about 12%.
Each model's accuracy has a 95% interval. Call its half-width for the old model wa and for the new model wb. What is the half-width of the difference?
w equals the square root of w-a squared plus w-b squared.
Square each half-width, add them, and take the square root. Independent errors partly cancel, so w is more than either wa or wb but less than their sum. This holds when the two models ran on separate eval sets.
With made-up numbers: w = √(0.64 + 0.64) = 1.13. The gain is 2.2 ± 1.13 points, so 11 to 33 fewer errors per 1,000, or $308 to $959 a month.
The same range, in three units. Widen the per-model interval and watch the executive verdict weaken.
Illustrative service: 1,000 documents a day, 8% of errors become tickets, $12 a ticket, 30-day month.
The memo has three sentences. The claim in their units. The confidence and the bounds. The ask. Then: "what we do not know yet", each item with a plan and a date.
The ask often has a third option. Say a full launch has a 60% chance of +$50k a month, 30% of nothing, and 10% of −$200k. A staged rollout to 25% of traffic catches a regression early and caps the loss at −$50k.
| Plan | Expected value per month |
|---|---|
| Full launch | 0.6 × 50,000 + 0.1 × (−200,000) = +$10,000 |
| Staged | 0.6 × 50,000 + 0.1 × (−50,000) = +$25,000 |
Staging delays 75% of the upside by a month: 0.6 × 50,000 × 0.75 = $22,500 once. It pays back in 22,500 / 15,000 = 1.5 months.
Chapter 8
Pull four levers, push the gain up the chain, pay the latency drain, and find the best launch with every guardrail green
Every part now fits in one machine. You run the docs assistant. You control four levers: the recall gain, the reranker gain, the model size and a response cache. The machine pushes the quality gain up the ladder, charges the latency drain, and checks three guardrails.
Name the parts. The quality gain is Δq, in percent. The three link elasticities are e1, e2, e3: quality to answers, answers to completion, completion to retention. The added latency is ℓ in milliseconds, and the SLO leaves a slack of 100 ms. Each 100 ms past the slack costs a share π of revenue.
F equals one plus delta q times e-one e-two e-three, times one minus pi times the larger of zero and ell minus one hundred, over one hundred.
Shrink the quality gain Δq through the three links to get the revenue upside. Count the 100 ms steps that ℓ goes past the slack and multiply by π to get the drain. Multiply the upside factor by the drain factor.
With made-up numbers: Δq = 10% from the reranker, so the upside is 0.10 × 0.12 = 1.2%. It adds ℓ = 180 ms, 80 past the slack, so the drain is 0.8 × 0.9% = 0.72%. F = 1.012 × 0.9928 = 1.0047: +0.47%. At ℓ = 310 ms, F = 1.012 × 0.9811 = 0.9929: −0.71%.
Set the levers, then press Run quarter. Beat the best launch with all three gauges green. Turn noise on to see how hard a small gain is to read week to week.
A toy model. Quality gain = 0.5 × recall + reranker + 4, 8 or 11 points for Medium, Large, XL. Latency adds 6 ms per recall point and 18 ms per reranker point. Size adds 120, 300 or 520 ms, and the cache saves 150 ms. Baseline revenue is $120,000 a month.
Try the traps. XL looks best on quality, breaks latency and cost, and loses money. Max recall with no cache breaks latency. The best launch in this toy is a small model with recall +20%, reranker +7% and the cache. It earns +$2,448 a month and uses 96 ms of the 100 ms slack. The best point sits on a guardrail's edge, inside it.
The failure: optimizing a point estimate. Elasticities carry error and hold only for small moves. The fix is to optimize the low end of the range. Use the model as a shared picture of the trade-offs, not as an autopilot.
Chapter 9
Keep the terms, the numbers, the checklist and the code in one place, and see where the sibling lessons fit
A metrics ladder is the chain from a module metric to the business, where every link is a measured, shrinking, breakable claim. Good evals certify the bottom rung. Money is lost in the links.
| Term | Meaning | Number from this lesson |
|---|---|---|
| Broken rung | a side effect outweighs the gain | −$1,040 a month from a better model |
| Attenuation | each link keeps part of the gain | 8 → 5.2 → 3.9 points |
| Driver tree | north star as a product of leaves | 40,000 × 3.2 × 1.5 × 0.6 = 115,200 |
| Error budget | failure the SLO allows | 43.2 min per 30 days at 99.9% |
| Burn rate | spend speed against plan | 14.4 empties the budget in 50 h |
| Funnel lift | raise the lowest step | 40% → 50%: +25% completions |
| Bucket yield | f × s × x | 0.213 against 0.060 |
| z badge | distance from normal in spreads | −8.7 is an incident; 1.2 is noise |
| Difference interval | √(wa² + wb²) | 2.2 ± 1.13 points, $308 to $959 a month |
| Revenue factor | upside times drain | +10% quality, 180 ms: +0.47% |
pythonimport math, statistics as st def growth_shares(factors): # {"W":1.01,"S":1.05,...} -> share of log growth total = math.log(math.prod(factors.values())) return {k: round(math.log(v) / total, 3) for k, v in factors.items()} def burn_rate(err_rate, slo): # 0.0144, 0.999 -> 14.4 return err_rate / (1 - slo) def bucket_yield(buckets): # {name: (f, s, x)} -> ranked list return sorted(((round(f * s * x, 3), n) for n, (f, s, x) in buckets.items()), reverse=True) def z_badge(trailing, x): # sample sd, n - 1 z = (x - st.mean(trailing)) / st.stdev(trailing) return ("PAGE" if abs(z) > 3 else "LOOK" if abs(z) > 2 else "OK"), round(z, 2) def revenue_factor(dq, lat_ms, elas=(0.5, 0.6, 0.4), slack=100, pen=0.009): up = dq * math.prod(elas) drain = pen * max(0, lat_ms - slack) / 100 return (1 + up) * (1 - drain) print(growth_shares({"W": 1.01, "S": 1.05, "C": 1.02})) # {'W': 0.127, 'S': 0.621, 'C': 0.252} print(round(burn_rate(0.0144, 0.999), 1)) # 14.4 print(z_badge([60.2, 59.8, 60.5, 60.1, 59.9, 60.4, 60.0], 57.9)) # ('PAGE', -8.69) print(round(revenue_factor(0.10, 180), 4)) # 1.0047
| Lesson | Its job on the ladder |
|---|---|
| Metric Design | builds each rung: what to measure, and how to resist gaming |
| Statistics of Evaluation | says when a rung's change is real: intervals, tests, power |
| Summarizing Distributions | means, spreads and tails behind every tile |
| Evaluation Plots | draws rungs honestly, the craft behind Chapter 6 |
| Experiment Design | tests a link between rungs with an A/B test |
| Regression Testing for ML | gates and canaries that stop rungs from rotting |
| Estimator Evaluation and GenAI Evaluation | module rungs for estimation and generative systems |
Keep going. AI Evaluation covers the eval harness. Agent Evaluation covers a module that is an agent. Testing and Deployment covers the systems under Chapter 3's SLOs.
Limits. Elasticities are local, measured with error, and drift. A multiplicative tree ignores cross-terms. Expected-value calls need probabilities nobody knows well. And a published metric changes the behaviour it measures.
Sources. The burn-rate thresholds come from Google's SRE workbook, Alerting on SLOs. The GPT-4o case comes from OpenAI's Expanding on what we missed with sycophancy. We made up the docs assistant and all its numbers for this lesson.
Now press Present or Teach. Explain from memory why a better model can lose money, how a gain shrinks, and how burn rate, bucket yield and the z badge work. Then go back to the ladder and find the latency at which the 3-point model breaks even.