Evals

How an eval works

Levels, steps, routes and endings, the states a result can be in, versions and production, when traffic is scored, and what evals read from your traces.

An eval is a small graph at one level of your traffic. A trace enters at the top, each step answers one typed question, the answer picks a route, and the walk stops at a named pass or fail. This page explains each of those parts once.

Levels

Every eval scores one level, chosen when you create it and fixed after that.

Run

One execution of your agent: the question it got, the answer it gave, and every span inside.

Did it answer the question? Did it invent numbers? Was it too slow?

Span

One step inside a run: a model call, a tool call, a retrieval.

Did this SQL call succeed? Were the tool arguments valid? Was the completion cut off?

Conversation

A whole thread: every run that shares a conversation id, scored again as it grows.

Did the user get what they came for? Did they have to repeat themselves?

An eval reads upward, never sideways. A span eval sees its span, the run it belongs to, and a summary of the run's conversation. A run eval sees the run, all of its spans, and its conversation. A conversation eval sees every run in the thread and their spans. Something a level can't see is not offered in the editor, and reading it from Python raises an error that names it.

Steps and routes

Each step answers in a declared shape. You set the shape on the step's Output tab, under This step returns:

ShapeExampleRoutes
True / falseok = trueOne for True, one for False
Number, from a minimum to a maximumscore = 0.82 on 0 to 1Ranges: below 0.5, 0.5 to 0.8, 0.8 and up
One of a few optionscoverage = partialOne per option

A Human review step returns one of its options or a rating, a decision model one outcome per question, and a Score spans step one outcome per check. Their shapes follow from their settings.

Each route goes to a step on the canvas, + New pass verdict, + New fail verdict, or + Insert a step here…. Every step has an Otherwise for anything left. A route can never lead back to an earlier step, so every walk ends.

The steps a trace walked is its path, shown on every result as step names joined by arrows: Write tools → What the reply says → Combine.

Ranges

Ranges can't overlap: a value that fits two ranges could go two places, so the eval can't be saved until you fix it. Gaps are allowed: a value no range covers goes to Anything else. Click ≥ or > (and ≤ or <) to include or exclude an end; Add a range splits one.

Several outputs

A Python step or a judge can return more than one field, such as {"score": 0.7, "tone": "ok"}. Its routes are then conditions, and the first one that matches wins: score ≥ 0.8 → …, tone is one of rude, cold → …, otherwise → …. Put the specific conditions first.

Endings

A walk stops at an ending. Its panel has:

SettingWhat it does
NameShown on every result, trace view and chart. Name it for the outcome and the way there: Grounded (judged), Claimed a change that did not happen.
VerdictPass or Fail.
Reason codeFail only. A short UPPER_SNAKE tag, such as HALLUCINATION, that results are grouped, searched and alerted on by.
Display scoreOptional. A number from a step on every path to this ending, usually a judge's, shown beside the verdict: Fail · 0.31 · HALLUCINATION.

Four paths that all end at one ending called "Pass" tell you nothing afterwards. Give each way through its own ending, and the charts show how much each step is doing.

Result states

Every trace an eval scores gets a result:

StateMeaning
Pass / FailThe walk reached an ending. Only these count toward a pass rate.
WaitingThe walk reached a Human review step and is in the grading queue. Grading it finishes the walk.
ErroredA step could not run: Python raised, a judge's provider refused the call, a decision model had nothing to read. An errored result is never a pass or a fail, and it says which step failed and why. See errors.
SkippedThe walk started but was not scored, for example a spot check that reached a Human review step. It counts as neither.

Some traffic gets no result at all: traces the eval's filters don't match, traces outside its sample, a trace it already scored, and anything over your plan's limit. Those cost nothing.

Versions and production

Every change to what an eval does is a new version. Saving asks what changed and writes v2, v3, v4. A version is never edited after it is saved. One label, production, says which version scores new traffic, and moving it is its own step, so you can save, test and ship separately. Name, description, on or off and sampling change in place and are not versions. See Test, version, ship.

When traffic is scored

Only evals that are on score new traffic, each with its production version.

LevelScored
RunWhen the run finishes. A run closed with endRun is scored once its spans have stopped arriving for 10 seconds, and never later than 60 seconds after the end, so spans still on their way from other workers are included.
SpanAs each span is recorded.
Conversation15 seconds after the latest run in the thread, and again each time a new run joins. A thread that never goes quiet is still scored within 10 minutes. A conversation's verdict is always about the whole thread so far.

What evals read from your traces

There is nothing to install for evals: they read the traces your agent already sends. An eval can only check what a trace contains, so these fields matter:

FieldUsed bySet it with
Agent nameScoping an eval to one agentThe name you give wrapAgent
Run input and outputJudges, decision models, Python, transcriptsrun.setInput(...), run.setOutput(...)
Conversation idConversation evals, t.conversationconversationId on wrapAgent (Python: conversation_id)
Span kind and nameSpan evals, span filters, Spans variablesSet for you on framework calls; kind on manual spans
Span input and outputTool and retrieval evidenceSet for you, or span.setInput(...) / span.setOutput(...)
MetadataFilters (per customer, per plan), Pythonrun.setMetadata({...})
Status and errorsTool and model health checksSet for you; errors you throw are recorded
User feedbackEvals over what users dislikedFeedback

A few habits make evals sharper:

  • Set the output to the answer the user saw, not the whole message list.
  • Put your evidence in spans. A retrieval whose documents never reach a span can't be checked.
  • Use span kinds. tool, retrieval and llm let one eval cover every tool without naming each; the templates rely on them.
  • Report tool failures honestly. A tool that returns {"error": "..."} inside a successful span looks fine on dashboards. Throw, or set the span's error.
  • Send a conversation id for anything multi-turn, so an eval can ask whether the user got what they came for.

On this page