Recommendation systems interview questions

7 questions across 4 sections, in the order you would learn them. Every answer here is one that works — but an answer you have read is not an answer you can give, so use Test yourself and say it out loud first.

Matching people to items

Read the section that teaches this

If this comes up in an interview

How would you design a recommender system?

Two stages: cheap candidate generation narrowing millions to hundreds, then expensive ranking of those. Combine collaborative and content signals, handle cold start with content features and popularity, and include deliberate exploration.

What is the cold start problem?

New users have no history and new items have no interactions, so collaborative filtering has nothing to work from. Content features, popularity defaults and exploration cover the gap until enough signal accumulates.

Why do offline metrics mislead for recommenders?

You only observe interactions with what was shown, under the previous system. A better recommender surfaces different items, which offline scoring counts as wrong. Live experiments are necessary rather than optional here.

Ranking models and how to measure them

Read the section that teaches this

If this comes up in an interview

What is a two-tower model?

Separate networks embed users and items, and relevance is their similarity. Item embeddings are precomputed, so retrieval is a fast nearest-neighbour search. It is the same design as dense retrieval in RAG.

Why use NDCG rather than precision for ranking?

NDCG rewards placing the most relevant items at the top, since users mostly see the first few results. Precision at k treats every position in the top k equally.

Build a recommender end to end

Read the section that teaches this

If this comes up in an interview

How would you evaluate a recommender offline?

A time-based split so the model never sees the future, ranking metrics such as recall at k and NDCG against each user's later interactions, and comparison against a tuned popularity baseline. Then treat offline results as a filter and confirm with an online test, since offline data reflects what the old system chose to show.

Then they push further

Why is offline evaluation biased?

Users could only interact with what the previous system showed them. Items it never surfaced have no interactions, so a new model that recommends them looks wrong offline even if users would love them.

What gets marked up. Marked up for time-based splits, a popularity baseline, and naming exposure bias.

The recommender system design interview

Read the section that teaches this

If this comes up in an interview

Design the recommendation system for a short-video app's home feed.

Clarify the objective and scale. Then describe multi-source candidate generation, including two-tower retrieval with approximate nearest neighbour search, a ranking model predicting several engagement signals combined by weights tied to the goal, re-ranking for diversity and freshness, logging of impressions and outcomes, cold-start handling, exploration, and evaluation with time-split offline metrics and online A/B tests.

Then they push further

Engagement went up but users report the feed feels repetitive. What do you change?

Add diversity in re-ranking, penalise near-duplicates and over-represented creators, include longer-term signals such as return visits in the objective, and track a diversity metric and user surveys as guardrails.

How do you handle a brand-new video with no interactions?

Embed it from content features such as visuals, audio, text and creator, give it a small exploration budget of impressions, and let early engagement quickly update its ranking.

What gets marked up. Strong answers start from the objective, separate retrieval from ranking, and address feedback loops and cold start without prompting.

These are the questions for one topic. The whole question bank covers every topic on the site.