> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mixpeek.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Find more data like your model's failures

> Describe where your model fails, or show one example, and get more samples like it, without near-duplicates and balanced across labels.

![Find more data like your model's failures](https://mixpeek.com/templates/ai-data-curation/rain.webp)

Describe where your model fails, or show one example, and get more samples like it, without near-duplicates and balanced across labels.

> [card] [Deploy in Studio](https://studio.mixpeek.com/manifests/apply?url=https%3A%2F%2Fmixpeek.com%2Ftemplates%2Fai-data-curation.namespace.yaml\&manifest_url=https%3A%2F%2Fmixpeek.com%2Ftemplates%2Fai-data-curation.namespace.yaml\&src=template-ai-data-curation\&template=ai-data-curation\&template_name=Find+more+data+like+your+model%27s+failures\&sync=1\&utm_source=docs\&utm_medium=template_deploy\&utm_campaign=mvs_onramp)
>
> Creates every resource below in your organization, with sample data.

> [card] [Download the manifest](https://mixpeek.com/templates/ai-data-curation.namespace.yaml)
>
> `ai-data-curation.namespace.yaml`, the file Studio and the API apply.

> [card] [Template page](https://mixpeek.com/templates/ai-data-curation)
>
> The demo and the use case on mixpeek.com.

## At a glance

| | |
| - | - |
| **Creates** | 1 namespace, 1 bucket, 1 collection, 5 retrievers, 1 alert |
| **Extractors** | [`multimodal_extractor`](https://docs.mixpeek.com/docs/extract/extractors#multimodal) v1 |
| **Models** | [Vertex AI multimodalembedding@001](https://mixpeek.com/models/multimodalembedding) |
| **Daily spend budget** | 2 USD, set on the namespace. Queries are not capped. |
| **Sample data** | 40 objects, uploaded to `samples` when you apply |
| **Version** | 0.1.0, updated 2026-10-29 |

## How the pieces connect

Buckets hold what you upload, collections turn it into searchable documents, and retrievers answer queries over the collections.

```mermaid theme={null}
flowchart LR
  b0[("samples")]
  c1["samples<br/>multimodal_extractor v1"]
  r2{{"failure-discovery"}}
  r3{{"similar-to-failure"}}
  r4{{"hard-examples"}}
  r5{{"curate"}}
  r6{{"confident-miss-monitor"}}
  b0 --> c1
  c1 --> r2
  c1 --> r3
  c1 --> r4
  c1 --> r5
  c1 --> r6
```

## Deploy it

> [tab] API
>
> **1. Get the manifest**
>
> ```bash theme={null}
> curl -sO https://mixpeek.com/templates/ai-data-curation.namespace.yaml
> ```
>
> **2. Validate it**
>
> Validate runs every check apply runs and creates nothing. Fix each entry in `errors`, then run it again.
>
> ```bash theme={null}
> curl -X POST https://api.mixpeek.com/v1/manifest/validate \
>   -H "Authorization: Bearer $MIXPEEK_API_KEY" \
>   -F "manifest_file=@ai-data-curation.namespace.yaml"
> ```
>
> **3. Apply it**
>
> Apply creates every resource in one call. `wait_for_seed=true` also waits until the sample objects are processed, so the first query below has documents to return.
>
> ```bash theme={null}
> curl -X POST "https://api.mixpeek.com/v1/manifest/apply?wait_for_seed=true" \
>   -H "Authorization: Bearer $MIXPEEK_API_KEY" \
>   -F "manifest_file=@ai-data-curation.namespace.yaml"
> ```
>
> The response lists each resource with its outcome in `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.

> [tab] Studio
>
> Open [Deploy in Studio](https://studio.mixpeek.com/manifests/apply?url=https%3A%2F%2Fmixpeek.com%2Ftemplates%2Fai-data-curation.namespace.yaml\&manifest_url=https%3A%2F%2Fmixpeek.com%2Ftemplates%2Fai-data-curation.namespace.yaml\&src=template-ai-data-curation\&template=ai-data-curation\&template_name=Find+more+data+like+your+model%27s+failures\&sync=1\&utm_source=docs\&utm_medium=template_deploy\&utm_campaign=mvs_onramp), sign in, choose where to deploy, and select **Apply to my workspace**. Studio shows each resource as it is created.

## Run the first query

Look up the namespace id by name, then run `failure-discovery`. Check `status` and `warnings` along with `documents`: a run that times out still answers 200, with `status` `degraded`.

```bash cURL theme={null}
NAMESPACE_ID=$(curl -s https://api.mixpeek.com/v1/namespaces/ai-data-curation \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" | jq -r .namespace_id)

curl -X POST https://api.mixpeek.com/v1/retrievers/failure-discovery/execute \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "X-Namespace: $NAMESPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{"inputs": {"query": "a dark city street at night"}}' \
  | jq '{status, warnings, documents: [.documents[] | {document_id, score}]}'
```

```python Python theme={null}
import os, requests

AUTH = {"Authorization": f"Bearer {os.environ['MIXPEEK_API_KEY']}"}
ns = requests.get("https://api.mixpeek.com/v1/namespaces/ai-data-curation", headers=AUTH).json()

run = requests.post(
    "https://api.mixpeek.com/v1/retrievers/failure-discovery/execute",
    headers={**AUTH, "X-Namespace": ns["namespace_id"]},
    json={"inputs": {"query": "a dark city street at night"}},
).json()

print(run["status"], run["warnings"])  # "completed" on a clean run
for doc in run["documents"]:
    print(doc["document_id"], doc["score"])
```

```javascript JavaScript theme={null}
const auth = { Authorization: `Bearer ${process.env.MIXPEEK_API_KEY}` };
const ns = await fetch("https://api.mixpeek.com/v1/namespaces/ai-data-curation", { headers: auth }).then((r) => r.json());

const run = await fetch("https://api.mixpeek.com/v1/retrievers/failure-discovery/execute", {
  method: "POST",
  headers: { ...auth, "X-Namespace": ns.namespace_id, "Content-Type": "application/json" },
  body: JSON.stringify({"inputs": {"query": "a dark city street at night"}}),
}).then((r) => r.json());

console.log(run.status, run.warnings); // "completed" on a clean run
for (const doc of run.documents) console.log(doc.document_id, doc.score);
```

## Add your own data

Each object you add to a bucket is processed by every collection that reads it. This adds one object to `samples`. `NAMESPACE_ID` is the id from the namespace lookup above.

```bash cURL theme={null}
curl -X POST "https://api.mixpeek.com/v1/buckets/samples/objects?auto_process=true" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "X-Namespace: $NAMESPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{"label": "example", "prediction": "example", "confidence": 1.5, "correct": true, "error_category": "example", "model_version": "example", "blobs": [{"property": "image", "type": "image", "data": "https://example.com/photo.jpg"}]}'
```

```python Python theme={null}
import os, requests

HEADERS = {"Authorization": f"Bearer {os.environ['MIXPEEK_API_KEY']}", "X-Namespace": os.environ["NAMESPACE_ID"]}

obj = requests.post(
    "https://api.mixpeek.com/v1/buckets/samples/objects",
    params={"auto_process": "true"},
    headers=HEADERS,
    json={
        "label": "example",
        "prediction": "example",
        "confidence": 1.5,
        "correct": True,
        "error_category": "example",
        "model_version": "example",
        "blobs": [
            {
                "property": "image",
                "type": "image",
                "data": "https://example.com/photo.jpg"
            }
        ]
    },
).json()
print(obj["object_id"], obj["status"])  # PENDING until processing finishes
```

```javascript JavaScript theme={null}
const headers = {
  Authorization: `Bearer ${process.env.MIXPEEK_API_KEY}`,
  "X-Namespace": process.env.NAMESPACE_ID,
  "Content-Type": "application/json",
};

const obj = await fetch("https://api.mixpeek.com/v1/buckets/samples/objects?auto_process=true", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "label": "example",
    "prediction": "example",
    "confidence": 1.5,
    "correct": true,
    "error_category": "example",
    "model_version": "example",
    "blobs": [
      {
        "property": "image",
        "type": "image",
        "data": "https://example.com/photo.jpg"
      }
    ]
  }),
}).then((r) => r.json());
console.log(obj.object_id, obj.status); // PENDING until processing finishes
```

The object is `PENDING` until processing finishes, then `COMPLETED` or `FAILED`. [Buckets and objects](https://docs.mixpeek.com/docs/ingest/buckets.md) covers object states, retries and duplicates.

## Retrievers

### `failure-discovery`

Describe a failure in words and get back every sample that looks like it, labeled or not, so one known miss turns into the set of samples like it.

**Stages:** [`feature_search`](https://docs.mixpeek.com/docs/retrieve/stages#feature-search)

**Searches:** `samples`

| Input | Type | Required | Description |
| - | - | - | - |
| `query` | text | yes | What to look for; searched across every index below |

### `similar-to-failure`

Pass the URL of an image the model got wrong and get back the samples closest to it.

**Stages:** [`feature_search`](https://docs.mixpeek.com/docs/retrieve/stages#feature-search)

**Searches:** `samples`

| Input | Type | Required | Description |
| - | - | - | - |
| `query` | text | yes | URL of the image or frame to match; encoded by the index below and compared against it |

### `hard-examples`

Every sample the model got wrong, most confident first.

**Stages:** [`sort_attribute`](https://docs.mixpeek.com/docs/retrieve/stages#sort-attribute)

**Searches:** `samples`

| Input | Type | Required | Description |
| - | - | - | - |
| `limit` | text | no | Optional cap on documents grouped per run |

### `curate`

Search for what a dataset should cover, then keep a diverse, balanced pick: near-duplicates dropped and every label represented.

**Stages:** [`feature_search`](https://docs.mixpeek.com/docs/retrieve/stages#feature-search) → [`mmr`](https://docs.mixpeek.com/docs/retrieve/stages#mmr) → [`sample`](https://docs.mixpeek.com/docs/retrieve/stages#sample)

**Searches:** `samples`

| Input | Type | Required | Description |
| - | - | - | - |
| `query` | text | yes | What to look for; searched across every index below |

### `confident-miss-monitor`

The alert's check: is the sample just written one the model got wrong with confidence 0.8 or higher. The run is scoped to that one sample and reads its fields only, so it calls no model. Materialises into confident-miss-indexed.

**Searches:** `samples`

| Input | Type | Required | Description |
| - | - | - | - |
| `document_id` | text | yes | The written document this run is scoped to, supplied by the alert attachment |

## Collections

Each collection runs one extractor over a bucket, or over another collection's documents.

> [accordion] samples
>
> multimodal\_extractor\@v1 over bucket samples. Feeds confident-miss-monitor, confident-miss-indexed, failure-discovery, similar-to-failure, hard-examples, curate.
>
> **Reads** bucket `samples` with [`multimodal_extractor`](https://docs.mixpeek.com/docs/extract/extractors#multimodal) v1.
>
> **Inputs:** `image` ← `image`
>
> **Copied onto each document:** `label`, `prediction`, `confidence`, `correct`, `error_category`, `model_version`
>
> | Document field | Type |
> | - | - |
> | `label` | string |
> | `prediction` | string |
> | `confidence` | number |
> | `correct` | boolean |
> | `error_category` | string |
> | `model_version` | string |
> | `start_time` | number |
> | `end_time` | number |
> | `start_frame` | integer |
> | `end_frame` | integer |
> | `fps` | number |
> | `source_fps` | number |
> | `analysis_fps` | number |
> | `width` | integer |
> | `height` | integer |
> | `aspect_ratio` | number |
> | `duration` | number |
> | `transcription` | string |
> | `description` | string |
> | `ocr_text` | string |
> | `json_output` | object |
> | `thumbnail_url` | string |
> | `source_video_url` | string |
> | `video_segment_url` | string |
> | `multimodal_extractor_v1_multimodal_embedding` | array\<number> |
> | `multimodal_extractor_v1_transcription_embedding` | array\<number> |
> | `internal_metadata` | object |

## Also created

**[Alerts](https://docs.mixpeek.com/docs/enrich/alerts-and-triggers.md)**

* `confident-miss-indexed`: Emails the org notifications address (Settings -> Notifications; unset means opted out) when a newly indexed sample is one the model got wrong with confidence 0.8 or higher.

> [accordion] Cost estimate at list price
>
> At 10,000 items a month (2 minutes or 10 pages each) and 100,000 queries, this template costs about **18.07 USD a month** (1.79 USD per 1,000 items). The namespace's daily spend budget pauses new batches before you pass it.
>
> | Part | USD a month |
> | - | - |
> | Processing | 17.85 |
> | Storage | 0.02 |
> | Queries | 0.20 |
> | Processing in `samples` | 17.85 |

## The manifest

Every resource above comes from this file. Change it and apply it again with `?mode=upsert` to update what exists. [Manifests](https://docs.mixpeek.com/docs/manage/manifests.md) documents each field.

```yaml ai-data-curation.namespace.yaml expandable theme={null}
# ai-data-curation: one manifest spins up the namespace.
# Platform manifest schema (GET /v1/discovery/schema). Validate with POST /v1/manifest/validate,
# apply with POST /v1/manifest/apply or the Deploy button. Wiring comes from the flow diagram:
# edges are bucket -> collection sources, collection -> retriever scope, retriever -> view.
# Applying a SECOND time, over a namespace this template already created: use
# POST /v1/manifest/apply?mode=create_missing, which creates what is missing and leaves
# what exists alone. The default, create_only, fails the WHOLE apply and rolls it back if
# any resource already exists, so an upgrade looks like a dead end without this. Use
# mode=upsert to also patch resources that exist but have drifted from this file.
version: '1.0'
metadata:
  name: ai-data-curation
  description: "Namespace template ai-data-curation. Generated from the flow diagram on mixpeek.com/templates/ai-data-curation."
namespaces:
  - name: ai-data-curation
    description: "Everything below lives in this namespace."
    feature_extractors:
      - name: multimodal_extractor
        version: v1
    # Daily spend budget, in dollars of what you are charged (1,000 credits a dollar).
    # New batches pause once the namespace has spent this much today; queries are not capped.
    # Raise it later on the namespace: PATCH /v1/namespaces/<id> {"spend_budget": {"daily_usd": N}}.
    budget:
      daily_usd: 2

# Data sources. A storage connection carries credentials, so it is created in Studio
# (or POST /v1/organizations/connections) and synced into the bucket named here.
#   samples: s3, continuous, your samples with your model's predictions, in your account -> bucket samples
buckets:
  - name: samples
    namespace: ai-data-curation
    description: "Meant to be fed by samples (s3, continuous). No source is connected yet: applying this manifest creates the bucket only. Connect the source to this bucket in Studio (Syncs) to start the feed."
    schema:
      properties:
        image:
          type: image
          required: true
        label:
          type: string
        prediction:
          type: string
        confidence:
          type: number
        correct:
          type: boolean
        error_category:
          type: string
        model_version:
          type: string

# Connect your own storage. Create the secrets named below, uncomment, and apply again;
# apply live-tests the connection, so it must have real credentials to succeed.
# Until then the buckets above accept direct uploads.
# storage_connections:
#   - name: samples-connection
#     provider: s3
#     description: "Read-only access to the s3 location holding your samples with your model's predictions, in your account."
#     config:
#       region: us-east-1
#       credentials:
#         type: access_key
#         access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
#         secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

# bucket_syncs:
#   - name: samples-sync
#     bucket: samples
#     connection: samples-connection
#     source_path: "samples/"
#     sync_mode: continuous
#     polling_interval_seconds: 300
#     skip_duplicates: true
#     file_filters:
#       include_patterns: ["*.jpg", "*.jpeg", "*.png", "*.webp"]
#     schema_mapping:
#       mappings:
#         image:
#           target_type: blob
#           source: {type: file}
#           blob_type: image

collections:
  - name: samples
    namespace: ai-data-curation
    description: "multimodal_extractor@v1 over bucket samples. Feeds confident-miss-monitor, confident-miss-indexed, failure-discovery, similar-to-failure, hard-examples, curate."
    source:
      type: bucket
      bucket: samples
    feature_extractor:
      name: multimodal_extractor
      version: v1
      input_mappings:
        image: image
      field_passthrough:
        - source_path: label
        - source_path: prediction
        - source_path: confidence
        - source_path: correct
        - source_path: error_category
        - source_path: model_version
    alert_applications:
      - alert: confident-miss-indexed
        input_mappings:
          - input_key: document_id
            source: {source_type: document_field, path: _internal.document_id}
    enabled: true
retrievers:
  - name: failure-discovery
    namespace: ai-data-curation
    description: "Describe a failure in words and get back every sample that looks like it, labeled or not, so one known miss turns into the set of samples like it."
    collections:
      - samples
    input_schema:
      query:
        type: text
        required: true
        description: "What to look for; searched across every index below"
    stages:
      - stage_name: search
        stage_id: feature_search
        parameters:
          searches:
            - feature_uri: "mixpeek://multimodal_extractor@v1/vertex_multimodal_embedding"
              query:
                input_mode: text
                value: "{{INPUT.query}}"
              top_k: 50
          fusion: rrf
          final_top_k: 50
    tags:
      - template:ai-data-curation
  - name: similar-to-failure
    namespace: ai-data-curation
    description: "Pass the URL of an image the model got wrong and get back the samples closest to it."
    collections:
      - samples
    input_schema:
      query:
        type: text
        required: true
        description: "URL of the image or frame to match; encoded by the index below and compared against it"
    stages:
      - stage_name: search
        stage_id: feature_search
        parameters:
          searches:
            - feature_uri: "mixpeek://multimodal_extractor@v1/vertex_multimodal_embedding"
              query:
                input_mode: content
                value: "{{INPUT.query}}"
              top_k: 50
          fusion: rrf
          final_top_k: 50
    tags:
      - template:ai-data-curation
  - name: hard-examples
    namespace: ai-data-curation
    description: "Every sample the model got wrong, most confident first."
    collections:
      - samples
    input_schema:
      limit:
        type: text
        required: false
        description: "Optional cap on documents grouped per run"
    stages:
      - stage_name: verdict_filter
        config:
          stage_id: attribute_filter
          parameters:
            conditions:
              AND:
                - field: correct
                  operator: eq
                  value: false
      - stage_name: most_confident_first
        stage_id: sort_attribute
        parameters:
          field: "confidence"
          direction: "desc"
    tags:
      - template:ai-data-curation
  - name: curate
    namespace: ai-data-curation
    description: "Search for what a dataset should cover, then keep a diverse, balanced pick: near-duplicates dropped and every label represented."
    collections:
      - samples
    input_schema:
      query:
        type: text
        required: true
        description: "What to look for; searched across every index below"
    stages:
      - stage_name: search
        stage_id: feature_search
        parameters:
          searches:
            - feature_uri: "mixpeek://multimodal_extractor@v1/vertex_multimodal_embedding"
              query:
                input_mode: text
                value: "{{INPUT.query}}"
              top_k: 200
          fusion: rrf
          final_top_k: 200
      - stage_name: drop_near_duplicates
        stage_id: mmr
        parameters:
          lambda: 0.5
          top_k: 100
          diversity_feature_uri: "mixpeek://multimodal_extractor@v1/vertex_multimodal_embedding"
      - stage_name: balance_labels
        stage_id: sample
        parameters:
          strategy: "stratified"
          stratify_by: "label"
          count: 12
          min_per_stratum: 4
          seed: 7
    tags:
      - template:ai-data-curation
  - name: confident-miss-monitor
    namespace: ai-data-curation
    description: "The alert's check: is the sample just written one the model got wrong with confidence 0.8 or higher. The run is scoped to that one sample and reads its fields only, so it calls no model. Materialises into confident-miss-indexed."
    collections:
      - samples
    input_schema:
      document_id:
        type: text
        required: true
        description: "The written document this run is scoped to, supplied by the alert attachment"
    stages:
      - stage_name: verdict_filter
        config:
          stage_id: attribute_filter
          parameters:
            conditions:
              AND:
                - field: _internal.document_id
                  operator: eq
                  value: "{{INPUT.document_id}}"
                - field: correct
                  operator: eq
                  value: false
                - field: confidence
                  operator: gte
                  value: 0.8
    tags:
      - template:ai-data-curation
alerts:
  - name: confident-miss-indexed
    namespace: ai-data-curation
    description: "Emails the org notifications address (Settings -> Notifications; unset means opted out) when a newly indexed sample is one the model got wrong with confidence 0.8 or higher."
    source: retriever
    retriever: confident-miss-monitor
    trigger_on: results
    notification_config:
      channels:
        - channel_type: email
      include_matches: true
      include_scores: true
    enabled: false

# The curation sample set: 20 daytime and 20 night street photos (CC0, from
# Wikimedia Commons), each with the label it truly has and an illustrative
# prediction from a day-or-night scene model. The model gets 16 wrong, 14 of
# them at night, so the failures share a condition the retrievers can find.
# The blobs are the samples/curation/ set in the Mixpeek sample bucket, so the
# one-click reads nothing from a third-party host.
seed:
  - bucket: samples
    max_objects: 40
    objects:
      - {blobs: {image: samples/curation/images/day/steam-in-new-york-street.jpg}, label: day, prediction: day, confidence: 0.97, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/doorman-on-leadenhall-street.jpg}, label: day, prediction: day, confidence: 0.95, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/muscle-cars-at-rundle-street.jpg}, label: day, prediction: day, confidence: 0.93, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/driving-outside-flinders-street-railway-station.jpg}, label: day, prediction: day, confidence: 0.91, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/first-street.jpg}, label: day, prediction: day, confidence: 0.89, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/neighborhood-street.jpg}, label: day, prediction: day, confidence: 0.97, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/street-view-urban-street.jpg}, label: day, prediction: day, confidence: 0.95, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/street.jpg}, label: day, prediction: day, confidence: 0.93, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/street-curve.jpg}, label: day, prediction: day, confidence: 0.91, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/bleak-city-street.jpg}, label: day, prediction: day, confidence: 0.89, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/shadowed-street-london.jpg}, label: day, prediction: night, confidence: 0.71, correct: false, error_category: deep_shadow, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/street-corner-japan.jpg}, label: day, prediction: day, confidence: 0.95, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/crossing-the-street.jpg}, label: day, prediction: day, confidence: 0.93, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/people-crossing-street.jpg}, label: day, prediction: day, confidence: 0.91, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/steep-city-street.jpg}, label: day, prediction: day, confidence: 0.89, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/london-street-in-the-rain.jpg}, label: day, prediction: night, confidence: 0.84, correct: false, error_category: overcast, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/cobblestone-street.jpg}, label: day, prediction: day, confidence: 0.95, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/aerial-view-of-smolenskaya-street-moscow.jpg}, label: day, prediction: day, confidence: 0.93, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/new-york-street-fashion.jpg}, label: day, prediction: day, confidence: 0.91, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/day/budapest-crossroads.jpg}, label: day, prediction: day, confidence: 0.89, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/toronto-harbour-street-at-night-in-2017-sean-pol.jpg}, label: night, prediction: day, confidence: 0.52, correct: false, error_category: low_light, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/hong-kong-night.jpg}, label: night, prediction: night, confidence: 0.87, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/cityscape-and-traffic-light-trails.jpg}, label: night, prediction: day, confidence: 0.56, correct: false, error_category: low_light, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/flatiron-at-night.jpg}, label: night, prediction: night, confidence: 0.81, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/speed-by-night.jpg}, label: night, prediction: day, confidence: 0.6, correct: false, error_category: low_light, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/man-on-a-bicycle-at-night.jpg}, label: night, prediction: day, confidence: 0.64, correct: false, error_category: low_light, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/inside-a-car-at-night-time-in-williamsburg.jpg}, label: night, prediction: day, confidence: 0.68, correct: false, error_category: low_light, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/downtown-los-angeles-at-night.jpg}, label: night, prediction: night, confidence: 0.81, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/driving-through-a-bridge-at-night.jpg}, label: night, prediction: day, confidence: 0.72, correct: false, error_category: low_light, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/car-light-trails-at-night.jpg}, label: night, prediction: day, confidence: 0.76, correct: false, error_category: low_light, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/dim-urban-street.jpg}, label: night, prediction: day, confidence: 0.52, correct: false, error_category: low_light, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/boston-firetruck-parked-on-a-street-at-night.jpg}, label: night, prediction: day, confidence: 0.56, correct: false, error_category: low_light, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/cobblestone-street-at-night.jpg}, label: night, prediction: day, confidence: 0.6, correct: false, error_category: low_light, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/colorful-urban-traffic-at-night.jpg}, label: night, prediction: night, confidence: 0.87, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/new-york-city-center-street-at-night-time.jpg}, label: night, prediction: night, confidence: 0.84, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/on-an-empty-road-at-night.jpg}, label: night, prediction: day, confidence: 0.64, correct: false, error_category: low_light, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/highway-intersection-at-night-time.jpg}, label: night, prediction: day, confidence: 0.68, correct: false, error_category: low_light, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/jette-highway-traffic-at-night.jpg}, label: night, prediction: day, confidence: 0.72, correct: false, error_category: low_light, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/neon-streets.jpg}, label: night, prediction: night, confidence: 0.84, correct: true, model_version: scene-lighting-v1}
      - {blobs: {image: samples/curation/images/night/chicago-nighttime.jpg}, label: night, prediction: day, confidence: 0.76, correct: false, error_category: low_light, model_version: scene-lighting-v1}
