Mental model
Classical uptime monitoring fails AI products silently: an LLM endpoint can return fast HTTP 200 OK streaming text at 99.95% availability while hallucinating revoked corporate pricing, breaching PII policy rules, or failing structured JSON parses. AI Service-Level Objectives (SLOs) extend reliability engineering explicitly onto task outcomes—measuring segmented TTFT/TPOT, deterministic contract pass rate, cited groundedness, and policy adherence against actionable error budgets.
Learning outcomes
- Formulate crisp numerator/denominator Service-Level Indicators (
SLIs) across speed, contract validity, citation grounding, and safety adherence. - Bind AI error budgets directly to deployment freezes, automatic prompt rollbacks, and alert runbooks so quality degrades visibly rather than silently.
- Avoid hidden-cohort averaging errors by slicing SLO attainment cleanly per task type (
read QAvswrite action).
Theory
An unmeasured SLO without concrete ownership response policy acts purely as wall decoration. Effective AI reliability defines precise measurable windows (rolling 28 days), explicit exclusion criteria (filtering intentional abusive traffic or caller client disconnects cleanly from server quality budgets), and automated consequences when burn rates spike:
| AI SLI Dimension | Measurement Method | Example Production Objective | Escalation Policy on Burn Breach |
|---|---|---|---|
| Interactive Availability & TTFT | count(http_ok && ttft_ms < 800) / count(valid_requests) | >= 99.0% over 28d (interactive) | Trigger horizontal replica scale, tighten context caps |
| Structured Output Validity | count(valid_zod_json) / count(structured_calls) | >= 99.7% per day | Auto-revert latest prompt or schema deploy |
| Grounded Citation Support | Async human + calibrated NLI audit on stratified sample (N=400/wk) | >= 95.0% claims entailed by chunk | Freeze new prompt shipping; trigger retriever debug audit |
| Zero Critical Policy Violations | count(acl_leak == 0 && unsafe_write == 0) / count(runs) | >= 99.99% (0 severe incidents) | Immediate kill-switch downgrade to read-only fallback |
Notice why SLO alerts track multi-window burn rates cleanly rather than reacting blindly to single isolated edge failures or masking broken workflows inside 28-day lag averages: if a bad checkpoint deployment consumes 5% of the entire monthly schema-error budget in 60 minutes, paging SREs + pausing CI rollout catches regressions immediately while normal noise stays quiet.
pythonfrom dataclasses import dataclass@dataclass(frozen=True)class SloWindowTelemetry:total_valid_requests: intfast_ttft_successes: intvalid_schema_count: intaudited_sample_size: intsupported_citations_count: intdef evaluate_error_budget(t: SloWindowTelemetry,latency_target: float = 0.99,schema_target: float = 0.995,grounded_target: float = 0.95,) -> dict[str, object]:"""Calculate real-time error budget remaining cleanly across infrastructure and outcome SLIs."""ttft_rate = t.fast_ttft_successes / max(1, t.total_valid_requests)schema_rate = t.valid_schema_count / max(1, t.total_valid_requests)grounded_rate = t.supported_citations_count / max(1, t.audited_sample_size)schema_budget_allowed = max(1e-9, 1.0 - schema_target)schema_consumed_ratio = (1.0 - schema_rate) / schema_budget_allowedfreeze_prompt_releases = schema_consumed_ratio >= 0.8 or grounded_rate < grounded_targetreturn {"ttft_sli": round(ttft_rate, 4),"schema_sli": round(schema_rate, 4),"grounded_sli": round(grounded_rate, 4),"schema_budget_consumed_pct": round(schema_consumed_ratio * 100, 1),"freeze_non_fix_releases": freeze_prompt_releases,}
Trade-offs
Outcome-oriented SLOs align engineering priorities straight onto real business reliability cleanly (blocking silent hallucination regressions just as strictly as HTTP 500 crashes), yet measuring qualitative accuracy continuously demands well-calibrated stratified sampling (human reviews + validated NLI checks) and immutable grader versioning so moving judge checkpoints never masks silent drops. Infrastructure-only uptime/TTFT metrics remain cheap and instantaneous in edge proxies cleanly, yet leave huge blind spots whenever confident hallucinations render cleanly inside fast 200 OK HTTP payloads.
Failure modes and misconceptions
- Reporting Global Blended Quality Averages: Mixing simple greeting chats alongside high-risk refunds averages cleanly to
96%while leaving refund failures at40%. - Silent Grader Mutability Mid-Window: Swapping the rubric model checkpoint inside production SLO pipelines changes measured pass scores arbitrarily overnight without product changes.
- No Error Budget Enforcement Policy: Dashboards turning red every week without triggering automatic canary rollbacks or feature freezes erode engineering trust cleanly.
- Conflating Provider Throttles With Prompt Defects: Mixing upstream Cloud API
429limits straight into model groundedness SLIs hides root causes cleanly across infrastructure vs prompts.
Decision scenario
An enterprise HR policy assistant stays green (99.95% HTTP 200 and 450 ms TTFT) while support escalations jump 4x cleanly after a corpus sync left expired 2024 dental terms ranking top 3. Define distinct availability, schema, freshness/citation-support SLIs, slice isolation, and burn-rate error budget triggers that catch this silently failing assistant inside hours cleanly.
Why can an AI application satisfy a 99.9 percent HTTP availability SLO comfortably while still failing its users catastrophically?