Overview
Online evaluation monitors production agents in real-time, automatically assessing quality, correctness, and performance without manual review. Unlike offline evaluation during development, online evals run continuously on live traffic.Why Online Evaluation?
Production agents face scenarios you can’t anticipate during development:- Distribution Shift: User queries differ from test data
- Edge Cases: Rare inputs that expose weaknesses
- Performance Degradation: Model updates or API changes affecting quality
- Cost Monitoring: Tracking token usage and latency at scale
Evaluation Architecture
Setting Up Online Evaluators
1. Define Evaluation Metrics
Identify what to measure based on your use case:2. Configure Automated Evaluation
Set up evaluators to run automatically on new traces:3. Sampling Strategies
For high-traffic systems, evaluate a sample of traces:Production Evaluation Patterns
Pattern 1: Real-Time Alerts
Trigger alerts when metrics fall below thresholds:Pattern 2: Comparative Evaluation
Compare current performance against historical baseline:Pattern 3: Category-Based Evaluation
Evaluate differently based on query category:Pattern 4: Human-in-the-Loop Validation
Flag uncertain cases for human review:Cost and Performance Monitoring
Tracking Token Usage
Monitoring Response Quality Over Time
Evaluation Best Practices
1
Start with Simple Metrics
Begin with basic evaluators (latency, error rate, output length) before implementing complex LLM-based judges.
2
Calibrate Thresholds
Use historical data to set realistic thresholds. Avoid alert fatigue from overly strict limits.
3
Combine Automated and Human Review
Use automated evals to filter, but maintain human review for borderline cases and continuous calibration.
4
Monitor Evaluator Performance
Regularly validate that your evaluators are working correctly. Track disagreement rates with human judgments.
5
Version Your Evaluators
Track changes to evaluation logic. When you update an evaluator, compare results against the previous version.
Common Pitfalls
Integration with Deployment
Pre-Deployment Validation
Before rolling out new agent versions:Continuous Deployment Pipeline
Next Steps
Production Overview
Review complete production deployment strategies
Trace Upload
Learn how to upload traces for evaluation