6.4.15 · D3AI Safety & Alignment

Worked examples — Responsible AI deployment practices

3,148 words14 min readBack to topic

The scenario matrix

Before any example, let us list every cell a deployment-math problem can land in. Each row is a "shape" of input the formulas must survive.

# Cell class The tricky part Covered by
A Sample size for a rare failure ( tiny) , huge Ex 1
B Sample size for a common failure ( large) small , no approximation allowed Ex 2
C Limiting case — you can never be sure Ex 3
D KL divergence, normal shifted distributions plug into the sum Ex 4
E KL divergence, identical distributions (degenerate) must give exactly Ex 4
F KL divergence, a zero bin in production trap Ex 5
G Prediction entropy: confident vs uncertain which is "good"? sign of Ex 6
H Entropy extremes: one-hot vs uniform vs bounds Ex 6
I Word problem: circuit breaker blast radius translate story → counts Ex 7
J Word problem: staged rollout schedule in days samples → traffic → time Ex 8
K Exam twist: confidence-routing automation rate combine threshold + distribution Ex 9

Every symbol below is re-earned. If you have not met , KL divergence , or entropy before, read the "First, what the symbol means" box the first time it appears.


Warm-up: the two symbols we lean on

Figure — Responsible AI deployment practices

Look at the curve above: it dives to near and crosses zero at . Both the sample-size math and the KL/entropy math live entirely on the left half (), where is negative — keep that picture in mind, it explains every sign flip below.


Group A–C · Sample-size math (how long to run a stage)

Recall the parent formula: to be confident of catching at least one failure of rate , Both and are negative (both arguments are between 0 and 1), so their ratio is positive — good, is a count.


Group D–F · KL divergence (is production drifting from training?)

Figure — Responsible AI deployment practices

Figure s02 draws exactly the two distributions of Ex 4: the black bars are , the red bars are the shifted . Notice bucket 2 has equal-height bars — that is the term that contributes 0 to the sum. KL divergence adds up, bin by bin, how far the red bar has strayed from the black one; the two big gaps at buckets 1 and 3 are where the drift number comes from.


Group G–H · Prediction entropy (is the model confident?)

Figure — Responsible AI deployment practices

Figure s03 shows the three predictions of Ex 6 as bars of entropy in bits. The two dashed guide-lines are the bounds we will prove: the floor at (perfect certainty) and the ceiling at (total confusion, red bar). Every real prediction lands somewhere between them — reading the height of a bar tells you at a glance how nervous the model is.


Group I–J · Word problems (story → numbers)


Group K · Exam-style twist


Recall Self-test (reveal after answering)

Rare failures force which limit for ? ::: as (Ex 3). Why must training be the denominator in ? ::: So a novel (zero-in-training) production bin makes the ratio blow up to and fires a loud alert (Ex 5). A 4-class model outputs ; its entropy in bits is? ::: bits — maximum confusion (Ex 6). With 8,000 users/day at 1% routing, a 2,996-sample stage takes how long? ::: 38 days (Ex 8). Uniform confidence on , threshold 0.85 → automation rate? ::: 37.5% (Ex 9).