Design Smart Reply Suggestions for Gmail on Mobile

Last updated: November 29, 2026

Quick Overview

Design the ML system that suggests three short replies under an incoming Gmail message on mobile, covering candidate generation, ranking, safety, and latency.

Google
ML System Design
Machine Learning Engineer
Google
November 29, 2026
Machine Learning Engineer
System Design Round
ML System Design
Hard

0

0

0 solved


Design the ML system that suggests three short replies under an incoming Gmail message on mobile, covering candidate generation, ranking, safety, and latency.

Smart Reply is a well-known Google product where quality, privacy, and safety constraints all bind at once. Interviewers look for a retrieval-then-rank design, a curated response set, diversity in the top three, and strong privacy handling.

What the Interviewer Expects
  • Clarify scope: which emails trigger suggestions and success metrics
  • Propose a fixed whitelist of responses with a dual-encoder retrieval model
  • Explain triggering model, ranking, and diversity selection
  • Address privacy (no human reading mail) and offensive outputs
  • Cover latency, serving location, and online evaluation
Key Topics to Cover
Dual encoder
Response whitelist
Triggering model
Diversity
Privacy-preserving ML
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
  • How would you support 20 languages?
  • Would you move to a generative model, and what changes?
  • How do you prevent suggestions from being repetitive across users?
  • How do you evaluate without reading users' emails?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice ML System Design Problems
Sample Answer
Requirements

Functional: for an incoming email, decide whether to show suggestions; if yes, show three short, diverse, appropriate replies. Non-functional: under 100 ms extra latency, no offensive or presumptuous ...

High-Level Design
  1. Triggering model: small classifier predicts whether a short reply is appropriate (skip newsletters, long questions, sensitive topics). Most mail never reaches the next stages, saving compute. 2...

Submit Your Answer
Markdown supported