Get Your AI On Blog

How To Identify User Search Intent Using AI and Machine Learning

Research & Development

Time is our most precious, non-renewable resource. If you’re like us, you probably find it deeply annoying to waste your time and energy with irrelevant ads that are unhelpful and sometimes downright misleading.

I remember turning 25 and being instantly targeted with ads for wedding services. As soon as I turned 30, they turned into ads for diapers. While this simplistic targeting mechanic works sometimes, it can also be stereotypical and limitative.

Increasingly, though, this narrow targeting makes for an annoying user experience. It’s why people start using ad blockers and it’s also a surefire way to throw marketing dollars out the (browser) window.

There’s a better option to optimize your marketing budget than throwing spaghetti at the wall, hoping that something sticks. We know this because the customers we work with use the method we’re about to describe to achieve up to 15% increase on their CTR for ad campaigns.

It’s true that technology has helped in the past couple of years, making targeting easier and, honestly, creepier (we’re looking at you, Facebook!), but we’re not into that at all. We know for a fact there’s a more effective way to make users give a click and give them what they need, and it has to do with AI.

Why User Search Intent is all the rage nowadays

Back in the day, SEO experts and marketers used to optimize their campaigns and content for types of devices. Remember when we had to get up and go to a desktop to get on the internet? Yup, simpler times.

As analytics became more powerful and the tech behind them improved, the criteria used to segment and target audiences became more varied. Then, as more people got online, location became essential for marketing and sales performance. Then came social media, which started amassing vast volumes of specific data about people that let to even deeper, more thorough targeting.

So why is it that, in spite of all this data and tech, millions still go to waste?

Our take on this is that tech is not the answer unless you really care about the customer. Enter user search intent. As the name suggests, user search intent reveals what a user aims to do when they google* something.

*Applies to all search engines, but who are we kidding? There’s no way you’re going to Bing that.

User Search Intent has become the sweetheart of the optimization world (whether it’s SEO, CRO or other disciplines) because it provides very specific insights without being stalkerish. The user provides the intent and all companies have to do is pay attention to it and interpret that intention correctly.

And that’s where things get tricky.Google knows this better than anyone. That’s why it changes its search algorithm around 500–600 times (!) every year.

By processing trillions of searches each year, Google’s algorithm has evolved to understand the intent behind each query. In fact, these frequent updates are changing the face of the SERPs (Search Engine Results Pages) to accommodate search intent. That’s because SERP features exist to get a user from his search to the solution they need in as few clicks as possible.

For example, it knows you may want to find out more about the books and movies when you search for “harry potter”, so it combines the details, making them readily available:

user search intent prediction ai google example

Even though your company is not Google, it doesn’t mean you can’t level up your game to leverage user search intent. By using AI, you can leverage the users’ intent to feed it into your marketing machine and do it at scale. We’ll show you how and help you do it for free if you stick with us ‘til the end!

How leveraging User Search Intent helps your business

When you know WHY customers want something, you can deliver the HOW.

If you know someone is looking for, you can deliver the right information at the right time and:

  • Break through the noise in competitive industries
  • Reduce your CAC (Customer Acquisition Cost)
  • Boost your CTR (Click-Through Rates)
  • Increase customer retention
  • Strengthen your positioning
  • Power the referral flywheel
  • Optimize the resources you invest in marketing
  • Help people achieve what they want.

Here’s an example of how other companies do it:

user search intent prediction ai ad campaign example

user search intent prediction ai ads examples

So how do we know what consumers want?

That’s a challenge we accepted for one of our customers in the ad-tech space dealing with around 5 billion search queries spread around 17 languages. For this project, we focused on English.

Nailing User Search Intent – the ol’ fashioned way

User Search Intent is not new for marketers, but, even so, very few use it. The more mature a marketing program is the more depth and attention to nuance the marketing strategy includes.

Unlocking growth potential with User Search Intent starts with building your keywords list. The more keywords you can collect, the better – think five to six figures. Just make sure that quantity doesn’t get in the way of quality.

The next step entails data mining so keywords can be categorized and selected for the subsequent stage. No matter how much you try to automate it, you’ll still need to manually review keywords categories to ensure they are relevant for your objectives.

The same workflow applies to identifying intent in your keywords, both in terms of triggers that indicate intent and the intent stage attached to each keyword (informational or transactional, for example). Once you’ve done all this work – which can take hours if you’ve never experimented with it – it’s time to use a dedicated tool to clean up the data and establish relationships between your data sources.

