Arize Dataset

Arize Dataset

Creates, lists, exports and appends examples to Arize datasets with the ax CLI, covering dataset versions, file-based creation and troubleshooting setup errors.

Skill files3 files

references/

SKILL.md377 lines
1
---
2
name: arize-dataset
3
description: Creates, manages, and queries Arize datasets and examples. Covers dataset CRUD, appending examples, exporting data, and file-based dataset creation using the ax CLI. Use when the user needs test data, evaluation examples, or mentions create dataset, list datasets, export dataset, append examples, dataset version, golden dataset, or test set.
4
metadata:
5
author: arize
6
version: "1.0"
7
compatibility: Requires the ax CLI and a configured Arize profile.
8
---
9
10
# Arize Dataset Skill
11
12
> **`SPACE`** — All `--space` flags and the `ARIZE_SPACE` env var accept a space **name** (e.g., `my-workspace`) or a base64 space **ID** (e.g., `U3BhY2U6...`). Find yours with `ax spaces list`.
13
14
## Concepts
15
16
- **Dataset** = a versioned collection of examples used for evaluation and experimentation
17
- **Dataset Version** = a snapshot of a dataset at a point in time; updates can be in-place or create a new version
18
- **Example** = a single record in a dataset with arbitrary user-defined fields (e.g., `question`, `answer`, `context`)
19
- **Space** = an organizational container; datasets belong to a space
20
21
System-managed fields on examples (`id`, `created_at`, `updated_at`) are auto-generated by the server -- never include them in create or append payloads.
22
23
## Prerequisites
24
25
Proceed directly with the task — run the `ax` command you need. Do NOT check versions, env vars, or profiles upfront.
26
27
If an `ax` command fails, troubleshoot based on the error:
28
- `command not found` or version error → see references/ax-setup.md
29
- `401 Unauthorized` / missing API key → run `ax profiles show` to inspect the current profile. If the profile is missing or the API key is wrong, follow references/ax-profiles.md to create/update it. If the user doesn't have their key, direct them to https://app.arize.com/admin > API Keys
30
- Space unknown → run `ax spaces list` to pick by name, or ask the user
31
- Project unclear → ask the user, or run `ax projects list -o json --limit 100` and present as selectable options
32
- **Security:** Never read `.env` files or search the filesystem for credentials. Use `ax profiles` for Arize credentials and `ax ai-integrations` for LLM provider keys. If credentials are not available through these channels, ask the user.
33
34
## List Datasets: `ax datasets list`
35
36
Browse datasets in a space. Output goes to stdout.
37
38
```bash
39
ax datasets list
40
ax datasets list --space SPACE --limit 20
41
ax datasets list --cursor CURSOR_TOKEN
42
ax datasets list -o json
43
```
44
45
### Flags
46
47
| Flag | Type | Default | Description |
48
|------|------|---------|-------------|
49
| `--space` | string | from profile | Filter by space |
50
| `--limit, -l` | int | 15 | Max results (1-100) |
51
| `--cursor` | string | none | Pagination cursor from previous response |
52
| `-o, --output` | string | table | Output format: table, json, csv, parquet, or file path |
53
| `-p, --profile` | string | default | Configuration profile |
54
55
## Get Dataset: `ax datasets get`
56
57
Quick metadata lookup -- returns dataset name, space, timestamps, and version list.
58
59
```bash
60
ax datasets get NAME_OR_ID
61
ax datasets get NAME_OR_ID -o json
62
ax datasets get NAME_OR_ID --space SPACE # required when using dataset name instead of ID
63
```
64
65
### Flags
66
67
| Flag | Type | Default | Description |
68
|------|------|---------|-------------|
69
| `NAME_OR_ID` | string | required | Dataset name or ID (positional) |
70
| `--space` | string | none | Space name or ID (required if using dataset name instead of ID) |
71
| `-o, --output` | string | table | Output format |
72
| `-p, --profile` | string | default | Configuration profile |
73
74
### Response fields
75
76
| Field | Type | Description |
77
|-------|------|-------------|
78
| `id` | string | Dataset ID |
79
| `name` | string | Dataset name |
80
| `space_id` | string | Space this dataset belongs to |
81
| `created_at` | datetime | When the dataset was created |
82
| `updated_at` | datetime | Last modification time |
83
| `versions` | array | List of dataset versions (id, name, dataset_id, created_at, updated_at) |
84
85
## Export Dataset: `ax datasets export`
86
87
Download all examples to a file. Use `--all` for datasets larger than 500 examples (unlimited bulk export).
88
89
```bash
90
ax datasets export NAME_OR_ID
91
# -> dataset_abc123_20260305_141500/examples.json
92
93
ax datasets export NAME_OR_ID --all
94
ax datasets export NAME_OR_ID --version-id VERSION_ID
95
ax datasets export NAME_OR_ID --output-dir ./data
96
ax datasets export NAME_OR_ID --stdout
97
ax datasets export NAME_OR_ID --stdout | jq '.[0]'
98
ax datasets export NAME_OR_ID --space SPACE # required when using dataset name instead of ID
99
```
100
101
### Flags
102
103
| Flag | Type | Default | Description |
104
|------|------|---------|-------------|
105
| `NAME_OR_ID` | string | required | Dataset name or ID (positional) |
106
| `--space` | string | none | Space name or ID (required if using dataset name instead of ID) |
107
| `--version-id` | string | latest | Export a specific dataset version |
108
| `--all` | bool | false | Unlimited bulk export (use for datasets > 500 examples) |
109
| `--output-dir` | string | `.` | Output directory |
110
| `--stdout` | bool | false | Print JSON to stdout instead of file |
111
| `-p, --profile` | string | default | Configuration profile |
112
113
**Agent auto-escalation rule:** If an export returns exactly 500 examples, the result is likely truncated — re-run with `--all` to get the full dataset.
114
115
**Export completeness verification:** After exporting, confirm the row count matches what the server reports:
116
```bash
117
# Get the server-reported count from dataset metadata
118
ax datasets get DATASET_NAME --space SPACE -o json | jq '.versions[-1] | {version: .id, examples: .example_count}'
119
120
# Compare to what was exported
121
jq 'length' dataset_*/examples.json
122
123
# If counts differ, re-export with --all
124
```
125
126
Output is a JSON array of example objects. Each example has system fields (`id`, `created_at`, `updated_at`) plus all user-defined fields:
127
128
```json
129
[
130
{
131
"id": "ex_001",
132
"created_at": "2026-01-15T10:00:00Z",
133
"updated_at": "2026-01-15T10:00:00Z",
134
"question": "What is 2+2?",
135
"answer": "4",
136
"topic": "math"
137
}
138
]
139
```
140
141
## Create Dataset: `ax datasets create`
142
143
Create a new dataset from a data file.
144
145
```bash
146
ax datasets create --name "My Dataset" --space SPACE --file data.csv
147
ax datasets create --name "My Dataset" --space SPACE --file data.json
148
ax datasets create --name "My Dataset" --space SPACE --file data.jsonl
149
ax datasets create --name "My Dataset" --space SPACE --file data.parquet
150
```
151
152
### Flags
153
154
| Flag | Type | Required | Description |
155
|------|------|----------|-------------|
156
| `--name, -n` | string | yes | Dataset name |
157
| `--space` | string | yes | Space to create the dataset in |
158
| `--file, -f` | path | yes | Data file: CSV, JSON, JSONL, or Parquet |
159
| `-o, --output` | string | no | Output format for the returned dataset metadata |
160
| `-p, --profile` | string | no | Configuration profile |
161
162
### Passing data via stdin
163
164
Use `--file -` to pipe data directly — no temp file needed:
165
166
```bash
167
echo '[{"question": "What is 2+2?", "answer": "4"}]' | ax datasets create --name "my-dataset" --space SPACE --file -
168
169
# Or with a heredoc
170
ax datasets create --name "my-dataset" --space SPACE --file - << 'EOF'
171
[{"question": "What is 2+2?", "answer": "4"}]
172
EOF
173
```
174
175
To add rows to an existing dataset, use `ax datasets append --json '[...]'` instead — no file needed.
176
177
### Supported file formats
178
179
| Format | Extension | Notes |
180
|--------|-----------|-------|
181
| CSV | `.csv` | Column headers become field names |
182
| JSON | `.json` | Array of objects |
183
| JSON Lines | `.jsonl` | One object per line (NOT a JSON array) |
184
| Parquet | `.parquet` | Column names become field names; preserves types |
185
186
**Format gotchas:**
187
- **CSV**: Loses type information — dates become strings, `null` becomes empty string. Use JSON/Parquet to preserve types.
188
- **JSONL**: Each line is a separate JSON object. A JSON array (`[{...}, {...}]`) in a `.jsonl` file will fail — use `.json` extension instead.
189
- **Parquet**: Preserves column types. Requires `pandas`/`pyarrow` to read locally: `pd.read_parquet("examples.parquet")`.
190
191
## Append Examples: `ax datasets append`
192
193
Add examples to an existing dataset. Two input modes -- use whichever fits.
194
195
### Inline JSON (agent-friendly)
196
197
Generate the payload directly -- no temp files needed:
198
199
```bash
200
ax datasets append DATASET_NAME --space SPACE --json '[{"question": "What is 2+2?", "answer": "4"}]'
201
202
ax datasets append DATASET_NAME --space SPACE --json '[
203
{"question": "What is gravity?", "answer": "A fundamental force..."},
204
{"question": "What is light?", "answer": "Electromagnetic radiation..."}
205
]'
206
```
207
208
### From a file
209
210
```bash
211
ax datasets append DATASET_NAME --space SPACE --file new_examples.csv
212
ax datasets append DATASET_NAME --space SPACE --file additions.json
213
```
214
215
### To a specific version
216
217
```bash
218
ax datasets append DATASET_NAME --space SPACE --json '[{"q": "..."}]' --version-id VERSION_ID
219
```
220
221
### Flags
222
223
| Flag | Type | Required | Description |
224
|------|------|----------|-------------|
225
| `NAME_OR_ID` | string | yes | Dataset name or ID (positional); add `--space` when using name |
226
| `--space` | string | no | Space name or ID (required if using dataset name instead of ID) |
227
| `--json` | string | mutex | JSON array of example objects |
228
| `--file, -f` | path | mutex | Data file (CSV, JSON, JSONL, Parquet) |
229
| `--version-id` | string | no | Append to a specific version (default: latest) |
230
| `-o, --output` | string | no | Output format for the returned dataset metadata |
231
| `-p, --profile` | string | no | Configuration profile |
232
233
Exactly one of `--json` or `--file` is required.
234
235
### Validation
236
237
- Each example must be a JSON object with at least one user-defined field
238
- Maximum 100,000 examples per request
239
240
**Schema validation before append:** If the dataset already has examples, inspect its schema before appending to avoid silent field mismatches:
241
242
```bash
243
# Check existing field names in the dataset
244
ax datasets export DATASET_NAME --space SPACE --stdout | jq '.[0] | keys'
245
246
# Verify your new data has matching field names
247
echo '[{"question": "..."}]' | jq '.[0] | keys'
248
249
# Both outputs should show the same user-defined fields
250
```
251
252
Fields are free-form: extra fields in new examples are added, and missing fields become null. However, typos in field names (e.g., `queston` vs `question`) create new columns silently -- verify spelling before appending.
253
254
## Delete Dataset: `ax datasets delete`
255
256
```bash
257
ax datasets delete NAME_OR_ID
258
ax datasets delete NAME_OR_ID --space SPACE # required when using dataset name instead of ID
259
ax datasets delete NAME_OR_ID --force # skip confirmation prompt
260
```
261
262
### Flags
263
264
| Flag | Type | Default | Description |
265
|------|------|---------|-------------|
266
| `NAME_OR_ID` | string | required | Dataset name or ID (positional) |
267
| `--space` | string | none | Space name or ID (required if using dataset name instead of ID) |
268
| `--force, -f` | bool | false | Skip confirmation prompt |
269
| `-p, --profile` | string | default | Configuration profile |
270
271
## Workflows
272
273
### Find a dataset by name
274
275
All dataset commands accept a name or ID directly. You can pass a dataset name as the positional argument (add `--space SPACE` when not using an ID):
276
277
```bash
278
# Use name directly
279
ax datasets get "eval-set-v1" --space SPACE
280
ax datasets export "eval-set-v1" --space SPACE
281
282
# Or resolve name to ID via list if you need the base64 ID
283
ax datasets list -o json | jq '.[] | select(.name == "eval-set-v1") | .id'
284
```
285
286
### Create a dataset from file for evaluation
287
288
1. Prepare a CSV/JSON/Parquet file with your evaluation columns (e.g., `input`, `expected_output`)
289
- If generating data inline, pipe it via stdin using `--file -` (see the Create Dataset section)
290
2. `ax datasets create --name "eval-set-v1" --space SPACE --file eval_data.csv`
291
3. Verify: `ax datasets get DATASET_NAME --space SPACE`
292
4. Use the dataset name to run experiments
293
294
### Add examples to an existing dataset
295
296
```bash
297
# Find the dataset
298
ax datasets list --space SPACE
299
300
# Append inline or from a file using the dataset name (see Append Examples section for full syntax)
301
ax datasets append DATASET_NAME --space SPACE --json '[{"question": "...", "answer": "..."}]'
302
ax datasets append DATASET_NAME --space SPACE --file additional_examples.csv
303
```
304
305
### Download dataset for offline analysis
306
307
1. `ax datasets list --space SPACE` -- find the dataset name
308
2. `ax datasets export DATASET_NAME --space SPACE` -- download to file
309
3. Parse the JSON: `jq '.[] | .question' dataset_*/examples.json`
310
311
### Export a specific version
312
313
```bash
314
# List versions
315
ax datasets get DATASET_NAME --space SPACE -o json | jq '.versions'
316
317
# Export that version
318
ax datasets export DATASET_NAME --space SPACE --version-id VERSION_ID
319
```
320
321
### Iterate on a dataset
322
323
1. Export current version: `ax datasets export DATASET_NAME --space SPACE`
324
2. Modify the examples locally
325
3. Append new rows: `ax datasets append DATASET_NAME --space SPACE --file new_rows.csv`
326
4. Or create a fresh version: `ax datasets create --name "eval-set-v2" --space SPACE --file updated_data.json`
327
328
### Pipe export to other tools
329
330
```bash
331
# Count examples
332
ax datasets export DATASET_NAME --space SPACE --stdout | jq 'length'
333
334
# Extract a single field
335
ax datasets export DATASET_NAME --space SPACE --stdout | jq '.[].question'
336
337
# Convert to CSV with jq
338
ax datasets export DATASET_NAME --space SPACE --stdout | jq -r '.[] | [.question, .answer] | @csv'
339
```
340
341
## Dataset Example Schema
342
343
Examples are free-form JSON objects. There is no fixed schema -- columns are whatever fields you provide. System-managed fields are added by the server:
344
345
| Field | Type | Managed by | Notes |
346
|-------|------|-----------|-------|
347
| `id` | string | server | Auto-generated UUID. Required on update, forbidden on create/append |
348
| `created_at` | datetime | server | Immutable creation timestamp |
349
| `updated_at` | datetime | server | Auto-updated on modification |
350
| *(any user field)* | any JSON type | user | String, number, boolean, null, nested object, array |
351
352
353
## Related Skills
354
355
- **arize-trace**: Export production spans to understand what data to put in datasets → use `arize-trace`
356
- **arize-experiment**: Run evaluations against this dataset → next step is `arize-experiment`
357
- **arize-prompt-optimization**: Use dataset + experiment results to improve prompts → use `arize-prompt-optimization`
358
359
## Troubleshooting
360
361
| Problem | Solution |
362
|---------|----------|
363
| `ax: command not found` | See references/ax-setup.md |
364
| `401 Unauthorized` | API key is wrong, expired, or doesn't have access to this space. Fix the profile using references/ax-profiles.md. |
365
| `No profile found` | No profile is configured. See references/ax-profiles.md to create one. |
366
| `Dataset not found` | Verify dataset ID with `ax datasets list` |
367
| `File format error` | Supported: CSV, JSON, JSONL, Parquet. Use `--file -` to read from stdin. |
368
| `platform-managed column` | Remove `id`, `created_at`, `updated_at` from create/append payloads |
369
| `reserved column` | Remove `time`, `count`, or any `source_record_*` field |
370
| `Provide either --json or --file` | Append requires exactly one input source |
371
| `Examples array is empty` | Ensure your JSON array or file contains at least one example |
372
| `not a JSON object` | Each element in the `--json` array must be a `{...}` object, not a string or number |
373
374
## Save Credentials for Future Use
375
376
See references/ax-profiles.md § Save Credentials for Future Use.
377

