Code Room
System designHardsd-g332
Subject PersonalizationLevel Senior–Staff~50 minCommon in ML systems interviewsIndustries Technology, Software development

Question

Design the *serving* path for a learning-to-rank (LTR) model in product search: a query retrieves up to 2,000 candidate items, and for each you must assemble a ~150-dimensional feature vector (query-item features, item features, user-item features), score all 2,000 with a gradient-boosted tree (or small DNN), and return the top 24 — all in under 120ms p99 at 30k searches/sec. Focus on feature assembly and consistency, not on training the model. How do you avoid the feature vector being slow or *different* from what training saw?

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.