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
November 29, 20260
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
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- 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 ProblemsSample 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...