Live demo: demo-ecommerce-search.vercel.app
Qdrant Shopping is an e-commerce search demo over 5.8M real Amazon fashion products. It shows how one Qdrant collection can power search, filters, personalization, merchandising, recommendations, and visual similarity.
Each text search uses one Query API request to combine dense semantic search, BM25 keyword search, faceted filters, and a merchandising formula. Product pages use the Recommend API for similar, visually similar, and persona-based shelves.
Measured on the full 5.78M-product catalog:
| Shopper Action | Qdrant Request | Typical Time |
|---|---|---|
| Search with filters and personalization | 1 Query API request | 40 ms |
| Load similar products | 1 Recommend request | 10 ms |
| Open a product | 1 point lookup | <1 ms |
| Load facet counts | 1 Facet request | 260 ms |
The relevance eval uses an LLM judge over 30 queries and scores 96% precision@10.
This demo is relevant to:
- E-commerce teams building product discovery, search, and recommendations.
- Data and machine learning teams combining semantic, keyword, and image retrieval.
- Merchandising teams that need ranking controls for margin, stock, freshness, and popularity.
- Platform teams that want one search engine instead of separate systems for search, personalization, and recommendations.
- Engineers evaluating Qdrant for large catalogs with filters and business-aware ranking.
The catalog is one Qdrant collection with product payloads and three vector types:
- A 384-dimensional MiniLM dense vector from product title and category.
- A BM25 sparse vector from title, brand, and category.
- A 512-dimensional CLIP image vector on a 50,000-item subset for visual similarity.
The search path is:
- Retrieve candidates with dense semantic search and BM25 keyword search.
- Fuse the two result sets with reciprocal rank fusion.
- Apply filters inside the Qdrant request.
- Re-score the fused results with a merchandising formula.
- Reorder text-search results with a shopper taste vector.
- Return the final shelf from the app API.
Personalization is deliberately a re-rank for text search. A search for "jeans" still returns jeans; the shopper taste vector changes the order, not the candidate set. With no search text, the taste vector ranks the landing page directly.
The merchandising formula has a fixed shape. Presets and sliders change only the weights, and the server clamps them to [-10, 10], so business controls do not change the retrieval pipeline.
The serving app uses Cloud Inference for query embeddings, so it does not run an embedding model. Product vectors use int8 quantization in RAM, with float32 originals on disk. The serving node uses about 1.9 GB of RAM.
To use the same pattern with your catalog:
- Replace the Amazon metadata with your product feed.
- Choose dense, sparse, and image vectors based on your search surfaces.
- Store business fields as payloads: price, stock, margin, brand, category, rating, and freshness.
- Build shopper vectors from clicks, purchases, saves, or session history.
- Decide where personalization belongs: candidate retrieval, re-ranking, or both.
- Express merchandising logic as formula weights rather than separate ranking services.
- Evaluate relevance, latency, facet correctness, and persona differentiation on your own queries.
The main files to adapt are:
ingest/schema.py: collection schema, vectors, quantization, and payload indexes.ingest/ingest.py: product transformation and Cloud Inference ingest.ingest/clip_subset.py: image-vector enrichment.app/api/shelf/route.ts: hybrid search, filters, formula scoring, and personalization.app/api/product/[asin]/shelves/route.ts: similar, visual, and persona recommendation shelves.lib/formula.ts: merchandising formula and weight handling.lib/personas.ts: shopper taste vectors.evals/: API contract, relevance, latency, facets, and persona checks.
Requires:
- Qdrant Cloud cluster with Cloud Inference enabled
- Node 20+
- Python 3.11+
- uv
# .env at the repo root
QDRANT_URL=https://<cluster>.qdrant.io:6333
QDRANT_API_KEY=<key>
ANTHROPIC_API_KEY=<key> # for the relevance-judge eval
uv sync
uv run python ingest/phase0_check.py
curl -L -C - -o data/meta_Clothing_Shoes_and_Jewelry.jsonl \
"https://huggingface.co/datasets/McAuley-Lab/Amazon-Reviews-2023/resolve/main/raw/meta_categories/meta_Clothing_Shoes_and_Jewelry.jsonl"
uv run python ingest/schema.py
uv run python ingest/scan_stats.py
uv run python ingest/ingest.py
uv run python ingest/clip_subset.py
npm install && npm run dev # storefront on localhost:3005Ingest embeds in-cluster through Cloud Inference. The full catalog takes under two hours; use --limit 100000 for a smaller smoke corpus.
Check the build, then deploy:
uv run python evals/api_contract.py
uv run python evals/relevance_judge.py
uv run python evals/shelf_evals.py
npm test
vercel deploy --prod # set QDRANT_URL and QDRANT_API_KEY in Vercel