Uber interview questions
Big tech · 5 questions reported
- junior 0
- mid 3
- senior 2
These are 5 technical questions candidates reported being asked in Uber interviews for AI engineer, ML engineer and applied AI engineer roles, each with a model answer you can say out loud in a minute or two. They cover ml system design, attention, error analysis and training: 0 junior, 3 mid-level and 2 senior questions. Every question comes from a public interview write-up that names Uber.Updated
Uber attention and the transformer block questions
Model answer
Project once, split into heads, attend in each head, merge.
def mhsa(x, w_qkv, w_o, h): # x: (B, T, d)
B, T, d = x.shape
q, k, v = (x @ w_qkv).split(d, -1)
heads = lambda t: t.view(B, T, h, -1).transpose(1, 2)
q, k, v = heads(q), heads(k), heads(v) # (B, h, T, d/h)
s = q @ k.transpose(-2, -1) / (d // h) ** 0.5
future = torch.ones(T, T, dtype=torch.bool,
device=x.device).triu(1)
s = s.masked_fill(future, float("-inf"))
y = s.softmax(-1) @ v
return y.transpose(1, 2).reshape(B, T, d) @ w_o
Interviewers watch for the mask before softmax, scaling by the head size, not d, and the transpose before the final reshape.
Uber error analysis questions
Model answer
Sorting by distance favours cheap, nearby items, so carts fill more often but with smaller baskets. Decompose revenue per session into conversion times order value and slice by category and price band to see which term moved.
Replace it with a ranker scoring expected revenue: relevance times conversion times basket value, with distance as one feature. To separate causes, A/B test old, new, and a distance ranking reweighted to the old price mix.
Uber training and optimisation questions
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.
Uber mL system design questions
Model answer
Label: actual trip time. Start from a routing engine's ETA over the road graph, then learn a residual correction from time of day, live traffic, region, weather and trip type, as DeeprETA does. Serve a compact model with cached features.
Ground truth lands when the trip ends, so track error by segment as labels arrive, watch feature drift meanwhile, and retrain regularly. Pick the loss by business cost, asymmetric if lateness hurts more.
Model answer
Two stages: retrieve a few hundred eligible stores, filtered by delivery radius and opening hours, then rank them.
Labels come from the funnel: click, add to cart, order, with orders the main target. A multi-task model predicts each step, and the final score blends them with business terms like delivery time and fees. Features: user history and cuisine affinity, store quality, ETA, price, time and location. Labels carry position bias, so log position and correct for it. Evaluate offline with NDCG against orders, then A/B test orders per session, gross bookings and retention.
Each question comes from a public interview write-up or video that names Uber; the answers are ours. Not affiliated with Uber.