Skip to main content
PATCH
/
v2
/
datasets
/
{dataset_id}
/
examples
Update existing examples in a dataset
curl --request PATCH \
  --url https://api.arize.com/v2/datasets/{dataset_id}/examples \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "examples": [
    {
      "id": "example_001",
      "question": "What is 2 * 2?"
    },
    {
      "id": "example_002",
      "question": "What is the square root of 64?",
      "answer": "8"
    },
    {
      "id": "example_003",
      "question": "If 9x = 36, what is x?",
      "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 update operation by ID matching

examples
object[]
required

Array of examples with 'id' field for matching and updating existing records

new_version
string

Name for the new version. If provided (non-empty), creates a new version with that name. If omitted or empty, updates the existing version in-place.

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