Create eval

http
POST /projects/{project_reference}/evals

Create an eval source file in the project source or a preview branch to test an agent against a dataset and metrics; returns the eval source document. Requires project.evals.write.

Parameters

NameInRequiredDescription
project_referencepathYesProject slug, UUID, or domain that identifies the project.
source_target_kindquerySource to use: project or preview_branch. Defaults to project.
target_branch_idqueryPreview branch to use when the target kind is preview_branch.

Request body

FieldTypeRequiredDescription
namestringYesHuman-readable eval name; the eval id is derived from it.
descriptionstringOptional short description of what the eval checks.
targetstringYesIdentifier of the agent the eval runs against.
datasetobjectYesThe examples the eval runs: inline examples or a dataset file.
metricsarrayThe metrics that score each example. Defaults to none.
repetitionsintegerHow often each example runs. Defaults to 1.
tagsarrayLabels for the eval. Defaults to none.
metadataobjectFree-form JSON object stored with the eval. Defaults to empty.

Responses

StatusDescription
201Created a structured evaluation source document in the selected source target.
400Bad request
401Unauthorized
403Forbidden
409Conflict
500Server error
503internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.