How We Learned to Guess Shoppers' Tastes and Made Money on It: Personalized Catalog Ranking at Lamoda

Aleksandr Zhelubenkov27 May 2023

Problem

Lamoda, a fashion e-commerce site with about 18 million monthly active users, sorts its catalog pages by popularity. Most users enter through the catalog and look at only a couple of hundred products before leaving if nothing fits. Categories such as dresses or sneakers hold thousands of products, so the top of the page decides what gets bought. One sort for everyone ignores that users prefer different brands, colors and sizes, and that behavior differs by platform and geo.

Example from the article: for a user who prefers pink and blue colors, the base popularity ranking and the personalized ranking of the same catalog look visibly different.

Solution in brief

Replace the single heuristic sort in steps: segment-level sorts, then an ML ranker, then a two-stage personalized pipeline. Candidates come from Elasticsearch, where the base popularity score is boosted by a linear model over the user's attribute preferences. A separate service with CatBoost then reranks the few hundred candidates.

Questions this case answers
  • How to personalize the ordering of a large filterable catalog for each user while applying the user's filters correctly at every stage
  • How to move from a heuristic sort to a learned ranker with a two-stage candidate generation and reranking pipeline under latency limits
  • How to personalize e-commerce catalog ranking for each user instead of one popularity sort
  • How to move a heuristic catalog sort to a learning-to-rank model without making results cheaper

Tools and methods

  • Elasticsearch — stores catalog, precomputed sorts and candidate retrieval with a boosted score query
  • CatBoost — final ranker, trained for learning to rank on add-to-cart
  • Logistic regression — pointwise model that learns how strongly each attribute value (brand, color, size) boosts items
  • Aerospike — key-value feature store for online reads
  • Go — ranking microservice with CatBoost inside
Continue reading — it's free

Google or a one-time email code. No password.