Problem
Lamoda's catalog gets more than 17 million visitors a month, and 95% of them look only at the first two pages, about a hundred products. The team ranked by a hand-made formula that mixed recent conversion, size availability and price. It worked inside single categories but was hard to improve, did not optimize a business metric in a clear way, and reacted unpredictably to small changes. Two result lists could differ by millions of NMV a month, and no one could tell which was better.
Example from the article: sorting all women's or men's products by the formula put underwear and socks at the top, because they convert well and are not returnable.
Solution in brief
Keep the formula and the serving path, and replace its conversion term with the prediction of a gradient-boosted learning-to-rank model. The model is trained on impressions, one row per product shown, with the add-to-cart event as the target. Heuristic category mixing and user segments stay as they were, and the sorted lists are still loaded into Elasticsearch.
Questions this case answers
- How to replace a hand-tuned scoring formula for sorting a large item list with a learning-to-rank model while keeping the existing precomputed-ranking serving setup
- How to build training data for an item-ranking model from impression and action logs when the business metric is purchase conversion
- How to replace a hand-tuned catalog sorting formula with a learning-to-rank model without rebuilding the serving layer?
- How to keep a product catalog diverse when the top is dominated by cheap, high-conversion items such as socks?
Tools and methods
- Learning-to-rank with gradient boosting — predicts a score per product within a (user, date, catalog) group
- CatBoost — final training library, replaced XGBoost
- XGBoost — first training library
- Elasticsearch — serves the precomputed sorted lists per segment
- Exponentially decayed CTR — a feature that weights recent clicks more
Google or a one-time email code. No password.