evaluate, before a change ships), push (eval, score, batch_eval, external helpers), read (get_eval_breakdown), and define (the @eval decorator). See the Evaluations guide for when to use which.
decimalai.evaluate()
Run each case through an agent once, run the checks on each run’s trace, and report. 5. Measure it is a walkthrough.
Returns an
EvalReport:
Each case is an evaluation run: traced with the checks’ results attached, and kept out of the agent’s own numbers. A check that returns
None skips that case; one that raises is reported as an error on it. Sampling (@eval(sampling_rate=...)) is ignored: every check runs on every case.
Raises decimalai.EvaluationNotApplied when no case could run on the setup asked for (an unknown prompt version or skill name, no API key, a DecimalAI backend from before evaluation runs); a single case that could not is reported on that case. Raises RuntimeError inside a running event loop: there, await decimalai.evaluate_async(...), which takes the same arguments.
To run a single run on another setup, without a set of cases, use support.override(prompt_version=..., exclude_skills=...) around Runner.run (OpenAI Agents SDK), or support.run(message, prompt_version=..., exclude_skills=...) on decimalai.agent_config(). See the Evaluations guide.
decimalai.eval()
Push a single eval score to a trace.
str
required
The trace to attach the score to.
str
required
Metric name (e.g.,
"factual_accuracy", "relevance").float
required
Score value between 0.0 and 1.0.
str
default:"custom"
Eval source identifier. Appears grouped in dashboard.
str
Human-readable display name (e.g.,
"My RAG Eval").bool
default:"score >= 0.5"
Binary pass/fail override.
str
Human-readable explanation of the score.
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 @eval evaluators across a list of traces.
trace.output is the trace’s whole final answer, up to 20,000 characters, for traces the OpenAI Agents SDK integration sent; other traces carry its first 200 characters.
External Integration Helpers
Import scores from third-party evaluation frameworks:- DeepEval
- LangSmith
- Custom Scores
Custom Evaluators (@eval)
Define evaluators that run client-side before trace upload:
@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). A check may also return None when a trace isn’t its concern: no score is recorded. The same checks are what decimalai.evaluate() takes. 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.