Search by Algolia
Add InstantSearch and Autocomplete to your search experience in just 5 minutes
product

Add InstantSearch and Autocomplete to your search experience in just 5 minutes

A good starting point for building a comprehensive search experience is a straightforward app template. When crafting your application’s ...

Imogen Lovera

Senior Product Manager

Best practices of conversion-focused ecommerce website design
e-commerce

Best practices of conversion-focused ecommerce website design

The inviting ecommerce website template that balances bright colors with plenty of white space. The stylized fonts for the headers ...

Catherine Dee

Search and Discovery writer

Ecommerce product listing pages: what they are and how to optimize them for maximum conversion
e-commerce

Ecommerce product listing pages: what they are and how to optimize them for maximum conversion

Imagine an online shopping experience designed to reflect your unique consumer needs and preferences — a digital world shaped completely around ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

DevBit Recap: Winter 2023 — Community
engineering

DevBit Recap: Winter 2023 — Community

Winter is here for those in the northern hemisphere, with thoughts drifting toward cozy blankets and mulled wine. But before ...

Chuck Meyer

Sr. Developer Relations Engineer

How to create the highest-converting product detail pages (PDPs)
e-commerce

How to create the highest-converting product detail pages (PDPs)

What if there were a way to persuade shoppers who find your ecommerce site, ultimately making it to a product ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

Highlights from GopherCon Australia 2023
engineering

Highlights from GopherCon Australia 2023

This year a bunch of our engineers from our Sydney office attended GopherCon AU at University of Technology, Sydney, in ...

David Howden
James Kozianski

David Howden &

James Kozianski

Enhancing customer engagement: The role of conversational commerce
e-commerce

Enhancing customer engagement: The role of conversational commerce

Second only to personalization, conversational commerce has been a hot topic of conversation (pun intended) amongst retailers for the better ...

Michael Klein

Principal, Klein4Retail

Craft a unique discovery experience with AI-powered recommendations
product

Craft a unique discovery experience with AI-powered recommendations

Algolia’s Recommend complements site search and discovery. As customers browse or search your site, dynamic recommendations encourage customers to ...

Maria Lungu

Frontend Engineer

What are product detail pages and why are they critical for ecommerce success?
e-commerce

What are product detail pages and why are they critical for ecommerce success?

Winter is coming, along with a bunch of houseguests. You want to replace your battered old sofa — after all,  the ...

Catherine Dee

Search and Discovery writer

Why weights are often counterproductive in ranking
engineering

Why weights are often counterproductive in ranking

Search is a very complex problem Search is a complex problem that is hard to customize to a particular use ...

Julien Lemoine

Co-founder & former CTO at Algolia

How to increase your ecommerce conversion rate in 2024
e-commerce

How to increase your ecommerce conversion rate in 2024

2%. That’s the average conversion rate for an online store. Unless you’re performing at Amazon’s promoted products ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

How does a vector database work? A quick tutorial
ai

How does a vector database work? A quick tutorial

What’s a vector database? And how different is it than a regular-old traditional relational database? If you’re ...

Catherine Dee

Search and Discovery writer

Removing outliers for A/B search tests
engineering

Removing outliers for A/B search tests

How do you measure the success of a new feature? How do you test the impact? There are different ways ...

Christopher Hawke

Senior Software Engineer

Easily integrate Algolia into native apps with FlutterFlow
engineering

Easily integrate Algolia into native apps with FlutterFlow

Algolia's advanced search capabilities pair seamlessly with iOS or Android Apps when using FlutterFlow. App development and search design ...

Chuck Meyer

Sr. Developer Relations Engineer

Algolia's search propels 1,000s of retailers to Black Friday success
e-commerce

Algolia's search propels 1,000s of retailers to Black Friday success

In the midst of the Black Friday shopping frenzy, Algolia soared to new heights, setting new records and delivering an ...

Bernadette Nixon

Chief Executive Officer and Board Member at Algolia

Generative AI’s impact on the ecommerce industry
ai

Generative AI’s impact on the ecommerce industry

When was your last online shopping trip, and how did it go? For consumers, it’s becoming arguably tougher to ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

What’s the average ecommerce conversion rate and how does yours compare?
e-commerce

What’s the average ecommerce conversion rate and how does yours compare?

Have you put your blood, sweat, and tears into perfecting your online store, only to see your conversion rates stuck ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

What are AI chatbots, how do they work, and how have they impacted ecommerce?
ai

What are AI chatbots, how do they work, and how have they impacted ecommerce?

“Hello, how can I help you today?”  This has to be the most tired, but nevertheless tried-and-true ...

Catherine Dee

Search and Discovery writer

Looking for something?

facebookfacebooklinkedinlinkedintwittertwittermailmail

Is semantic search applicable in your business and marketing plans, and how can you use it to your advantage?

For simple user queries, a search engine can reliably find the correct content using keyword matching alone. A “red toaster” query pulls up all of the products with toaster in the title or description, and red in the color attribute. Add synonyms like maroon for red and you can match even more toasters. But things start to become more difficult quickly: you have to add these synonyms yourself, and your search will also bring up toaster ovens. This is often where semantic search comes in.

