Skip to content

About

Fashion search demo: hybrid retrieval, server-side ranking, and recommendations over 2M products

Resources

Stars

19 stars

Watchers

0 watching

Forks

Repository files navigation

Qdrant Shopping

Live demo: demo-ecommerce-search.vercel.app

Qdrant Shopping: search, filter, and re-rank 5.8M products in one request

What It Is

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.

Who It's For

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.

How It's Built

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:

  1. Retrieve candidates with dense semantic search and BM25 keyword search.
  2. Fuse the two result sets with reciprocal rank fusion.
  3. Apply filters inside the Qdrant request.
  4. Re-score the fused results with a merchandising formula.
  5. Reorder text-search results with a shopper taste vector.
  6. 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.

Adapt It to Your Pipeline

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:

Run It

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:3005

Ingest 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

About

Fashion search demo: hybrid retrieval, server-side ranking, and recommendations over 2M products

Resources

Stars

19 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages