Overview
Guardian provides real-time monitoring for AI models in production. This guide covers setting up comprehensive monitoring for drift detection, performance tracking, and alerting.Quick Start
Integrating with Your Serving Code
Basic Integration
Async/Batch Integration (Recommended)
For production workloads, use async logging to minimize latency impact:Setting Up Drift Detection
Establishing Baseline
Guardian needs a baseline distribution to detect drift:Drift Metrics
| Metric | Description | Typical Threshold |
|---|---|---|
| PSI | Population Stability Index | Warning: 0.1, Critical: 0.2 |
| KL Divergence | Kullback-Leibler divergence | Warning: 0.1, Critical: 0.2 |
| JS Distance | Jensen-Shannon distance | Warning: 0.1, Critical: 0.15 |
| KS Statistic | Kolmogorov-Smirnov test | Warning: 0.05, Critical: 0.1 |
Configuring Alerts
Alert Channels
Alert Severity Levels
| Severity | Use Case | Response |
|---|---|---|
info | FYI notifications | Review when convenient |
warning | Potential issues | Investigate within 24h |
critical | Immediate attention | Page on-call engineer |
Viewing Metrics
Dashboard
Access the monitoring dashboard at:API
Handling Alerts
Acknowledging
Resolving
Best Practices
Start with key metrics
Start with key metrics
Begin with essential metrics:
prediction_drift- Catches distribution shiftslatency_p99- Performance degradationerror_rate- System health
Set appropriate thresholds
Set appropriate thresholds
- Start with conservative thresholds (more alerts)
- Tune based on false positive rate
- Different models may need different thresholds
Use async logging
Use async logging
Never block your serving path with synchronous logging. Use the AsyncLogger or batch endpoints.
Log ground truth when available
Log ground truth when available
If you can obtain ground truth labels later:

