What Are N-Grams?
Every Amazon advertiser looks at search term reports — individual phrases like "silicone baking mat large" or "steel cookie sheet non stick." They make decisions one term at a time. Negate this one. Keep that one. Adjust this bid.
And most of them miss the forest for the trees.
An n-gram is a contiguous sequence of n words from a text. When applied to your search term data, you decompose every term into word-level components, then aggregate performance across all appearances of each word.
Unigram
Single word: "silicone", "mat", "large". Broadest view, biggest wins, highest false-positive risk.
Bigram
Word pair: "silicone mat", "baking sheet". More context, fewer false positives, still powerful.
Trigram
Word triplet: "silicone baking mat". Very targeted, useful for confirmation, rarely primary negatives.
How a Search Term Decomposes
The word "steel" might appear in 200 different search terms. Individually, each spent $1-5 with zero conversions. Collectively, $612 in pure waste. One negative phrase match eliminates all of it — current and future variations.
Why N-Gram Analysis Works
The "Death by a Thousand Cuts" Problem
Most wasted spend doesn't come from a few obvious bad search terms. It comes from hundreds of low-spend, individually-invisible terms sharing a common theme.
You sell silicone baking mats. Your report has 3,000 rows. You sort by spend. Top 50 terms look mostly fine. You negate a few obvious ones and feel good. But buried in rows 51-3,000 are 187 search terms containing the word "steel." Each spent $1-5. None converted. Total: $612 in waste you'd never find by scrolling.
Search-Term-by-Search-Term
- Looks at complete terms one by one
- Sorts by spend, misses low-spend terms entirely
- Negates individual terms — new variations keep appearing
- Time-consuming, incomplete, whack-a-mole
Word-Level Aggregation
- Breaks terms into words, aggregates across ALL appearances
- Surfaces hidden patterns regardless of individual spend
- One negative phrase blocks ALL current and future variations
- Fast, systematic, permanent cleanup
Negative Exact vs. Negative Phrase: The Leverage
Blocks 1 search term
Blocks ALL searches containing "steel"
That's the difference between playing defense and playing offense. N-gram analysis finds the words that deserve negative phrase match treatment.
Not for bid optimization: high ACOS doesn't mean irrelevant — it means adjust the bid. Not for keyword discovery: n-grams reveal what to block, not what to target. Not for low-volume accounts: you need enough data for patterns to emerge (~$500+/month).
These are fundamentally different problems with fundamentally different solutions.
The Step-by-Step Process
Export Search Term Report
60-90 days of data from Amazon Ads console. Need: search term, impressions, clicks, spend, orders, sales, campaign name.
Clean & Prepare Data
Remove brand terms, product targeting ASINs, and duplicates. Aggregate same search terms across campaigns. Optionally filter 0-click rows.
Break into N-Grams
Split every search term into unigrams, bigrams, and trigrams. Each n-gram inherits the full metrics of its parent search term.
Aggregate Metrics per N-Gram
Sum spend, clicks, impressions, orders for each word/phrase across ALL search terms it appeared in. This is the core insight.
Analyze & Identify Patterns
Sort by spend descending. High spend + zero/low orders + irrelevant = candidate. Always drill down before deciding.
Create Negative Phrase Matches
Apply via bulk upload or negative keyword lists. One phrase blocks all variations — current and future.
Validate & Monitor
Check for false positives. Monitor ACOS impact over 2-4 weeks. Re-run quarterly.
Run at account level for broadest patterns (start here). Category level for product-type-specific waste. Campaign level for product-specific irrelevancy. Start broad, narrow down as needed.
Building the Analysis Sheet
The Output Table
| N-Gram | Appearances | Spend | Orders | ACOS | Signal |
|---|---|---|---|---|---|
| steel | 187 | $612 | 0 | ∞ | Negate |
| stainless | 143 | $441 | 1 | 2,323% | Negate |
| metal | 94 | $277 | 0 | ∞ | Negate |
| large | 312 | $1,313 | 42 | 156% | Bid down |
| silicone | 489 | $3,102 | 312 | 50% | Keep |
| baking | 521 | $2,891 | 287 | 50% | Keep |
"Steel," "stainless," and "metal" — three words that individually wouldn't flag in a search term report — are collectively responsible for $1,330 in wasted spend with essentially zero returns. Three negative phrase matches eliminate all of it.
Building Methods
Method 1: Excel / Google Sheets (No Code)
Use =SPLIT(A2, " ") to break search terms into words. Create a master word list of unique words. For each word, use SUMPRODUCT to aggregate:
=SUMPRODUCT((ISNUMBER(SEARCH(D2, Sheet1!$A$2:$A$5000))) * Sheet1!$D$2:$D$5000)
This sums the Spend column for every row containing your target word. Copy across for all metrics. Calculate ACOS = Spend ÷ Revenue. Sort by spend descending.
Tip: SEARCH matches partial words ("mat" matches "material"). For precise matching, wrap with spaces: SEARCH(" "&D2&" ", " "&Sheet1!A2&" ")
Method 2: Python Script (Recommended for Scale)
Load CSV → split each search term into words → generate unigrams/bigrams/trigrams → group by n-gram → sum all metrics → calculate ACOS → sort by spend → export. Takes seconds on tens of thousands of rows.
Method 3: Pre-Built PPC Tools
Look for tools that show aggregated metrics per n-gram (not just word clouds), let you filter by type, allow drill-down into source search terms, and support export. The tool doesn't matter — the methodology does.
Which N-Gram Type to Focus On
| Type | Best For | Risk Level | Example |
|---|---|---|---|
| Unigrams | Broad irrelevant themes (materials, categories) | Higher — can over-negate | "steel" for silicone seller |
| Bigrams | Specific irrelevant product types | Medium — more context | "stainless steel" for silicone |
| Trigrams | Confirming very specific patterns | Lower — very targeted | "stainless steel rack" |
Start with unigrams for the broadest view and biggest wins. Use bigrams to confirm patterns when a unigram feels too broad to negate safely.
Want Me to Run N-Gram Analysis on Your Account?
I'll pull 90 days of data, decompose every search term, and deliver the negative keyword list that stops the bleeding.
Interpreting N-Gram Data
The Three-Column Decision Framework
| Spend | Orders | Relevant? | Action |
|---|---|---|---|
| High | Zero / Very Low | No | Negative Phrase Match — immediate |
| High | Zero / Very Low | Yes | Bid down — relevant but overbidding |
| High | High | Yes | Leave / optimize — it's working |
| Low | Zero | No | Negate if easy — low priority cleanup |
| Low | Zero | Yes | Ignore — not enough data |
The critical column is "Relevant?" — and that requires human judgment. You, the person who knows the product, look at each high-spend n-gram and ask: "Is this word fundamentally relevant to what I sell?"
High ACOS does not mean irrelevant. A unigram showing 200% ACOS might contain a mix of relevant and irrelevant search terms. If you negate entirely, you kill the relevant traffic too. Always drill down. The question is never "is this profitable?" — it's "is this relevant?"
The Drill-Down: From N-Gram to Search Terms
Before negating any n-gram, look at the actual search terms containing it. This 30-second sanity check prevents costly mistakes.
76 of 78 search terms are irrelevant. 2 are relevant but niche. Verdict: negate "glass" — the 2 relevant terms don't justify $228 in waste.
If 50%+ of search terms containing an n-gram are actually relevant, don't negate the unigram. Use bigrams for a more targeted negative instead.
You'll typically find 80% of wasted spend in the top 10-15 irrelevant n-grams. Don't try to clean up every word. Focus on high-spend, clearly-irrelevant patterns first. Marginal returns drop fast after the big wins.
Creating Negative Phrase Match Keywords
The Decision Tree
Is the n-gram categorically irrelevant? (ANY search with this word is irrelevant)
→ Apply as Negative Phrase Match. Blocks all current and future search terms containing this word. Example: "steel" for a silicone-only seller.
Is it irrelevant only in combination? (The word alone is fine, but paired with X it's bad)
→ Use the bigram as your negative phrase. "Stainless steel" instead of just "steel" — if "steel wool" is relevant to you.
Is it relevant to some products but not others?
→ Apply at campaign or ad group level, not account-wide. "Kids" is irrelevant in adult product campaigns but essential in kids' product campaigns.
Where to Apply
| Level | When to Use | Example |
|---|---|---|
| Account (Neg. Keyword List) | Universally irrelevant — no product should show for this | "wholesale" for a B2C brand |
| Campaign Level | Irrelevant here, potentially relevant elsewhere | "kids" in adult product campaign |
| Ad Group Level | Irrelevant for this product, relevant for others in same campaign | "small" in large-size ad group |
Amazon does NOT support negative broad match. Your only options are negative exact and negative phrase. Negative phrase blocks any search term that contains your phrase in order — exactly what you want for n-gram-based negation. Don't confuse this with positive broad match behavior.
Real-World Case Studies
Case 1: Silicone Kitchen Products — "The Material Mismatch"
A brand selling silicone baking mats, spatulas, and trivets. Auto and broad match campaigns were generating clicks from people searching for metal, glass, steel, and wooden kitchen products.
| N-Gram | Search Terms | Spend | Orders | Action |
|---|---|---|---|---|
| steel | 187 | $612 | 0 | Neg. Phrase |
| wooden | 94 | $312 | 0 | Neg. Phrase |
| metal | 112 | $287 | 1 | Neg. Phrase |
| glass | 78 | $234 | 2 | Neg. Phrase |
| ceramic | 43 | $128 | 0 | Neg. Phrase |
| cast iron | 61 | $198 | 0 | Neg. Phrase |
Six words eliminated nearly $1,800 in monthly waste across hundreds of search terms. No standard analysis would have caught this.
Case 2: Premium Dog Food — "The Species Problem"
Broad match campaigns leaking into cat food, bird food, and other pet categories.
| N-Gram | Terms | Spend | Orders | Action |
|---|---|---|---|---|
| cat | 234 | $891 | 3 | Neg. Phrase |
| bird | 67 | $201 | 0 | Neg. Phrase |
| rabbit | 31 | $94 | 0 | Neg. Phrase |
| fish | 89 | $267 | 1 | Drill down * |
| hamster | 18 | $54 | 0 | Neg. Phrase |
"Fish" looked like a clear negate at unigram level. But drill-down revealed relevant terms: "fish flavor dog food," "salmon fish dog food." The bigram solution — negating "fish food" and "fish tank" — blocked irrelevant traffic while preserving converting keywords. N-gram analysis gives you the data. Human judgment makes the call.
Common Irrelevancy Categories
Material Mismatches
You sell silicone, searches include "steel," "metal," "glass," "ceramic," "wooden." Most common pattern, usually biggest win.
Category Drift
You sell baking mats, searches include "yoga mat," "car mat," "door mat." Bigram negatives like "yoga mat" are the fix.
Size / Spec Mismatch
"Commercial," "industrial," "professional," "mini" — when your product is a specific size and searchers want something else.
Gender / Age Mismatch
"Men's" for women's products, "kids" for adult, "baby" when min age is 3+. Common and high-waste.
Intent Mismatch
"How to," "DIY," "recipe," "review" — informational searches that rarely convert. Low individually, adds up fast.
B2B / B2C Mismatch
"Wholesale," "bulk order," "commercial," "supplier" — when you're B2C getting B2B traffic, or vice versa.
Cadence, Maintenance & Advanced Tactics
How Often to Run
| Stage | Frequency | Why |
|---|---|---|
| New Account / Onboarding | Day 1 | Biggest wins from initial cleanup. Inherited accounts are full of waste. |
| First 3 Months | Monthly | New campaigns create new patterns. Monthly catches them before they accumulate. |
| Steady State | Quarterly | Rate of new waste slows. Quarterly catches seasonal shifts. |
| After Major Changes | 2-4 weeks after | New launches and keyword campaigns introduce new irrelevant patterns. |
Advanced: Bigram Layering
When a unigram is too broad to negate (e.g., "rack" — you sell baking mats but "cooling rack" is relevant), layer bigram negatives instead:
Five bigram negatives block the waste while preserving "cooling rack for baking."
Advanced: N-Gram Discovery (The Positive Side)
The same analysis that finds waste also reveals your strongest converting themes. Look for:
- High orders, low ACOS: Strongest word themes. Are you bidding exact match on keywords with these words?
- High impressions, low clicks: Ads showing but not clicked. Check images and titles for these themes.
- Emerging volume: New n-grams not in last quarter's analysis = trending searches. Get ahead of them.
If "organic" appears in 300 search terms and consistently converts at 15% ACOS, that tells you exactly what shoppers value about your product — and where to double down in your listing copy, A+ content, and keyword targeting.— Mohsin Raza, Adaptoid E-Commerce
- Aggregate, don't isolate. Individual search terms lie. Aggregated word-level data tells the truth. One word across 200 search terms reveals what 200 individual reviews cannot.
- Relevancy is the only criteria for negation. High ACOS means adjust the bid. Irrelevant means negate. These are fundamentally different problems with fundamentally different solutions. Confusing them kills converting traffic.
- Phrase match is the power tool. One negative phrase match blocks all current AND future search terms containing that word. It's permanent, proactive cleanup — not whack-a-mole.
- Always drill down before you negate. N-gram data shows you where to look. Human judgment makes the call. 30 seconds of drill-down prevents costly false positives.
- Start with unigrams, refine with bigrams. Unigrams give you the broadest view and biggest wins. When a unigram is too broad, bigram layering achieves near-unigram coverage without false positives.
- The first analysis is the most valuable. Day-one n-gram analysis on any account finds patterns that have been wasting money for months or years. Each subsequent analysis finds less, but quarterly keeps things clean.
- N-grams work both ways. The same analysis that finds waste reveals your strongest converting themes. "Organic" converting at 15% across 300 terms is a signal to double down — in bids, listing copy, and A+ content.