---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://mixpeek.com/.well-known/search?q={query}"
  method: GET
  documentation: "https://mixpeek.com/llms.txt"
---

1.  [](/)
2.  [Code examples](/recipes)
3.  AI-Powered Catalog Search

Back to code examples

# AI-Powered Catalog Search

Replace keyword-based catalog search with AI-powered semantic and visual search. Understands natural language queries like "lightweight summer dress under $50" and combines text understanding with visual similarity for comprehensive product discovery.

image

text

Production

[Run in Builder](/build?recipe=ai-catalog-search)

Python

cURL

from mixpeek import Mixpeek

client \= Mixpeek(api\_key\="YOUR\_API\_KEY", namespace\="catalog")

\# 1. A bucket whose objects carry a product photo and its description, and one collection per extractor over it

bucket \= client.buckets.create(

    bucket\_name\="products",

    bucket\_schema\={

        "properties": {

            "photo": {

                "type": "image",

            },

            "description": {

                "type": "text",

            },

        },

    },

)

image\_collection \= client.collections.create(

    collection\_name\="product\_photos",

    source\={"type": "bucket", "bucket\_ids": \[bucket\["bucket\_id"\]\]},

    feature\_extractor\={

        "feature\_extractor\_name": "multimodal\_extractor",

        "version": "v1",

    },

)

text\_collection \= client.collections.create(

    collection\_name\="product\_text",

    source\={"type": "bucket", "bucket\_ids": \[bucket\["bucket\_id"\]\]},

    feature\_extractor\={

        "feature\_extractor\_name": "text\_extractor",

        "version": "v1",

    },

)

\# 2. Upload and process

client.buckets.upload(

    bucket\["bucket\_id"\],

    blobs\=\[{"property": "photo", "type": "image", "data": "s3://your-bucket/products/linen-dress.jpg"}, {"property": "description", "type": "text", "data": "s3://your-bucket/products/linen-dress.txt"}\],

)

client.collections.trigger(image\_collection\["collection\_id"\])

client.collections.trigger(text\_collection\["collection\_id"\])

\# 3. The query searched against photos and descriptions, fused with RRF, then a rerank on description text

retriever \= client.retrievers.create(

    retriever\_name\="catalog-search",

    collection\_identifiers\=\["product\_photos", "product\_text"\],

    input\_schema\={

        "query": {

            "type": "text",

            "required": True,

        },

    },

    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": 100,

                    },

                    {

                        "feature\_uri": "mixpeek://text\_extractor@v1/multilingual\_e5\_large\_instruct\_v1",

                        "query": {

                            "input\_mode": "text",

                            "value": "{{INPUT.query}}",

                        },

                        "top\_k": 100,

                    },

                \],

                "fusion": "rrf",

                "final\_top\_k": 100,

            },

        },

        {

            "stage\_name": "rerank",

            "stage\_id": "rerank",

            "parameters": {

                "inference\_name": "BAAI\_\_bge\_reranker\_v2\_m3",

                "query": "{{INPUT.query}}",

                "document\_field": "text",

                "top\_k": 20,

            },

        },

    \],

)

\# 4. Search

results \= client.retrievers.execute(

    retriever\["retriever\_id"\],

    inputs\={

    "query": "lightweight summer dress under $50",

},

)

for doc in results\["documents"\]:

    print(doc\["document\_id"\], doc\["score"\])

### Feature Extractors

Multimodal Extractor

Unified embeddings for video, audio, image, and text: scene/silence chunking, Whisper transcription, thumbnails, and Gemini vision.

Text Embedding

Extract semantic embeddings from documents, transcripts and text content

### Retriever Stages

feature search

Search and filter documents by vector similarity using feature embeddings

filter

rerank

Rerank documents using cross-encoder models for accurate relevance

sort

## Frequently asked questions

### How does this compare to Elasticsearch or Algolia?

Unlike keyword-based engines, Mixpeek understands intent and visual similarity. A search for "cozy winter sweater" matches cable-knit wool items even if the listing says "chunky pullover knit."

### Can I combine text queries with image queries?

Yes. Submit both a text description and a reference image to find products that match both the visual style and the textual description.

### How do I apply business rules like boosting promoted products?

Use the sort-attribute stage to blend relevance scores with business signals like promotion status, margin, or popularity rank.

## Related code examples and resources

Pages on the same stages, extractors and patterns.

[

Extractor

### Text Embedding

Extract semantic embeddings from documents, transcripts and text content

Learn more





](/extractors/text)[

Recipe

### Visual Product Search

Enable camera-based product discovery for e-commerce. Customers snap a photo of a product they like, and the pipeline returns visually similar items from your catalog along with pricing, availability, and product metadata.

Learn more





](/recipes/visual-product-search)[

Extractor

### Multimodal Extractor

Unified embeddings for video, audio, image, and text: scene/silence chunking, Whisper transcription, thumbnails, and Gemini vision.

Learn more





](/extractors/multimodal)[

Recipe

### Reverse Image Search

Build a reverse image search engine that accepts an image as input and returns visually similar results from your indexed collection. Uses multimodal embeddings to match visual features like color, shape, composition, and semantic content.

Learn more





](/recipes/reverse-image-search)[

Recipe

### E-commerce Catalog Enrichment

Automatically enrich product listings with visual attributes, descriptions, and tags extracted from product images. Fill in missing catalog data at scale.

Learn more





](/recipes/ecommerce-catalog-enrichment)[

Recipe

### Face Search Pipeline

Detect, align, and embed faces across your image and video library, then search by face identity. Uses SCRFD for detection and ArcFace for 512-dimensional identity embeddings, enabling large-scale face recognition and matching.

Learn more





](/recipes/face-search-pipeline)