Requirements
What it is
Clarify first. For 'Top picks for you' on the home screen:
- goal: more products added to baskets from the row, without hurting order value or satisfaction;
- scale: 8,000,000 home-screen opens a day, about 278 a second at peak; 50,000 products per city, stock differs by store;
- latency: the row must be ready within 100 ms (p99) of the request;
- freshness: react to what the customer is doing in this session; new products recommendable within a day;
- constraints: only in-stock items at the customer's store; no restricted items (alcohol, tobacco) where not allowed; at most one sponsored item.
Why it matters
Each requirement removes options.
- 100 ms and 50,000 items rule out scoring everything with a heavy model: a two-stage design is needed.
- Per-store stock means filtering must happen at request time or per store.
- Session freshness means some features must be computed live.
In the real world: In interviews, writing these five lines on the board in the first five minutes and referring back to them is the strongest opening.
Skipping straight to 'collaborative filtering'. Without the goal and limits, you cannot justify any architecture.