Design Query-to-Keyword Relevance Scoring for Broad Match Ads

Last updated: November 29, 2026

Quick Overview

With broad match, an advertiser's keyword can trigger ads on related queries it does not contain literally. Design the model that decides whether a query is relevant enough to a keyword for the ad to enter the auction.

Google
ML System Design
Machine Learning Engineer
Google
November 29, 2026
Machine Learning Engineer
System Design Round
ML System Design
Medium

0

0

0 solved


With broad match, an advertiser's keyword can trigger ads on related queries it does not contain literally. Design the model that decides whether a query is relevant enough to a keyword for the ad to enter the auction.

Broad match expansion is a key Google Ads lever: good matches grow advertiser reach, bad matches waste spend and annoy users. Interviewers test semantic matching, label design with raters, and per-advertiser context like landing pages and negative keywords.

What the Interviewer Expects
  • Frame as a query-keyword relevance classifier used before the auction
  • Use semantic embeddings plus advertiser context (landing page, other keywords)
  • Collect rater labels and use conversion data carefully
  • Respect negative keywords and policy exclusions
  • Measure advertiser value and user relevance online
Key Topics to Cover
Semantic matching
Dual encoders
Cross-encoders
Rater labels
Keyword expansion
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
  • Is 'cheap flights to Paris' relevant to the keyword 'Paris hotels'?
  • How do you avoid matching a competitor's brand when the advertiser did not intend it?
  • How do you keep cost manageable when every query must be compared to millions of keywords?
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

Inputs: query, candidate keyword, ad group context (other keywords, landing page content, ad text). Output: relevance score and a binary match decision. Scale: every search query compared with candida...

High-Level Design
  1. Candidate retrieval: dual-encoder embeddings of queries and keywords; ANN finds the top few hundred keywords per query.
  2. Context enrichment: ad group embedding from all keywords and landi...

Submit Your Answer
Markdown supported