Skip to main content

Examples

This page shows practical patterns for working with datasets using the Python SDK.

Basic listing and inspection

Adding rows

Add new test cases to an existing dataset.

Async row addition

Bulk row addition

Adding rows with files

You can upload files (images, documents, etc.) as part of a dataset row using the FileAttachment class.

Use case: Prompt testing against a dataset

Evaluate a prompt against all rows in a dataset by treating row values as variables.
This pattern is a foundation for building more advanced evaluation pipelines and experiments on top of your datasets.