Skip to main content
POST
/
v2
/
datasets
/
{dataset_id}
/
examples
Add new examples to a dataset
curl --request POST \
  --url https://api.arize.com/v2/datasets/{dataset_id}/examples \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "examples": [
    {
      "question": "What is 2 + 2?",
      "answer": "4",
      "topic": "arithmetic"
    },
    {
      "question": "What is the square root of 16?",
      "answer": "4",
      "topic": "geometry"
    },
    {
      "question": "If 3x = 12, what is x?",
      "answer": "4",
      "topic": "algebra"
    }
  ]
}
'
{
  "id": "<string>",
  "name": "<string>",
  "space_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "versions": [
    {
      "id": "<string>",
      "name": "<string>",
      "dataset_id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Most Arize AI endpoints require authentication. For those endpoints that require authentication, include your API key in the request header using the format

Authorization: Bearer <api-key>

Path Parameters

dataset_id
string
required

The unique identifier of the dataset A universally unique identifier

Query Parameters

dataset_version_id
string

The unique identifier of the dataset version A universally unique identifier

Body

application/json

Body containing dataset examples for insert (append) operation with auto-generated IDs

examples
object[]
required

Array of examples to append to the dataset version

Response

A dataset object

A dataset is a structured collection of examples used to test and evaluate LLM applications. Datasets allow you to test models consistently across any real-world scenarios and edge cases, quickly identify regressions, and track measurable improvements.

id
string
required

Unique identifier for the dataset

name
string
required

Name of the dataset

space_id
string
required

Unique identifier for the space this dataset belongs to

created_at
string<date-time>
required

Timestamp for when the dataset was created

updated_at
string<date-time>
required

Timestamp for the last update of the dataset

versions
object[]

List of versions associated with this dataset