How it works
- Each source row has a unique ID (database primary key, row number, etc.)
- Store that ID as
external_idin the datapoint’smetadata - On each sync run, compare source rows to existing datapoints by
external_id - Create, update, or delete as needed
We’re building native dataset sync into the SDK to make this easier. In the meantime, the pattern below works well.
Sync script
The script needs HoneyHive Python SDK 1.8.0 or later and a data plane key with these permissions:project.dataset.list, project.dataset.put, project.datapoint.list, project.datapoint.post, project.datapoint.put, and project.datapoint.delete.
Go to Settings > Project > API Keys and open the Data Plane tab. Click Create API Key, name the key, set an expiration, and select the permissions this guide lists. Copy the key from the dialog, because it is shown only once, and store it as HH_DATA_PLANE_API_KEY. Then copy the Project ID from the same tab and store it as PROJECT_ID. See API Keys for how data plane keys work.
Adapt the inputs and ground_truth mapping to match your data schema.
Skip unchanged rows with hashing
The script above updates every matched row, even if nothing changed. For large datasets, add a content hash to skip unnecessary API calls.Track dataset versions
You can keep a version manifest alongside your sync script to track what changed and when.Automate with CI/CD
Run the sync whenever your dataset source changes. For example, if your test cases live in a JSON file in your repo, trigger the sync on push:Related
Run with HoneyHive Datasets
Evaluate your AI against the synced dataset
Upload datasets
One-time upload via UI or SDK
Export datasets
Export datapoints for external use
Manage as code
Define datasets and evaluators in
.honeyhive/ and apply with the CLI