> ## Documentation Index
> Fetch the complete documentation index at: https://docs.veadk.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Evaluation datasets

Build a dataset from manual cases, a CSV or observability data. Edit items in Latest and publish a fixed release for experiments.

First select [an evaluation workspace](https://docs.veadk.xyz/productions/agentkit-cli/archives/0.57.4/en/commands/eval/workspace.md) and set `WORKSPACE_ID` to its ID. Use resource IDs and revisions returned in that workspace. For the complete example files and variable assignments, see [Run an evaluation and export its report](https://docs.veadk.xyz/productions/agentkit-cli/archives/0.57.4/en/workflows/evaluation.md).

The CSV example reads `cases.csv` in the current directory. For batch deletion, save an array of objects with `ItemId` and `ExpectedRevision` in `items-to-delete.json`. Use the current Latest item revision for each entry. The real-time import example requires access to an APMPlus workspace and its agent key.

## eval dataset create

Create a manual dataset and define its fields.

| Option | Description | Default |
| - | - | - |
| `--description <value>` | Resource or version description | — |
| `--fields <json\|@file\|->` | Ordered fields with Name, Type, boolean Required and optional Description. The default schema has required input:String, reference\_output:String and trajectory:ATIF | — |
| `--name <value>` | Resource name. Required. | — |
| `--tags <value...>` | Space-separated tags | — |
| `--workspace-id <value>` | Authorized evaluation workspace ID. Required. | — |

```bash theme={null}
agentkit eval dataset create --json --workspace-id "$WORKSPACE_ID" --name answers \
  --fields '[{"Name":"answer","Type":"String","Required":true}]'
```

## eval dataset item batch-create

Append cases to Latest. Use `Result.Version.Schema.Revision` from creation or `Result.Dataset.Version.Schema.Revision` from `dataset get`.

| Option | Description | Default |
| - | - | - |
| `--dataset-id <value>` | Dataset ID in the workspace. Required. | — |
| `--expected-schema-revision <value>` | Exact schema revision of Latest. Required. | — |
| `--items <json\|@file\|->` | Cases with Data arrays. Match each Key and Type to the schema and use native JSON values. Required. | — |
| `--workspace-id <value>` | Authorized evaluation workspace ID. Required. | — |

```bash theme={null}
agentkit eval dataset item batch-create --json --workspace-id "$WORKSPACE_ID" \
  --dataset-id "$DATASET_ID" --expected-schema-revision "$SCHEMA_REVISION" \
  --items '[{"Data":[{"Key":"answer","Type":"String","Value":"Paris"}]}]'
```

## eval dataset item batch-delete

Delete items from Latest. Supply each current item revision. A conflict rejects the entire batch.

> [!WARNING]
>
> A live deletion removes the selected resource or cases in the workspace. Verify the IDs and revisions before submitting.

| Option | Description | Default |
| - | - | - |
| `--dataset-id <value>` | Dataset ID in the workspace. Required. | — |
| `--items <json\|@file\|->` | Objects with ItemId and ExpectedRevision for each item. Required. | — |
| `--workspace-id <value>` | Authorized evaluation workspace ID. Required. | — |
| `-y, --yes` | Skip the deletion prompt. Required for unattended deletion, except during a supported dry run | false |

```bash theme={null}
agentkit eval dataset item batch-delete --json --workspace-id "$WORKSPACE_ID" \
  --dataset-id "$DATASET_ID" --items @items-to-delete.json --yes
```

## eval dataset create-from-data-backflow

Collect cases from traces or agent trajectories. Supply a UTC window for historical imports. The service manages the window for real-time collection.

> [!WARNING]
>
> Case data is transferred to the evaluation workspace. Confirm the data scope and access permissions first.

| Option | Description | Default |
| - | - | - |
| `--apm-agent-key <value>` | Agent key at the observability source | — |
| `--apm-workspace-id <value>` | APMPlus workspace ID | — |
| `--field-mappings <json\|@file\|->` | Ordered source and destination mappings. Set MaskingEnabled on each entry and use unique destination names | — |
| `--filter <json\|@file\|->` | Observability filter groups. Groups use OR and matchers within each group use AND | — |
| `--import-type <value>` | One-time historical import or continuous real-time collection `OneOff`, `Realtime` | — |
| `--max-item-count <number>` | Dataset capacity, from 1 to 1000 cases | — |
| `--sampling-rate <number>` | Required for real-time collection. Greater than 0 and at most 100. For historical imports omit or use 100 | — |
| `--source-type <value>` | Source type for the data or target `Trace`, `AgentTrajectory` | — |
| `--end-time <value>` | UTC RFC3339 end of a historical window, after the start. Omit for real-time collection | — |
| `--start-time <value>` | UTC RFC3339 start of a historical window. Omit for real-time collection | — |
| `--description <value>` | Resource or version description | — |
| `--name <value>` | Resource name. Required. | — |
| `--tags <value...>` | Space-separated tags | — |
| `--workspace-id <value>` | Authorized evaluation workspace ID. Required. | — |

```bash theme={null}
agentkit eval dataset create-from-data-backflow --json --workspace-id "$WORKSPACE_ID" \
  --name trace-samples --source-type Trace --import-type Realtime \
  --apm-workspace-id "$APM_WORKSPACE_ID" --apm-agent-key "$APM_AGENT_KEY" --sampling-rate 100 \
  --max-item-count 100 \
  --field-mappings '[{"SourceField":"span_id","TargetFieldName":"span_id","TargetType":"String","MaskingEnabled":false}]'
```

## eval dataset create-from-file

Create a dataset from a previously uploaded CSV file.

| Option | Description | Default |
| - | - | - |
| `--description <value>` | Resource or version description | — |
| `--file-key <value>` | Result.Key from the CSV upload | — |
| `--max-item-count <number>` | Dataset capacity, from 1 to 1000 cases | 1000 |
| `--name <value>` | Resource name. Required. | — |
| `--tags <value...>` | Space-separated tags | — |
| `--workspace-id <value>` | Authorized evaluation workspace ID. Required. | — |

```bash theme={null}
agentkit eval dataset create-from-file --json --workspace-id "$WORKSPACE_ID" \
  --name imported-answers --file-key "$FILE_KEY"
```

## eval dataset delete

Delete a dataset from the workspace.

> [!WARNING]
>
> A live deletion removes the selected resource or cases in the workspace. Verify the IDs and revisions before submitting.

| Option | Description | Default |
| - | - | - |
| `--dataset-id <value>` | Dataset ID in the workspace. Required. | — |
| `--workspace-id <value>` | Authorized evaluation workspace ID. Required. | — |
| `-y, --yes` | Skip the deletion prompt. Required for unattended deletion, except during a supported dry run | false |

```bash theme={null}
agentkit eval dataset delete --json --workspace-id "$WORKSPACE_ID" --dataset-id "$DATASET_ID" \
  --yes
```

## eval dataset get

Read the latest dataset or a fixed release, including its schema and revisions.

| Option | Description | Default |
| - | - | - |
| `--dataset-id <value>` | Dataset ID in the workspace. Required. | — |
| `--version-id <value>` | Release ID when reading a fixed version | — |
| `--version-type <value>` | Version type to read `Latest`, `Release` | — |
| `--workspace-id <value>` | Authorized evaluation workspace ID. Required. | — |

```bash theme={null}
agentkit eval dataset get --json --workspace-id "$WORKSPACE_ID" --dataset-id "$DATASET_ID" \
  --version-type Latest
```

## eval dataset item get

Read a case and its item revision.

| Option | Description | Default |
| - | - | - |
| `--dataset-id <value>` | Dataset ID in the workspace. Required. | — |
| `--expected-revision <value>` | Exact current content revision of Latest | — |
| `--item-id <value>` | ItemId returned by the case list. Required. | — |
| `--version-id <value>` | Release ID when reading a fixed version | — |
| `--version-type <value>` | Version type to read `Latest`, `Release` | — |
| `--workspace-id <value>` | Authorized evaluation workspace ID. Required. | — |

```bash theme={null}
agentkit eval dataset item get --json --workspace-id "$WORKSPACE_ID" \
  --dataset-id "$DATASET_ID" --item-id "$ITEM_ID" --version-type Latest
```

## eval dataset item list

Page through cases in a dataset version by keyword or status.

| Option | Description | Default |
| - | - | - |
| `--dataset-id <value>` | Dataset ID in the workspace. Required. | — |
| `--expected-revision <value>` | Exact current content revision of Latest | — |
| `--keyword <value>` | Keyword filter | — |
| `--page-number <number>` | One-based page number | 1 |
| `--page-size <number>` | Results per page from 1 to 100 | 10 |
| `--sort-by <value>` | Sort field. Supply the sort order as well `UpdatedAt`, `ItemId` | UpdatedAt |
| `--sort-order <value>` | Sort direction. Supply the sort field as well. By default order by UpdatedAt then ItemId, both descending `Asc`, `Desc` | Desc |
| `--status <value>` | Filter by exact status `Active`, `Reviewing`, `Conflict` | — |
| `--version-id <value>` | Release ID when reading a fixed version | — |
| `--version-type <value>` | Version type to read `Latest`, `Release` | — |
| `--workspace-id <value>` | Authorized evaluation workspace ID. Required. | — |

```bash theme={null}
agentkit eval dataset item list --json --workspace-id "$WORKSPACE_ID" \
  --dataset-id "$DATASET_ID" --version-type Latest
```

## eval dataset version list

List dataset versions and find release IDs to use in experiments.

| Option | Description | Default |
| - | - | - |
| `--dataset-id <value>` | Dataset ID in the workspace. Required. | — |
| `--page-number <number>` | One-based page number | 1 |
| `--page-size <number>` | Results per page from 1 to 100 | 10 |
| `--version-type <value>` | Version type to read `Latest`, `Release` | — |
| `--workspace-id <value>` | Authorized evaluation workspace ID. Required. | — |

```bash theme={null}
agentkit eval dataset version list --json --workspace-id "$WORKSPACE_ID" \
  --dataset-id "$DATASET_ID" --version-type Release
```

## eval dataset list

List ordinary datasets by name, tags or publication status.

| Option | Description | Default |
| - | - | - |
| `--has-data <boolean>` | Filter by whether Latest contains cases | — |
| `--keyword <value>` | Keyword filter | — |
| `--name <value>` | Case-insensitive name substring | — |
| `--publish-status <value>` | Publication status filter `Unpublished`, `Published` | — |
| `--tags <value...>` | Space-separated tags | — |
| `--page-number <number>` | One-based page number | 1 |
| `--page-size <number>` | Results per page from 1 to 100 | 10 |
| `--workspace-id <value>` | Authorized evaluation workspace ID. Required. | — |

```bash theme={null}
agentkit eval dataset list --json --workspace-id "$WORKSPACE_ID" --page-number 1
```

## eval dataset version publish

Check `CanPublish` and the item count on Latest, then publish its content revision. Keep the returned `Result.Version.VersionId`.

| Option | Description | Default |
| - | - | - |
| `--dataset-id <value>` | Dataset ID in the workspace. Required. | — |
| `--description <value>` | Resource or version description | — |
| `--expected-revision <value>` | Exact current content revision of Latest. Required. | — |
| `--version-name <value>` | Name of the published release. Required. | — |
| `--workspace-id <value>` | Authorized evaluation workspace ID. Required. | — |

```bash theme={null}
agentkit eval dataset version publish --json --workspace-id "$WORKSPACE_ID" \
  --dataset-id "$DATASET_ID" --expected-revision "$DATASET_REVISION" \
  --version-name answers-v1
```

## eval dataset file upload

Upload a local CSV file. Pass `Result.Key` to `dataset create-from-file`.

> [!WARNING]
>
> Case data is transferred to the evaluation workspace. Confirm the data scope and access permissions first.

| Option | Description | Default |
| - | - | - |
| `--file <path>` | Local CSV file, relative to the current directory or absolute. Required. | — |
| `--workspace-id <value>` | Authorized evaluation workspace ID. Required. | — |

```bash theme={null}
agentkit eval dataset file upload --json --workspace-id "$WORKSPACE_ID" --file ./cases.csv
```

For manual writes, the CLI marks the item source as `Manual` by default. The regular dataset list filters on `DataSet`. A backflow request sets `Mode=Condition` and the service defaults to `PipelineCreateMode=Recommended`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.