Skip to main content

Datasets are the foundation for experiment runs. The dataset helpers cover creation (which upserts by name), record inspection, example appends, and split management.

Create A Dataset#

id is optional. When you do provide it, give every example its own value: example IDs are unique per dataset, so reusing one across examples in the same dataset is an error. A stable, unique id is what createDataset() matches on when it upserts, and what you can hand to the split helpers below instead of the server-generated nodeId. Omit id and the server generates one for you.

Upsert Or Append#

createDataset() upserts by name: re-running it with the same name updates the existing dataset to match the examples you pass, and an unchanged upload is a no-op. To keep existing examples and add more, use appendDatasetExamples() instead of re-running createDataset() with the extra examples.

createDataset() returns { datasetId }, so you can pass that object directly as the dataset selector for append or experiment calls.

Read Back Dataset State#

Use getDataset, getDatasetExamples, and getDatasetInfo to inspect datasets after creation.

Manage Splits On An Existing Dataset#

Use createDatasetSplit, updateDatasetSplit, and deleteDatasetSplit to manage train, test, validation, or other named subsets after a dataset exists. Select the dataset by name or GlobalID. Example membership accepts either the user-provided id or Phoenix nodeId returned by getDatasetExamples.

Split names are unique across the Phoenix instance. Creating or renaming a split to an existing name fails with HTTP 409. These helpers require Phoenix server 19.20.0 or newer. Servers on 19.20.0 through 20.15.0 resolve membership by nodeId only — user-provided id values are accepted from the release that follows 20.15.0, so pass nodeId when you target an older server.