| Metric | Alert Threshold | Action |
|---|---|---|
| p99 latency > 500ms | 5 minutes | Auto-scale, investigate bottleneck |
| Error rate > 1% | 2 minutes | Rollback model, page on-call |
| Throughput drop > 50% | 1 minute | Check upstream, health of replicas |
| GPU utilization > 95% | 10 minutes | Add GPU instances, check batching |
When ground truth is available (with delay), compute model accuracy:
# Model accuracy monitoring (delayed labels)
Prediction at t=0: fraud_score=0.92
Ground truth at t=24h: confirmed_fraud=True
Weekly report:
Precision@threshold=0.5: 0.83 (was 0.85 last week) ⚠
Recall@threshold=0.5: 0.76 (was 0.78 last week) ⚠
Alert if drop > 0.02
Drift is the most common cause of silent ML system degradation.
| Type | What Changes | Detection Method |
|---|---|---|
| Data (feature) drift | Input features distribution shifts | KS test, PSI, chi-squared |
| Concept drift | Relationship between features and target changes | Accuracy monitoring, residual analysis |
| Label drift | Ground truth distribution shifts | Label distribution tracking |
| Upstream drift | Source data changes (schema, quality) | Data validation, schema checks |
# Drift detection with PSI (Population Stability Index)
psi = sum((p_i - q_i) * log(p_i / q_i))
# p_i = proportion in serving data, q_i = proportion in training data
# PSI < 0.1: no drift
# PSI 0.1—0.25: moderate drift (investigate)
# PSI > 0.25: severe drift (retrain immediately)
Recommended panels: