> ## 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.

# Custom extractor quickstart

> Write a text embedding extractor in three Python files, test it offline, and search with it.

Write a text embedding extractor in three Python files, test it offline, and search with it. The manifest builds the bucket, collection and retriever your extractor plugs into, with six sample articles.

> [card] [Jump to the manifest](#the-manifest)
>
> `custom-extractor-quickstart.namespace.yaml`: apply it with one API call, then read the walkthrough below to change it.

## At a glance

| | |
| - | - |
| **Creates** | 1 namespace, 1 bucket, 1 collection, 1 retriever |
| **Extractors** | [`text_extractor`](https://docs.mixpeek.com/docs/extract/extractors#text) v1 |
| **Daily spend budget** | 1 USD, set on the namespace. Queries are not capped. |
| **Sample data** | 6 objects, uploaded to `articles` when you apply |

## 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[("articles")]
  c1["article-embeddings<br/>text_extractor v1"]
  r2{{"text-search"}}
  b0 --> c1
  c1 --> r2
```

## Deploy it

**1. Get the manifest**

```bash theme={null}
# Copy the manifest from the bottom of this page into custom-extractor-quickstart.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=@custom-extractor-quickstart.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=@custom-extractor-quickstart.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.

## Run the first query

Look up the namespace id by name, then run `text-search`. 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/custom-extractor-quickstart \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" | jq -r .namespace_id)

curl -X POST https://api.mixpeek.com/v1/retrievers/text-search/execute \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "X-Namespace: $NAMESPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{"inputs": {"query": "how do qubits work"}}' \
  | 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/custom-extractor-quickstart", headers=AUTH).json()

run = requests.post(
    "https://api.mixpeek.com/v1/retrievers/text-search/execute",
    headers={**AUTH, "X-Namespace": ns["namespace_id"]},
    json={"inputs": {"query": "how do qubits work"}},
).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/custom-extractor-quickstart", { headers: auth }).then((r) => r.json());

const run = await fetch("https://api.mixpeek.com/v1/retrievers/text-search/execute", {
  method: "POST",
  headers: { ...auth, "X-Namespace": ns.namespace_id, "Content-Type": "application/json" },
  body: JSON.stringify({"inputs": {"query": "how do qubits work"}}),
}).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 `articles`. `NAMESPACE_ID` is the id from the namespace lookup above.

```bash cURL theme={null}
curl -X POST "https://api.mixpeek.com/v1/buckets/articles/objects?auto_process=true" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "X-Namespace: $NAMESPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{"topic": "example", "blobs": [{"property": "text", "type": "text", "data": "The text you want indexed."}]}'
```

```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/articles/objects",
    params={"auto_process": "true"},
    headers=HEADERS,
    json={
        "topic": "example",
        "blobs": [
            {
                "property": "text",
                "type": "text",
                "data": "The text you want indexed."
            }
        ]
    },
).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/articles/objects?auto_process=true", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "topic": "example",
    "blobs": [
      {
        "property": "text",
        "type": "text",
        "data": "The text you want indexed."
      }
    ]
  }),
}).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

### `text-search`

Type a question or a description and get the articles whose meaning is closest.

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

**Searches:** `article-embeddings`

| Input | Type | Required | Description |
| - | - | - | - |
| `query` | text | yes | What to look for, in plain words |

## Collections

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

> [accordion] article-embeddings
>
> text\_extractor\@v1 over bucket articles: each article embedded whole. Feeds text-search.
>
> **Reads** bucket `articles` with [`text_extractor`](https://docs.mixpeek.com/docs/extract/extractors#text) v1.
>
> **Inputs:** `text` ← `text`
>
> **Copied onto each document:** `topic`

## 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 custom-extractor-quickstart.namespace.yaml expandable theme={null}
# custom-extractor-quickstart: one manifest spins up the namespace a custom text extractor plugs into.
# Platform manifest schema (GET /v1/discovery/schema). Validate with POST /v1/manifest/validate,
# apply with POST /v1/manifest/apply. Wiring: the articles bucket feeds the article-embeddings
# collection, which text-search searches.
# The collection runs the builtin text_extractor. A custom extractor written as Python files
# (manifest.py, pipeline.py, realtime.py) is uploaded as a code archive on a dedicated deployment;
# the extractors: section below takes a registry extractor, a model (a pinned Hugging Face repo,
# an uploaded model or one ONNX file) or a container image pinned by digest, and no archive.
# Once your extractor is deployed, a second collection and retriever point at it through the API.
# 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. Use mode=upsert to also patch resources that exist but have
# drifted from this file.
version: '1.0'
metadata:
  name: custom-extractor-quickstart
  description: "Guide template custom-extractor-quickstart: short articles embedded by text_extractor and searched by meaning, the namespace a custom text extractor is added to."
namespaces:
  - name: custom-extractor-quickstart
    description: "Everything below lives in this namespace."
    feature_extractors:
      - name: text_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: 1

# A custom extractor cannot be declared here as a code archive. A model-only extractor can:
# this block imports a pinned Hugging Face model and serves it as an extractor (see the
# bring-your-own-model template). Uncomment it and point the collection at bge_small_hf to use it.
# extractors:
#   - name: bge_small_hf
#     namespace: custom-extractor-quickstart
#     version: v1
#     source:
#       huggingface:
#         repo: BAAI/bge-small-en-v1.5
#         revision: "5c38ec7c405ec4b44b94cc5a9bb96e735b38267a"

buckets:
  - name: articles
    namespace: custom-extractor-quickstart
    description: "One object per article: its body in text and a topic. Upload files here or write objects through the API."
    schema:
      properties:
        text:
          type: text
          required: true
        topic:
          type: string

collections:
  - name: article-embeddings
    namespace: custom-extractor-quickstart
    description: "text_extractor@v1 over bucket articles: each article embedded whole. Feeds text-search."
    source:
      type: bucket
      bucket: articles
    feature_extractor:
      name: text_extractor
      version: v1
      input_mappings:
        text: text
      field_passthrough:
        - source_path: topic
    enabled: true

retrievers:
  - name: text-search
    namespace: custom-extractor-quickstart
    description: "Type a question or a description and get the articles whose meaning is closest."
    collections:
      - article-embeddings
    input_schema:
      query:
        type: text
        required: true
        description: "What to look for, in plain words"
    stages:
      - stage_name: semantic
        stage_id: feature_search
        parameters:
          searches:
            - feature_uri: "mixpeek://text_extractor@v1"
              query:
                input_mode: text
                value: "{{INPUT.query}}"
              top_k: 10
          fusion: rrf
          final_top_k: 10
    tags:
      - template:custom-extractor-quickstart

# Six short articles on different subjects, so a question about one of them has a clear answer.
seed:
  - bucket: articles
    max_objects: 6
    objects:
      - texts:
          text: "Quantum computers store information in qubits. A qubit can hold a superposition of 0 and 1, and qubits can be entangled so that measuring one fixes the state of another. Algorithms such as Shor's factoring algorithm use these effects to solve some problems far faster than a classical computer can."
        topic: computing
      - texts:
          text: "Photosynthesis turns light into chemical energy. Chlorophyll in a leaf absorbs red and blue light, and the plant uses that energy to split water and combine carbon dioxide into glucose. Oxygen is released as a by-product."
        topic: biology
      - texts:
          text: "A sourdough starter is a culture of wild yeast and lactic acid bacteria living in flour and water. Feed it equal weights of flour and water once a day. When it doubles within six hours of a feeding, it is strong enough to raise a loaf."
        topic: cooking
      - texts:
          text: "Plate tectonics explains earthquakes and volcanoes. The Earth's outer shell is broken into plates that move a few centimeters a year. Where two plates grind past each other, stress builds until the rock slips and the ground shakes."
        topic: geology
      - texts:
          text: "Compound interest pays interest on earlier interest. A deposit of 1,000 dollars at 5 percent a year, compounded annually, grows to about 1,629 dollars after ten years, while simple interest would give 1,500."
        topic: finance
      - texts:
          text: "Vaccines train the immune system without causing the disease. A vaccine shows the body a harmless piece of a pathogen, such as a protein from its surface. The immune system makes antibodies and memory cells, so a later infection is cleared faster."
        topic: medicine
acceptance:
  max_cost_usd: 0.1
  steps:
    - name: articles-embedded
      kind: documents
      collection: article-embeddings
      expect: {min_documents: 6}
    - name: text-search-answers
      kind: query
      retriever: text-search
      inputs: {query: how do qubits work}
      expect: {min_results: 1}
```

## 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/custom-extractor-quickstart.md`.

```text Prompt theme={null}
Set up the Mixpeek "Custom extractor quickstart" template in my organization. My API key is in MIXPEEK_API_KEY.
1. Save the manifest at the bottom of https://mixpeek.com/docs/templates/custom-extractor-quickstart as custom-extractor-quickstart.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/custom-extractor-quickstart and keep namespace_id. Send it as the X-Namespace header on every call below.
5. POST {"inputs": {"query": "how do qubits work"}} to https://api.mixpeek.com/v1/retrievers/text-search/execute. Read documents, check that status is completed, and print warnings.
Reference for this template: https://mixpeek.com/docs/templates/custom-extractor-quickstart.md
```

## How it works

The manifest builds the part of the pipeline that stays the same whichever extractor you use: the `articles` bucket, a collection that embeds each article whole with the builtin [`text_extractor`](https://docs.mixpeek.com/docs/extract/extractors#text), and a retriever over it. Your extractor replaces the embedding step.

A custom extractor is a folder of three Python files. `manifest.py` declares what the extractor writes, `pipeline.py` computes it for every object at ingest, and `realtime.py` embeds the query at search time, so query and documents share one vector space.

> [!NOTE]
>
> The manifest's `extractors:` section accepts a registry extractor, a model or a container image pinned by digest. A folder of Python files is none of these, so you upload it with the custom extractor API and create its collection with `POST /v1/collections`.

## Write the extractor

Create a folder named `text_embed` with these three files. The example embeds text with a SHA-256 hash, so it needs only `numpy` and `pandas`.

**1. manifest.py**

The `features` list declares one 128-dimension embedding. `inference_type = "embedding"` says that `realtime.py` serves query embeddings.

```python text_embed/manifest.py theme={null}
feature_extractor_name = "text_embed"
version = "1.0.0"
description = "Text embedding extractor"

dependencies = []

features = [
    {
        "feature_type": "embedding",
        "feature_name": "text_embed_v1_embedding",
        "embedding_dim": 128,
        "distance_metric": "cosine",
    }
]

inference_type = "embedding"

compute_profile = {"resource_type": "cpu"}
```

> [!WARNING]
>
> Use the key names `feature_type`, `feature_name`, `embedding_dim` and `distance_metric`. With `name`, `type`, `dimensions` or `distance` the collection gets no vector index, and nothing fails until a search returns nothing.

**2. pipeline.py**

`build_steps` returns the processors that run over each batch. The processor reads the `data` column (raw text for a text blob, a storage URL for a binary one) and writes one vector per row into the column named after the feature.

```python text_embed/pipeline.py theme={null}
import hashlib
from typing import List

import numpy as np
import pandas as pd

def text_to_embedding(text: str, dim: int = 128) -> List[float]:
    """Generate a deterministic, L2-normalized embedding from text."""
    hash_bytes = hashlib.sha256(text.encode("utf-8")).digest()
    seed = int.from_bytes(hash_bytes[:4], byteorder="big")
    rng = np.random.default_rng(seed)
    embedding = rng.standard_normal(dim).astype(np.float32)
    norm = np.linalg.norm(embedding)
    if norm > 0:
        embedding = embedding / norm
    return embedding.tolist()

class TextEmbedBatchProcessor:
    def __init__(self, config=None, **kwargs):
        self.text_column = "data"
        self.output_column = "text_embed_v1_embedding"
        self.embedding_dim = 128

    def __call__(self, batch: pd.DataFrame) -> pd.DataFrame:
        if batch.empty:
            return batch
        batch = batch.reset_index(drop=True)

        texts, valid = [], []
        for idx, v in enumerate(batch.get(self.text_column, [])):
            text = "" if v is None else str(v)
            if text.strip():
                texts.append(text)
                valid.append(idx)

        batch[self.output_column] = None
        if texts:
            embs = [text_to_embedding(t, self.embedding_dim) for t in texts]
            for i, orig_idx in enumerate(valid):
                batch.at[orig_idx, self.output_column] = embs[i]
        return batch

def build_steps(extractor_request=None, container=None,
                base_steps=None, dataset_size=None, content_flags=None):
    steps = list(base_steps or [])
    steps.append(TextEmbedBatchProcessor())
    return {"steps": steps, "prepare": lambda ds: ds}
```

**3. realtime.py**

`run_inference` embeds the query text the same way the pipeline embeds an article.

```python text_embed/realtime.py theme={null}
import hashlib
import numpy as np

class InferenceService:
    async def run_inference(self, inputs: dict, parameters: dict) -> dict:
        text = inputs.get("text", "")
        h = hashlib.sha256(text.encode("utf-8")).digest()
        rng = np.random.default_rng(int.from_bytes(h[:4], "big"))
        v = rng.standard_normal(128).astype(np.float32)
        n = np.linalg.norm(v)
        return {"embedding": (v / n if n else v).tolist()}
```

> [!WARNING]
>
> A hash matches only an exact copy of an article and ranks everything else at random. It proves the wiring; for search by meaning, see [Embed by meaning](#embed-by-meaning).

## Validate it locally

Both checks run offline. `lint` validates `manifest.py` and runs the security scanner. `test` runs `pipeline.py` through Ray Data `map_batches` with sample rows, the way ingest feeds it, and checks that every feature column is filled.

```bash Lint and test theme={null}
python plugins.py lint text_embed
python plugins.py test text_embed
```

A passing run ends with `Test passed` and `text_embed_v1_embedding: 3/3 rows populated`. `plugins.py` is the client the [Custom Extractor API](https://docs.mixpeek.com/docs/extract/custom-extractors.md) reference names.

## Deploy it

Deploying uploads the folder as a zip, scans it, and starts the pipeline as a batch step and `realtime.py` as a query endpoint. Where that can happen depends on your deployment:

| Where you run Mixpeek | How your code gets there |
| - | - |
| Dedicated deployment | `python plugins.py push` zips and uploads it; deploy with the [Custom Extractor API](https://docs.mixpeek.com/docs/extract/custom-extractors.md). |
| Single-tenant or standalone container | Build the code into an image and declare it with `source.image`. See [Manifests](https://docs.mixpeek.com/docs/manage/manifests.md). |
| Shared API (`api.mixpeek.com`) | Upload is not served. [Submit the extractor for review](https://docs.mixpeek.com/docs/extract/custom-extractors.md), or keep `text_extractor`. |

Its plugin id is `text_embed_1_0_0` (name and version, dots as underscores). Wait until its status reads `DEPLOYED`.

## Point a collection at your extractor

Add a second collection over the same bucket that runs `text_embed`, process the articles through it, and add a retriever. These calls go to your dedicated host, so set `MIXPEEK_API_URL` to it.

**1. Create the collection**

A collection takes bucket ids, so look the bucket up by name first.

```bash cURL theme={null}
BUCKET_ID=$(curl -s "$MIXPEEK_API_URL/v1/buckets/articles" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "X-Namespace: $NAMESPACE_ID" | jq -r .bucket_id)

curl -s -X POST "$MIXPEEK_API_URL/v1/collections" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "X-Namespace: $NAMESPACE_ID" \
  -H "Content-Type: application/json" \
  -d "{
    \"collection_name\": \"article-embeddings-custom\",
    \"source\": {\"type\": \"bucket\", \"bucket_ids\": [\"$BUCKET_ID\"]},
    \"feature_extractor\": {
      \"feature_extractor_name\": \"text_embed\",
      \"version\": \"1.0.0\",
      \"input_mappings\": {\"text\": \"text\"},
      \"field_passthrough\": [{\"source_path\": \"topic\"}]
    }
  }" | jq '{collection_id, vector_indexes}'
```

Check that `vector_indexes` lists one index. An empty list means the `features` keys in `manifest.py` are wrong.

**2. Process the articles already in the bucket**

Trigger the collection to run the articles already in the bucket. The call answers 202 with a batch id and a task id.

```bash cURL theme={null}
curl -s -X POST "$MIXPEEK_API_URL/v1/collections/article-embeddings-custom/trigger" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "X-Namespace: $NAMESPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{}'
```

**3. Create a retriever and search**

The `feature_uri` names your extractor, its version and the feature. If the search finds no index, copy the URI from the collection's `vector_indexes`.

```bash cURL theme={null}
curl -s -X POST "$MIXPEEK_API_URL/v1/retrievers" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "X-Namespace: $NAMESPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "retriever_name": "text-search-custom",
    "collection_identifiers": ["article-embeddings-custom"],
    "input_schema": {"query": {"type": "text", "required": true}},
    "stages": [{
      "stage_name": "semantic",
      "config": {
        "stage_id": "feature_search",
        "parameters": {
          "searches": [{
            "feature_uri": "mixpeek://text_embed@1.0.0/text_embed_v1_embedding",
            "query": {"input_mode": "text", "value": "{{INPUT.query}}"},
            "top_k": 10
          }],
          "final_top_k": 10
        }
      }
    }]
  }' | jq .retriever_id

curl -s -X POST "$MIXPEEK_API_URL/v1/retrievers/text-search-custom/execute" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "X-Namespace: $NAMESPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{"inputs": {"query": "Quantum computers store information in qubits. A qubit can hold a superposition of 0 and 1, and qubits can be entangled so that measuring one fixes the state of another. Algorithms such as Shor'"'"'s factoring algorithm use these effects to solve some problems far faster than a classical computer can."}}' \
  | jq '{status, warnings, documents: [.documents[] | {topic, score}]}'
```

The query is the full text of the computing article, so the hash extractor returns it first with a score near 1.

> [!TIP]
>
> The first search after a deploy can return an empty `documents` list while the query endpoint starts. Read `status` and `warnings`, and retry after a few seconds.

## Change it

### Embed by meaning

Swap the hash for a sentence-transformers model and set `embedding_dim` to its output size (384 for `all-MiniLM-L6-v2`).

```python text_embed/manifest.py theme={null}
feature_extractor_name = "text_embed"
version = "1.1.0"
description = "Text embedding extractor (all-MiniLM-L6-v2)"

dependencies = ["sentence-transformers"]

features = [
    {
        "feature_type": "embedding",
        "feature_name": "text_embed_v1_embedding",
        "embedding_dim": 384,
        "distance_metric": "cosine",
    }
]

inference_type = "embedding"

compute_profile = {"resource_type": "cpu"}
```

```python text_embed/pipeline.py, text_to_embedding only theme={null}
from sentence_transformers import SentenceTransformer

_model = None

def text_to_embedding(text: str, dim: int = 384) -> List[float]:
    """Embed text with all-MiniLM-L6-v2, L2-normalized."""
    global _model
    if _model is None:
        _model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
    return _model.encode(text, normalize_embeddings=True).tolist()
```

Set `self.embedding_dim = 384` in the processor, make `realtime.py` call the same model, and run `lint` and `test` again.

### Ship a new version

Each version is its own extractor with its own id (`text_embed_1_1_0`) and feature URI (`mixpeek://text_embed@1.1.0/text_embed_v1_embedding`). Deploy it, create a collection and retriever for it as above, and compare against `1.0.0` before you switch. `plugins.py rollback text_embed 1.0.0` restores the earlier version.

### Keep the model, drop the code

When the extractor only runs a model, the manifest can declare it with no upload. Uncomment the `extractors:` block, which imports `BAAI/bge-small-en-v1.5` pinned to a commit, and point the collection and retriever at it:

```yaml article-embeddings and text-search, on the imported model theme={null}
collections:
  - name: article-embeddings
    namespace: custom-extractor-quickstart
    description: "bge_small_hf over bucket articles: each article embedded whole. Feeds text-search."
    source:
      type: bucket
      bucket: articles
    feature_extractor:
      name: bge_small_hf
      version: v1
      input_mappings:
        text: text
      field_passthrough:
        - source_path: topic
    enabled: true

retrievers:
  - name: text-search
    namespace: custom-extractor-quickstart
    description: "Type a question or a description and get the articles whose meaning is closest."
    collections:
      - article-embeddings
    input_schema:
      query:
        type: text
        required: true
        description: "What to look for, in plain words"
    stages:
      - stage_name: semantic
        stage_id: feature_search
        parameters:
          searches:
            - feature_uri: "mixpeek://bge_small_hf@v1"
              query:
                input_mode: text
                value: "{{INPUT.query}}"
              top_k: 10
          fusion: rrf
          final_top_k: 10
```

Change `feature_extractors` on the namespace to `bge_small_hf` too. A collection's extractor is fixed at creation, so apply this to a new namespace by renaming every `custom-extractor-quickstart` namespace first. [Bring your own model](https://docs.mixpeek.com/docs/templates/bring-your-own-model.md) runs this end to end.


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