Every user and every item is a point (an embedding vector) in a shared latent space, colored by its dominant taste cluster (Action / Drama / Comedy / Documentary). A recommender never sees genres directly — it just learns coordinates such that things a user would enjoy end up nearby.
score(u, i) = (e_u · e_i) / (‖e_u‖ ‖e_i‖) — cosine similarity
top-K(u) = argmax_i score(u, i) — ranked retrieval
s_t = β·s_(t-1) + (1-β)·e_(item_t) — session vector (sequential)
- Two-Tower / CF — collaborative filtering via a learned two-tower model: the user tower's embedding is compared directly against every item tower's embedding by cosine similarity, and the top-K highest-scoring items are retrieved as candidates.
- Content-based — instead of the user's own learned vector, similarity is measured against the embedding of the single item the user liked most recently, so recommendations chase that item's content features rather than the whole taste profile.
- Sequential — a session vector
s_t is updated as an exponentially-decayed average of recently viewed items as a marker walks the user's history; recommendations drift to follow the session rather than staying fixed.
- Embedding noise — Gaussian jitter added to every vector, standing in for an under-trained or sparse-data model; higher noise pushes nearest neighbors further from the user's true taste cluster, lowering precision@K.
Real production systems (e.g. YouTube's or Pinterest's two-tower retrieval stage) work exactly like the CF panel here: an approximate-nearest-neighbor index finds the top-K item vectors closest to the user vector in milliseconds, before a separate, heavier ranking model re-scores that shortlist.