LearnQuestion bank

Design a system that monitors a production ML model’s performance in real time.

AI leadershipSystem designHard

Answer it yourself first, out loud or on paper, then compare.

Answer

Model answer, written in a candidate's voice

In short

  • Stream features, predictions, labels, and business events with model/version metadata into a metrics and drift pipeline
  • Detect input and prediction drift; evaluate performance under delayed labels with rolling windows and confidence bounds
  • Tie monitoring to business KPIs and SLOs, sliced by segment
  • Set baseline-derived alert thresholds, severity, on-call routing, and runbooks
  • Define rollback and retraining triggers with canary/shadow gates and champion-challenger
  • For LLMs, add sampled quality evals and safety flags with human review
  • Close the loop with dashboards, incidents, retraining/rollback decisions, and audit trail

In full

I would treat monitoring as a closed-loop control plane, not a dashboard: stream features, predictions, labels, and business events with model/version metadata into a metrics store, then compute drift, performance, and KPI health continuously. Input and prediction drift are tracked with baseline-derived tests and prediction-distribution shifts, while performance under delayed labels is evaluated over rolling windows with confidence bounds and proxy signals rather than paging on noisy early labels. I would tie alerts to business KPIs and SLOs such as conversion, revenue, latency, cost, and error rate, and slice every metric by segment such as geography, customer tier, device, model version, and time window so a global average does not hide a failing cohort. Alerts use baseline-derived thresholds and severity, route to the owning on-call with a runbook, and distinguish page-worthy safety or KPI breaches from ticket-worthy drift; rollback or retraining is triggered by predefined gates such as canary or shadow failure, sustained drift, KPI breach, or safety regression, with champion-challenger and an audit trail. For LLMs I would add sampled quality evals and safety flags for toxicity, PII, policy or compliance, hallucination or grounding risk, and human review on a sample, feeding the same alerting and rollback path.

Checked against sources by an independent AI reviewer.

What a strong answer covers

  • Input and prediction drift; performance under delayed labels
  • Business KPIs
  • Slicing by segment
  • Alert thresholds and on-call
  • Rollback and retraining triggers
  • For LLMs: sampled quality evals and safety flags

Common mistakes

  • Only infrastructure metrics
  • No plan for label delay