AdCopilotby Atromx

N-Gram Analysis: Finding Patterns in Search Terms

What n-gram analysis is in PPC, why fragments beat whole queries for finding waste, and how AI turned a script ritual into a conversation.

Updated 2026-08-10Atromx IntelligenceGoogle Ads · Search, PMax, Display, YouTube, Demand Gen
The short answer

N-gram analysis breaks every search term in an account into overlapping word fragments — unigrams (one word), bigrams (two), trigrams (three) — and aggregates spend and conversions by fragment instead of by query. One bad query is an anecdote; the word 'free' carrying spend across four hundred losing queries is a diagnosis. It finds the patterns that row-by-row search term review structurally misses.

N-gram analysis is a way of reading the search terms report by fragment instead of by row: every query is split into its overlapping word sequences — unigrams (single words), bigrams (pairs), trigrams (triples) — and performance is summed per fragment across the whole account. The query "free crm software download" contributes to free, crm, software, download, free crm, crm software and so on; each fragment accumulates the spend, clicks and conversions of every query containing it. Sort fragments by unconverting spend, and the account's vocabulary problems introduce themselves.

How n-gram analysis works

The mechanism is aggregation attacking sparsity. A busy account's search terms table runs to thousands of rows, most individually too small to judge — three clicks here, one there, nothing significant anywhere. But the same words recur across those rows, and at fragment level the sample sizes become honest: queries containing manual, individually negligible, may jointly represent real money and no conversions. Fragment-level review finds what query-level review structurally cannot, because the pattern never sits inside any single row.

Why fragments beat queries is worth stating plainly: a query is an event, a fragment is a theme. Decisions about negatives, bids and copy are decisions about themes — and n-grams are simply performance reporting at the theme level.

The classic implementation was a script: export the terms, tokenise, pivot, sort. It worked, and it had a ceiling — static output, no follow-up questions, analysis divorced from action. You learned that free was bleeding; the negatives still had to be designed, checked against converting terms, and added by hand. Next quarter, if the ritual survived staff turnover, you learned it again.

From script ritual to conversation

With an AI agent connected to the account, n-grams stop being a script you run and become a sentence you speak: "pull ninety days of search terms, break them into one-to-three-word fragments, and rank fragments by spend without conversions." The follow-ups — the part spreadsheets never did — happen in the same conversation. Does free ever convert anywhere? Which campaigns does it bleed in? What would a phrase negative block that an exact negative would not?

Then fragment becomes action in seconds, with receipts. Losing fragments become staged negative keywords you approve, at the right level and match type. Converting fragments feed bids and copy — if same day converts, say same day in the headline. Next month's rerun shows whether the fence held. The full worked pattern, prompts included, is in the n-gram walkthrough.

The quiet upgrade is evidentiary. "This query looks bad" starts an argument; "this word carried this much spend to zero conversions across hundreds of queries" ends one. N-grams were always the cheapest way to manufacture that class of evidence. AI removed the last excuse for not running them.

Frequently asked questions

How many words should an n-gram be?

One to three covers nearly all the value. Unigrams surface the big thematic offenders, bigrams add the context that changes meaning — 'free shipping' is a different signal from 'free download' — and trigrams occasionally catch a phrase pattern the shorter cuts blur. Beyond three, fragments approach the original queries and the aggregation stops aggregating; the sample per fragment thins back toward anecdote.

Does n-gram analysis work for Performance Max?

Partially, and honesty matters here. PMax exposes search themes and category-level insights rather than a complete query-by-query report, so fragment analysis runs only on what is visible — useful for spotting thematic drift, incomplete by construction. Where search campaigns overlap PMax, the search campaigns' terms often carry the readable signal for both. Treat PMax n-grams as directional, not exhaustive.

The offer

Try it on your own account for a week

The full set of tools for the week, so you can see what it actually does — and it still cannot delete anything. No cost, no card, no contract: you connect your own Google account and can withdraw the access whenever you like.

  • Up to 5 accounts
  • One week
  • Full tools
  • No card
Keep reading