← Google Interview Insights

Google·Machine Learning Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jun 2026

Summary

Google ML Engineer interview with a meaty system design question about building a real-time bandit-style recommendation loop. One question, but it had a lot of surface area and I felt like I was constantly playing catch-up on the details.

Questions Asked (1)

Q1

Design a recommendation system that, at each interaction, selects one item from four candidates to show a user, collects immediate feedback, and continuously updates the model to improve future selections. Walk through your model choice, feature engineering, how you handle feedback, your exploration vs. exploitation strategy, and how you'd evaluate the system both offline and online.

System DesignA/B Testing & ExperimentationTechnical Trade-offs
Author's notes

I went with a contextual bandit setup using a linear model with upper confidence bounds, which felt safe but I second-guessed myself mid-answer and started rambling about neural bandits before snapping back.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the problem as a contextual bandit with a slate of four candidates, then propose a model like a neural network that scores each candidate and selects the highest-scoring one with an epsilon-greedy or Thompson sampling exploration strategy. Walk through feature engineering, feedback incorporation via online learning, and evaluation using both offline metrics (e.g., replay) and online A/B tests.

Pro tip: Emphasize the importance of logging propensities and using counterfactual evaluation to avoid feedback loops, and mention that you'd start with a simple model and iterate, showing pragmatism and awareness of production constraints.

1. Clarify requirements and constraints

Ask about latency, scale, cold-start, and business metrics to scope the system. Confirm that feedback is immediate and that the model must update continuously.

2. Choose model and features

Propose a contextual bandit approach with a neural network or gradient-boosted trees to score candidates. Engineer user, item, and context features, including embeddings and interaction history.

3. Design feedback and exploration strategy

Use epsilon-greedy or Thompson sampling to balance exploration and exploitation. Log propensities and update the model online using incremental learning or periodic retraining.

4. Evaluate offline and online

Offline: use replay or counterfactual estimators to evaluate new policies. Online: run A/B tests with guardrail metrics and monitor for feedback loops and novelty effects.

5. Iterate and monitor

Set up monitoring for model drift, latency, and business metrics. Plan for continuous improvement and handling of edge cases like cold-start and position bias.

Key Points to Mention

  • Contextual bandit formulation with four arms per interaction
  • Feature engineering: user demographics, item attributes, context (time, device), and embeddings
  • Exploration vs. exploitation: epsilon-greedy, Thompson sampling, or UCB
  • Online learning: incremental updates, experience replay, and handling delayed feedback
  • Offline evaluation: replay method, inverse propensity scoring, and off-policy evaluation
  • Online evaluation: A/B testing, interleaving, and guardrail metrics

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.