Senior interview questionAsked at Airbnb · interview write-up
Design a two-stage retrieval and ranking system, built on user embeddings, that surfaces the rental listings a user is most likely to book.
Model answer
Candidate retrieval: a two-tower model embeds the user, from search context and booking and click history, and each listing, from attributes, location and engagement. Train it on bookings as positives with in-batch negatives; an ANN index returns a few thousand listings, filtered to the searched market and available dates.
Ranking: a richer model scores those candidates with price, availability and user-listing cross features, predicting booking probability. Cold-start listings rely on content features. Judge offline with NDCG on held-out bookings, then run an A/B test on bookings.
Practise the rest
40 ML system design questions, 492 in all, each with a model answer. Free.
More from Airbnb interview questions.
More ML system design interview questions
- You need to copy 500 GB of weights to 1,000 GPU workers over shared 10 Gbps links. What's the lower bound on time, and what would you build?
- Design an LLM coding assistant end to end: data, model and evaluation.
- Design a job scheduler for ML training and batch inference on a shared GPU cluster.
- Training a retrieval model over a catalogue of millions of items, you use sampled softmax. Why does it need a correction, and how do you choose the classification loss?
- Design an inference API that converts PDFs into Markdown using several models in stages.
- How can LLMs be incorporated into recommendation systems, from metadata enrichment and cold start to generative retrieval and semantic reranking?