Save 25%Black Friday: 25% off all plans — use code BLACKFRIDAY2026 at checkout. Ends Friday, Dec 4.Claim the deal
1Framing the ProblemChapter 1

Every ad-supported platform faces the same core question: which ad should appear in this slot, right now, for this user? The answer must balance what the advertiser is willing to pay with how likely the user is to engage, and it must do so billions of times per day in under 50 milliseconds. Get it right and you have a revenue engine that funds the entire product. Get it wrong and advertisers overpay, users see irrelevant ads, and the marketplace loses trust on both sides.

We are designing the ML system that makes that decision for in-feed sponsored content. The business objective is to maximize auction revenue subject to user experience guardrails: a CTR (click-through rate) floor, a negative-feedback ceiling, and an ad load ratio that protects the organic feed. The first thing I would clarify in the interview is the surface. Feed ads ranking is the hardest variant because there is no explicit query intent. The model must predict engagement from user context and ad features alone, and it must produce calibrated probability scores that the auction trusts enough to charge real money.

What we are designing

The ML task is multi-objective prediction. Given a user, their context, and an ad candidate, predict calibrated P(click)P(\text{click}) and P(conversion∣click)P(\text{conversion} \mid \text{click}) to compute an expected value per impression. The downstream consumer is the ad auction service, which uses these calibrated scores to rank ads by eCPM (effective cost per mille), allocate ad slots, and determine what each advertiser pays under a second-price auction.

The high-level shape is a multi-stage pipeline. A retrieval stage produces thousands of eligible ad candidates from the active ad catalog. A lightweight pre-scorer filters those to hundreds. A heavy multi-task ranker scores the survivors with calibrated CTR and CVR (conversion rate) predictions. The auction uses eCPM to allocate slots and set prices. Behind the online path, an offline loop logs impressions, collects delayed conversion labels arriving days to weeks later, retrains the multi-task model, recalibrates, and publishes to serving.

Your progressLogin to save progress
Spot an issue or have a suggestion?