Skip to main content

Embedding datasets and Training pairs

Reviewed searches promoted into Training pairs and pairs explicitly saved from Playground Search receive the project tag retrieval_feedback automatically. Existing tags on a reused pair are preserved; adding the tag increments that pair's revision. An exact promotion replay does not restore a tag you later removed. Tag capacity is checked atomically: 409 tag_limit_reached leaves the review and dataset unchanged. Reporting an unreviewed search does not create a training pair or tag it.

An embedding project trains on Training pairs: an anchor (a query), a positive (a passage that answers it) and an optional negative (one that does not). It has up to 20 datasets, including archived ones. The default dataset is created automatically. Every path checks the signed-in owner and the exact project and dataset IDs.

GET /api/v1/projects/{owner_slug}/{project_slug}/datasets
POST /api/v1/projects/{owner_slug}/{project_slug}/datasets
PUT /api/v1/projects/{owner_slug}/{project_slug}/datasets/{dataset_id}
POST /api/v1/projects/{owner_slug}/{project_slug}/datasets/{dataset_id}/archive
POST /api/v1/projects/{owner_slug}/{project_slug}/datasets/{dataset_id}/unarchive
GET /api/v1/projects/{owner_slug}/{project_slug}/datasets/{dataset_id}/examples
POST /api/v1/projects/{owner_slug}/{project_slug}/datasets/{dataset_id}/examples
PUT /api/v1/projects/{owner_slug}/{project_slug}/datasets/{dataset_id}/examples/{example_id}
DELETE /api/v1/projects/{owner_slug}/{project_slug}/datasets/{dataset_id}/examples/{example_id}
GET /api/v1/projects/{owner_slug}/{project_slug}/datasets/{dataset_id}/tags
POST /api/v1/projects/{owner_slug}/{project_slug}/datasets/{dataset_id}/tags
POST /api/v1/projects/{owner_slug}/{project_slug}/datasets/{dataset_id}/examples/tags

The dataset list includes archived rows, ready-pair counts, source labels and max_datasets. Create and rename accept {"name":"Research"}. Names are unique per project without case. Archive keeps examples and referenced frozen versions readable; it does not delete them. Archived datasets refuse edits, tags and new imports with 409 dataset_archived. Archived rows count toward the 20-dataset limit. A foreign or unknown dataset ID returns 404.

Training pairs have an anchor, a required positive, and an optional negative. A stored negative is used for training only by a profile that supports explicit negatives. The example list uses a cursor, limit (1–100; default 25), and optional literal q search (up to 256 characters). It returns the filtered total_count, next_cursor, source and tag IDs. Editing requires expected_revision; a stale edit returns 409 embedding_example_revision_conflict.

Tags are project-scoped (up to 256). The tags list gives each tag's count in the selected dataset. To add or remove tags in bulk, send 1–100 rows with example_id, expected_revision, and the complete replacement tag_ids (up to 32 per pair). The batch is atomic: one stale revision refuses all changes. A changed tag set increments that pair's revision. Training selection can use tags; a frozen version records the selected tag IDs and cannot change when a live pair is retagged.

CSV and JSONL import, sample preview, final counts and reload recovery are described in Dataset imports. Source labels describe where a pair came from. “Search feedback” appears only for a row promoted from an explicitly reviewed search, not for an inference call.

Promoted pairs display the localized Search feedback source once. The matching retrieval_feedback tag stays saved and selectable, but its duplicate badge is hidden on that row. Other tags remain visible.