Skip to main content

Design a recommendation system for an Indian e-commerce app.

System design · Pro 2

Short answer

Clarify the goal and constraints first: what to recommend, where, the metric (clicks, purchases, revenue), scale and latency. Then a two-stage design: candidate generation from collaborative filtering, item similarity and popular items in the user's region and language, then a ranking model on user, item and context features. Handle cold start, evaluate offline then with an A/B test, and monitor.

Deeper answer

Good answers think about data: views, carts, purchases and returns as implicit feedback; item text and images for new products; signals such as city, language and festival season. Candidate generation narrows millions of items to hundreds quickly, using embeddings and nearest-neighbour search. The ranker, often gradient boosting or a neural model, scores those with richer features.

Cold start: new users get popular and regional items or ask a few preferences; new items lean on content embeddings. Offline metrics such as recall at k and NDCG guide development, but the A/B test on business metrics decides. Watch for feedback loops that only show popular items, and add diversity and business rules such as stock availability.

What a strong answer covers

Answer it out loud in the mock interview about 2 min

Follow-ups to expect

Common mistakes

Learn it

ML interviews

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.