arize-dataset
Original:🇺🇸 English
Not Translated
INVOKE THIS SKILL when creating, managing, or querying Arize datasets and examples. Covers dataset CRUD, appending examples, exporting data, and file-based dataset creation using the ax CLI.
4installs
Sourcegithub/awesome-copilot
Added on
NPX Install
npx skill4agent add github/awesome-copilot arize-datasetSKILL.md Content
Arize Dataset Skill
Concepts
- Dataset = a versioned collection of examples used for evaluation and experimentation
- Dataset Version = a snapshot of a dataset at a point in time; updates can be in-place or create a new version
- Example = a single record in a dataset with arbitrary user-defined fields (e.g., ,
question,answer)context - Space = an organizational container; datasets belong to a space
System-managed fields on examples (, , ) are auto-generated by the server -- never include them in create or append payloads.
idcreated_atupdated_atPrerequisites
Proceed directly with the task — run the command you need. Do NOT check versions, env vars, or profiles upfront.
axIf an command fails, troubleshoot based on the error:
ax- or version error → see references/ax-setup.md
command not found - / missing API key → run
401 Unauthorizedto inspect the current profile. If the profile is missing or the API key is wrong: checkax profiles showfor.envand use it to create/update the profile via references/ax-profiles.md. IfARIZE_API_KEYhas no key either, ask the user for their Arize API key (https://app.arize.com/admin > API Keys).env - Space ID unknown → check for
.env, or runARIZE_SPACE_ID, or ask the userax spaces list -o json - Project unclear → check for
.env, or ask, or runARIZE_DEFAULT_PROJECTand present as selectable optionsax projects list -o json --limit 100
List Datasets: ax datasets list
ax datasets listBrowse datasets in a space. Output goes to stdout.
bash
ax datasets list
ax datasets list --space-id SPACE_ID --limit 20
ax datasets list --cursor CURSOR_TOKEN
ax datasets list -o jsonFlags
| Flag | Type | Default | Description |
|---|---|---|---|
| string | from profile | Filter by space |
| int | 15 | Max results (1-100) |
| string | none | Pagination cursor from previous response |
| string | table | Output format: table, json, csv, parquet, or file path |
| string | default | Configuration profile |
Get Dataset: ax datasets get
ax datasets getQuick metadata lookup -- returns dataset name, space, timestamps, and version list.
bash
ax datasets get DATASET_ID
ax datasets get DATASET_ID -o jsonFlags
| Flag | Type | Default | Description |
|---|---|---|---|
| string | required | Positional argument |
| string | table | Output format |
| string | default | Configuration profile |
Response fields
| Field | Type | Description |
|---|---|---|
| string | Dataset ID |
| string | Dataset name |
| string | Space this dataset belongs to |
| datetime | When the dataset was created |
| datetime | Last modification time |
| array | List of dataset versions (id, name, dataset_id, created_at, updated_at) |
Export Dataset: ax datasets export
ax datasets exportDownload all examples to a file. Use for datasets larger than 500 examples (unlimited bulk export).
--allbash
ax datasets export DATASET_ID
# -> dataset_abc123_20260305_141500/examples.json
ax datasets export DATASET_ID --all
ax datasets export DATASET_ID --version-id VERSION_ID
ax datasets export DATASET_ID --output-dir ./data
ax datasets export DATASET_ID --stdout
ax datasets export DATASET_ID --stdout | jq '.[0]'Flags
| Flag | Type | Default | Description |
|---|---|---|---|
| string | required | Positional argument |
| string | latest | Export a specific dataset version |
| bool | false | Unlimited bulk export (use for datasets > 500 examples) |
| string | | Output directory |
| bool | false | Print JSON to stdout instead of file |
| string | default | Configuration profile |
Agent auto-escalation rule: If an export returns exactly 500 examples, the result is likely truncated — re-run with to get the full dataset.
--allExport completeness verification: After exporting, confirm the row count matches what the server reports:
bash
# Get the server-reported count from dataset metadata
ax datasets get DATASET_ID -o json | jq '.versions[-1] | {version: .id, examples: .example_count}'
# Compare to what was exported
jq 'length' dataset_*/examples.json
# If counts differ, re-export with --allOutput is a JSON array of example objects. Each example has system fields (, , ) plus all user-defined fields:
idcreated_atupdated_atjson
[
{
"id": "ex_001",
"created_at": "2026-01-15T10:00:00Z",
"updated_at": "2026-01-15T10:00:00Z",
"question": "What is 2+2?",
"answer": "4",
"topic": "math"
}
]Create Dataset: ax datasets create
ax datasets createCreate a new dataset from a data file.
bash
ax datasets create --name "My Dataset" --space-id SPACE_ID --file data.csv
ax datasets create --name "My Dataset" --space-id SPACE_ID --file data.json
ax datasets create --name "My Dataset" --space-id SPACE_ID --file data.jsonl
ax datasets create --name "My Dataset" --space-id SPACE_ID --file data.parquetFlags
| Flag | Type | Required | Description |
|---|---|---|---|
| string | yes | Dataset name |
| string | yes | Space to create the dataset in |
| path | yes | Data file: CSV, JSON, JSONL, or Parquet |
| string | no | Output format for the returned dataset metadata |
| string | no | Configuration profile |
Passing data via stdin
Use to pipe data directly — no temp file needed:
--file -bash
echo '[{"question": "What is 2+2?", "answer": "4"}]' | ax datasets create --name "my-dataset" --space-id SPACE_ID --file -
# Or with a heredoc
ax datasets create --name "my-dataset" --space-id SPACE_ID --file - << 'EOF'
[{"question": "What is 2+2?", "answer": "4"}]
EOFTo add rows to an existing dataset, use instead — no file needed.
ax datasets append --json '[...]'Supported file formats
| Format | Extension | Notes |
|---|---|---|
| CSV | | Column headers become field names |
| JSON | | Array of objects |
| JSON Lines | | One object per line (NOT a JSON array) |
| Parquet | | Column names become field names; preserves types |
Format gotchas:
- CSV: Loses type information — dates become strings, becomes empty string. Use JSON/Parquet to preserve types.
null - JSONL: Each line is a separate JSON object. A JSON array () in a
[{...}, {...}]file will fail — use.jsonlextension instead..json - Parquet: Preserves column types. Requires /
pandasto read locally:pyarrow.pd.read_parquet("examples.parquet")
Append Examples: ax datasets append
ax datasets appendAdd examples to an existing dataset. Two input modes -- use whichever fits.
Inline JSON (agent-friendly)
Generate the payload directly -- no temp files needed:
bash
ax datasets append DATASET_ID --json '[{"question": "What is 2+2?", "answer": "4"}]'
ax datasets append DATASET_ID --json '[
{"question": "What is gravity?", "answer": "A fundamental force..."},
{"question": "What is light?", "answer": "Electromagnetic radiation..."}
]'From a file
bash
ax datasets append DATASET_ID --file new_examples.csv
ax datasets append DATASET_ID --file additions.jsonTo a specific version
bash
ax datasets append DATASET_ID --json '[{"q": "..."}]' --version-id VERSION_IDFlags
| Flag | Type | Required | Description |
|---|---|---|---|
| string | yes | Positional argument |
| string | mutex | JSON array of example objects |
| path | mutex | Data file (CSV, JSON, JSONL, Parquet) |
| string | no | Append to a specific version (default: latest) |
| string | no | Output format for the returned dataset metadata |
| string | no | Configuration profile |
Exactly one of or is required.
--json--fileValidation
- Each example must be a JSON object with at least one user-defined field
- Maximum 100,000 examples per request
Schema validation before append: If the dataset already has examples, inspect its schema before appending to avoid silent field mismatches:
bash
# Check existing field names in the dataset
ax datasets export DATASET_ID --stdout | jq '.[0] | keys'
# Verify your new data has matching field names
echo '[{"question": "..."}]' | jq '.[0] | keys'
# Both outputs should show the same user-defined fieldsFields are free-form: extra fields in new examples are added, and missing fields become null. However, typos in field names (e.g., vs ) create new columns silently -- verify spelling before appending.
questonquestionDelete Dataset: ax datasets delete
ax datasets deletebash
ax datasets delete DATASET_ID
ax datasets delete DATASET_ID --force # skip confirmation promptFlags
| Flag | Type | Default | Description |
|---|---|---|---|
| string | required | Positional argument |
| bool | false | Skip confirmation prompt |
| string | default | Configuration profile |
Workflows
Find a dataset by name
Users often refer to datasets by name rather than ID. Resolve a name to an ID before running other commands:
bash
# Find dataset ID by name
ax datasets list -o json | jq '.[] | select(.name == "eval-set-v1") | .id'
# If the list is paginated, fetch more
ax datasets list -o json --limit 100 | jq '.[] | select(.name | test("eval-set")) | {id, name}'Create a dataset from file for evaluation
- Prepare a CSV/JSON/Parquet file with your evaluation columns (e.g., ,
input)expected_output- If generating data inline, pipe it via stdin using (see the Create Dataset section)
--file -
- If generating data inline, pipe it via stdin using
ax datasets create --name "eval-set-v1" --space-id SPACE_ID --file eval_data.csv- Verify:
ax datasets get DATASET_ID - Use the dataset ID to run experiments
Add examples to an existing dataset
bash
# Find the dataset
ax datasets list
# Append inline or from a file (see Append Examples section for full syntax)
ax datasets append DATASET_ID --json '[{"question": "...", "answer": "..."}]'
ax datasets append DATASET_ID --file additional_examples.csvDownload dataset for offline analysis
- -- find the dataset
ax datasets list - -- download to file
ax datasets export DATASET_ID - Parse the JSON:
jq '.[] | .question' dataset_*/examples.json
Export a specific version
bash
# List versions
ax datasets get DATASET_ID -o json | jq '.versions'
# Export that version
ax datasets export DATASET_ID --version-id VERSION_IDIterate on a dataset
- Export current version:
ax datasets export DATASET_ID - Modify the examples locally
- Append new rows:
ax datasets append DATASET_ID --file new_rows.csv - Or create a fresh version:
ax datasets create --name "eval-set-v2" --space-id SPACE_ID --file updated_data.json
Pipe export to other tools
bash
# Count examples
ax datasets export DATASET_ID --stdout | jq 'length'
# Extract a single field
ax datasets export DATASET_ID --stdout | jq '.[].question'
# Convert to CSV with jq
ax datasets export DATASET_ID --stdout | jq -r '.[] | [.question, .answer] | @csv'Dataset Example Schema
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:
| Field | Type | Managed by | Notes |
|---|---|---|---|
| string | server | Auto-generated UUID. Required on update, forbidden on create/append |
| datetime | server | Immutable creation timestamp |
| datetime | server | Auto-updated on modification |
| (any user field) | any JSON type | user | String, number, boolean, null, nested object, array |
Related Skills
- arize-trace: Export production spans to understand what data to put in datasets → use
arize-trace - arize-experiment: Run evaluations against this dataset → next step is
arize-experiment - arize-prompt-optimization: Use dataset + experiment results to improve prompts → use
arize-prompt-optimization
Troubleshooting
| Problem | Solution |
|---|---|
| See references/ax-setup.md |
| API key is wrong, expired, or doesn't have access to this space. Fix the profile using references/ax-profiles.md. |
| No profile is configured. See references/ax-profiles.md to create one. |
| Verify dataset ID with |
| Supported: CSV, JSON, JSONL, Parquet. Use |
| Remove |
| Remove |
| Append requires exactly one input source |
| Ensure your JSON array or file contains at least one example |
| Each element in the |
Save Credentials for Future Use
See references/ax-profiles.md § Save Credentials for Future Use.