Problem
Delivery Club's feed ran a production model from Mail.ru Search that could not use the real-time delivery time prediction, which refreshes every five minutes and cannot be precomputed. In early 2021 only offline models or very simple real-time layers could ship, because a heavy model needs a real-time service answering within 100 ms (p99) at up to 1,000 RPS. Replacing the model was risky: offline metrics correlate poorly with product metrics, and an A/B test of two entirely different models would not show why it failed. Popularity bias also pushes local restaurants out.
Example from the article: a pizzeria around the corner should compete with a nearby pizzeria, not with a chain that has many orders but a much longer delivery time.
Solution in brief
Remove past orders and popular fast food from the feed and rebuild only the exploration part. LightFM picks the top 50 candidates, LightGBM ranks them, and a simple real-time layer adds the live delivery time to the model's rank. Feature rounding, monotonicity constraints and SHAP checks keep LightGBM sane.
Questions this case answers
- How to inject a frequently updated signal into a ranking when the production model cannot be retrained or replaced and only a simple low-latency layer can ship
- How to make a tree-based ranker learn plausible, monotone dependencies on key features without losing offline quality
- How to recommend items that are new to the user and not globally popular when popularity bias dominates the training data
- How to rank restaurants that are new to a user when the production model cannot use real-time delivery time?
Tools and methods
- LightFM (WARP loss) — first-level candidates per city.
- LightGBM — second-level ranker trained on orders.
- SHAP — dependence plots to sanity-check the ranker.
- Real-time re-ranking — linear blend of the model's rank and delivery time.
- recall_new@k, precision_new@k — metrics that exclude past orders and top popular restaurants.
Google or a one-time email code. No password.