Classic design · Senior
Place feed for a new city (Meta, L5)
Classic interview design. Key points: geographic candidates and user cold start.
Short answer
Classic interview design. Key points: geographic candidates and user cold start. This case's prompt is an interview one: design a place recommendation feed for a user arriving in a new city, asked in an L5-level interview at Meta. According to the source, the ML system design rounds always come back to recommendation, ranking, and retrieval, framed in the company's own…
01 · CONTEXT
The prompt: a places feed for someone who just arrived
This case's prompt is an interview one: design a place recommendation feed for a user arriving in a new city, asked in an L5-level interview at Meta. According to the source, the ML system design rounds always come back to recommendation, ranking, and retrieval, framed in the company's own product.
02 · STRUCTURE
A roadmap for running the interview
The source proposes DRIVE, a five-step framework for the ML system design round: Define, Retrieve, Iterate, Validate, and Enter production. It also recommends finishing the core structure quickly so there is time to go deep on two areas.
| Etapa | What to cover |
|---|---|
| Define | State the goal, frame the task (ranking, retrieval, classification), and name the label before designing. |
| Retrieve | Data sources, sampling, and featurization; one cited example is featurizing location data for a feed (Meta). |
| Iterate | Training and tuning: architecture, two-tower models, learning rate decay, and batch size. |
| Validate | Offline and online evaluation, calibration, and error analysis by slice. |
| Enter production | Serving, monitoring, retraining, and the feedback loop. |
03 · CANDIDATES AND COLD START
From the prompt to a possible design
Two points in the source touch this prompt. The first is featurizing location data for a feed, cited as an example of a real prompt. The second is two-tower models, in which separate encoders for query and candidate underpin retrieval at scale.
Applied to the problem, one possible approach is to split the recommendation into stages: a retriever that limits candidates to places in the region where the person is, and a ranker that orders that set. Since the user just arrived, they may have little or no history there; this is user cold start, and signals from other cities or from the visit context can take the place of history.
The app asks the feed service for the feed, stating who the person is and which city they are in.
The feed service invokes the candidate generator, which queries the place index for the region.
The person's profile and signals are read; this is where the lack of history in the new city shows up.
The ranker receives the candidates, reads the signals, and orders the places.
The feed service returns the ordered list to the app.
04 · VALIDATION AND PRODUCTION
Measure, retrain, and don't ignore the feedback loop
For validation, the source calls for offline and online evaluation, calibration, and error analysis by slice, and lists as a key concept knowing which metrics to trust before and after deployment. Calibration, in its terms, is predicted probabilities matching observed rates, with emphasis on ad ranking.
In production, the source calls for covering serving, monitoring, retraining, and the feedback loop, that is, how the recommender's outputs shape the data it trains on later and how to account for that.
The logged interactions feed the training of the ranking model.
The trained model is stored alongside the embeddings.
The places' embeddings are computed and published to the index used by the online path.
The model and interaction metrics reach monitoring, which closes the evaluation loop.
Frequently asked questions
What is Place feed for a new city (Meta, L5)?
Classic interview design. Key points: geographic candidates and user cold start.
What does the Place feed for a new city (Meta, L5) design cover?
It is organized in these sections: The prompt: a places feed for someone who just arrived, A roadmap for running the interview, From the prompt to a possible design, and Measure, retrain, and don't ignore the feedback loop.
How long is Place feed for a new city (Meta, L5) and what level is it?
It takes about 16 minutes to read and is rated Senior 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.