Automating Search Engine Marketing Ad Generation with Multi-Stage LLM Pipeline

thumbtack · Tech · 2024 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Search engine marketing ad generation

Thumbtack needed to generate personalized Google Responsive Search Ad assets at SEM scale without relying on generic templates or months of manual copy review.

Constraints:

Architecture

Thumbtack built a multi-stage LLM pipeline for SEM ad generation. Stage one generates ad assets from ad group names, keywords, best practices, character limits, and optional custom inputs. Stage two uses an LLM as a judge to review and select preferred assets from the generated pool. Stage three separates selected assets into distinct ads to avoid repetition across ad variants. Automated validation enforces character limits and checks that review/selection steps only refine existing generated assets, after which expert reviewers approve final copy for Google upload.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  ad-group-input-set[Ad group input set] --> llm-generation-stage[LLM generation stage]
  llm-generation-stage --> automated-validation-layer[Automated validation layer]
  automated-validation-layer --> llm-review-stage[LLM review stage]
  llm-review-stage --> asset-grouping-stage[Asset grouping stage]
  asset-grouping-stage --> expert-review-gate[Expert review gate]
  expert-review-gate --> google-experiments[Google experiments]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Ad group input set Provides ad group names, top keywords, value propositions, character limits, and custom parameters. LLM generation stage
LLM generation stage Creates candidate RSA headlines and descriptions tailored to each ad group. Ad group input set, Automated validation layer
Automated validation layer Filters content for irrelevance, character-limit violations, best practices, and unexpected new content. LLM generation stage, LLM review stage
LLM review stage Judges and selects preferred assets from generated options. Automated validation layer, Asset grouping stage
Asset grouping stage Separates selected assets into distinct ads to reduce repetition and overlap. LLM review stage, Expert review gate
Expert review gate SEM experts approve final copy before Google upload. Asset grouping stage, Google experiments
Google experiments Measures traffic, CTR, conversions, and conversion value through synthetic control or Drafts and Experiments. Expert review gate

Data flow

Ad group metadata, target keywords, value propositions, best practices, and character limits feed the generation prompt. Generated assets are parsed and filtered, a second LLM selects/refines the best options, grouping logic separates assets into distinct ads, automated checks enforce constraints, and expert reviewers make final selections before Google upload and experiment measurement.

4 supporting quotes
“The LLM inputs for generation include the ad group name, keywords, ad copy best practices, and character limits.”article, stated
“The output of an initial LLM generation is passed through a second LLM, which selects a refined subset that closely satisfies the requirements,”article, stated
“The system ensures that the finally selected headlines and descriptions are separated into unique groups, avoiding significant repetitions or similarities within each ad.”article, stated
“Finally, while automatic review is included to filter out bad assets and ensure adherence to Thumbtack’s requirements, the final selection of assets for upload to Google still involves a manual review process.”article, stated

Why this architecture

A multi-stage pipeline fit the ad-generation problem because output quality depends on several distinct constraints: generation must be keyword-specific, review must filter low-quality copy, grouping must avoid ad-variant overlap, and humans must approve final copy for legal and quality reasons. Measurement moved from synthetic controls to Google Drafts and Experiments because later phases needed more robust impact estimation.

3 supporting quotes
“LLMs are leveraged not only for generation but also “as a judge” to choose preferred assets from the generated options.”article, stated
“Furthermore, during the automatic review, selection, and separation steps, checks are implemented to flag if the LLMs are generating any new, unvalidated content, ensuring they only refine and select from the initially generated pool of assets, rather than introducing unexpected elements.”article, stated
“Our exploration into experimentation methodologies concluded that Google’s built-in Drafts and Experiments (D&E) feature offers a robust method for estimating impact.”article, stated

Models used: large language models for generation · LLM-as-judge review model

Scale

Alternatives considered (roads not taken)

Manual template-based RSA creation

Rejected because: Templates produced generic assets and manual keyword personalization was infeasible at scale.

