For the complete documentation index, see llms.txt. This page is also available as Markdown.

evals_datasets_create

Create a collection of test cases for evaluating a project.

Effect: This call saves data or changes configuration. Review the behavior below before using it.

Inputs

Name
Type
Requirement
Description

project_id

string

Required

ID returned by projects_list; use a project in the active organization.

name

string

Required

Resource name.

node_contract

object

Required

Required input/output mapping: input_kind, nonempty input_keys, and nonempty output_node_ids. See the shape below.

description

string

Optional

Description of the resource or requested change.

rows

array of rows

Optional

At most 100 rows per call. Each has an inputs object and optional expected_output object and source_run_id UUID. Omit to create the dataset without rows.

node_contract has input_kind (start_node or legacy_input_nodes), input_keys (nonempty string array), and output_node_ids (nonempty string array). Copy keys from the project. A Start node uses its field keys; legacy inputs use node IDs.

Each row contains inputs (object), optional expected_output (object), and optional source_run_id (UUID string). Row input keys must match the dataset contract.

Example

These are MCP tool arguments, not an HTTP request body. Replace bracketed IDs with values returned from your account.

This example assumes a Start input named question and an output named out-0. Replace them with the project’s actual keys. The regular-expression rule, where used, checks only that the output contains non-whitespace text.

{
  "project_id": "<project-id>",
  "name": "Response review",
  "node_contract": {
    "input_kind": "start_node",
    "input_keys": [
      "question"
    ],
    "output_node_ids": [
      "out-0"
    ]
  }
}

Result

Abbreviated result example; unshown fields are omitted for clarity.

Behavior

Optional rows are validated before creation.

If row insertion fails, the error contains dataset_id and dataset_created=true: inspect all existing rows before repairing.

Do not repeat dataset creation or blindly retry rows.

Troubleshooting

If the error says dataset_created=true, keep dataset_id. Read all row pages before adding missing rows; do not create the dataset again.

Evaluations and monitoring

Evaluate a project before rollout

Connection, permissions, pagination, and recovery

Was this helpful?