Working with Datasets
A dataset contains the data that participants will annotate in an AI Task Builder Batch. This page covers dataset creation, upload, and advanced configuration options.
For the complete batch workflow, see Working with Batches.
Dataset versions
There are two dataset versions:
V4 datasets are created by passing a schema when calling POST /datasets. See Defining a dataset schema for details.
Creating a dataset
V3 dataset (no schema):
V4 dataset (with schema):
Uploading data
V4 datasets (JSONL or CSV)
V4 upload uses a three-step flow with import job tracking.
Step 1: Request a presigned URL
For example:
The response includes a presigned S3 URL, the content_type to use for the upload, and an import_id to track this upload:
Step 2: Upload to S3
Use the content_type value from the response as the Content-Type header.
Step 3: Poll for import status
See Monitoring an import for status details.
V3 datasets (CSV or ZIP)
Step 1: Request a presigned URL
Step 2: Upload to S3
Step 3: Poll dataset status
Wait until status reaches READY before creating a batch.
JSONL format
For V4 datasets, upload data as newline-delimited JSON. Each line is one datapoint. Field names must match the keys defined in the dataset schema.
In strict mode ("strict": true), every record must include all schema fields. In non-strict mode, missing fields are allowed and treated as absent.
CSV format
Both V3 and V4 datasets accept CSV uploads. Each row is one datapoint.
For V4 CSV uploads, column names must match schema field keys.
Metadata columns
Columns prefixed with META_ are not displayed to participants. Use these for internal data you need in your results but don’t want participants to see.
In V4 datasets, use fields of type metadata instead of the META_ prefix.
Custom task grouping
By default, tasks are grouped randomly when you set up a batch (using the tasks_per_group parameter). To define your own groupings, include a META_TASK_GROUP_ID column in your CSV (V3) or a field of type task_group_id in your schema (V4).
Rows with the same group ID value are grouped together into a single task group. Participants complete all tasks within a group in one submission.
If your dataset includes META_TASK_GROUP_ID (V3) or a task_group_id field (V4), these groupings take precedence over the tasks_per_group parameter during batch setup.
Monitoring an import
For V4 datasets, each upload is tracked as an import job.
A partial response includes per-record errors:
Accepted records are available immediately even if some records were rejected.
Dataset status (V3 only)
Poll the status endpoint to check processing status for V3 datasets.
Wait for the status to reach READY before creating a batch with this dataset.