Skip to main content

1. Install the SDK

2. Define a dataset

A Dataset holds your cases. Each case has an input and an optional expected answer. Set key explicitly on any dataset you’ll re-run — it’s what identifies the dataset, so you can rename it later without starting a new history.

3. Write a task

The task is the system under evaluation. It maps an input to an output, and it may be async.

4. Write a scorer

A scorer receives the case’s input, output, expected, and metadata, and returns a value. The metric takes the function’s name.

5. Run it

local=True runs the eval in full and reports nowhere, so you can try it without an API key.
Drop local and the run reports to TraceRoot, using the same credentials as the tracing SDK:
.env
candidate_version labels what you’re testing — a model id, a prompt version, or a git sha. It’s what the UI groups and compares runs by.

Next steps

Datasets

Author, version, and publish datasets.

Scorers

Code scorers and LLM-as-a-judge.

Running Evals

Every option of evaluate().

Reading Results

Per-metric summaries and per-case results.

Run the example

Clone the repo and run a complete tool-agent eval end-to-end.

Python

Run the Python example

TypeScript

Run the TypeScript example