Skip to main content
The evaluations API has three layers: push (eval, score, batch_eval, external helpers), read (get_eval_breakdown), and define (@eval decorator for client-side evaluators). See the Evaluations guide for the conceptual model.

decimalai.eval()

Push a single eval score to a trace.
trace_id
str
required
The trace to attach the score to.
name
str
required
Metric name (e.g., "factual_accuracy", "relevance").
score
float
required
Score value between 0.0 and 1.0.
source
str
default:"custom"
Eval source identifier. Appears grouped in dashboard.
source_label
str
Human-readable display name (e.g., "My RAG Eval").
passed
bool
default:"score >= 0.5"
Binary pass/fail override.
reason
str
Human-readable explanation of the score.
category
str
default:"quality"
"quality" or "compatibility".

decimalai.score()

Shorthand for pushing a single eval score.

decimalai.get_eval_breakdown()

Get the full eval breakdown for a trace, grouped by source.

decimalai.batch_eval()

Apply an evaluator function across multiple traces.

External Integration Helpers

Import scores from third-party evaluation frameworks:

Custom Evaluators (@eval)

Define evaluators that run client-side before trace upload:
The @eval decorator also accepts category="llm_judge" (for judge-style scorers), sampling_rate (a 0.0–1.0 fraction of traces to evaluate), and version (a string tag for the evaluator definition). See the Evaluations guide for built-in evaluators and sampling configuration.

What’s next

Replay

Re-run traces after a manifest change and re-score them.

Datasets

Datasets filter on the eval verdict — keep traces become training data.