Skip to main content
For the complete documentation index for agents and LLMs, see llms.txt.

Import and Export a DatasetBeta

Beta
This is coming — this page describes a feature that's still being rolled out and may not be available to you yet.

To reuse test cases you built in one workspace, export the Dataset as a ZIP archive and import it into another workspace. For example, you can check a pipeline in a staging workspace with the same conversations you collected in production.


About This Task​

An export contains the Dataset and every conversation its test cases replay. The archive leaves out who ran each conversation, API keys, feedback, and pipeline logs.

Table-based test cases have no conversation. The archive carries their rows instead: each row's inputs and expected data. For background, see Table-Based Test Cases.

When you import an archive, the platform stores the conversations with the new Dataset. You can replay them in the workspace they were imported into, even though the conversations don't appear in search history.

The pipelines that test cases were recorded on often belong to another workspace or no longer exist. So an archive is imported as it is: its test cases belong to no pipeline, and each one runs on whichever pipeline version an Experiment picks.

Export a Dataset​

  1. Open the Datasets list in Evaluation, and click the Dataset you want to export.
  2. Click Export. The export starts. When it finishes, your browser downloads the archive as <dataset-name>-<date>.zip, and a confirmation says that the download has started.
  3. If a warning appears, read which test cases it names. The export leaves out test cases whose conversations are no longer complete in search history. To include them, fix the cause or remove them from the Dataset, and export again.

The Export button isn't available for a Dataset that has no test cases.

If the export fails, a notification says The Dataset could not be exported. Try again.

Import a Dataset​

Before you start, make sure you have the exported .zip archive. You don't need to choose a pipeline.

  1. Open the Datasets list in Evaluation. A pipeline's Datasets tab lists every Dataset in the workspace, so you can also start there.
  2. Click Import. The button is next to New Dataset. If the list is empty, it's also in the empty state.
  3. In Archive, drop the exported .zip file or click to choose it.
  4. Optional: In Name (optional), type a name for the new Dataset. If you leave it empty, the Dataset keeps the name from the archive.
  5. Click Import. When the import finishes, a confirmation appears and the new Dataset opens. If the import fails, a notification says that the Dataset could not be imported, and the dialog stays open so you can try again.

Import stays unavailable until you choose an archive.

Work With Imported Test Cases​

Imported test cases appear in the Dataset's test case table with an Imported tag. You can replay them in Experiments like any other test case.

An imported test case has no pipeline, so the Experiment you run decides which pipeline version replays it.

To read an imported conversation and open its traces, click View chat. For details, see View an Imported Conversation and Its Traces.

Import and Export a Dataset with the API​

Export and import run in the background, so each request returns a transfer that you check until it ends:

  • To export, send a POST request to /api/v2/workspaces/{workspace_id}/evaluation/datasets/{dataset_id}/exports.
  • To import, send a multipart POST request to /api/v2/workspaces/{workspace_id}/evaluation/datasets/imports with file and an optional name. Leave out pipeline_id when you want to replay the same test cases on different pipelines: without it, the test cases belong to no pipeline, so a suite replays each one on whichever pipeline it runs on. The pipeline_id field is deprecated: if you send it, every imported test case is bound to that pipeline, which must be in the workspace. If that pipeline is deleted before the import runs, the test cases belong to no pipeline.
  • To check a transfer, send a GET request to /api/v2/workspaces/{workspace_id}/evaluation/datasets/transfers/{transfer_id}. When an export ends, download the archive from /api/v2/workspaces/{workspace_id}/evaluation/datasets/transfers/{transfer_id}/archive.