How to Architect a Personalized Ads Serving System
Full-Funnel Ads Serving System Design
Scenario
You are asked to architect a full-funnel advertising platform that serves personalized ads to users on a social media app. The system should maximize long-term value by balancing user experience and advertiser outcomes under latency and scale constraints.
Task
Design an end-to-end ads serving system. Address:
-
Data collection and event schema
-
Feature engineering and feature store (offline/online parity)
-
Model architecture: retrieval → ranking → re-ranking
-
Real-time serving and latency budgets
-
Feedback loops and training pipelines
-
Exploration vs. exploitation strategies
-
A/B testing design and evaluation
-
Offline and online metrics to track
-
Cold-start handling for users and ads
Assume standard ad objectives (e.g., CPC/CPA) and typical mobile feed constraints.
Hints
-
Think multi-stage candidate generation (retrieval → ranking → re-ranking)
-
Latency budgets and fallbacks per stage
-
Point-in-time correct joins in the feature store
-
Bandits for exploration/exploitation
-
Calibration and counterfactual evaluation for offline metrics
Constraints & Assumptions
-
Preserve the scope, facts, inputs, and requested outputs from the prompt above.
-
If the prompt leaves a detail unspecified, state a reasonable assumption before relying on it.
-
Keep the answer interview-ready: concise enough to present, but concrete enough to implement or evaluate.
Clarifying Questions to Ask
-
Clarify the task, data shape, labels, constraints, and evaluation metric.
-
State assumptions behind the math or modeling technique you choose.
-
Connect theory to practical training, debugging, and deployment implications.
What a Strong Answer Covers
-
Correct definitions and formulas where the prompt requires them.
-
A practical explanation of how the method behaves on real data.
-
Trade-offs, failure modes, diagnostics, and mitigation strategies.
-
Evaluation choices that match the product or modeling objective.
Follow-up Questions
-
How would noisy labels, class imbalance, or distribution shift affect the answer?
-
What would you monitor after deployment?
-
Which baseline would you compare against first?