advanced24 min studyLesson 843 in Engineering

Collect enough support for the failures an aggregate can hide

Plan rare-slice coverage, distinguish prevalence estimation from challenge testing, and interpret zero observed failures using a fixed-sample probability model.

On this page

What you’ll understand

  • Quantify the chance a random test misses a rare slice.
  • Separate oversampling for conditional performance from population weighting.
  • Compute a one-sided zero-failure upper bound with explicit assumptions.

A thousand-request evaluation reports a strong aggregate result, but only a few examples involve a rarely used language and a strict tool permission boundary. The aggregate says little about that intersection. Rare cases need a deliberate collection and evidence plan: define the slice, estimate or document its prevalence, and collect enough independent support for the failure rate being assessed. A curated stress case can reveal a defect even when its frequency is unknown; it cannot by itself estimate how often that defect will occur in deployment.

Distinguish slice prevalence from within-slice performance

Let a slice be a predeclared condition on requests, such as language plus tool type. Its prevalence is the probability a target-population request belongs to it. Its conditional failure rate is another quantity, measured among eligible slice requests. Multiplying the two gives the population contribution of that failure only when definitions and conditioning match. Overlapping slices require care: summing their contributions can double-count requests. Preserve intersection counts and grouping identifiers rather than report many apparently precise slice percentages drawn from the same few conversations.

Under independent identical population draws with slice probability r, the chance of collecting no slice examples in n requests is (1−r)^n. An expected count of one does not guarantee one observed example, much less reliable conditional evaluation. Stratified oversampling can increase slice support, but retain its selection design and target weights when estimating population aggregates. Adversarially authored cases are useful for capability or failure discovery; their construction is usually not a random draw from the natural slice, so their pass rate should not silently become a deployment frequency estimate.

Pr⁡(Nslice=0)=(1−r)n,E[Nslice]=nr\Pr(N_{\mathrm{slice}}=0)=(1-r)^n,\qquad \mathbb{E}[N_{\mathrm{slice}}]=nr
This exact binomial coverage model assumes n independent identical draws with slice prevalence r∈[0, 1]. n is a nonnegative integer. It describes slice membership, not the conditional correctness of model answers inside the slice.↔ Scroll wide equations horizontally.

Zero observed failures is limited evidence

If a fixed-size independent slice sample has zero failures, the observed fraction is zero but the population failure probability remains uncertain. Inverting the probability of zero failures gives a one-sided exact binomial upper confidence bound. The bound is larger when support is smaller. It applies to the declared fixed sample under the stated Bernoulli model, not automatically to duplicated variants, a hand-selected easiest subset, or a sequence stopped the first time the model appears safe. Record the denominator and selection process with every zero-failure claim.

The confidence level is a property of the interval procedure under repeated valid sampling, not a probability that a fixed unknown rate lies below the particular realized endpoint without an additional Bayesian model. A zero-failure bound for one slice does not provide simultaneous coverage for many slices at the same nominal level. Allocate joint uncertainty deliberately when the release depends on several statements. More samples can narrow a bound for the same population; they do not establish that the slice definition captures all relevant risks or that next month's traffic has the same distribution.

pU=1−δ1/n,n>0,0<δ<1p_U=1-\delta^{1/n},\qquad n>0,\quad0<\delta<1
After zero failures in n fixed independent Bernoulli trials, this is the one-sided Clopper–Pearson upper endpoint at confidence 1−δ, obtained from (1−p_U)^n=δ. It concerns the within-slice failure probability, with no optional-stopping or distribution-shift guarantee.↔ Scroll wide equations horizontally.

Define evidence sufficiency before the release review

For each important slice, state the required support, allowed failure consequences, uncertainty method, and action when evidence is missing. A missing slice should be reported as unassessed rather than folded into a passing overall score. Use targeted data collection, shadow evaluation, or a narrower deployment scope when that matches the decision. Discovery of a new failure can justify adding regression cases, while a separate untouched sample is needed for a fresh confirmatory rate claim after model or prompt tuning. Report both roles rather than mixing their denominators.

The probability lab models rare membership only. Reset, set both p=0.02 and n=30, predict its expected count and zero-success bar, then inspect. The expected count is 0.6 and the no-member probability is 0.98^30≈0.54548. The thirty-trial limit is the actual control range; the instrument does not collect a thousand cases or estimate a conditional failure rate. Use the display to see why a small random test often lacks rare-slice support, then design the real collection and inference process explicitly.

Zero failures in a small slice do not establish zero risk

A fictional evaluation obtains 100 independent requests from one predeclared slice at a fixed sample size and observes no failures. Use a one-sided 95% exact binomial upper confidence endpoint. Assume the slice sample truly matches the population being discussed.

  1. Set n=100 and δ=0.05. The zero-failure probability under failure rate p is (1−p)^100.

  2. Solve (1−p_U)^100=0.05, giving p_U=1−0.05^(1/100)≈0.029513, or about 2.95%.

  3. Report zero observed failures out of 100 together with the one-sided bound and sampling assumptions. It does not establish a zero rate, simultaneous coverage for other slices, or safety under a shifted workload.

The result

The fixed-sample upper endpoint is approximately 2.95% for this slice. The evidence can still be insufficient for a stricter predeclared release requirement.

Explore the model

Interactive lab

Interactive lab · probability

Inspect the missing-support probability for a rare slice

Reset, set both p=0.02 and n=30, predict, then inspect. Mean membership is 0.6 and the exact zero-member mass is 0.98^30≈0.54548. These are independent slice-membership trials, not answer failures. The lab has no targeted sampling or confidence-bound calculator.

Inspect the missing-support probability for a rare sliceThese are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Current readings: Mean · np: 5; Variance · np(1−p): 2.5; Total probability: 1. All parameters are adjustable with the labeled controls below.03581000.070.150.220.3Successes kP(X = k)k = 0 · P = 9.77e-4
Exact probabilityHighlighted outcomeMean np
Mean · np
5
Variance · np(1−p)
2.5
Total probability
1
t = 0 s

These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forAn expected rare-slice count is not a support guarantee. Design collection and report conditional performance using its actual denominator.

Check your understanding

A curated set contains difficult rare-slice cases but was not sampled from deployment. What does a high pass rate establish?

Try it yourself

With zero failures in twenty fixed independent slice trials, compute the one-sided 95% exact upper endpoint. Compare its scope with the 100-trial example.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Insert the twenty-trial count into 1−0.05^(1/n), keeping the one-sided confidence level fixed.

Compare with the solution

The endpoint is approximately 0.139108, or 13.91%, much wider than the 100-trial endpoint. The same fixed-sampling assumptions apply; neither endpoint guarantees performance under distribution shift, adaptive selection, or many simultaneous slice claims.

Take it with you

  • Slice prevalence and within-slice failure rate have different denominators.
  • Targeted coverage and challenge testing need explicit selection roles.
  • Zero observed failures requires a support-aware bound and its sampling assumptions.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.