Ad CTR prediction and calibration

DesignHard45 minGoogle and Meta style

Your task

Design an ad click-through-rate (CTR) prediction system for an ad exchange. For each ad request you must score candidate ads and pick the auction winner within ~20ms p99 at ~100k requests/sec. The predicted CTR (and predicted conversion rate) directly sets the bid in the auction, so probabilities must be well-calibrated, not just well-ranked. Features include user, context, and ad-creative signals, many of them high-cardinality and sparse (ad IDs, publisher IDs, user segments). New ads appear continuously and must start serving without weeks of history, and there's strong feedback: you only observe clicks on ads you chose to show.

It covers

  • Ctr prediction
  • Ads
  • Calibration