KatInterview

Designing a User-Generated Game Recommendation System

Machine LearningModel answer
MediumModel answerMachine Learningrecommendation-systemsmachine-learningsystem-design

Last updated

Architect an end-to-end recommendation backend and ML pipeline for a large platform offering user-created interactive experiences, emphasizing cold-start strategies and multi-task learning.

You are tasked with designing a personalized game discovery engine for a large-scale gaming platform featuring millions of user-generated interactive experiences and tens of millions of daily active players. The engine generates the main "Recommended for You" section on the user's home screen.

Core Requirements

  1. Objective & Loss Formulation: Define the primary optimization targets. How do you convert complex user engagement behaviors into concrete ML loss functions while avoiding clickbait traps?
  2. Feature Engineering & Cold-Start Strategy: Detail user, item, context, and cross features. Propose a clear method for handling newly published games (item cold-start) and brand-new players (user cold-start).
  3. Multi-Stage Architecture: Outline a multi-stage pipeline (Retrieval, Pre-Ranking, Heavy Ranking, Re-Ranking) capable of filtering millions of candidates down to a top-50 feed under low-latency constraints.
  4. Data Pipeline & Train/Serve Skew: Explain how to build the training dataset, capture labels correctly, handle attribution windows, and avoid temporal data leakage.
  5. Evaluation Strategy: Define offline evaluation metrics and outline an online A/B testing strategy.

Constraints & Context

  • Target Latency: $p_{99} < 180\text{ ms}$ end-to-end.
  • Dynamic Content: Thousands of new games are created daily; game popularity can surge or decay rapidly within hours.
  • Catalog Heterogeneity: Games vary wildly in genre, style, and session length (e.g., 2-minute casual arcade games vs. 45-minute multi-player RPGs).

Hints

Hint 1

Avoid relying solely on Click-Through Rate (CTR); raw clicks favor misleading thumbnails over long-term retention.

Hint 2

For item cold-start, separate behavioral signals from content signals using modality encoders (text, thumbnail, creator history) and structural dropouts during training.

Hint 3

Log feature snapshots directly at inference time rather than relying on point-in-time offline backfills to guarantee zero train-serve feature skew.