Jump to the manifest
bootstrap-labeled-dataset.namespace.yaml: apply it with one API call, then read the walkthrough below to change it.At a glance
How the pieces connect
Buckets hold what you upload, collections turn it into searchable documents, and retrievers answer queries over the collections.Deploy it
1
Get the manifest
2
Validate it
Validate runs every check apply runs and creates nothing. Fix each entry in
errors, then run it again.3
Apply it
Apply creates every resource in one call. The response lists each resource with its outcome in
wait_for_seed=true also waits until the sample objects are processed, so the first query below has documents to return.resources. Apply refuses a resource that already exists and rolls the whole apply back, so to apply the file again over this namespace add ?mode=create_missing, which creates only what is missing.Run the first query
Look up the namespace id by name, then runimage-search. Check status and warnings along with documents: a run that times out still answers 200, with status degraded.
Add your own data
Each object you add to a bucket is processed by every collection that reads it. This adds one object toincoming-images. NAMESPACE_ID is the id from the namespace lookup above.
PENDING until processing finishes, then COMPLETED or FAILED. Buckets and objects covers object states, retries and duplicates.
Retrievers
label-lookup
The taxonomy’s matcher: the reference example closest to an image’s vector, if it scores at least min_score.
Stages: feature_search
Searches: reference-set
image-search
Text-to-image search over the incoming images. Each result carries the scene_label it was given.
Stages: feature_search
Searches: incoming
needs-review
Incoming images the taxonomy could not label: no reference example scored at least min_score.
Stages: attribute_filter
Searches: incoming
Collections
Each collection runs one extractor over a bucket, or over another collection’s documents.reference-set
reference-set
image_extractor@v1 over bucket reference-images. The examples scene-labeler matches against.Reads bucket
reference-images with image_extractor v1.Inputs: image ← imageCopied onto each document: scene_labelincoming
incoming
image_extractor@v1 over bucket incoming-images. Labeled by scene-labeler; feeds image-search and needs-review.Reads bucket
incoming-images with image_extractor v1.Inputs: image ← imageAlso created
Taxonomiesscene-labeler: Copies scene_label from the closest reference example onto each incoming image.
The manifest
Every resource above comes from this file. Change it and apply it again with?mode=upsert to update what exists. Manifests documents each field.
bootstrap-labeled-dataset.namespace.yaml
Hand it to an agent
Paste this prompt into Claude Code, Cursor or another coding agent. To give the agent this whole page instead, use Copy page in the menu at the top of the page, or point it at the page’s Markdown athttps://mixpeek.com/docs/templates/bootstrap-labeled-dataset.md.
Prompt
How it works
You label a few images by hand. Every new image then gets the label of the labeled image it looks most like, and the ones that look like nothing you labeled wait for a person.reference-setembeds each image inreference-imageswithimage_extractor(SigLIP, 768 dimensions) and copies itsscene_labelonto the document. These are your labeled examples.incomingembeds each image inincoming-imageswith the same extractor. Both collections write the same feature, so their vectors are comparable.incomingapplies thescene-labelertaxonomy. As each incoming image is processed, the taxonomy reads the image’s stored vector (image_extractor_v1_embedding) and passes it tolabel-lookupasquery_embedding.label-lookupsearchesreference-setwith that vector and returns the single closest example, if it scores at leastmin_score(0.30). The taxonomy copies that example’sscene_labelonto the incoming document.- When no example scores 0.30 or more, the image gets no
scene_label.needs-reviewlists those images with anattribute_filteronscene_labelexistsfalse.
Apply does not wait between the two seed batches. An incoming image processed before the reference set is indexed comes out unlabeled; step 4 below labels it again.
The labeling loop
1
Count what was labeled
Group the incoming documents by
scene_label. Documents with no label form their own group.cURL
2
List the images that need a label
needs-review takes no inputs. Each document id it returns is an image to look at and label.cURL
3
Teach it a new example
Editing an object does not reprocess it, so add each example as a new object in
reference-images, with auto_process=true. Replace the URL with your image.cURL
4
Label the incoming images again
To relabel the images already in Poll
incoming against the grown reference set, apply the taxonomy to the collection with reapply_all: true. The call returns a task.cURL
GET /v1/tasks/{task_id} until status is COMPLETED, then run step 1 again.Why these settings
- The same extractor on both sides. The taxonomy compares an incoming vector with reference vectors, so both collections must write
mixpeek://image_extractor@v1/google_siglip_base_v1. min_score: 0.30onlabel-lookup. The taxonomy has no threshold of its own. A match below the retriever’s floor returns nothing, so the image stays unlabeled. Raise it for precision, lower it for coverage, and pick it by checking samples fromneeds-reviewand from the labeled images.top_k: 1. Each image takes the label of its single nearest example.merge_mode: replace. A relabel overwrites the oldscene_label.scene_labelis required onreference-images. An example without a label would still match and copy nothing.- A separate reference set. Auto-labels never become examples, so one wrong label cannot spread.
Variations
Each change below edits the manifest. Apply it again with?mode=upsert.
Add a category
A category exists once one example carries it. Add a few objects toreference-images with the new scene_label (step 3), then relabel incoming (step 4). Nothing in the manifest changes.
Label text documents
Swap the extractor on both collections and point the taxonomy at the text vector. The bucket property holding the text becomes atext type, for example content.
collections (both) feature_extractor
label-lookup searches
scene-labeler input_mappings
feature_extractors entry to text_extractor as well.
Get an email when an image needs a label
An alert runs a retriever each time a document is written and fires when it returns documents. Alerts run after taxonomies, so this retriever sees the label already in place.retrievers (add)
alerts (add)
incoming collection (add)
Find categories you have not labeled yet
Clusterincoming on the same feature, run it, and label a few members of each group in reference-images. Hierarchical cluster search shows how to run a cluster.
clusters (add)

