Skip to content

AI Six Sigma · Continuous monitoring

Statistical process control for model behaviour.

We run AI systems the way process engineers run a production line: every decision is a unit, every critical-to-quality characteristic has a written defect definition, and a control chart — not a glance at a dashboard — decides when behaviour has shifted and who gets paged.

Method

DMAIC, applied to AI systems.

Define, Measure, Analyze, Improve, Control is the Six Sigma improvement cycle. It transfers to AI with one change: the unit of production is a decision, and the process includes the prompt, the model, the retrieval index and every tool the model calls.

Define what a defective decision is — before anyone looks at a dashboard.

Each AI decision is a unit of output. We agree the critical-to-quality characteristics with the business and risk owners, then write each one as a testable defect definition. A decision that violates any CTQ is defective, which makes every decision a Bernoulli trial and the daily defect proportion a statistic we can put limits on.

Critical-to-quality characteristics for AI decisions and how each is operationalised as a defect
CTQDefect definitionMeasurementExample tolerance
GroundednessAny claim in the output that is not entailed by the retrieved context, judged by an NLI entailment model calibrated against a human-labelled golden set.Claim-level entailment on every sampled decision≤ 0.5% of decisions with an unsupported claim
Policy adherenceA deterministic policy check or guardrail classifier fails on the final output — PII egress, prohibited advice, jurisdiction rules — or a required disclosure is missing.Rule engine + classifier verdicts, logged per decision0 critical; ≤ 0.1% minor
Latency p95End-to-end decision latency above the SLO, measured from the gateway span to the committed response.Per-request trace span; EWMA chart on the daily p95≤ 1,800 ms per decision
Cost per decisionMetered tokens, tool calls and retrieval for one decision exceed the budget ceiling, joined on trace id.Usage records joined to the decision ledger≤ $0.042 per decision
Escalation precisionThe system escalates and the reviewer marks it unnecessary, or it does not escalate a case the reviewer later reverses.Reviewer labels on escalations + 5% audit samplePrecision ≥ 0.90, recall ≥ 0.97

Tolerances are illustrative; we set them per system with the accountable owner and record them in the control plan.

Phase 1 of 5

Control

A control chart that pages someone before customers notice.

A simulated production model scored on 800–1,400 sampled decisions a day. The process starts in control; from day 41 its true defect rate creeps upward by 0.05 points a day. Watch which rule catches it first.

Simulated dataCL (Phase I) 0.0094Day 40 / 60n today 1,337p today 0.0105In control
All Western Electric rules passing across 40 days · limits frozen from Phase I baseline

PHASE I BASELINE · LIMITS FROZEN0.0000.0050.0100.0150.0200.0251102030405060Day (simulated)Defect proportion pCL 0.0094UCL = CL + 3σₚ,ᵢLCLawaiting day 41
  • Daily defect proportion pᵢ = defectsᵢ / nᵢ
  • Centre line p̄, pooled over days 1–30
  • 3σ limits, stepped per day as nᵢ varies (800–1,400)
  • R1 — action: point beyond 3σ
  • R2 / R4 — early warning: 2 of 3 beyond 2σ, or 8-point run

Alert log

  1. No alerts. Rules 1, 2 and 4 evaluated on every appended day.
Data table (40 days)
Daily sample size, defects, proportion and control limits (simulated)
DaynDefectspUCLLCLRules
11066120.01130.01830.0005—
21247160.01280.01760.0012—
3922120.01300.01900.0000—
41188120.01010.01780.0010—
593650.00530.01890.0000—
685060.00710.01930.0000—
799660.00600.01860.0002—
898990.00910.01860.0002—
91161140.01210.01790.0009—
101119120.01070.01810.0008—
1185580.00940.01930.0000—
12101290.00890.01850.0003—
131192130.01090.01780.0010—
141300110.00850.01740.0014—
1593550.00530.01890.0000—
161246130.01040.01760.0012—
17115890.00780.01790.0009—
181166120.01030.01790.0009—
19114370.00610.01800.0008—
2097380.00820.01870.0001—
211084100.00920.01820.0006—
221314130.00990.01740.0014—
2399230.00300.01860.0002—
241115130.01170.01810.0007—
2584170.00830.01940.0000—
261049110.01050.01840.0005—
27119580.00670.01780.0010—
281009110.01090.01850.0003—
291357160.01180.01730.0015—
301317170.01290.01740.0014—
311350190.01410.01730.0015—
321184130.01100.01780.0010—
3385470.00820.01930.0000—
341161100.00860.01790.0009—
35816110.01350.01960.0000—
361249130.01040.01760.0012—
37107750.00460.01820.0006—
3883170.00840.01950.0000—
391309120.00920.01740.0014—
401337140.01050.01730.0015—

Why a p-chart

Each decision is defective or not, and the number of decisions scored varies by day. The p-chart's limits, p̄ ± 3·√(p̄(1−p̄)/nᵢ), widen on light days and tighten on heavy ones, so a noisy Sunday is not mistaken for a shift.

Why the limits are frozen

p̄ comes from the day 1–30 Phase I baseline and then stays fixed. Re-fitting the centre line on every new point lets a slow drift carry the limits upward with it, and the chart never alarms.

Why three rules

Rule 1 (one point beyond 3σ) is the action signal. Rule 4 (eight consecutive points on one side) and Rule 2 (two of three beyond 2σ) fire earlier on small sustained shifts, which is how drift actually arrives.

Instrumentation

The monitoring stack we install.

Six instruments, each producing a signal with an owner and a reaction. Together they close the loop from a code change to a production alert to a verified fix.

  1. Decision

    Eval harness in CI

    Every prompt, model, retrieval or tool change runs the CTQ suite as a required check. The build fails when any CTQ regresses beyond tolerance against current production.

    Signal · Per-CTQ pass rate, diffed against prod

  2. Inference

    Shadow traffic

    Candidate configurations receive mirrored production requests. Outputs are scored and ledgered, never returned to users, so we see real-distribution behaviour before exposure.

    Signal · Defect rate delta, candidate vs prod

  3. Data

    Golden sets

    Versioned, stratified, human-labelled cases per CTQ, with a sealed holdout that is never used for prompt iteration so the suite cannot be overfit.

    Signal · Judge–human agreement (κ) per release

  4. Data

    Drift monitors

    Population Stability Index on intent mix and embedding-cluster assignment; KL divergence on output labels against a rolling 28-day reference window.

    Signal · PSI > 0.2 or KL above its own control limit

  5. Guardrail

    Cost & latency SPC

    p-charts for defect proportion; EWMA charts for p95 latency and cost per decision, which catch small sustained shifts that Shewhart limits miss.

    Signal · Western Electric rules 1, 2, 4

  6. Guardrail

    Alert routing to on-call

    Warnings open a ticket with the chart, the rule, and the change log for the window. Rule 1 pages on-call and flips the router to the last-known-good configuration hash.

    Signal · Time-to-acknowledge, time-to-contain

Put your AI systems under statistical control

The Systems Assessment inventories every model and decision path you run, drafts CTQ defect definitions with your owners, and specifies the charts, rules and gates for each — ready to instrument.