© arize · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 11,971 prompts

More by @OpenSourceBuffGuy

See all
Paris Shopfront Editorial Portrait prompt image

Paris Shopfront Editorial Portrait

Generates a moody film-scanned editorial portrait of a young woman in an oversized leather coat outside a vintage Paris wine shop at dusk.

image-prompt, nano-banana, negative-prompt, portrait, woman, medium-shot, editorial, fashion, film-grain, muted-colors, cinematic, photorealistic, vertical-format, text-rendering, soft-lighting, moody, bokeh, cityscape

Pastel autumn outfit lookbook with handwritten annotations prompt image

Pastel autumn outfit lookbook with handwritten annotations

Creates a pastel e-commerce fashion lookbook poster of a model in a simple autumn outfit, with handwritten labels, arrows and a bold headline.

image-prompt, fashion, fashion-shoot, poster, text-rendering, pastel, autumn, full-body, woman, minimalist, negative-space, vertical-format, gpt-image, product-photography, social-media-graphic, photorealistic, for-online-sellers, for-designers, portrait, editorial, whimsical, cozy, studio-lighting

Premium food photography template prompt image

Premium food photography template

Creates a steaming, glossy spicy Sichuan-style dish photo in a dark bowl with chilies and restaurant props, with the food and ratio left to fill in.

image-prompt, gpt-image, food-photography, photorealistic, cinematic, moody, dramatic-lighting, bokeh, close-up, high-angle, square-format, placeholders, template, negative-prompt, cooking, restaurants, product-photography, for-photographers, for-small-business-owners, for-online-sellers, advertising

Reviews

Loading reviews…

Discussion

Loading comments…