FullStack AI Hub
Studio
lesson depth
Mastery
not started · 0%

AI Service-Level Objectives

Define service objectives around successful, policy-compliant task outcomes as well as latency and availability.

Freshness: current•15 min read•Evaluation, Reliability, and Observability

Key Learning Outcomes

  • ✓Explain the operating model behind AI Service-Level Objectives.
  • ✓Evaluate trade-offs and failure modes for AI Service-Level Objectives.
  • ✓Apply AI Service-Level Objectives to a production decision.
Full Technical Reference Document

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.

Emit OTel GenAI & outcome spans
Measure latency, schema & quality SLIs
Slice cohorts by workflow risk class
Burn error budget cleanly on misses
Trigger freeze or rollback gate
Conceptual teaching model synthesized from:Site Reliability EngineeringOpenTelemetry Generative AI Semantic Conventions

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 QA vs write 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 DimensionMeasurement MethodExample Production ObjectiveEscalation Policy on Burn Breach
Interactive Availability & TTFTcount(http_ok && ttft_ms < 800) / count(valid_requests)>= 99.0% over 28d (interactive)Trigger horizontal replica scale, tighten context caps
Structured Output Validitycount(valid_zod_json) / count(structured_calls)>= 99.7% per dayAuto-revert latest prompt or schema deploy
Grounded Citation SupportAsync human + calibrated NLI audit on stratified sample (N=400/wk)>= 95.0% claims entailed by chunkFreeze new prompt shipping; trigger retriever debug audit
Zero Critical Policy Violationscount(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.

python
from dataclasses import dataclass
​
@dataclass(frozen=True)
class SloWindowTelemetry:
total_valid_requests: int
fast_ttft_successes: int
valid_schema_count: int
audited_sample_size: int
supported_citations_count: int
​
def 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_allowed
​
freeze_prompt_releases = schema_consumed_ratio >= 0.8 or grounded_rate < grounded_target
return {
"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 at 40%.
  • 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 429 limits 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.

Reflect before revealing the guide

Why can an AI application satisfy a 99.9 percent HTTP availability SLO comfortably while still failing its users catastrophically?

Prerequisites & Related Concepts (3)

Private notes

0 words
Included In Free Course
Free · Verifiable Credential

FS-201Production LLM Engineer

Design an observable full-stack LLM product from capability validation through interfaces retrieval evaluation security and operations.

37 concepts~35h self-paced
Start Free Course
Weekly Engineering Dispatch

Get the weekly systems teardown

One technical note per week covering inference bottlenecks, retrieval harnesses, and commit-pinned teardowns.

Next