“Creation of ad assets for SEM campaigns at Thumbtack was an incredibly manual and labor-intensive process that consumed a significant amount of the team’s time.”article, stated
“The sheer difficulty of manually generating keyword-based assets at scale meant that creating highly personalized ads for all ad groups was nearly impossible.”article, stated

Generation-only LLM pipeline

Rejected because: Later phases added automated selection, review, and separation to reduce manual review and repeated assets.

“In the above mentioned phases, phases 1 and 2 only used automatic generation. Phase 3 included automatic selection and review of generated content.”article, stated

Synthetic-control measurement for all phases

Rejected because: Volatile metrics made synthetic controls hard for phases 2 and 3, so Thumbtack used Google D&E in phase 4.

“Due to the volatile nature of the metrics involved for evaluation, we found it hard to measure the impact of the method for phases 2 and 3, using synthetic control methods.”article, stated

Patterns

prompt-chaining (workflow)

Generation, automated review/selection, and grouping are separate LLM pipeline stages.

“It uses LLMs for generating, reviewing, and grouping assets.”article, stated

llm-as-judge (evaluation)

A second LLM judges and selects a refined subset of ad assets.

“LLMs are leveraged not only for generation but also “as a judge” to choose preferred assets”article, stated

guardrails-io-filtering (reliability)

Validation filters irrelevant content, character-limit failures, and unvalidated new content in review steps.

“parsing the initial generation output to filter out irrelevant and undesirable content”article, stated

human-in-the-loop-gate (workflow)

SEM experts review final copy before upload to Google.

“Final copies are reviewed by expert reviewers.”article, stated

eval-driven-development (evaluation)

Thumbtack used PoC lift, synthetic controls, and Google Drafts and Experiments to validate rollout phases.

“Synthetic control method was used to estimate the impact of PoC”article, stated
“We launched the phase 4 test using Google D&E.”article, stated

Tradeoffs

Keep expert review for final upload

Chose automated filtering plus human final selection over fully automated Google upload.

Rationale: Legal compliance and quality control still required human oversight.

“human oversight remains crucial, particularly for legal compliance and quality control.”article, stated

Use multiple LLM stages

Chose generation plus judge plus grouping over one-shot ad generation.

Rationale: Separate stages handle different risks: personalization, quality filtering, and ad-variant diversity.

“This feature addresses the previous pain point of overlap and repetitions among the three ads within an ad group”article, stated

Gotchas (what bit them)

Manual templates waste ad slots with repeated generic copy.

Root cause: Most ad assets did not include service-specific keywords or value propositions.

Resolution: The LLM generation stage inserts top keywords and ad-group-specific context.

“These assets did not have any information specific to the ad group.”article, stated
“issues such as repetitions in headlines and descriptions, and overlap among the three ads within an ad group”article, stated

LLM review stages can introduce unvalidated content.

Root cause: A review/selection model might generate new copy instead of selecting from the original generated pool.

Resolution: Checks flag if LLMs generate new unvalidated content during review or separation.

“checks are implemented to flag if the LLMs are generating any new, unvalidated content”article, stated

SEM metrics can be volatile.

Root cause: The team found synthetic controls hard to use in phases 2 and 3.

Resolution: Phase 4 used Google Drafts and Experiments for more robust measurement.

“Due to the volatile nature of the metrics involved for evaluation, we found it hard to measure the impact”article, stated

Evaluation

Thumbtack evaluated through a phase-1 synthetic-control PoC and a later Google Drafts and Experiments phase-4 test.

Metrics: traffic lift · conversion lift · CTR · conversion value per request · impressions · ROAS

“we observed a 20% lift in traffic and a 10% lift in conversions.”article, stated
“treatment arm with LLM Ads showed higher CTR, and higher conversion value per request.”article, stated

Outcomes

The pipeline generated personalized assets across SEM ad groups under Google RSA constraints of 15 headlines, 4 descriptions, 30-character headlines, and 90-character descriptions.

“Experiment results from the latest phase show statistically significant improvement in impressions, click through rate (CTR) and conversions.”article, stated
“This approach saved several months for review”article, stated