Multimodal product search with SigLIP 2 embeddings and reranking
A store search box that finds shoes by text, a product photo or both, powered by SigLIP 2 embeddings, hybrid retrieval and cross-encoder reranking, with keyword search as the baseline, a hand-judged benchmark behind it, and queries embedded in the browser.
Background
A shopper sees a pair of boots they like and wants something similar, but in brown suede. Keyword search only finds it if the product title happens to use the shopper's words, and a purely visual match ignores the requirements.
This search box handles both. Shoppers can search by text, by a product photo ("find similar"), or by a photo plus requirements such as colour or material.
Data
Amazon Berkeley Objects, a released catalogue of about 148,000 products with images, descriptions and attributes such as colour, style and material (CC BY 4.0), narrowed to its roughly 6,000 shoes, boots and sandals, one per product photo. Missing attributes are tracked: a product with no recorded material never counts as matching a material filter.
How it works
- Keyword baseline. BM25 over titles, descriptions and attributes.
- Embeddings. SigLIP 2 encodes product images and text into one vector space, so a text request or a product image retrieves visually and semantically similar items.
- Hybrid retrieval. Candidates from keyword, text and image search are merged with reciprocal-rank fusion.
- Reranking. A cross-encoder scores each request against each candidate more carefully than the embeddings can, combined with attribute signals. Requirements are hard filters, not soft preferences.
- Search in the browser. The text encoder runs in the visitor's browser with Transformers.js, so free-text queries are embedded on the page and searched against precomputed product vectors, with no model server.
Evaluation
The catalogue has no search logs, so relevance comes from a hand-judged benchmark of 80 requests: text, image-based, and image plus requirements, split into development and held-out sets. Results are judged without knowing which method produced them, on a 0–3 scale, and anything that breaks a hard requirement scores zero. The main measure is NDCG@10, with constraint violations, failures by request type and query time alongside.
Demo
The search experience a shopper would use: a search box, "find similar" on any product, requirement filters and a results grid. Behind it, a toggle switches between keyword, embedding and hybrid search, a score inspector explains why a product ranked where it did, and a set of failure cases shows where each method misses.
Relevance is measured by reviewer judgement, not purchases.