text stringlengths 0 59.1k |
|---|
### Managing Datasets with the CLI |
Use the CLI to push local datasets to VoltOps or pull remote datasets locally: |
**Push a dataset:** |
```bash |
pnpm volt eval dataset push \ |
--name support-qa-v1 \ |
--file ./datasets/support-qa.json |
``` |
**Pull a dataset:** |
```bash |
pnpm volt eval dataset pull \ |
--name support-qa-v1 \ |
--version abc123 \ |
--output ./datasets/support-qa-v1.json |
``` |
**CLI dataset commands:** |
- `push` - Upload a local dataset file to VoltOps |
- `--name <datasetName>` (required) - Dataset name |
- `--file <datasetFile>` - Path to dataset JSON file |
- `pull` - Download a dataset version from VoltOps |
- `--name <datasetName>` - Dataset name (defaults to `VOLTAGENT_DATASET_NAME`) |
- `--id <datasetId>` - Dataset ID (overrides `--name`) |
- `--version <versionId>` - Version ID (defaults to latest) |
- `--output <filePath>` - Custom output file path |
- `--overwrite` - Overwrite existing file if present |
- `--page-size <size>` - Number of items to fetch per request |
## Configuration Reference |
### Required Fields |
#### `id` |
Unique identifier for the experiment. Used in logs, telemetry, and VoltOps run metadata. |
```ts |
id: "support-regression"; |
``` |
#### `dataset` |
Specifies the evaluation inputs. Three approaches: |
**Inline items:** |
```ts |
dataset: { |
items: [ |
{ id: "1", input: "hello", expected: "hello" }, |
{ id: "2", input: "goodbye", expected: "goodbye" }, |
]; |
} |
``` |
**Named dataset (pulled from VoltOps):** |
```ts |
dataset: { |
name: "support-qa-v1", |
versionId: "abc123", // optional - defaults to latest |
limit: 100, // optional - limit items processed |
} |
``` |
**Custom resolver:** |
```ts |
dataset: { |
name: "custom-source", |
resolve: async ({ limit, signal }) => { |
const items = await fetchFromAPI(limit, signal); |
return { |
items, |
total: items.length, |
dataset: { name: "custom-source", metadata: { source: "api" } }, |
}; |
}, |
} |
``` |
The resolver receives `{ limit?, signal? }` and returns an iterable, async iterable, or object with `{ items, total?, dataset? }`. |
#### `runner` |
Function that executes your agent/workflow for each dataset item. Receives a context object and returns output. |
**Context properties:** |
- `item` - Current dataset item (`{ id, input, expected?, label?, extra?, ... }`) |
- `index` - Zero-based position in the dataset |
- `total` - Total number of items (if known) |
- `signal` - AbortSignal for cancellation handling |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.