When to use Custom Scoring:
- You have your own evaluation logic (deterministic or ML-based)
- You’re integrating an existing evaluation system
- You need domain-specific metrics that aren’t covered by built-in evaluators
- You want to track any custom metric alongside your traces
- Built-in Evaluators - Use LangWatch’s ready-made evaluators
- Saved Evaluators - Reuse configured evaluators across your project
How It Works
With custom scoring, you:- Run your own evaluation logic
- Send the results (score, passed, label, details) to LangWatch
- View results in traces, analytics, and dashboards
Sending Custom Scores
On a Trace/Span
Attach evaluation results to the current trace or span:- Python
- TypeScript
- REST API
In Experiments
Log custom scores during batch evaluation:Evaluation Result Fields
At least one of
passed, score, or label should be provided for meaningful results.Example Use Cases
Code Quality Check
Semantic Similarity
Business Rule Validation
Combining with Built-in Evaluators
You can use custom scoring alongside built-in evaluators:Viewing Custom Scores
Custom scores appear in:- Trace Details - Under the Evaluations section
- Analytics Dashboard - Filterable by evaluation name
- Experiments - In the results table alongside other evaluators