Author: Rémi Kerhoas

  • Semantic PPC and SEO Tactics That Still Win With AI

    Semantic PPC and SEO Tactics That Still Win With AI

    Why advanced semantic techniques still matter in PPC and SEO

    Now that I can use AI to generate keywords and launch a paid search campaign in minutes, it is tempting to think the hardest part of PPC and SEO work has already been handled.

    But I still need more than fast keyword output if I want structured, scalable performance. I need to understand how search actually works, how people phrase intent, and how noisy search term data can distort a campaign if I do not organize it properly.

    That is where semantic techniques such as n-grams, Levenshtein distance, and Jaccard similarity continue to matter. I use them to interpret messy data, apply real client context, and build frameworks that AI alone cannot reliably produce.

    What I learn from n-grams in PPC and SEO analysis

    I think of n-grams as the “n” words that make up a keyword. In the search term “private caregiver nearby,” I can break the phrase into smaller pieces that are easier to analyze.

    • 3 unigrams (one word): “private,” “caregiver,” and “nearby”
    • 2 bigrams (two consecutive words): “private caregiver” and “caregiver nearby”
    • 1 trigram (three consecutive words): “private caregiver nearby”

    I use n-grams because they simplify large keyword lists without stripping away the patterns that matter.

    For example, I recently restructured several campaigns that had more than 100,000 search terms. By using n-grams, I reduced those lists into much more workable sets.

    • ~6,000 unigrams.
    • ~23,000 bigrams.
    • ~27,000 trigrams.

    Once I have those smaller sets, I can spot patterns quickly. If every keyword containing the “free” unigram performs poorly, I can exclude “free” as a broad match negative.

    On the other hand, if I see that “nearby” performs especially well, I may test more local variations, build location-specific landing pages, or adjust campaign structure around that intent.

    I still have to respect the limits of this method.

    • I need a large volume of search terms, so this approach usually works best for accounts with bigger budgets.
    • As “n” gets larger, the output becomes less useful because the data expands again. At that point, I usually need more advanced methods such as Levenshtein distance or Jaccard similarity.

    How I cluster keywords with n-grams

    When I analyze SEO and PPC data, I often deal with huge volumes of long-tail search terms. Many appear only once and carry very little standalone data.

    N-grams help me turn that chaotic long-tail data into clearer, more manageable intelligence.

    That intelligence helps me reduce wasted spend, find new opportunities, and build a structure that can scale.

    • I start by exporting search term data. In PPC, that includes cost, impressions, clicks, conversions, and conversion value by search term.
    • For each n-gram, I sum cost, impressions, clicks, conversions, and conversion value.
    • Then I calculate CPA, ROAS, CTR, CVR, and any other metrics that matter for the account.

    With a shorter and more digestible dataset, I can rank the top-spending n-grams that do not convert, which often become negatives, and the ones that do convert, which become positives.

    From there, I build ad groups around recurring n-grams that consistently drive performance.

    For example, I may find that emergency-related n-grams such as “24/7,” “same day,” or “urgent” deliver higher conversion rates. I would segment those terms so I can control budget, bidding, and messaging more precisely.

    Bottom line: I use n-grams to isolate themes that deserve special attention.

    Once I have identified those themes, it becomes much easier to build advanced paid search structures around high-impact n-grams and improve ROI.

    Dig deeper: How to uncover hidden gems in your paid search accounts

    How I use Levenshtein distance to improve keyword quality

    Levenshtein distance measures the minimum number of single-symbol edits, including insertions, deletions, or substitutions, needed to turn one string into another.

    That may sound complicated, but the idea is simple once I put it into practice.

    The Levenshtein distance between “cat” and “cats” is 1 because I only need to add the “s.” Between “cat” and “dog,” the distance is 3.

    One common PPC use case is finding brand and competitor misspellings inside search term reports.

    For example, “uber” and “uver” have a Levenshtein distance of 1, so I would feel confident excluding the misspelled version from non-brand campaigns.

    I can apply the same logic to keyword relevance.

    If the distance between a keyword and the search terms it matches is too high, such as 10 or more, those terms probably have very little in common with the keyword and deserve review.

    A low distance usually tells me those queries are close enough to be safe and do not need the same level of manual inspection.

    How I consolidate PPC keywords with Levenshtein distance

    After I use n-grams to create initial keyword clusters, I may still have thousands of search terms to organize into a practical campaign structure.

    Manually sorting through 6,000 unigrams is not realistic. This is where Levenshtein distance becomes especially useful.

    Venn diagram showing sets A and B with their overlapping intersection labeled A&B, illustrating Jaccard similarity for SEO and PPC keywords.
    A simple Venn diagram visualizes how Jaccard similarity measures the shared overlap between keyword sets A and B in semantic PPC and SEO analysis.

    My goal is to merge ad groups that target nearly identical keywords so I do not end up with an overly granular, SKAG-like structure.

    Too much granularity makes reporting and account management harder. It can also create inefficient bidding and wasted spend.

    Using the same dataset, I calculate the Levenshtein distance between queries across different ad groups.

    Then I identify the closest keyword and ad group using a predefined threshold. A threshold of 3, for example, gives me a high degree of accuracy.

    This helps me consolidate keywords and ad groups with confidence. If I use a looser threshold, such as 6, I can also group or name ad groups by broader similarity or intent.

    Here is a simple example showing why these three keywords can be grouped together:

    Levenshtein distance24/7 plumber24 7 plumber247 plumber
    24/7 plumber011
    24 7 plumber101
    247 plumber110

    Dig deeper: How to use negative keywords in PPC to maximize targeting and optimize ad spend

    How I go further with Jaccard similarity

    In PPC, I use Jaccard similarity as a practical proxy for understanding the overlap between two sets of n-grams.

    The calculation is straightforward: I divide the number of shared unigrams between two sets by the total number of unique unigrams across both sets.

    It sounds technical, but I visualize it simply:

    • Jaccard similarity = Red / Green
    A plus B - A and B

    Here are a couple of concrete examples I use to explain the concept:

    • “new york plumber” and “plumber new york” = 1 because all three unigrams appear in both sets, just in a different order.
    • “new york plumber” and “NYC plumber” = 0.25 because only “plumber” is shared, and there are four unigrams in total.

    Jaccard similarity is a helpful first step for deduplicating similar keywords. I see it as a bridge between old phrase match logic and broad match modified logic.

    But it has an important limitation: it does not understand meaning.

    In the example above, “new york” and “NYC” should be treated as equivalent, but the Jaccard calculation sees them as different.

    To handle that kind of nuance, I need more advanced techniques, which I would treat as the next layer of analysis.

    How I combine Jaccard similarity and Levenshtein distance

    Consider a cybersecurity course campaign with the following top 10 keywords:

    KeywordSemrush average monthly searches in the U.S.
    cybersecurity courses5,400
    cybersecurity online course1,900
    free cybersecurity courses1,300
    online cybersecurity courses1,300
    cybersecurity course1,000
    cybersecurity courses online880
    google cybersecurity course880
    cybersecurity courses free720
    cybersecurity free courses590
    cybersecurity online courses480

    By combining singular and plural versions, along with reordered versions of the same idea, I can reduce that top 10 into a more actionable top four.

    • “Cybersecurity courses.”
    • “Cybersecurity courses online.”
    • “Free cybersecurity courses.”
    • “Google cybersecurity course.”

    I could use n-grams to do this, but scaling n-gram analysis across thousands of keywords can quickly become overwhelming.

    A more efficient approach is to use both similarity metrics in sequence.

    • First, I apply Levenshtein distance to consolidate very similar queries.
    • Then I use Jaccard similarity to deduplicate reordered variants.
    • At each step, I sum the usual KPIs, including cost, conversions, and other performance metrics, so the analysis stays actionable.

    The result is a clear, compressed structure that can hold up even as search term volume grows.

    How I restructure paid search campaigns with semantic techniques

    With the right semantic techniques, I can restructure massive keyword sets quickly and still produce consistent, high-quality results.

    AI can absolutely help me create an initial summary, but I do not rely on it entirely.

    Otherwise, I run into the classic problem of “garbage in, garbage out.”

    Broad match can be powerful, but it also introduces more noise. These techniques help me verify that the queries I am matching stay aligned with campaign goals.

    I use n-grams, Levenshtein distance, and Jaccard similarity to apply client context to raw search data and build a stable structure around real intent.

    If the process feels overwhelming at first, I use this summary to decide which technique fits the job:

    ScenarioBest techniqueWhy
    Identify high-intent patterns in huge search-term exportsn-gramsSurfaces themes fast; reduces dimensionality
    Clean duplicate / near-duplicate keywords at scaleLevenshtein distanceCaptures spelling + structural similarity
    Deduplicate reordered or slightly varied keyword stringsJaccard similarityOrder-insensitive token-based comparison
    Create scalable clusters for campaign rebuildsCombo: Levenshtein → Jaccard → n-gramSequence gives accuracy + compression

    For me, the main lesson is simple: AI can accelerate PPC and SEO work, but semantic analysis gives that work structure, signal quality, and strategic control.


    Inspired by this post on Search Engine Land.


    crushpress.ai community screenshot