Why recommend
Recommendations drive a large share of e commerce revenue by surfacing products a shopper is likely to buy: related items, frequently bought together, and personalized picks.
Two stage architecture
Recommender systems usually split into two stages to balance scale and quality.
- Candidate generation: cheaply narrow millions of products down to a few hundred using signals like co purchase, category, and recent views.
- Ranking: apply a richer, more expensive model to order those candidates by predicted relevance.
This keeps the expensive model running on a small set rather than the entire catalog.
Online and offline
- Offline jobs precompute embeddings and co occurrence tables in batch.
- Online serving combines those precomputed signals with real time context such as the current session and cart.
Pitfalls
- The cold start problem: new shoppers and new products lack history, so fall back to popularity or content based signals.
Key idea
Use cheap candidate generation to shrink the catalog, then an expensive ranking model, and handle cold start with fallbacks.