🏪 E-commerce / Marketplace

Semantic Product Search with Vectorize

Workers AI generates embeddings for search queries. Vectorize finds semantically similar products — even when exact keywords don't match. Replace SQL LIKE queries with meaning-aware search.

The Problem

"Users search for "comfortable reading chair" and get zero results — our product is called "POÄNG Armchair". Or "study table" returns nothing because it's listed as "BEKANT Sit/Stand Desk". We're losing sales to poor keyword matching."

The Outcome

more results found for natural language queries. Semantic search understands intent, not just keywords.

Live demo below

The problem

Customers can't find products they would actually buy.

"A customer types "comfortable reading chair" and gets zero results — because our product is called "STRANDMON Wing Chair"."

E-commerce Product Manager, furniture retailer

Both sides run simultaneously — real API calls, no mocks

Without Cloudflare
SQL LIKE query

Response time

With Cloudflare Vectorize
Semantic understanding

Response time

The win

🎯
More results found
for natural-language queries
🖥
0
New servers
no Elasticsearch cluster needed
<2s
Semantic query
embedding + vector search combined

Productionising this

What changes when you ship this for real

Match seed and query pooling

Embeddings produced with pooling: 'cls' are NOT compatible with mean. Pick one, document it next to the binding, and re-seed if you change.

Hybrid search

Pure semantic misses exact-match queries (SKUs, model numbers). Combine Vectorize semantic + D1 LIKE keyword via Reciprocal Rank Fusion (RRF) for production. AI Search does this automatically with bge-m3.

Filter by metadata

Vectorize supports metadata filters (filter: { category: 'sofa' }) — push category, price-range, in-stock at the index instead of post-filtering in the Worker.

Cache embeddings of common queries

KV-cache the embedding vector for the top 1k search queries (e.g. "sofa", "office chair"). Skips Workers AI on hot queries → saves neurons + 50–100ms.

Re-seed on catalog changes

When products change name/description, re-embed and upsert that ID. Vectorize upsert is idempotent. Don't re-seed everything.

Cost ceiling

Workers Paid base $5/mo; Vectorize includes 50M queried + 10M stored dims. Beyond: $0.01/M queried, $0.05/100M stored. 384-dim index → 1k products = 384k stored = trivial.