Gmail's Smart Compose and Smart Reply: Inside the Machine
AI · 6 min read
Smart Compose and Smart Reply hinge on sequence models that predict text continuations and canned responses. Early iterations used n-gram and LSTM models, while modern implementations leverage transformer-based architectures fine-tuned on email-specific corpora. Production constraints require careful quantization and pruning to meet strict latency and memory budgets.
Latency is particularly important in inline composition features; predictions must arrive near-instantaneously so they feel like a natural extension of typing. Gmail dynamically decides between on-device lightweight models and server-side heavy models, using heuristic triggers to minimize network overhead while preserving quality. Privacy concerns also drove designs where sensitive data processing happens on-device when feasible.
From a UX standpoint, subtlety is key. Suggestions are presented as faint, inline ghost text or small reply chips, allowing users to accept, ignore, or modify with minimal disruption. The feature avoids aggressive automation; instead it augments user intent. Continuous A/B testing on phrasing, suggestion frequency, and trigger heuristics guided gradual rollout to avoid novelty backlash.