The probe
Two distinct recommendation problems that look similar but require different architectures:
1. Collaborative filtering (”users like you also liked X”) — requires knowing the preference matrix across all users
2. Content-based filtering (”because you liked X, you might like Y”) — requires embedding items in a vector space
Production systems use both, ensembled.
Step 1 — Collaborative Filtering at Scale
The preference matrix: Users × Items, with values = interaction strength (play count, rating, purchase). At Netflix: 270M users × 10K titles = 2.7T cells (sparse — most users have seen < 0.1% of catalog).
Matrix factorization (ALS): Decompose the user-item matrix into two lower-rank matrices: User vectors (U) and Item vectors (I), where U × Iᵀ ≈ the original matrix. Each user gets a 128-dimensional vector; each item gets a 128-dimensional vector. Recommendation = find items whose vector is closest to the user’s vector.
Approximate nearest neighbor (ANN): Given a user vector, find the K nearest item vectors. FAISS (Facebook AI Similarity Search) builds an index of item vectors and returns top-K in O(log N) time.
Training: ALS runs offline (weekly or daily) on the full interaction matrix. Too expensive for real-time. Outputs: user vectors (one per user) and item vectors (one per item) — stored in the feature store.
Inference (online): ANN lookup on the precomputed item index, given the user’s stored vector. Returns top-K candidates in < 50ms.
52 FAANG Question Vault — $299 one-time (or $249 for paid subscribers)
All 52 walkthroughs + 52 drill cards + 6 framework cheatsheets + the Senior+ System Design Playbook. Everything, immediately. Lifetime access with all future updates included. → [VAULT CHECKOUT LINK]


