Most recommenders are judged on accuracy alone, and many can score well simply by showing everyone the same few bestsellers. ElectroPicks set out to build a store that is genuinely personal, covers the catalogue, and responds in real time.
- 22.6M
- raw Amazon Electronics reviews
- +25%
- NDCG@10 over the popularity baseline
- 85%
- of the catalogue covered by recommendations
- 27.5 ms
- mean end-to-end API response (35.7 ms p95)
The data
The project uses the Amazon Reviews 2023 Electronics category. After keeping reviews from 2019 onward, filtering to users and items with at least five interactions, and capping at five million interactions, the training set has about 552,000 users and 148,000 items. The split is by time, not at random: the test period is the final 10% of the timeline, so the models are always predicting the future.
Offline: from baselines to ranking
- 01Baselinesrandom and popularity recommenders, plus an evaluation harness for Recall, NDCG, and catalogue coverage
- 02Matrix factorisationMF-BPR written from scratch in PyTorch
- 03Two-tower retrievala user tower that pools recent history and an item tower, trained with in-batch negatives
- 04RankingLightGBM LambdaRank re-ranks the top 100 FAISS candidates using 12 user, item, cross, and time features
Online: every request
- 01Historythe user's last 20 items from PostgreSQL
- 02Encodethe TorchScript user tower
- 03RetrieveFAISS top 100 across 148,000 items
- 04Rank and diversifyLightGBM re-ranking, a brand cap, and optional MMR for variety
- 05Explaineach pick comes with a "Because you viewed…" reason
What we learned
- Only the full pipeline beat popularity. Two-tower retrieval plus LightGBM was the only personalised method to beat the popularity baseline on NDCG@10, with a 2.5× lift over retrieval alone.
- Coverage matters as much as accuracy. The popularity baseline covered 0.05% of the catalogue; the full pipeline covered 85%.
- An honest negative result. MF-BPR converged to a popularity clone. We reported it rather than hiding it.
- Freshness beats popularity. Item age was the most important ranking feature.
- Profile before you optimise. One ranking step first took about a second; converting the feature store once at startup made the pipeline 28× faster end to end.
What I would do next
- Blend content-based item embeddings into the index so new items can be recommended: 31% of test items never appear in training.
- Train separate rankers per user-activity segment to close the cold-start gap.
