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 ...
Senior Product Manager
A good starting point for building a comprehensive search experience is a straightforward app template. When crafting your application’s ...
Senior Product Manager
The inviting ecommerce website template that balances bright colors with plenty of white space. The stylized fonts for the headers ...
Search and Discovery writer
Imagine an online shopping experience designed to reflect your unique consumer needs and preferences — a digital world shaped completely around ...
Senior Digital Marketing Manager, SEO
Winter is here for those in the northern hemisphere, with thoughts drifting toward cozy blankets and mulled wine. But before ...
Sr. Developer Relations Engineer
What if there were a way to persuade shoppers who find your ecommerce site, ultimately making it to a product ...
Senior Digital Marketing Manager, SEO
This year a bunch of our engineers from our Sydney office attended GopherCon AU at University of Technology, Sydney, in ...
David Howden &
James Kozianski
Second only to personalization, conversational commerce has been a hot topic of conversation (pun intended) amongst retailers for the better ...
Principal, Klein4Retail
Algolia’s Recommend complements site search and discovery. As customers browse or search your site, dynamic recommendations encourage customers to ...
Frontend Engineer
Winter is coming, along with a bunch of houseguests. You want to replace your battered old sofa — after all, the ...
Search and Discovery writer
Search is a very complex problem Search is a complex problem that is hard to customize to a particular use ...
Co-founder & former CTO at Algolia
2%. That’s the average conversion rate for an online store. Unless you’re performing at Amazon’s promoted products ...
Senior Digital Marketing Manager, SEO
What’s a vector database? And how different is it than a regular-old traditional relational database? If you’re ...
Search and Discovery writer
How do you measure the success of a new feature? How do you test the impact? There are different ways ...
Senior Software Engineer
Algolia's advanced search capabilities pair seamlessly with iOS or Android Apps when using FlutterFlow. App development and search design ...
Sr. Developer Relations Engineer
In the midst of the Black Friday shopping frenzy, Algolia soared to new heights, setting new records and delivering an ...
Chief Executive Officer and Board Member at Algolia
When was your last online shopping trip, and how did it go? For consumers, it’s becoming arguably tougher to ...
Senior Digital Marketing Manager, SEO
Have you put your blood, sweat, and tears into perfecting your online store, only to see your conversion rates stuck ...
Senior Digital Marketing Manager, SEO
“Hello, how can I help you today?” This has to be the most tired, but nevertheless tried-and-true ...
Search and Discovery writer
In the past decade, artificial intelligence and predictive search has made our lives easier and faster in many areas. Predicting keystrokes, words, products, and phrases is one of the areas where artificial intelligence has made its mark. Under the hood of many ecommerce and media sites, you’ll find high-end AI technologies that are used to improve sales with advanced natural language processing. The science behind NLP for understanding user’s queries and predicting the best search results was made possible through machine learning. Today, Google uses BERT, which helps return meaningful results of queries that users haven’t previously typed, no matter how they spell or combine the words in the query.
Predictive search, in particular, refers to a useful user experience (UX) tool that suggests queries as users type. Query suggestions help people formulate the best query to find the products they are looking for. In this article, you’ll gain a complete understanding of how predictive search works, common pitfalls of predictive search, and how to avoid those pitfalls, along with the benefits and best practices for implementing a common predictive search experience – namely, autocomplete.
Most of us have experienced the wonderful world of autocomplete, where you type the first few letters of what you’re looking for into a search engine and click on one of the search suggestions from the drop-down, but there’s a lot that goes on in the background to make this possible. The ability to select from a list of suggestions without having to type the complete term in the search box is the core functionality of predictive search.
Google set the standard, being the first organization to implement an autocomplete feature. Very quickly, users grew to expect predictive search. Amazon, Shopify, Spotify, and Walmart are some examples of sites and applications that have implemented predictive search capability to show popular queries, offer contextual suggestions, avoid typos, and filter suggestions based on a user’s location or preferences. Today, organizations, big and small, offer some form of autocomplete.
Predictive search technology attempts to anticipate search terms based on the behavior, previous searches, geolocation, and other attributes of the end user, as well as trending searches across all user sessions, and displays the terms as suggestions in or under the search field. Autocomplete, autosuggest, and predictive search are often used interchangeably in the tech industry, especially in the UI/UX department.
A search query is the term that a user types in the search bar of a page. Predictive search analyzes each letter of the search query as they are being typed and provides a set of suggested queries in a drop-down menu before the user has even finished typing. These suggestions are generated by a series of algorithms. Multiple machine learning and natural language processing algorithms and models are used to generate matches, starting with a simple string in order to identify, match, and predict the outcome of the unfinished search query.
These suggestions help users to get results faster with less typing, which helps prevent typos and create queries that will return the desired results. The algorithms behind these suggestions begin with simple string matching from static lists or existing data, and get increasingly complex by using natural language processing to manage typos and synonyms to help users get the desired results.
Here are some best practices to create a good user experience with autocomplete searches:
Instant search is a cousin of predictive search. As a user types a query, results are displayed in near real-time. Instant search is executing a new search with every keystroke, which improves the search experience by driving discovery visually. Visual sites, such as ecommerce sites with product photos, can really benefit as instant search enables buyers to scan the results faster.
Instant search can be built on the back of autocomplete or other predictive search technologies, but at Algolia, we took a different approach using radix trees (also called radix tries or compressed tries… more on this below), a data structure that’s already sorted and works well for typo-tolerance.
The radix tree is used for something else: prefix search. Prefix search helps us retrieve results as someone types each character; it starts document sorting and matching using the beginning of a term. If you type “t”, prefix search will retrieve results for “toast” or “toaster”; the engine must know that both of these terms contain the prefix “t”.
This approach also helps with alternate spellings (e.g., “gray” or “grey”) and typos (“iphxne” instead of “iphone”). Also called typo tolerance, it allows users to make mistakes while typing and still find the records they’re looking for. This kind of predictive matching works for words that are close in spelling — the difference in spelling between a typed word and its exact match in the index. A perfect match is distance = 0. When there is a perfect match, or the distance is low (one or two letters mistakenly typed), then a match is made, and the record is added to the results.
It’s extremely fast to calculate, and often faster than more sophisticated AI models. If you’re familiar with vector search, you know it can help with typos, too. While vectors may contain embeddings for misspellings and provide a degree of typo tolerance, the radix tree can compute prefixes on the fly. Keyword search is actually much faster than vector search for this use case and can work for a much broader array of misspellings. It can help someone find an Apple device with an “aplp” prefix.
Predictive search results are not only influenced by matching strings, but also popular searches and user data that get fed into machine learning algorithms. These algorithms are continually learning from user behavior, improving the accuracy with which they predict what the user is searching for and what results might be relevant.
Regardless of the algorithm used to implement predictive search, the relevance, structure, and design of the search suggestions are critical for user interaction and overall user experience. Having a well-designed predictive search that provides relevant and responsive search suggestions is crucial. Here are some more best practices:
So, why spend the time implementing predictive search? What is the business value? Predictive search increases conversion rates and saves time for users when searching for an item by providing helpful auto suggestions. It’s an important functionality when shopping from a mobile phone that has a compact keyboard. Having the predictive search feature in the application reduces friction for users, making it less likely that they’ll abandon their search.
Here are a few of the benefits of using predictive search:
Predictive search helps to avoid confusion caused by typos and errors, and offers faster results by filtering the data.
Predictive search offers many advantages, including an increased conversion rate and a better customer experience, and is a crucial component in the success of many businesses. Using the best practices described in this article will help you make sure that your site search works as hard as you do.
Powered by Algolia Recommend