Design a Real-Time Model That Nudges Uncivil Replies Before Posting

Last updated: November 29, 2026

Quick Overview

Design the ML system behind a feature that detects a likely hurtful or uncivil reply while the member is composing it and asks them to reconsider, covering labels, model choice, serving latency, thresholds and fairness monitoring.

Nextdoor
ML System Design
Machine Learning Engineer
Nextdoor
November 29, 2026
Machine Learning Engineer
Onsite
ML System Design
Hard

0

0

0 solved


Design the ML system behind a feature that detects a likely hurtful or uncivil reply while the member is composing it and asks them to reconsider, covering labels, model choice, serving latency, thresholds and fairness monitoring.

Civility nudges are a signature Nextdoor trust feature, and the ML has to be fast, precise, and fair across regions and dialects, because a false nudge feels like being scolded by your neighborhood app. The interviewer checks label strategy, a latency-aware serving design, threshold selection tied to product cost, and ongoing monitoring.

What the Interviewer Expects
  • Define the label from multiple signals (reports, moderator removals, human review) and discuss their bias
  • Choose a model that meets a tight latency budget, such as a distilled transformer
  • Explain context features: the parent post, thread heat, prior interactions
  • Pick thresholds from precision targets and measure nudge outcomes
  • Monitor fairness by language, region and dialect, and retrain against drift
Key Topics to Cover
Text classification
Label quality
Low-latency inference
Threshold calibration
Fairness monitoring
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 handle languages where you have few labels, such as a new country launch?
  • Members learn to evade the model with spelling tricks. What do you do?
  • Should the same model also auto-hide posts? Why or why not?
  • How would you use the edit-or-abandon outcome as a training signal without creating a feedback loop?
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

Score a draft reply when the member taps post (and optionally while typing, debounced). Budget: p99 under 100 ms end to end, so the nudge feels instant. Target precision at the nudge threshold of at l...

High-Level Design

Offline: training data from replies with outcomes (reported, removed by moderators, labeled by trained raters on a sampled set), plus hard negatives (heated but civil disagreement). Model: a multiling...


Submit Your Answer
Markdown supported

Related Questions