learn-model-evaluation-with-phoebe / Practitioner session 8 of 10
Learn Model Evaluation with Phoebe · Practitioner track · Session 8 of 10

Operational metrics

Quality metrics tell you whether the answer is good. Tonight's metrics tell you whether anyone will wait for it and whether you can afford to serve it. You will learn the NVIDIA serving vocabulary - TTFT, ITL, the identity that ties them together - plus per-query cost arithmetic and the discipline of budgeting p95, not averages. Then the payoff: latency and price go INSIDE the eval sheet as first-class success criteria, completing the satisficing architecture b5 started. A system with rising judge scores and 8-second answers is not a good system - it is a churn machine with a nice dashboard.

🟠 Practitioner track DS · analysts · ML + AI engineers Python · live evaluator on key pages 45 min
0-3 · Welcome 3-18 · The serving math 18-42 · Build-along: budget the Lumen assistant 42-45 · Q&A
Part 1 · covers NVIDIA NIM benchmarking metrics (TTFT / ITL / TPS)

The serving math 8 min live

The NVIDIA benchmarking definitions, exactly - these are the industry's shared vocabulary, so learn them as written. TTFT (time to first token) = submit -> first token; it contains the queue wait, the prefill of your prompt, and the network hop, and it owns the "is it thinking?" UX moment. ITL (inter-token latency, also called TPOT) = (e2e - TTFT) / (output_tokens - 1) - the decode smoothness, how fluid the streaming feels. And the identity that ties them: e2e = TTFT + (tokens - 1) x ITL. Sanity-check any vendor claim with it - the three numbers must reconcile, and when they do not, that is your first question.

★ What you walk out with today The TTFT / ITL / TPS vocabulary read straight from the NVIDIA definitions, the identity as a vendor lie-detector, the batching tradeoff (system throughput vs each user's experience), per-query cost arithmetic with its four levers, and latency + price written into the eval sheet as owner-signed constraints.
ONE REQUEST, START TO FINISH ITL / TPOT = gap between tokens QUEUE PREFILL STREAMING DECODE one tick = one token FIRST TOKEN DONE TTFT = submit -> first token (queue + prefill + network) - the "is it thinking?" moment e2e = the whole bar, submit to done The identity: e2e = TTFT + (tokens - 1) x ITL. Sanity-check every vendor claim - if it does not add up, ask why.
🔍 Click to zoom - the request timeline with the TTFT and ITL brackets and the identity
Batching: one dial, two throughput numbers moving opposite ways system TPS - total tokens per second per-user TPS - one stream's smoothness live chat assistant overnight summarizer system TPS - the infra bill's metric per-user TPS - what one person feels tokens per second batch size, small to large Big batches: cheaper per token, choppier for every individual user. Small batches: the reverse. There is no correct setting - you choose per product, and one glorious TPS number hides which.
🔍 Click to zoom - raising system throughput spends each user's smoothness
LiveSystem TPS vs per-user TPS: the batching tradeoff4 min▶

Two throughput numbers that vendors love to blur: system TPS = total output tokens / wall time, across ALL concurrent requests - the infra bill's metric. Per-user TPS - what one person actually experiences in their stream. Under batching they diverge, by design: batching more requests together raises system throughput while degrading each user's ITL.

  • Big batches: cheaper per token, choppier for every individual user.
  • Small batches: smoother streams, a larger serving bill.
  • There is no correct setting - you choose, per product. A batch-overnight summarizer and a live chat assistant should not share a batching config, or a latency budget.

When a vendor quotes one glorious TPS number, ask which one it is, and at what concurrency. The identity from the figure catches the rest.

LivePercentile discipline: budget p95, never averages3 min▶

Latency distributions have long right tails: most requests are fine, and a few are terrible. An average blends the terrible into the fine and reports "fine." Users do not experience your average - the one 9-second answer is what they remember and what they quote in the churn survey.

So the budget is written in percentiles: p95 TTFT <= 800ms means 95% of requests see a first token inside 800ms, and you are watching the slowest 5% explicitly. For anything user-facing, budget p95 or p99; use the average only for capacity planning. One slow tail kills perceived quality - and the average will never tell you it is happening.

Self-studyThe identity as three lines of Python2 min read▶

Worth keeping in a scratch notebook for vendor meetings:

# e2e = TTFT + (tokens - 1) x ITL - reconcile any latency claim
ttft, itl, out_tokens = 0.42, 0.03, 120   # seconds, seconds, tokens
e2e = ttft + (out_tokens - 1) * itl
print(f"implied e2e: {e2e:.2f}s")          # 3.99s - does the claimed e2e match?

If a datasheet claims sub-second answers with those components, the numbers do not reconcile - someone is quoting TTFT as e2e, or averaging away the tail. Either way, you now have the question.

Part 2 · the money column

Cost per query, and the ROI arithmetic 8 min live

The cost of one query is not mysterious: tokens in x input price + tokens out x output price + retries. What teams skip is multiplying it by volume and putting it next to the quality number - which is the only place it means anything. The levers, in rough order of cheapness: model tier per step (not every step needs the big model), prompt caching (stop paying full price for the same system prompt), output-length discipline (you pay per output token; rambling is a line item), and max-turn caps (an agent that loops is a bill that loops).

Two candidate models, both columns on one sheet judge score, 0 to 1 monthly cost at 40,000 queries Judge score, b7-calibrated Monthly cost at 40,000 queries Model A $0.004 per query 0.86 $160 Model B $0.021 per query 0.88 $840 2 quality points for $680 a month more - roughly 5x the cost A 2% quality win at 5x cost is usually a loss - but this is a product decision, not a math verdict. Both columns belong on the same sheet, read by someone who can weigh one against the other.
🔍 Click to zoom - near-identical quality bars, a cost bar five times longer
LiveBuild-along: budget the Lumen assistant14 min▶

The Lumen support assistant, choosing between two models. Put quality and cost on the same sheet and let the arithmetic speak:

Model AModel B
Quality (judge score, b7-calibrated)0.860.88
Cost per query$0.004$0.021
Volume40,000 queries/mo40,000 queries/mo
Monthly cost$160$840

Model B buys 2 quality points for $680/mo more - roughly 5x the cost. Is 2 points worth $680 a month? Maybe! If those points sit exactly where escalations happen, possibly yes. The lesson is not the verdict - it is that this is a product decision, and it belongs on the sheet, made by someone who can see both columns. The general rule of thumb: a 2% quality win at 5x cost is usually a loss.

Compute your own version: your assistant's average tokens in/out, your models' prices, your monthly volume. One spreadsheet row per candidate model.

Add the retry rate - a 10% retry rate is a 10% surcharge on everything, and it hides in logs, not in price sheets.

Now apply one lever (caching, shorter outputs, or a cheaper model on the easy step) and recompute. The cheapest quality point is usually the one you did not have to buy back.

Part 3 · covers Anthropic define-success, Ng satisficing vs optimizing

Latency and price go inside the eval sheet 6 min live

Anthropic's own define-success guidance lists latency and price among its success-criteria categories - they are not infra footnotes, they are eval criteria with the same standing as quality. The instrument for holding them together is Ng's satisficing-vs-optimizing pattern from b5, now completed for an LLM system: one metric to maximize, everything else a hard constraint.

LiveThe satisficing architecture, completed5 min▶

The Lumen assistant's eval sheet, in one sentence:

maximize   task success on the golden set
subject to faithfulness >= 0.9
           p95 TTFT     <= 800ms
           cost         <= $0.02/query

Three rules that make it real rather than decorative:

  • Every constraint is owner-signed. Support owns the faithfulness floor, product owns the latency budget, finance owns the cost cap. A constraint nobody signed is a suggestion.
  • Constraints are pass/fail, not tradeable. A model that scores 0.95 on quality but blows the latency budget does not ship - that is the entire point of writing it down.
  • The optimizing metric stays singular. One number to climb keeps iteration fast (Ng's single-number doctrine); the constraints keep the climb from wandering somewhere expensive.
Real world

The assistant that got better and lost its users. A team shipped an assistant and watched judge scores rise release after release - richer answers, better citations, longer reasoning. Answers also crept from 2 seconds to 8. Users churned to the old search box. The postmortem's one line: latency was never a success criterion, so nobody was failing - every dashboard was green while the product died. One row on the eval sheet would have caught it in week one.

Self-studyWhere the sheet goes next2 min read▶

You now hold every column of the eval sheet: the classic metrics and their costs (b1-b5), LLM quality metrics (b6), a calibrated grader to compute them (b7), and tonight's latency and price constraints. b9 makes the whole thing continuous - drift, regression evals, the two-hop proxy chain - and b10 assembles the full sheet for Lumen's classic model and a RAG assistant, every number defended.

Homework

Try it yourself - this week ◐ 20-30 min total

Source material

Official sources covered

This session teaches the NVIDIA serving vocabulary as the industry standard, then wires latency and price into the eval sheet using Anthropic's success-criteria categories and Ng's satisficing pattern. This page covers:

✓NVIDIA NIM benchmarking metrics - TTFT, ITL/TPOT, system vs per-user TPSPart 1 · the identity + the batching tradeoff, definitions quoted exactly
✓Anthropic define-success - latency + price among the success-criteria categoriesPart 3 · operations as first-class eval criteria
◐Ng, Structuring ML Projects - satisficing vs optimizing metricsThe architecture from b5, completed here for LLM systems
◐evalml canon - the Lumen assistant budget + eval-sheet constraintsWorked example · the full sheet assembles in b10
Check yourself

Three questions before you go 🎯 ◐ 90 seconds

1 · Users complain the assistant "sits there thinking forever" before anything appears, but once text starts it flows fine. Which metric owns that complaint?

The dead air before the first character is TTFT's territory - queue, prefill, network. ITL owns the opposite complaint: text that starts fast but stutters as it streams. Matching the user's complaint to the right metric is what makes the fix findable.

2 · A vendor claims: e2e 1.5s, TTFT 400ms, 100 output tokens, ITL 30ms. What does the identity say?

e2e = TTFT + (tokens - 1) x ITL = 0.4 + 99 x 0.03 = 3.37s - more than double the claimed 1.5s. Maybe the token count is smaller, maybe the ITL is a best case, maybe e2e is a p50 while the rest are means. The identity does not tell you which - it tells you to ask.

3 · Why does the latency budget say "p95 TTFT <= 800ms" instead of "average TTFT <= 800ms"?

Most requests are fine and a few are terrible; the average blends them and reports "fine." A p95 budget watches the slowest 5% explicitly - and one slow tail kills perceived quality faster than a mediocre median ever will. Averages are for capacity planning, percentiles are for users.

Practitioner session 8 cheat sheet · pin this

TTFTSubmit -> first token: queue + prefill + network. Owns the "is it thinking?" moment - the perceived-responsiveness metric.
ITL / TPOT(e2e - TTFT) / (output_tokens - 1). Decode smoothness - how fluid the stream feels once it starts.
The identitye2e = TTFT + (tokens - 1) x ITL. Reconcile every vendor latency claim with it; numbers that break it are your first question.
Batching tradeoffSystem TPS (total tokens / wall time) rises with batching while each user's ITL degrades. No correct setting - choose per product.
Percentile disciplineBudget p95/p99, never averages - one slow tail kills perceived quality and the average will never show it. Averages are for capacity planning only.
Cost per queryTokens in x input price + tokens out x output price + retries. Levers: model tier per step, prompt caching, output-length discipline, max-turn caps.
The ROI arithmeticLumen: 0.86 at $160/mo vs 0.88 at $840/mo - 2 points for $680. A 2% quality win at 5x cost is usually a loss; either way it is a product decision, on the sheet.
The satisficing sheetMaximize task success on the golden set; subject to faithfulness >= 0.9, p95 TTFT <= 800ms, cost <= $0.02/query. Every constraint owner-signed, pass/fail.