KatInterview

Designing a Feed Ad Recommendation and Ranking Engine

Machine LearningModel answer
HardModel answerMachine Learningrecommender-systemsrankingctr-prediction

Last updated

Architect an end-to-end Machine Learning ad recommendation system for a content feed, balancing ad revenue with user experience, delayed feedback, counterfactual evaluation, and budget pacing.

You are tasked with designing an end-to-end ad recommendation and ranking system for an integrated content feed (such as a short-form video application or news stream). At each position in the feed, the application can insert either an organic content item or a targeted advertisement.

Your solution should address the following requirements:

  1. System Objectives & Trade-offs: Define the multi-objective optimization problem. Explain how to mathematically combine user retention/experience metrics with advertiser monetization goals, and how to decide whether to show an ad or an organic item at a given slot.
  2. Predictive Modeling Architecture: Propose the ML modeling framework for predicting key engagement events (pCTR, pCVR, expected value/revenue, negative feedback). Define the data schema, feature engineering, and label generation strategies, explicitly addressing sample selection bias (e.g., in conversion modeling) and delayed feedback.
  3. Core ML Challenges: Detail how your design handles:
    • Counterfactual evaluation and logged-policy selection bias.
    • Exploration vs. exploitation (e.g., cold start for new ads/creatives).
    • Real-time advertiser budget pacing and delivery constraints.
  4. Evaluation Strategy: Outline an offline metrics framework (including counterfactual estimators) and an online A/B testing plan with business and guardrail metrics.

Hints

Hint 1

Formulate the slot decision as a constrained optimization problem, using a Lagrangian multiplier (or exchange rate) to convert organic user-experience degradation into monetary units.

Hint 2

Address CVR sample selection bias via Entire Space Sequential Pattern Structuring (such as ESMM) to avoid training exclusively on clicked impressions.

Hint 3

For delayed conversion feedback, consider importance weighting (fake-negative correction) or survival/delay modeling rather than waiting for full attribution windows to close.