AdCopilotby Atromx

N-Gram Analysis of Search Terms, Without Spreadsheets

N-gram analysis used to need a script and a pivot table. A connected AI tokenises, aggregates and — crucially — makes the negative-keyword call.

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

N-gram analysis breaks every search term into word fragments and aggregates spend and conversions per fragment, exposing waste that no single query is big enough to show. It used to require a script and a pivot table; a connected AI now runs the whole thing from one prompt — tokenising the last ninety days of terms, ranking fragments by unconverting spend, and proposing which deserve negative keywords at which level, subject to your approval.

An n-gram analysis breaks your search terms into fragments — single words, pairs, triples — and totals spend and conversions per fragment instead of per query. Its power is aggregation: the word "free" might cost you real money this quarter without any single free-flavoured query being large enough to notice. The technique used to demand a script and a pivot-table afternoon. With a connected AI, it is one prompt — and the judgement call about which fragments become negatives happens in the same conversation.

What an n-gram analysis catches that eyeballing misses

The search terms report is sorted by query, and modern matching fills it with long-tail phrasings that appear once and never again (Google's documentation describes what the report includes). Scrolling it, you judge each row alone — and each row alone is defensible. Forty unique queries containing "salary" each cost pocket change; nobody pauses at any of them.

Aggregate by fragment and the pattern surfaces instantly: "salary" as a 1-gram carrying meaningful spend and zero conversions is a decision, not a curiosity. The same logic finds the good patterns — a 2-gram like "same day" quietly present in a disproportionate share of converting queries is an argument for copy and keyword coverage, not a negative. Fragments are where both waste and opportunity concentrate enough to see.

The old way: scripts, exports, pivot tables

The classic method: export the search terms report, split every query into tokens in a spreadsheet or a purpose-written script, build 1-, 2- and 3-gram tables, pivot spend and conversions against each, then stare at the output deciding what deserves action. Community scripts automated the middle steps and still exist — but they are code you maintain, their output is still a table that ends in a human judgement, and the whole apparatus is heavy enough that most operators run it once, nod, and never run it again.

The spreadsheet was never the point. The decision was. The new way keeps the decision and deletes the apparatus — a pattern familiar across PPC tooling: the analysis was always good; the apparatus was why it never became a habit.

The prompt that runs a full 1/2/3-gram breakdown

Pull search terms for the last 90 days across all search campaigns
in account 123-456-7890. Tokenise them and build 1-gram, 2-gram and
3-gram tables aggregating: total spend, clicks, conversions, and the
number of distinct queries each fragment appears in. Ignore
fragments below [your spend threshold] or appearing in fewer than
[N] distinct queries. Rank by unconverting spend. For the top
fragments, show example queries, say whether the fragment reads as
waste or as a targeting gap, and recommend an action. Then wait for
my review before changing anything.

Three details earn their place. The distinct-query count separates a genuine pattern from one weird expensive query wearing a fragment costume. The thresholds keep the model from reporting noise — set them to what you would notice losing. And "then wait" splits analysis from action, which keeps the approval step downstream legible.

The readout arrives in minutes: ranked fragments, evidence attached, examples inline. Interrogate it — "show me every query behind 'course'" — before anything becomes a negative.

A concrete — and deliberately hypothetical — shape of what comes back: the 1-gram table shows "course" aggregating spend across nineteen distinct queries with no conversions — someone is teaching your product, and learners are clicking your ads. The 2-gram table shows "near me" converting well but concentrated in one campaign — a coverage argument for the others. The 3-gram table sits mostly below your thresholds, exactly as it should. Three fragments, three different actions, none of them visible in a query-sorted report.

How many grams are worth running

All three, but not equally. 1-grams cast the widest net and carry the most ambiguity — a single word convicts weakly, so demand more distinct queries before acting on one. 2-grams are the workhorse: specific enough to mean something, common enough to aggregate. 3-grams only reward accounts with real volume; below that, they fragment into one-offs. If the account is small, run 1- and 2-grams over a longer window and let the 3-gram table wait until the data can feed it.

Turning fragments into negatives at the right level

A fragment is not yet a negative; it needs a match type and a home, and this is where judgement stays human:

  • Kill the intent, not the words. "Free" earns a phrase-match negative when free-seekers never buy from you — and stays live if a freemium tier is your funnel. The model can argue either side from your conversion data; you know the business model.
  • Choose the level by scope of wrongness. Wrong for the whole account (jobs, careers, DIY) goes to a shared negative list or campaign level. Wrong only for one ad group's intent — a "cheap" fragment in your premium line — stays local, at ad group level.
  • Protect the borderline. Fragments that convert occasionally deserve a watch list, not a block. Ask the model to keep a "deferred" table you revisit next month with more data.

Then the write: "Add the approved fragments as phrase-match negatives — items 1, 2, 4 and 7 at campaign level on campaigns A and B, item 3 to the shared list." One approval, exact list visible, attributed to you. The levels-and-match-types layer is covered in depth in the negative keyword automation guide.

Repeating monthly without repeating the work

Search terms drift continuously, so the analysis is a loop, not an event. Save the prompt with your thresholds baked in and add one clause for continuity:

Compare against last month's n-gram findings: which fragments are
new to the top of the waste ranking, which previously flagged
fragments still leak despite negatives, and which deferred
fragments now have enough data to judge?

The month-over-month diff is what makes the loop compound. New fragments show fresh drift while it is cheap. A blocked fragment still leaking means the negative sits at the wrong level or match type — a fixable mechanical fault. And the deferred list stops borderline calls from being re-litigated from scratch every month.

Twenty minutes a month, no exports, no pivot tables, and the judgement — the only part that was ever valuable — spent where it belongs. The habit also changes what you notice elsewhere: once you think in fragments, ad copy gaps and keyword coverage holes start showing up in the same vocabulary, which is precisely the point. If the n-gram sweep is your first structured look at waste, widen the lens afterwards — the AI audit guide walks the full account.

Frequently asked questions

How much search term data do I need for n-grams to be meaningful?

Enough that a fragment's pattern is repetition, not coincidence — as a working rule, only judge fragments that appear across multiple distinct queries and carry spend you would notice losing. Small accounts should widen the window to ninety days or more and stick to 1-grams and 2-grams, because rare 3-grams are mostly noise. The prompt should state your thresholds so the model filters before it ranks.

Can the AI add the negatives it finds?

Yes, with a write-capable connector — and with you approving the exact list first. The workflow is: the model proposes fragments as negatives with match type and level, you strike the ones that would block good traffic, then it applies the rest in one approved tool call. The change lands under your own Google sign-in and is attributed to you in change history.

Is n-gram analysis still useful now that match types are loose?

More useful, not less. Loose matching means your keywords admit a wider stream of queries than ever, and the individual queries are increasingly unique long-tail phrasings you will never see twice. Fragment-level aggregation is the only lens where a thousand one-off queries collapse into a dozen recurring patterns — which is exactly what modern matching behaviour needs policing with.

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