# Measured on production 2026-10-29: the seed and these four queries cost
# 880 credits ($0.88), nearly all of it the 40 image embeddings.
acceptance:
  max_cost_usd: 1.25
  steps:
    - name: samples-indexed
      kind: documents
      collection: samples
      expect: {min_documents: 40}
    - name: failure-discovery-finds-night
      kind: query
      retriever: failure-discovery
      inputs: {query: a dark city street at night}
      expect: {top_field: label, top_equals: night}
    - name: hard-examples-ranks-the-most-confident-miss
      kind: query
      retriever: hard-examples
      expect: {top_field: error_category, top_equals: overcast}
    - name: curate-returns-a-stratified-pick
      kind: query
      retriever: curate
      inputs: {query: a city street}
      expect: {min_results: 8}
```

## 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 at `https://mixpeek.com/docs/templates/ai-data-curation.md`.

```text Prompt theme={null}
Set up the Mixpeek "Find more data like your model's failures" template in my organization. My API key is in MIXPEEK_API_KEY.
1. Download https://mixpeek.com/templates/ai-data-curation.namespace.yaml to ai-data-curation.namespace.yaml.
2. POST it to https://api.mixpeek.com/v1/manifest/validate as the multipart field manifest_file, with the header Authorization: Bearer $MIXPEEK_API_KEY. Fix every entry in errors and validate again.
3. POST the same file to https://api.mixpeek.com/v1/manifest/apply?wait_for_seed=true. Every entry in resources should be created.
4. GET https://api.mixpeek.com/v1/namespaces/ai-data-curation and keep namespace_id. Send it as the X-Namespace header on every call below.
5. POST {"inputs": {"query": "a dark city street at night"}} to https://api.mixpeek.com/v1/retrievers/failure-discovery/execute. Read documents, check that status is completed, and print warnings.
Reference for this template: https://mixpeek.com/docs/templates/ai-data-curation.md
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.