Patterns

  1. 1 Retrieval and Ranking: the Multi-Stage Funnel "With 10 million items and 200 ms, I'll use a funnel. Retrieval pulls about a thousand candidates from several sources: two-tower embeddings with nearest-neighbour search, co-watched items, followed creators and trending. A heavy ranker with cross features scores those and predicts watch, like an... 4 min read
  2. 2 Two-Tower Models and Vector Search "For retrieval I'd train a two-tower model on watched pairs with in-batch negatives and a popularity correction. Item vectors are computed offline and put in an approximate nearest-neighbour index, rebuilt daily with new items added within minutes. At request time I compute one user vector from r... 4 min read
  3. 3 Feedback Loops, Position Bias and Exploration "This system trains on data it generated, so it will keep favouring what it already shows. I'd log the position of every impression and train with position as a feature, fixed at serving. I'd reserve one slot in the top ten on a small share of requests for exploration, boost new items for their f... 4 min read
  4. 4 Cold Start "For a new user I'd lean on context, popular-in-region and a quick topic picker, and update their vector from each video they watch in the session. For a new video, the item tower uses content features, so it's retrievable minutes after upload, and it gets a capped exploration budget to matching ... 4 min read