In the LangWatch platform, online evaluation is implemented through Monitors - automated rules that score incoming traces based on evaluators you configure.
How It Works
- Your application sends traces to LangWatch (via SDK integration)
- Monitors evaluate incoming traces using your configured evaluators
- Scores are recorded and displayed on dashboards
- Optionally trigger alerts when scores drop below thresholds
When to Use Online Evaluation
Monitors vs Guardrails
Both use evaluators, but serve different purposes:
If you need to block harmful content before it reaches users, see Guardrails.
Getting Started
Set Up Monitors
Evaluation by Thread
Quick Setup
1. Ensure traces are being sent
First, make sure your application is sending traces to LangWatch:- Python
- TypeScript
2. Create a Monitor
- Go to Online Evaluations in LangWatch
- Click New Online Evaluation
- Select Real-time evaluation (this creates a Monitor)
- Choose “When a message arrives” as the trigger
- Select evaluators (e.g., PII Detection, Faithfulness)
- Configure any filters (optional)
- Enable monitoring
3. View Results
Once enabled, scores will appear on:- Traces - Individual trace scores visible in trace details
- Analytics - Aggregate metrics over time
- Alerts - Configure automations for low scores
Adding Scores via Code
You can also add scores programmatically during request processing:- Python
- TypeScript
Available Evaluators
Monitors can use any evaluator from the LangWatch library:- Quality: Faithfulness, Answer Relevancy, Coherence
- Safety: PII Detection, Jailbreak Detection, Content Moderation
- RAG: Context Precision, Context Recall, Groundedness
- Custom: LLM-as-Judge with your own criteria