How it works
- Your application sends traces to LangWatch through an SDK or OpenTelemetry.
- Each monitor checks its preconditions and its sampling rate against the incoming trace.
- The monitor runs its evaluator on the trace, or on the whole thread once the thread goes idle.
- The result lands on the trace and in the evaluations analytics, where an automation can pick it up.
When to use online evaluation
Monitors and guardrails
Create a monitor
- Open Online Evaluations and click New Online Evaluation.
- Pick an evaluator category and an evaluator, name it and map its inputs to the trace.
- Pick Trace Level or Thread Level, add preconditions and a sampling rate if you need them, and click Create Online Evaluation.
Add scores from your code
Your own code can record an evaluation result on the current span, next to the results of the monitors:- Python
- TypeScript