Design Invalid Click Filtering for Sponsored Products Ads
Last updated: November 29, 2026
Quick Overview
Sponsored Products advertisers pay per click, so bot clicks and competitor click attacks waste their budgets. Design a system that identifies invalid clicks in real time and offline, so advertisers are not charged for them.
Amazon
November 29, 20260
0
0 solved
Sponsored Products advertisers pay per click, so bot clicks and competitor click attacks waste their budgets. Design a system that identifies invalid clicks in real time and offline, so advertisers are not charged for them.
An ML system design question in the style of Amazon Ads traffic quality teams. The interviewer checks that you combine a fast real-time filter with a slower, more accurate offline pass, think about billing consistency, and measure success without ground truth for most clicks.
What the Interviewer Expects
- Separates real-time filtering from offline batch adjudication
- Uses traffic, behavioral and advertiser-level features
- Explains labeling without direct ground truth
- Designs billing so refunds stay consistent and auditable
- Detects targeted attacks on one advertiser
- Balances advertiser trust against platform revenue
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 detect a competitor clicking a rival's ads by hand?
- How do invalid clicks affect the ad ranking models downstream?
- What evidence would you give an advertiser who disputes a charge?
- How would you catch a new botnet with no history?
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
M
- Every ad click is evaluated; clicks judged invalid are not charged and are excluded from advertiser reporting.
- Real-time decision within the click redirect path (a few ms) plus an offline pass wit...
L
- Real-time filter: rules and a light model using IP reputation, known bot user agents, click rate per device per minute, and duplicate clicks within seconds.
- Click log: all clicks recorde...