Topic 3 of 5 · 4 min read
Canary cohorts and promote-or-rollback decisions
Goal: Read canary and control metrics and decide to promote, hold or roll back.
A canary sends a change to a small group, compares that group with a control on the metrics that matter, and ends in a decision: promote, hold or roll back. The comparison is the point. A canary with no control only tells you the numbers, not whether the change caused them.
Check yourself · 1 of 3
Why does an LLM canary usually need more samples than a canary for a deterministic API?
Why it matters
LLM output varies from run to run, even for the same input. Quality scores are noisy, and rare failures appear in a few percent of requests. A cohort of 30 users over an afternoon will not show a drop from 92% to 88%. You need more samples than for a deterministic service, and enough time to cover different kinds of requests and weekdays.
How to do it
- Stage the exposure. Internal staff first, then a small cohort of real users, then wider steps. Each step has an entry condition and a minimum duration.
- Keep a control. Same period, same kind of users, running the current version. Assign by user or tenant at random, not by who volunteered.
- Choose metrics and limits in advance. Online eval score, thumbs-down rate, refusal rate, p95 latency, cost per task, and complaints or escalations.
- Look at intervals, not single numbers. If the gap is smaller than the run-to-run noise, say so and hold.
- Decide with a rule. Promote when no metric is worse than its limit. Roll back on a safety signal or a clear regression. Hold to collect more data when the result is unclear.
Before and after
Weak: "The canary looked fine, nobody complained, promoting."
Better:
Metric Control Canary Limit Verdict
Eval score 0.91 0.92 >= 0.89 ok
Thumbs-down 3.1% 3.4% <= +1.0 pt ok
p95 latency 4.1 s 5.9 s <= 5.0 s FAIL
Cost per task $0.021 $0.034 <= +30% FAIL
Samples 2,400 2,350 enough
Quality is the same, but latency and cost broke their limits. The decision is hold or roll back, with the prompt change that doubled output length as the lead suspect.
What goes wrong
- Too few samples. A small cohort hides a regression that shows up at full traffic.
- A biased cohort. Enthusiastic early adopters rate everything higher than ordinary users.
- Judging only quality. A better answer at three times the cost may still be a failed canary.
Examples
Quality up, cost doubled
A new prompt asks the model to reason step by step. The canary eval score rises from 0.88 to 0.93, but cost per task goes from $0.02 to $0.05, over the agreed limit. The team holds, shortens the reasoning instruction, and reruns the canary rather than promoting a feature that loses money on every use.
The tiny cohort
A team promotes after one day on 40 internal users with no complaints. At full traffic a refusal rate of about 6% appears for non-English prompts that no internal user had tried. A larger random cohort across languages would have shown it.
Key points
- A canary needs a control group; without it you cannot tell the change from background drift.
- Because outputs vary run to run, canaries need larger samples and longer windows than a normal service.
- Set metrics and limits before the canary starts, including cost and latency, not only quality.
- Assign cohorts at random; volunteers rate higher than ordinary users.
- End every canary with a written decision: promote, hold or roll back.
Common mistakes
- Promoting because nobody complained, when complaints are rare by nature.
- Comparing the canary with last month's numbers instead of a live control.
- Reading a small score difference as real when it is inside the run-to-run noise.
- Watching quality only and ignoring latency and cost per task.
Check yourself · 2 of 3
Canary eval score is 0.92 against 0.91 for control, but p95 latency is 40% over its limit. What is the right call?
Check yourself · 3 of 3
Which cohort is the best choice for the first external canary step?
Practice items, not counted towards your mastery.
Start here
- Feature Toggles (martinfowler.com) (opens in a new tab)ArticleFree
Release, ops and permission toggles, and why stale toggles must be removed.
- Canarying releases (Google SRE Workbook) (opens in a new tab)BookFree
How to size, time and judge a canary against a control population.
- OpenFeature (opens in a new tab)ToolFree
A vendor-neutral flag API, so evaluation code does not depend on one flag provider.