Senior interview questionAsked at Uber · interview write-up
Predict whether an ad impression is clicked within 24 hours at a 0.7% positive rate, with high-cardinality IDs and delayed labels: how do you build and assess the model?
Model answer
Train only on impressions older than 24 hours, so labels are final, or model the delay explicitly. High-cardinality IDs go through hashed or learned embeddings, plus crosses and historical click counts; a wide-and-deep or trees-plus-linear model is a solid start. Keep the 0.7% rate, or downsample negatives and correct the probabilities afterwards.
Assess with log loss and calibration, since bidding uses the probability itself, plus AUC, on a time-based split. Then an online A/B test on revenue and click-through, and monitor calibration drift daily.
Practise the rest
35 Training questions, 492 in all, each with a model answer. Free.
More from Uber interview questions.
More Training interview questions
- Implement masked cross-entropy in NumPy that stays numerically stable, with label smoothing and a temperature.
- Build a pipeline that finds math documents in web crawls and scores their quality.
- Explain KL divergence for language models: which direction is which, what happens when supports don't match, and how it's used as a regulariser.
- When would you use mean squared error versus cross-entropy? And what is LoRA?
- Explain Adam and its bias correction, and why AdamW decouples weight decay.
- Explain policy types in RL and modern policy-gradient methods such as TRPO, PPO and GAE, then compare linear attention and grouped-query attention.