You’ll then have to build your dashboard so you can draw effective insights the marketing team can use for campaigns and optimizing budgets. The shortcomings of this approach are obvious:

  • It’s time and resource-intensive
  • It involves a lot of manual work
  • It’s difficult to scale effectively
  • It requires specific know-how your marketing team may lack
  • It doesn’t provide insights in a form that can be fueled into the marketing machine to automate future optimization.

These are all reasons why we focused on finding a better solution for this problem that is becoming pervasive in large companies as their marketing continues to refine in both approach and tactics.

Extracting meaning with Machine Learning models

Our challenge was to predict user search intent based on a query. Naturally, a user’s search intent is tied to their activity in the search engine (the links they click) and their activity on the target websites, but we didn’t have access to that type of data. Our goal was to extract insights as rich and as actionable as possible from the queries themselves.

The question we sought to answer is: How can a Machine Learning model understand the intent behind a query?

For a human, the answer is obvious: just read the words, because for us words convey meaning. But an ML model doesn’t work like that. For it, a word is just a group of characters, without any attached meaning to it. When a partner asks:

“What’s wrong, babe?” and gets “Nothing.” as a response, most people know that’s not what it means. An ML model has no way of knowing though.

In addition, user intent can be ambiguous even for humans. “Nothing” can mean a lot of things to a lot of people.

user search intent prediction ai human approach

Here’s a more serious example: if someone searches “iPhone 8”, what do they want to do? Are they looking for product specifications, reviews? Do they want to see some pictures? The fact is that we don’t know for sure, but we can make an assumption based on several intent categories.

How humans define intent vs how AI does it

For this use case, we decided to split user intent into 3 categories, with the fourth (consideration) being added at a later stage. These types of intent correspond to the layers in the marketing funnel:

Informational or Awareness
Related to finding information about a topic. Examples of informational queries:“New York city population 2013”
“how tall is the Eiffel Tower”
Related to accomplishing a goal or engage in an activity. Examples of transactional queries:“buy Avengers DVD”
“iPhone price”
Also called or “visit-in-person”. Related to finding a place nearby or other types of local information. Examples of navigational queries:“Chinese restaurant nearby”
“bus schedule”
These are in-between informational and transactional intent. Examples of consideration queries:“iPhone reviews”
“Samsung iPhone comparison”


What’s challenging for AI is the ambiguity of queries. Inherently, some of them will have a multi-intent. For example, if someone searches for “hotels”, the intent depends on the context.

It can be either navigational (finding a hotel nearby) or related to consideration (making an online reservation). It could also be transactional, although this generic search suggests that the user might not be ready to make a booking.

Turning words into numbers that feed into the ML model

As we mentioned, a model can’t make sense of words. If we tried to use the raw data, it would be like teaching your dog to obey commands by showing it pictures of other dogs. Complete gibberish. Models operate on algorithms, so in order to “speak their language” we have to transform the queries into their mathematical equivalent. This problem falls in the NLP category, where:

“Natural language processing (NLP) is a subfield of computer science, information engineering, and artificial intelligence concerned with the interactions between computers and human (natural) languages, in particular how to program computers to process and analyze large amounts of natural language data.”

The transformation from words into an “understandable” format can be achieved with the help of existing ML models such as GloVe or FastText. These tools convert each word into a set of numbers (vector) and simultaneously maintain the relationship between words. This means that two words that are related (“buy” and “shopping”) will be “seen” as closer than two unrelated words (“buy” and “parrot”).

Manual vs. auto-labeling intent – how to scale it

So we have our word representations and we have our intent categories. Now what?

The next step is to annotate the queries with the intent for each of them and train our model using this dataset. Consequently, a trained model will learn to predict user intent for new queries. This is a concept similar to object recognition models. Given enough pictures with cats, a model will learn to recognize a cat in a picture that it couldn’t see before.

Going back to annotating queries, there are two options available:

  1. Manually label the data

This is a fancy name for “look at the query and write the intent next to it”.

The main advantage of manually annotated data is the high quality since humans do it. It is also a veeeeery slow process (approx. 2 hours per 1000 queries according to our measurements), so it doesn’t take us far on a dataset with a few million queries.

However, the small resulting dataset can be used for validation, meaning we can compare it with the results generated by the model and see how far they are from each other.

  1. Auto-label the data

