Problem
Swiggy users scroll through many restaurants and menus, and many leave without ordering. The team wanted a shorter path: a few ready carts of one or two items at each meal slot. Item-level recommendation is harder than restaurant recommendation. There are far more items, item pairs multiply, taste and diet are personal, stock changes during the day, and the list must be fresh and local. No labelled cart-level data existed for a ranker.
Example from the article: a customer who ordered Veg Biryani from a restaurant before gets a cart of that Biryani plus a cross-sell item, Gulab Jamoon.
Solution in brief
Candidate carts are taken from real one- and two-item orders, not generated. Rules built from a food taxonomy remove incoherent pairs. Carts are embedded and indexed per geohash for nearest-neighbour search against a customer embedding, merged with the customer's own history and local popular carts, and ranked by a hand-weighted score. Everything is precomputed offline.
Questions this case answers
- How to recommend small bundles of items from a very large catalogue when the number of combinations explodes and most combinations make no sense
- How to build and rank personalised candidates for a recommender without labelled data when results must be geographically serviceable and refreshed daily
- How to recommend a short list of ready-to-order item carts instead of making users browse restaurant menus?
- How to keep an item-level recommender from suggesting incoherent item pairs without hand-written food rules?
Tools and methods
- Food Intelligence (FI) taxonomy — in-house hierarchy of dish family and category, source of cart validity rules.
- Annoy — approximate nearest-neighbour index of cart embeddings per geohash5.
- Cross-sell model — suggests a complementary item for a menu item.
- Apache Spark and Databricks — batch workflows with custom Annoy wrappers.
- Amazon DynamoDB — stores precomputed recommendations.
Google or a one-time email code. No password.