← Questions

Design an ads ranking system with calibrated predictions

0
MetaAI/ML designLast asked Jan 2026

An AI/ML design interview question asked in Meta's AI/ML design round, last asked Jan 2026. It tests ads, ranking and calibration.

Design the system that ranks ads for a user on a large social platform. For each ad request, it predicts the probability of a click and of a conversion for each candidate ad, combines them with the advertiser's bid, and picks the ads to show. Because the predictions set prices in an auction, they must be calibrated (a predicted 2% click rate must really mean about 2%), not just ordered correctly.

Requirements

  • Functional: for a request (user, placement, context), retrieve candidate ads, predict click and conversion probabilities, compute expected value per ad (bid times predicted probability, plus quality terms), and run the auction.
  • Functional: training on logged impressions, clicks and conversions, including conversions reported days later.
  • Non-functional: tens of milliseconds for ranking hundreds or thousands of candidates per request; very high request volume; predictions calibrated overall and per segment (advertiser, placement, country).

Clarifying questions

  • Which objectives do advertisers bid on: clicks, conversions, or impressions?
  • How delayed are conversions, and how are they attributed?
  • How many candidate ads per request, and what is the latency budget?
  • Is there an existing model, and how is it evaluated today?

What a strong answer covers

  • The funnel: candidate retrieval (targeting, embeddings), a lightweight first-stage ranker, then a heavy model for the final ranking.
  • Labels: clicks per impression; conversions per click or per impression, with an attribution window; how delayed conversions are handled (waiting windows, delayed-feedback models, or importance-weighted corrections).
  • Features: user history and embeddings, ad and advertiser features, context (placement, time, device), cross features; a feature store for consistency between training and serving.
  • The model: a deep model with sparse embeddings and feature crosses (DLRM- or DCN-style), multi-task heads for click and conversion.
  • Why calibration matters: the auction multiplies probability by bid, so a miscalibrated model overcharges or undercharges advertisers and misallocates impressions.
  • Measuring calibration: predicted over observed ratio, reliability plots, expected calibration error, overall and per segment; log loss next to AUC.
  • Fixing calibration: Platt scaling or isotonic regression on fresh data, per-segment calibration layers, and correcting for negative downsampling in training.
  • Serving and monitoring: latency per stage, model freshness and frequent retraining, alerts on calibration drift.
  • Online evaluation: A/B tests on advertiser value, revenue and user experience metrics, with care for auction effects between test and control.

Follow-ups

  • The new model has better AUC but worse calibration. Do you ship it?
  • Training data is downsampled to 10% of negatives. What does that do to predicted probabilities, and how do you correct it?
  • Calibration is good overall but off for small advertisers. How do you find and fix that?
  • How do you handle a new advertiser with no history?

Where it's asked

What it tests

ads · ranking · calibration · click prediction

Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing