Skip to main content
Custom scoring lets you send evaluation results from your own code to LangWatch. This is useful when you have proprietary evaluation logic, domain-specific metrics, or want to integrate existing evaluation systems.
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
See also:

How It Works

With custom scoring, you:
  1. Run your own evaluation logic
  2. Send the results (score, passed, label, details) to LangWatch
  3. View results in traces, analytics, and dashboards

Sending Custom Scores

On a Trace/Span

Attach evaluation results to the current trace or span:

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

Next Steps

Built-in Evaluators

Saved Evaluators

Experiments

Evaluations Overview