Introduction to Machine Learning for SEO

Practical: Methods for search intent classification – Rule-based and ML-enabled Classification

This is a preview lesson

Purchase this course, or sign in if you’re already enrolled, to take this lesson.

Practical: Methods for search intent classification – Rule-based and ML-enabled Classification – Lesson Preview

This lesson shows you how to classify explicit search intent at scale using two complementary approaches: rule-based methods and ML-assisted techniques. If you work in SEO or marketing, you’ll learn when simple IF/ELSE rules in spreadsheets are enough and when to layer in SERP signals and machine learning to capture nuance that rules miss. That matters now because accurate intent labels power cleaner reporting, sharper topic maps, and tighter content briefs that convert.

You’ll start with practical rule-based setups built on your query data, from main intent (informational, navigational, transactional, commercial) to format cues, knowledge level, personas, and even localized or device-relevant queries. You’ll see how to expand coverage with N-grams/word frequencies, spot micro-intents hidden in brand/product terms and reverse-engineer intent from SERP features and ranked domains.

Then you’ll step into ML-assisted workflows: a transformer zero-shot pipeline that combines query rules + SERP labels, and a semantic parsing approach that mixes entities from Google Natural Language API with syntactic cues. You’ll get demo datasets, scripts, and guidance on when to prefer Google Sheets vs. Google Colab for collaboration and scale.


What you’ll learn (why it matters)

  • Design rule-based classifiers — because fast baselines unlock quick wins.
  • Map SERP features to intent — because Google’s layout signals user needs.
  • Detect micro-intents — because brand/product terms drive conversions.
  • Use N-grams & frequencies — because patterns reveal scalable rules.
  • Run ML-assisted labeling — because semantics improve accuracy at scale.
  • Choose Sheets vs. Colab — because teams need the right workflow.

Key concepts (with mini-definitions)

  • Rule-based classification — intent labels via IF/ELSE or regex rules.
  • Explicit vs. implicit intent — stated vs. inferred user goals in queries.
  • Macro vs. micro intent — broad category vs. brand/product-specific demand.
  • N-grams/word frequency — term patterns used to build dictionaries.
  • SERP feature mapping — linking features (e.g., PAA, Shopping) to likely intent.
  • Ranked-domain typing — labeling domains by site type to infer intent.
  • Transformer zero-shot — pre-trained model selecting an intent from candidates.
  • Entity-based semantic parsing — combining entity types/weights with syntax.

Tools mentioned

Google Sheets, Looker Studio, BigQuery, Google Colab, Python, regex, Google Search Console, GA4, SEMrush, Ahrefs, DataForSEO (SERP scraper, Top 1000 sites), spaCy, Google Cloud Natural Language API, Hugging Face models (e.g., BERT/DistilBERT/Sentence-BERT), Mark Williams-Cook’s intent tool and Mihir Naik’s Search Intent Explorer.


Practice & readings

  • Make a copy of the Google Sheets and Colab demos and classify a 200–1,000 keyword sample.
  • Export SERP features and ranked domains; test the provided dictionaries.
  • Compare outputs from rule-based, transformer, and entity methods on the same dataset.

Key insights & takeaways

  • Start simple with rules; add ML when nuance matters.
  • Combine query rules + SERP signals for stronger labels.
  • Micro-intent filters surface high-intent opportunities missed by macros.
  • Domain/site-type signals hint at dominant intent.
  • Custom dictionaries per niche can lift accuracy.

Ready for the next step? Start your learning journey with MLforSEO

Buy the course to unlock the full lesson
Explore templates and reusable scripts in this lesson!

    Length: 43 minutes|Difficulty: Hard
    0 of 32 lessons complete (0%)