Problem
A marketplace must recognize that two listings are the same product. Samokat.Tech built such a matcher for Megamarket: about 36 million products in the assortment, 5 million new seller offers a month and about 100 million competitor products to analyze each month. Matching decides whether a new seller's product is already in the catalog, which products are grouped, and which competitor price to use in dynamic pricing. A wrong match breaks all three, and a slow matcher cannot keep up.
Example from the article: in the speaker's live quiz most of the audience got pairs wrong. Two coffee packs differ only in the roast on the pack ("full roast" against "medium").
Solution in brief
Keep image and text models separate and combine them late. An image model and a bi-encoder propose candidates, FAISS searches the assortment, a cross-encoder re-scores pairs, and CatBoost adds price and category. Thresholds are calibrated per category for 95% precision at maximum recall. FP16, length-sorted batching and early filtering speed it up about 8 times.
Questions this case answers
- How to decide whether two items from different catalogs are the same object when they differ only in one small visual or textual detail, at a scale of tens of millions of items
- How to set per-category match thresholds that guarantee a target precision while keeping recall high, using a combined image and text similarity
- How to match identical products across seller offers, a marketplace assortment and competitor catalogs at tens of millions of items
- How to combine image and text models into one product matcher with a target precision
Tools and methods
- Vision Transformer, CurricularFace — image embeddings by metric learning
- Bi-encoder — fast text candidates
- Cross-encoder — multilingual Sentence Transformers model, heavy re-scoring
- FAISS GPU — top-N candidate search
- CatBoost — final model with price and category
- LLaVA, Llama 3 70B — missing attributes, hard categories
Google or a one-time email code. No password.
