AdCopilot

Glossary

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.

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.

Questions

Start free