Evals
Evals grades the answers of agents, skills and models against datasets and criteria you define.
An evaluation is either a benchmark, run on demand, or a monitor, which grades a sample of live requests. Run a benchmark before and after a change to see whether the change helped.
Availability
- Evals appears only when your deployment has it turned on.
- Organization owners and admins can open it, and so can workspace admins for their own workspaces.
- Anyone else needs an admin to give them access.
- If you click Evals on the left rail and see “Evals isn’t available on this account”, ask an organization admin or a workspace admin.
Core concepts
The last column is the name the Evals API and CLI use, for when you read results from your own code.
| Term | Definition | In the API and CLI |
|---|---|---|
| Evaluation | A benchmark or a monitor. | Its ref.kind is benchmark or monitor. CLI commands that take either kind name it as benchmark:<id> or monitor:<id>. |
| Benchmark | An evaluation that runs one or more datasets when you ask, comparing models, skills or agents side by side. | benchmark. What it compares is its axes. |
| Monitor | An evaluation that grades a sample of real requests as they finish, with no run to start. | monitor. The CLI’s messages also call it a live evaluation. |
| Dataset | A named list of dataset tasks in a workspace. | dataset |
| Dataset task | One prompt for the agent, with optional input files it reads, an optional expected answer, and optional expected files that the agent being tested never sees. The app calls it a task. | item: the HTTP API and the CLI call a dataset task an item. |
| Dataset version | A saved state of a dataset. Your edits stay unsaved until you save a new version, and a run grades the latest saved version. | version |
| Criteria | The checks that grade each answer. Together they’re the rubric. A dataset’s criteria grade every dataset task, and a dataset task can add its own. Each criterion is one of the four kinds below; Criteria compares them. | criteria |
| LLM judge | A model reads the answer and your instructions, and gives a pass or fail or a score from 0 to 1. | llm_judge |
| Agent judge | An agent that can open files reads the answer and the dataset task’s files, and gives a pass or fail or a score. Only an agent judge or a Python check can grade a dataset task with expected files. | agent_judge |
| Python check | Code you write runs on the answer and returns a pass or fail, or a score from 0 to 1. | code_verifier |
| Exact match | No model: the answer equals the expected answer, contains or leaves out a given text, or the agent called a named tool. | exact_match |
| Run | One execution of a benchmark. It tries every dataset task once for each model, skill or agent compared, and again for each repeat you set with Runs per task. | run. Set repeats with --runs-per-task. |
| Attempt | One try at one dataset task within a run. | One task result in a cell |
| Cell | One pair of compared value and repeat. Two models with three repeats make six cells. | cell, named by its cellId |
| Trace session | The record of one agent session, from real work as well as runs: every model call, with its tokens, cost and errors. | A session in traces |
| Feedback and scorecards | What people said about an answer (any of a score, a yes or no and a comment), and the rubrics they fill in when they rate a skill’s answers. | feedback, scorecard |
| Workflow | A kind of work your people do, such as refund requests. When your admin turns workflows on, tasks are filed into them, so you can narrow evaluations and datasets to one kind of work. | An Evals workflow. Filter with --workflow in the CLI or workflowIds over HTTP. |
Run a benchmark
- Go to Evals > Datasets > New dataset. Give it a name, such as “Sales product questions”. To start from a file, add it under Import tasks. Click Create dataset.
- On the dataset, add dataset tasks with Add task, and the criteria that grade them. Then save a new version with Save as v2 (the number goes up each time), so runs see your edits. If there are unsaved edits, Create and run offers to save them first.
- Go to Evals > Evaluations, click New evaluation and choose Benchmark.
- Fill in the page from the top: a name; Compare (Models, Skills or Agents), the ones to compare and what stays the same for every answer; Dataset (click Add dataset and pick yours); and Pass mark.
- Click Create and run. The benchmark is saved, its first run starts with each task tried once, and it opens on Activity.
A new benchmark grades with the default judge model. Once it’s saved, you can change that in its Judge model row.
Results
A benchmark’s results are on its Activity tab: click a run for its score and how each task did, then click a task for each answer and how every criterion scored it, with one tab per cell. An agent’s or skill’s Evaluations tab lists every evaluation that grades it. Read results explains the Activity tab and a run’s scorecard.
To see how much scores vary from one attempt to the next, run again with Runs per task above 1: choose Run with options… in the benchmark’s menu, or click Run again on a run.
Best practices
- Use at least 20 real examples, from an agent’s Activity tab or past tasks. Fewer can’t separate a real improvement from chance.
- Write criteria that can be scored. “Cites a source file” can be scored and “Is good” can’t; Criteria shows how.
- Read the tasks that failed. The average alone hides what went wrong.
- Change one thing, then run the same benchmark again. If you change two things at once, such as the agent’s instructions and a skill, you won’t know which one made the difference.
- Rerun the benchmark whenever the instructions, skills or model change. That is how you find out whether the change helped.
Use Evals from your own code
Developers can read results over HTTP and build and run evaluations from the command line, with a task API key that can read evals. The Evals developer guide covers both, from a quickstart to the full API and CLI reference.
Next steps
- Dataset files: import tasks, expected answers and criteria from one file instead of adding them one at a time.
- Criteria: write the rubric, the things a good answer must do.
- Benchmarks and monitors: choose which kind of evaluation to create, and create it.
- Read results: find out what a finished run’s score means.
- Create an evaluation from a task: create an evaluation by describing it in a task.