Generate Ad Headline Suggestions for Small Advertisers With an LLM

Last updated: November 29, 2026

Quick Overview

Design a feature in Ads Manager that suggests headline and primary text variations generated by an LLM from the advertiser's product page and existing ad. Keep the design focused on generation quality, policy safety and measuring impact.

Meta
ML System Design
Machine Learning Engineer
Meta
November 29, 2026
Machine Learning Engineer
Technical Screen
ML System Design
Easy

0

0

0 solved


Design a feature in Ads Manager that suggests headline and primary text variations generated by an LLM from the advertiser's product page and existing ad. Keep the design focused on generation quality, policy safety and measuring impact.

Meta offers generative AI tools for advertisers, and this lighter prompt tests whether a candidate can put an LLM into a product sensibly. Interviewers look for grounding in the advertiser's own info, policy checks, ranking of suggestions and an experiment plan.

What the Interviewer Expects
  • Grounds generation in the advertiser's page, product details and current text
  • Generates several variations and ranks them with a predicted performance or quality score
  • Runs ad policy checks and factual consistency checks on each suggestion
  • Keeps advertisers in control of what gets published
  • Measures adoption and ad performance in an experiment
Key Topics to Cover
generative AI
ad copy
grounding
policy checks
A/B testing
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
  • How do you stop the model from inventing discounts or claims?
  • How would you rank 10 generated headlines before any are shown to users?
  • How would you handle advertisers in regulated categories like finance?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice ML System Design Problems
Sample Answer
Requirements
  • Input: advertiser's existing ad text, landing page or catalog info, business category, language.
  • Output: 3 to 5 suggestions for headlines and primary text shown in the ad creation flow.
  • Generati...
High-Level Design
  1. Context builder: extract key facts from the landing page (product name, price, offers) and business info.
  2. Generator: an instruction-tuned LLM prompted with facts, tone, character limits ...

Submit Your Answer
Markdown supported