Problem
Retailers send raw offers (title, brand, pack size and a free-form extra field). Each must be linked to a catalog product or become a new card. Manual attribute search takes hours per card, and at peaks a card takes about a week. The flow is 30-100 thousand offers a day, up to 1-1.5 million at peaks. Barcode matching is about 98% accurate but covers only 14% of offers: retailers omit barcodes or use different ones for one product.
Example from the article: a manager sees an offer beside 10 candidate products, clicks the matches, and the card is ready in 2-3 minutes.
Solution in brief
Match by barcode first. For the rest, a fine-tuned small encoder embeds the title, brand, pack size and a cleaned extra field, FAISS returns top candidates, and a reranker trained on LLM soft labels reorders them. An Airflow DAG rebuilds the flat index weekly. Cleaning extra gave most of the gain (hit@5 74% to 84%, coverage 65% to 81%).
Questions this case answers
- How to link records of the same real-world item from an external feed to an internal catalog at tens of thousands of records per day, when identifiers cover only a small share and the text fields are noisy
- How to train a pairwise reranker on top of a nearest-neighbor index when human labels exist only for the shown top candidates and the index contains near-duplicates that poison the positive/negative split
- How to link incoming retailer offers to existing catalog products automatically, so that content managers only confirm a match?
- How to make an embedding model use a messy free-form attributes field without slowing inference?
Tools and methods
- Barcode matching — exact first pass.
- LaBSE-ru-turbo encoder — fine-tuned with an InfoNCE-based loss plus Matryoshka loss (768 to 256 dimensions).
- FAISS flat index — nearest-neighbor candidates, rebuilt weekly.
- Reranker — cross-entropy classifier on offer-product pairs; CatBoost as fallback.
- vLLM with Vikhr-Nemo-12B — scores pairs for soft labels.
- Airflow, Kafka — scheduling, offer delivery.
Google or a one-time email code. No password.