The automatic process entails creating a script that uses several rules for attaching intent categories to each query. A naive approach goes like this: assuming that the word “buy” indicates a transactional intent, a script will annotate all queries containing this word as transactional. This method is precise, but it limits the number of labeled queries since not all transactional queries will include this word.

For the more evolved approach that we created, we used word representations (vectors) described beforehand and calculated the distance between words. If a query includes “shopping”, this word is closely related to “buy”, the script can label the query as transactional.

The main advantage of this approach is that it can process large volumes of data, although it does have limitations: it doesn’t recognize words with typos or words that are not part of a dictionary (for example, specific phone models).

Training the model to recognize search intent

Considering that we now had a dataset with labeled data, the next step was choosing the model type, training the model, evaluate the results, and iterate. We describe this process in detail in a research paper that you can download for free.

Because the data was labeled as such, we had a problem of multi-class classification. The classification problem identified which set of intent categories a new query falls into. It is also called multi-class because a query can have more than one intent.

Here is a snapshot that includes results for a random list of queries.

user search intent prediction ai ml model training

What is important to note from these results is that intent is expressed as a probability using a value between 0 and 1. For example, the query “cats for sale near me” expresses both a transactional and a navigational intent. We can determine the most probable intent by looking at the highest prediction value. Working on this Machine Learning problem was highly iterative.

In programming, they are always more ways than one to achieve a goal (such as implementing a feature), but if we follow the steps, we are guaranteed to achieve a result.

Machine Learning is different in the sense that it involves a lot of trial and error. We don’t have a clear path to the solution, so we many approaches and measure results for each of them. Throughout this process, we’re ready to keep only the best solution and discard the rest. Ignoring sunk costs is our secret weapon. 🙂

What’s more, because we develop practical applications for a range of marketing needs, using an AI-as-a-service platform like MorphL means you benefit from insights that overflow from one area to another.

Generate Your Own User Search Intent Predictions for FREE

We really wanted to give people like you, who are interested in user search intent, a chance to experiment with MorphL. That’s why we created a dedicated page where you can go and upload your own CSV with up to 1,000 search queries to predict user intent.

Here’s how it works:

  1. Upload the CSV file containing the search queries (one query per line). This is currently limited for English queries only.
  2. Once the processing is done, you’ll be emailed the CSV with the predictions. You should receive something like this:
Query Informational Navigational Transactional
cats for sale near me 0 0.48 0.52


  1. It’s now time to analyze the user search intent predictions and put them to good use. To help you achieve this, we’ve put together a complementary Google Sheet you can use to filter search queries based on certain thresholds.Download the User Search Intent Prediction Analysis
  2. Notice that the above document has three sheets:
    • RAW Predictions – is where you need to load the CSV file with the predicted user search intents we sent you via email
    • Prediction Filters – enables you to play with the thresholds. Say you want to extract only those transactional search queries that have over 0.75 confidence. In case you want to have multiple thresholds, you can simply do that. For example, you can filter out all search queries that have below 0.5 confidence.
    • and Filtered Predictions –  see the resulting search queries after applying your preferred thresholds.

You can use these search queries to:

  • segment ad campaigns based on user intent and improve your ROI for them
  • personalize landing pages for users based on the ad campaign that drives them to page
  • create specific types of content that address distinct user intent to increase conversion rates
  • modify or update a page or a resource to attract qualified traffic instead of visitors that don’t convert because they’re not ready to commit yet.

Pave the way to measurable growth

Our customers and partners have been using our User Search Intent Prediction Model in different scenarios with exciting results: up to 15% increase on their CTR!

We’re now at about 85% accuracy for English datasets and we’d need your help to improve it further.

Let us know how you’re using our model for User Search Intent Predictions! If you bump into any issues, we’d love to learn from your experience and feed the knowledge back into the model to produce more accurate results.

3 things to keep in mind before you’re off to experiment

  1. The auto-labelling method produces the best results when all search queries belong to the same category (fashion, retail, auto, lifestyle, etc.)
  2. No matter how good the model becomes, user search intent still retains a level of ambiguity because not even humans can agree on the same way to label a specific dataset.
  3. We’re currently working on other languages (German, Spanish, etc.). We’ve found that since each language has its own specificity, it requires auto labeling to be customized. (Yes, we tried Google Translate. No, it doesn’t work 🙂 ).

Leave a Reply

Your email address will not be published. Required fields are marked *