Classic design · Mid
Game recommendation
Classic interview design. Key points: collaborative filtering and implicit feedback.
Short answer
Classic interview design. Key points: collaborative filtering and implicit feedback. The interview script starts from a catalog of games and users with an interaction history, in the context of ML systems design. The suggested business goal is to increase engagement (playing, liking, clicking, sharing) and, perhaps, purchases, with personalized recommendation for each user.
01 · CONTEXT AND GOAL
What it means to recommend a game
The interview script starts from a catalog of games and users with an interaction history, in the context of ML systems design. The suggested business goal is to increase engagement (playing, liking, clicking, sharing) and, perhaps, purchases, with personalized recommendation for each user. Framed as an ML problem, the input is the user and the output is a ranked list of games with a relevance score.
For sizing, the script assumes 100 million games and 100 million daily active users, and suggests a latency of 200 ms.
| Objective to maximize | What the script points out |
|---|---|
| Number of clicks | Favors clickbait |
| Games, sessions, or levels completed | Bias toward shorter games |
| Relevant items (proxy via implicit and explicit reactions) | More control over the signals, without these problems |
The script asks for relevance to be defined explicitly: for example, a like already counts as relevant, or playing half the game.
02 · DATA AND IMPLICIT FEEDBACK
What the model learns from
The data comes from the user profile, game metadata, and user-game interactions (data pipelines). Historical interactions include playing, purchasing, liking, and searching, and the script also lists the impression as an interaction type.
Explicit feedback is what the user declares, such as a survey; implicit feedback comes from the behavior log. The script labels a user-game pair as positive when the user explicitly liked it or interacted for at least a minimum amount of time, for example half the game, and samples negatives from the background distribution.
In representing the inputs, categorical ids such as game, user, language, and city become embeddings learned during training, and title and description can use embeddings from a pretrained language model.
03 · THE FUNNEL
Three stages to fit the latency
| Abordagem | Vantagem | Limite |
|---|---|---|
| Collaborative filtering | Does not require domain knowledge | User and item cold start |
| Content-based | Recommends new items, with no item cold start | New-user cold start; requires domain knowledge |
The script's choice is a sequential hybrid, organized as a three-stage funnel (candidate generation, ranking, and re-ranking) to meet latency requirements. Collaborative filtering goes into candidate generation and content-based into ranking.
The player's app asks the recommendation service for the list for the user.
The service triggers the candidate generation modules: one by relevance (collaborative filtering), one by popularity, and one by trending.
At this stage a lightweight model reduces a catalog of millions to thousands of candidates.
The collaborative module looks up the games closest to the user in the embedding index, an approximate nearest-neighbor problem.
The ranker, with a more powerful model, focuses on precision and runs only on the subset of candidates.
Re-ranking applies business criteria, such as filters and promotion, and the final list goes back to the app.
04 · CANDIDATES AND RANKING
Two towers to generate, attributes to sort
| Criterion | Matrix factorization | Two-tower network |
|---|---|---|
| Vantagem | Fast training and serving (static embeddings) | Accepts user attributes and handles new users |
| Limite | Uses only user-item interactions; new-user cold start | Expensive training |
The script chooses the two-tower network: one tower encodes the user, another encodes the game, and the similarity between the two vectors is the relevance score. Training minimizes the cross-entropy over each positive example and over sampled negatives.
In ranking, the script prioritizes precision over efficiency and uses a model based on item attributes, with options such as a feed-forward network with logistic regression or a Deep Cross Network.
The app logs the player's interactions (playing, purchasing, liking, searching) to an event queue.
A labeling process builds user-game pairs, marks positives and samples negatives, and writes the dataset.
Two-tower training reads the dataset and minimizes the cross-entropy.
In the diagram, training publishes the generated embeddings to the index that the recommendation service queries.
The script asks that the model be fine-tunable with new data; in the diagram, it is the training reading the updated dataset again.
05 · COLD START AND BIASES
What breaks first
For new users, the two-tower network still accepts the user profile, so there is something to encode even without interactions. For new games, the script suggests recommending them to random users, collecting data, and fine-tuning the model with it.
Among the extensions, the script lists the exploration-exploitation dilemma, tied to the multi-armed bandit, and position bias and selection bias, both with detection and correction.
06 · METRICS AND DELIVERY
How to know whether it worked
| Tipo | Metrics cited |
|---|---|
| Offline | Precision@k, mAP, and diversity |
| Online | CTR, completed games, purchases, total play time, total spend, and user feedback |
In re-ranking, the script applies additional business criteria, such as age filter, region filter, new-content promotion, and deduplication.
Frequently asked questions
What is Game recommendation?
Classic interview design. Key points: collaborative filtering and implicit feedback.
What does the Game recommendation design cover?
It is organized in these sections: What it means to recommend a game, What the model learns from, Three stages to fit the latency, Two towers to generate, attributes to sort, What breaks first, and How to know whether it worked.
How long is Game recommendation and what level is it?
It takes about 14 minutes to read and is rated Mid level.
Now design it yourself
Run this case as an interview in the System Design school: you make the decisions, the tutor challenges them and you see how your design scores.