PythiloLesson 12 of 12 · progress kept in this browser

Practice in Lab: Project: gate an AI release with paired coverage, uncertainty and hard limits →

Project: gate an AI release with paired coverage, uncertainty and hard limits

A release gate should fail when hard cases disappear, a safety requirement regresses or an average hides concentrated uncertainty. This project pairs versioned cases, checks category coverage, bootstraps independent group improvements and applies hard safety, cost and tail-latency limits. Quality gives groups equal weight while cost averages cases, an explicit difference a reviewer must defend. Measurements are supplied fixtures so the gate runs offline. A passing local gate is not permission for an automatic production rollout and does not validate the model or judge that produced those measurements.

import math
latencies = sorted([1.,1.,2.,9.])
rank = math.ceil(.95*len(latencies))-1
print(latencies[rank])
print('tail latency uses a declared quantile convention')
Your task

Baseline/candidate rows have unique id,category,string independent group,quality in [0,1], explicit boolean safe, and nonnegative finite cost/latency. Require identical case IDs and paired category/group identities. Policy has exactly minimum (positive integer counts by category), max_cost,p95_latency,tolerance (finite nonnegative), repetitions>=2 and seed. Compute candidate-minus-baseline quality using the equal-group bootstrap contract: group means, local seeded resampling and interpolated 95% percentile bounds. Require >=2 groups. Report promote,reasons,coverage,quality interval,mean_cost and nearest-rank p95 latency. Reasons in order: coverage for category/count mismatch, safety for any unsafe candidate, quality for lower bound < -tolerance, cost and latency for exceeded limits. Measurements are supplied evaluation fixtures, not calls to a model or judge.

All lessons