Semantic search attempts to apply user intent and the meaning (or semantics) of words and phrases to find the right content. It goes beyond keyword matching by using information that might not be present immediately in the text (the keywords themselves) but are closely tied to what the searcher wants. For example, finding a sweater with the query sweater or even sweeter is no problem for keyword search, while the queries warm clothing or how can I keep my body warm in the winter? are better served by semantic search.

As you can imagine, attempting to go beyond the surface-level information embedded in the text is a complex endeavor, one attempted by many and incorporating many different components. Additionally, as with anything that shows great promise, semantic search is a term that is sometimes used for search that doesn’t truly live up to the name. In fact, the term can be so overused in marketing that it has even been used to describe very simple systems like the packaging of a synonym dictionary! So here we want to outline what semantic search is, the technological latest, what goes into it, and what it solves (and doesn’t).

What is semantic search?

Semantic search applies user intent, context, and conceptual meanings to match a user query to the corresponding content. It uses vector search and machine learning to return results that aim to match a user’s query, even when there are no word matches. To best find and rank results, semantic search will compare hundreds or even thousands of different characteristics that have been learned by machine learning and come back with a number that specifies how similar a record is to a query based on a formula that it has, again, derived through machine learning. It’s complex, yes, and powerful.

This is different from pure keyword search, and it can have a strong impact. A pure keyword search works roughly by matching query words to words in documents. Conversely, semantic search will often return results where there are no word matches, even with NLP applied, but the content still “plainly” matches what the user seeks.

Semantic search can do this because semantic search engines work differently. They don’t match on text, but on meaning. This might evoke thoughts of someone teaching the software each word’s definitions, and that is not far from what actually happens. Just like you would use context clues to understand a new word (“The shoe was stuck on my foot, but I reckerdly pull on it until it came off.”), a semantic search engine does the same, but across millions of examples. By looking at this massive dataset, it doesn’t come up with a formal definition of words, but it does understand what the words mean based on its context or usage, and what other words can be used in the same or similar contexts.

Context

The context in which a search happens is important. Context can be as simple as the locale (an American searching for football wants something different compared to a Brit searching the same thing) or much more complex.

An intelligent search engine will use the context on both a personal level and a group level. The personal level influencing of results is called, appropriately enough, personalization and will use that individual searcher’s affinities, previous searches, and previous interactions to return the content that is best suited to the current query. Personalization is applicable to all kinds of searching, but semantic search can go even farther. On a group level, a search engine can rerank results using information about how all searchers interact with search results, such as which results are clicked on most often, or even seasonality of when certain results are more popular than others. Again, this displays how semantic search can bring in intelligence to search, in this case intelligence via user behavior.

Semantic search can also leverage the context within text. We’ve already discussed that synonyms are useful in all kinds of search, and can improve keyword search by expanding the matches for queries to related content. But we know as well that synonyms are not universal–sometimes two words are equivalent in one context, and not in another. When someone searches for football players, what are the right results? The answer will be different in Kent, Ohio than in Kent, United Kingdom. A query like tampa bay football players, however, probably doesn’t need to know where the searcher is located. Adding a blanket synonym that made football and soccer equivalent would have led to a poor experience when that searcher saw the Tampa Bay Rowdies soccer club next to Tom Brady. (Of course, if we know that the searcher would have preferred to see the Tampa Bay Rowdies, the search engine can take that into account!) This is an example of query understanding via semantic search.

User intent

The ultimate goal of any search engine is to help the user be successful in completing a task, whether it’s to read news articles, buy clothing, or find a document. The search engine needs to figure out what the user wants to do, or what the user intent is.

We can see this when searching on an eCommerce website. As the user types the query jordans, the search automatically filters on the category Shoes. This anticipates that the user intent is to find shoes, and not jordan almonds (which would be in the Food & Snacks category). By getting ahead of the user intent, the search engine can return the most relevant results, and not distract the user with items that match textually, but not relevantly. This can be all the more relevant when applying a sort on top of the search, like price from lowest to highest. This is an example of query categorization. Categorizing the query and limiting the results set will ensure that only relevant results appear.

Difference between keyword and semantic search

We have already seen ways in which semantic search is intelligent, but it’s worth looking more at how it is different from keyword search. While keyword search engines also bring in natural language processing to improve this word-to-word matching–through methods such as using synonyms, removing stop words, ignoring plurals–that processing still relies on matching words to words. But semantic search can return results where there is not matching text, but anyone with knowledge of the domain can see that there are plainly good matches.

This ties into the big difference between keyword search and semantic search, which is how matching between query and records occurs. To simplify things some, keyword search occurs by matching on text. Soap will always match soap or soapy, because of the overlap in textual quality. More specifically, there are enough matching letters (or characters) to tell the engine that a user searching for one will want the other. That same matching will also tell the engine that the query soap is a more likely match for the word soup than the word detergent, unless the owner of the search engine has told the engine ahead of time that soap and detergent are equivalent, in which case the search engine will “pretend” that detergent is actually soap when it is determining similarity. 

