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.
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
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- 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 ProblemsSample 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
- Candidate retrieval: dual-encoder embeddings of queries and keywords; ANN finds the top few hundred keywords per query.
- Context enrichment: ad group embedding from all keywords and landi...