Day 105 of 133

RecSys foundations + two-tower + ranking + sequential

MF, two-tower, MMoE/PLE, position bias (PAL), SASRec / BERT4Rec.

DSA · NeetCode Heap / Priority Queue

  • Last Stone WeightDSA · Heap / Priority Queue

    Interview questions to prep

    1. Why is a heap the right structure? Could a balanced BST or sorted list work — why is heap better?
    2. Explain the heap-of-k pattern: keep size k, push new, pop if over k. What's the resulting complexity?
    3. What does the comparator look like, and how would you tweak it to flip min/max behaviour?

Specialization · RecSys foundations

  • Interview questions to prep

    1. Walk through matrix factorization for recommendations and how SGD trains it.
    2. What's the cold-start problem in CF and how do hybrid models fix it?
  • Interview questions to prep

    1. How did Restricted Boltzmann Machines model user-item interactions in early recommender systems?
    2. When would matrix factorization or two-tower retrieval beat an RBM-style recommender today?
    3. How do similarity metrics and bias terms change nearest-neighbor or collaborative-filtering recommendations?
  • Interview questions to prep

    1. Compare content-based vs collaborative filtering — when does each fail?
    2. How would you blend content and CF signals — what's the failure mode of naive averaging?
  • Interview questions to prep

    1. Compare nDCG, MAP, MRR, and Recall@k — when do you use each?
    2. Why do offline metrics often disagree with online A/B test results in recsys?

Specialization · Two-tower retrieval

  • Interview questions to prep

    1. Walk through the YouTube two-tower paper — what does sampling-bias correction fix?
    2. Why is in-batch negative sampling biased, and how do you correct for it?
  • Embedding tables & ANN servingDeep LearningPinecone

    Interview questions to prep

    1. How would you serve a billion-item two-tower retrieval system at sub-50ms?
    2. How do you keep the item embedding index fresh as new items are added every minute?
  • Temporal & freshness signalsDeep LearningGoogle

    Interview questions to prep

    1. How would you incorporate item freshness without hurting long-term relevance?
    2. What's the right way to encode time-of-day and day-of-week signals in a recsys?

Specialization · Ranking & multi-task

  • Interview questions to prep

    1. Walk through MMoE — how does it handle conflicting tasks?
    2. Compare MMoE vs PLE — what does PLE fix?
  • Interview questions to prep

    1. What is position bias in CTR ranking, and how does PAL correct for it?
    2. How would you measure how much position bias is contaminating your training labels?
  • Calibration in ranking modelsDeep LearningEugene Yan

    Interview questions to prep

    1. Why is calibration important even when only ranking matters?
    2. Compare Platt scaling, isotonic regression, and temperature scaling — when does each fit?

Specialization · Sequential & LLM-based recsys

  • Interview questions to prep

    1. Compare SASRec and BERT4Rec — when does each win?
    2. What is causal masking in sequential recsys and why does it matter for next-item prediction?
  • Interview questions to prep

    1. What's the case for and against using LLMs directly for recommendation?
    2. How would you serve an LLM-based recsys at billion-user scale without exploding cost?
  • Causal & off-policy recsysDeep LearningEugene Yan

    Interview questions to prep

    1. Walk through off-policy evaluation for a recsys without rolling out a new model.
    2. How would you account for selection bias when training on logged user clicks?

References & further reading