Keyword-based search engines can also use tools like synonyms, alternatives, or query word removal–all types of query expansion and relaxation–to help with this information retrieval task, as well as NLP and NLU tools like typo tolerance, tokenization, and normalization.

Because semantic search is matching on concepts, the search engine can no longer determine whether records are relevant based on how many characters two words share. Again, think about soap versus soup versus detergent. Or more complex queries, like laundry cleaner, remove stains clothing, or how do I get grass stains out of denim? You can even include things like image searching! 

A real-world analogy of this would be a customer asking an employee where a “toilet unclogger” is located. An employee with only a pure keyword-esque understanding of the request would fail it unless the store explicitly refers to their plungers, drain cleaners and toilet augers as “toilet uncloggers.” But, we would hope, the employee is wise enough to make the connection between the various terms and direct the customer to the right aisle (perhaps by knowing the different terms, or synonyms, a customer can use for any given product).

A succinct way of summarizing what semantic search does is to say that semantic search brings increased intelligence to match on concepts more than words, through the use of vector search. With this intelligence, semantic search can perform in a more human-like manner, like a searcher finding dresses and suits when searching fancy, with not a jean in sight.

What is semantic search not?

By now, semantic search should be clear as a powerful method for improving search quality. As such, you should not be surprised to learn that the meaning of semantic search has been applied more and more broadly, to search experiences that don’t always warrant the name. And while there is no official definition of semantic search, we can say that it is search that goes beyond traditional keyword-based search by incorporating real-world knowledge to derive user intent based on the meaning of queries and content.

This leads to the conclusion that semantic search is not simply about applying NLP and adding synonyms to an index. While tokenization does require some real-world knowledge about language construction, and synonyms apply understanding of conceptual matches, they lack, in most cases, an artificial intelligence that is required for search to rise to the level of semantic

Implementation of semantic search

It is this last bit that makes semantic search both powerful and difficult. Generally, with the term semantic search, there is an implicit understanding that there is some level of machine learning involved. Almost as often, this also involves vector search.

Vector search works by encoding details about an item into vectors and then comparing vectors to determine which are most similar. Again, even a simple example can help.

Take two phrases: “Toyota Prius” and “steak”. And now let’s compare those to “hybrid”. Which of the first two are more similar? Neither would match textually, but you probably would say that “Toyota Prius” is the more similar of the two. You can say this because you know that a Prius is a type of hybrid vehicle, because you have seen “Toyota Prius” in a similar context as the word hybrid, such as “Toyota Prius is a hybrid worth considering,” or “hybrid vehicles like the Toyota Prius.” You’re pretty sure, however, you’ve never seen “steak” and “hybrid” in such close quarters.

This is generally how vector search works as well. A machine learning model takes thousands or millions of examples from the web, books, or other sources and uses this information to then make predictions on similarity. Of course, it is not feasible for the model to go through comparisons one-by-one (“Are Toyota Prius and hybrid seen together often? How about hybrid and steak?”) and so what happens instead is that the models will encode “patterns” that it notices about the different phrases. It’s similar to how you might look at a phrase and say, “this one is positive” or “that one includes a color,” except the language model doesn’t work so transparently (which is also why language models can be difficult to debug). These encodings are stored in a vector, or a long list of numeric values, and vector search uses math to calculate how similar different vectors are. 

Another way to think about the similarity measurements that vector search does, is to imagine the vectors plotted out. This is mind-blowingly difficult if you try to think of a vector plotted into hundreds of dimensions, but if you instead imagine a vector plotted into three dimensions, the principle is the same. These vectors form a line when plotted, and the question is: which of these lines are closest to each other? The lines for steak and beef will be closer than the lines for steak and car, and so are more similar. This principle is called vector similarity.

Vector similarity has a lot of applications. It can make recommendations based on the previously purchased products, find the most similar image, and can determine which items best match semantically when compared to a user’s query.

Conclusion

Semantic search is a powerful tool for search applications that has come more to the forefront with the rise of powerful deep learning models and the hardware to support them. While we’ve touched on a number of different common applications here, there are even more that use vector search and AI. Even image search or extracting metadata from images can be classified as semantic search. We’re in exciting times!

And, yet, its application is still early and its known powerfulness can lend itself to a misappropriation of the term. There are many components in a semantic search pipeline, and getting each one correct is important. When done correctly, semantic search will use real-world knowledge, especially through machine learning and vector similarity, to use user intent, context, and conceptual meanings to match a user query to the corresponding content.

About the author
Dustin Coates

Product and GTM Manager

linkedin

Recommended Articles

Powered byAlgolia Algolia Recommend

The past, present, and future of semantic search
ai

Julien Lemoine

Co-founder & former CTO at Algolia

Semantic search: the next big thing in search engine technology
product

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Semantic search and why it matters for e-commerce
ai

Michelle Adams

Chief Revenue Officer at Algolia