The Ad Compute Trade-Off: Allocate by Marginal Utility
Ad ranking is a compute trade-off: more resources per request can improve relevance, but GPU capacity and latency are finite. Learn how to allocate by marginal utility instead of uniformly.
MetaJiarui WangExplainer
Traditional Facebook recommendation systems learn from implicit engagement signals, which adapt slowly and capture little nuance. Your algorithm is a suite of AI-powered tools that lets people state their preferences in natural language to personalize Feed and Reels. The end-to-end system includes profile generation, preference management, ranking, and delivery optimization, with supplementary tail loads and cache invalidation for responsiveness. For interests added to ‘Interested In,’ four dedicated retrieval sources find matching content and a control layer spaces out recommendations and caps daily contribution, while for ‘Not Interested In,’ layered filtering uses embedding comparison, demotion rules, an LLM reranker, and device cache invalidation. LLMs generate the initial profile and Lately Summary, validate each edit for coherence and duplicates, and provide a final reranking check against ‘Not Interested In’ interests, with a separate LLM acting as a judge for evaluation.
Traditional Facebook recommendation systems rely on implicit engagement signals, which adapt slowly and capture little nuance, limiting user control over what they see.
Your algorithm is an end-to-end system that uses LLMs to interpret natural language preferences, with components for profile generation, preference management, ranking, and delivery optimization, including dedicated retrieval sources, control layers, layered filtering, and cache invalidation.
Your algorithm lets users add interests in natural language to ‘Interested In’ and ‘Not Interested In’ lists, which are applied to both Feed and Reels.
For ‘Interested In,’ the system uses four dedicated retrieval sources and a control layer that spaces out recommendations and caps daily contribution to prevent flooding.
For ‘Not Interested In,’ the system enforces exclusions through layered filtering at every stage, including embedding comparison, demotion rules, an LLM reranker, and device cache invalidation.
For 'Interested In,' the system uses a control layer that spaces out recommendations for the same interest and caps each interest's daily contribution. New interests receive extra weight for a limited period, then the system learns from engagement.
LLMs generate the initial profile and Lately Summary, validate each edit for coherence and duplicates, and provide a final reranking check against 'Not Interested In' interests. A separate LLM acts as a judge to evaluate these calls.
When a new interest is added to 'Interested In,' the system sends a supplementary tail load to fetch fresh recommendations. When an interest is added to 'Not Interested In,' cache invalidation removes matching cached content before display.
Summaries are generated from the original by a language model. Check the original before relying on it.
See the idea
Ad ranking is a compute trade-off: more resources per request can improve relevance, but GPU capacity and latency are finite. Learn how to allocate by marginal utility instead of uniformly.
Active learning is a loop that spends a fixed labeling budget on the samples most worth annotating. This diagram maps its stages — pool, score, label, train, evaluate — and the return path that closes the cycle.
Keep reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
One useful email. Unsubscribe anytime.