35/39
Part 6 of 6 · Trade-offs, reviews and evaluationLearn and do
Offline, online and guardrails tell you whether it works
The last nine minutes of the plan go to two questions: how you'd know the system works, and how you'd know when it stops working. Start with the first.
| Weeks | Use |
|---|---|
| 1 to 8 | train |
| 9 | test: the model meets week 9 the way it will meet the future |
- Offline. A metric on held-out data that tracks the objective. Split by time, not at random, as in the table.
- Online. An A/B test on the objective, with the unit of randomization, the duration, and the smallest effect worth detecting.
- Guardrails. Metrics that block a launch even when the main one wins: latency, cancellations, complaints, cost.
Expect offline and online to disagree. A reported Airbnb ML experience round asked exactly that: "What do you do when the offline metric and the online metric disagree?" (1 report). The ranking metrics lesson works through the causes.
In the editor, write ship(lift, guardrails). lift is the change in the main metric, and each guardrail maps to how much worse it got and the most it may get worse. Ship only when the main metric went up and no guardrail broke its limit.