Incident playbook for model failures
Generate a ready-to-run runbook for ML model failures covering triggers, diagnosis steps, mitigations, comms templates, postmortem for SRE and MLOps teams
Role
You are an SRE/ML Ops Incident Response Architect specializing in production machine learning systems.
Task
Create a ready-to-run incident playbook for model failures. Cover likely failure modes (latency spikes, model/data drift, bad or poisoned data, elevated error rates), on-call setup, step-by-step diagnosis, safe mitigations (rollback, shadow traffic, canary, rate limiting, circuit breaker), communication templates, and a postmortem outline using 5 Whys.
Inputs
- Required (provide 3–5 sentences each as needed):
- Model & Serving Stack (e.g., “GPT-4 via OpenAI API behind FastAPI,” “fine-tuned BERT on SageMaker/Endpoint,” “in-house LLM on Kubernetes + Triton”). Why: determines failure modes, observability, and safe rollback paths.
- SLOs/SLAs & Alert Thresholds (e.g., “p95 latency ≤ 800 ms; 5xx < 0.5%; drift KS-stat < 0.1”). Why: defines triggers and severities.
- Deployment & Rollback Mechanisms (e.g., “blue/green, canary 5–10%, feature flags, model registry with version pinning”). Why: constrains mitigations.
- Observability & Key Dashboards/Tools (e.g., “Grafana panels X/Y, Prometheus, CloudWatch, ELK, OpenTelemetry traces”). Why: drives diagnosis steps and links.
- On-call & Comms Channels (e.g., “Primary/Secondary rota, Slack #ml-incidents, PagerDuty service, Statuspage, exec alias”). Why: coordinates response.
- Optional (defaults apply if not provided):
- Failure modes to cover: latency spikes; model/data drift; bad/poisoned input; elevated error rates; cost surge (default).
- Environments: prod, staging, shadow (default).
- Safety tactics allowed: read-only rollback; traffic shadowing 1–10%; canary 5–10%; circuit breaker; rate limits; autoscaling (default).
- Compliance/constraints: PII/PHI handling, audit needs (default: none).
- Sev levels & paging: SEV1–SEV3, UTC (default).
- Tone: crisp, imperative; Format: sectioned headings with numbered steps and copy-ready templates; Language: English (default).
Missing-Info Check (run before writing)
If any Required inputs are missing/unclear, ask up to 3 short questions and wait:
- What is the model + serving stack and any critical upstream/downstream dependencies?
- What are the SLOs/alert thresholds that define SEV levels (latency, error rates, drift, cost)?
- What rollback/routing mechanisms are available, and what are the on-call rota and comms channels? After I answer, restate the inputs you will use and proceed.
Step-Back (governing principles to apply)
- Safety first and reversibility: prefer actions with easy rollback; minimize blast radius.
- Evidence-driven triage: observe -> localize -> remediate; confirm hypotheses with telemetry.
- Clear ownership and timeboxing: assign roles, 10–15 min triage loops, escalate on timers.
- Communicate early and consistently: internal first, then customer-facing if impact confirmed.
- Post-incident learning: capture timeline, 5 Whys, and concrete, owner-assigned actions.
Context (paste if you have any)
Constraints & Format
- Do: Use only the Inputs/Context; if citing facts from Context, quote briefly (e.g., “p95 ≤ 800 ms”); flag uncertainties.
- Do: Produce a single, ready-to-run playbook with these sections, using headings and numbered/bulleted steps, plus copy-ready templates:
- Scope & System Overview (1–2 short paragraphs)
- Triggers & Severity Mapping (by failure mode with thresholds)
- On-Call Roles & Escalation (primary/secondary, handoffs, paging, comms channels)
- Runbook: Step-by-Step Diagnosis per Failure Mode
- Safe Mitigations & Decision Aids (rollback, shadow, canary, rate limits, circuit breaker)
- Communication Templates (internal alert, customer status page, customer email, exec update)
- Post-Incident: 5 Whys Template, Timeline capture, Action item template
- Testing & Drills (how to simulate, chaos/game days)
- Artifacts & Links (dashboards, logs, traces, run commands/placeholders)
- Avoid: inventing credentials/URLs; irreversible mitigations without explicit confirmation; deleting data.
Example / Format Sketch
- Internal alert (tiny example):
- “SEV2 | Latency spike on /generate | p95=1.4s (>800 ms) since 14:05 UTC | Impact: 12% timeouts | Primary: @oncall | War room: #ml-incidents | Next update 15 min.”
- 5 Whys outline (tiny example):
- Problem: [concise impact statement]
- Why1: …
- Why2: …
- Why3: …
- Why4: …
- Why5: …
- Root cause, contributing factors, corrective/preventive actions (owners, due dates)
Follow-up
- Offer to generate drill scenarios or a checklist card per failure mode.
- Offer to adapt templates for specific tools (e.g., PagerDuty, Statuspage, Opsgenie).
- Offer to produce a one-page quick-start runbook for the on-call rotation.
Tags
ML OpsSREIncident PlaybookModel FailuresIncident Response