createEval

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.

Arguments

  • projectReferenceString!required

  • inputCreateEvalInput!required

  • input.nameString!required

    The eval id is derived from the name.

  • input.descriptionString

  • input.targetString!required

    The identifier of the agent the eval runs against.

  • input.datasetEvalDatasetInput!required

  • input.metrics[EvalMetricInput!]

    Default none.

  • input.repetitionsInt

    How often each example runs; default 1.

  • input.tags[String!]

  • input.metadataJSONObject

  • input.sourceTargetKindWriteTargetKind

    The source to write; default project. One of project, preview_branch.

  • input.targetBranchIdID

    Required with the kind preview_branch.

Responses

mutation CreateEval($projectReference: String!, $input: CreateEvalInput!) {  createEval(projectReference: $projectReference, input: $input) {    id    name    description    targetKind    target    sourcePath    exportName    source    dataset {      kind      path      editable      dynamic    }    metrics {      name      family      severity      config      editable      dynamic    }    repetitions    tags    metadata    editableFields    dynamicFields    capabilities    editMode    sourceOnlyReasons  }}
{  "data": {    "createEval": {      "id": "string",      "name": "string",      "description": "string",      "targetKind": "agent",      "target": "string",      "sourcePath": "string",      "exportName": "string",      "source": "string",      "dataset": {        "kind": "inline",        "path": "string",        "editable": false,        "dynamic": false      },      "metrics": [        {          "name": "string",          "family": "answer",          "severity": "gate",          "config": {},          "editable": false,          "dynamic": false        }      ],      "repetitions": 0,      "tags": [        "string"      ],      "metadata": {},      "editableFields": [        "name"      ],      "dynamicFields": [        "name"      ],      "capabilities": [        "string"      ],      "editMode": "structured",      "sourceOnlyReasons": [        "string"      ]    }  }}

The EvalSource! in data.createEval.