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

In the world of AI search and discovery, events are the fuel that powers accuracy and optimization. AI models heavily rely on vast amounts of high-quality event data to learn, make accurate predictions, and drive meaningful improvements.

This article will explain how the AI search machine learning models are using events to optimize results for Algolia NeuralSearch.

Three steps of search processing

If you’re new to search, it’s worth pausing for a moment to learn how search works. Every query is processed in three steps: query understanding, retrieval, and ranking.

End to End Search AI

  • The first step is query understanding, when a search engine parses and structures a query to better enable the input to be understood
  • Then, the engine retrieves results and orders them from most to least relevant
  • Finally, any additional rules or promotions can be applied to rank or re-rank results from most to least relevant

Historically, keyword search engines used term frequency to determine relevance and ranking for a given query. New machine learning models move beyond keyword matching to query understanding. When it comes to AI, each term is converted into a mathematical expression called a vector embedding. Queries are also vectorized. Then the machine learning models can mathematically compare a search query with a search record to understand its meaning.

vector space diagram
Image via Medium showing vector space dimensions. Similarity is often measured using Euclidean distance or cosine similarity.

Vector search is a way to use vector embeddings to find related objects that have similar characteristics using machine learning models that detect semantic relationships between objects in an index. The image above shows a simplified view of vector embeddings in 3D vector space. Real-world vectors can have hundreds of dimensions.

End to end AI search banner

Why is event data important for search AI?

AI search algorithms can understand the searcher’s intent, but ordering results from most to least important is harder. For example, if someone searches your online clothing site for a “blue top” an AI search engine will understand that “top” is a synonym for “shirt” or “sweater” but how it ranks results matters just as much — your visitors don’t want to comb through pages of content to find what they’re looking for. Events help improve that relevance. 

Events can be used to determine which fields best represent the meaning of a record (and index), and with what weighting. When I say “fields” I’m referring to the fields of a record in an index, such as the example below. Each field can be assigned a “weight” that can be used to boost or bury a result for any given search query. Technically, we calculate the relationship between the query and the events (as signals) to establish the significance of each field in determining the outcome; i.e. which fields should be considered to optimize for the outcome represented by the event (e.g., a conversion).

name Polyester windbreaker jacket
description Made of 100% taffeta polyester; body lining is 60% cotton/40% polyester jersey; Sleeve lining made of 100% polyester taffeta Rib-knit sleeve cuffs and hem made of 97% polyester/3% spandex. Detachable hood and inner locker loop Full zip closure Slant welt pockets Imported
Color BLUE
auxdescription ROYAL BLUE
categoryPath1 Uniform Shop

Unisex

categoryPath2 Jackets & Coats

School Uniforms

Jackets

categoryPath3 Jackets

This process trains an ‘expression’ of fields and associated weightings, which is then used to ‘vectorize’ each record. The expression must be provided for the engine to perform the vectorization process.

Can AI search be configured without events?

Technically, yes. An expression is simply a list of fields (from the record), and associated weightings (a numerical value between 0.0 and 1.0). However, determining which fields to use and to what weighting is extremely difficult for a person. To achieve a near-optimal expression is practically impossible, but to even generate an expression which yields reasonable results poses many challenges.

Consider the following real example; an expression trained on conversions, with the record excerpt shown above.

name:0.51401407,
categoryPath3:0.4297026,
categoryPath2:0.3915629,
categoryPath1:0.33121085,
color:0.20838235,
auxdescription:0.17819962

The selected fields appear reasonable enough, as are the ordering of the weightings. However, note that the description field is not included in the expression, although to a person, it may intuitively ‘best represent the meaning’ of the record. Also bear in mind, by comparison to many customers, this is an example of a better-structured record.

Consider instead the following real example; an expression trained on clicks, with the record excerpt from another customer’s index, with (typically) messier data quality.

categoryLevel3Name:0.22846536,
variantTopStyle:0.22119533,
categoryLevel4Name:0.21810511,
tagName:0.2164325,
variantFirmness:0.21558715,
tagKeyWords:0.19900157,
allTagNames:0.19536306
saleKeyWords:0.17452367,
H1:0.17995015
title MEMORY FOAM Queen Double King Single Mattress Bed 
description Sleep deeply with the All-New Memory Foam Sleep Mattress made from all natural fibers. . With new and improved 7-zone back-healthy pocket-spring system combined with 7 different support levels, it will relieve stern and long-lasting back pain.
allTagNames Furniture
Mattresses
Single Mattress
Double Mattress
King Single MattressAll Natural Mattress
Top Selling Mattresses
King Size Mattress
Queen Mattress
categoryLevel1Name Furniture
categoryLevel2Name Mattresses
categoryLevel3Name Bedroom
categoryLevel4Name Couples Mattress
saleKeyWords Natural Sleep
king mattress
king size mattress
queen mattress
queen size mattress
double mattress
single mattress
king single mattress
h1 Single Mattresses
tagKeyWords mattress
Mattress
matress
Matress
bedroom mattress
matresses
Matresses
single mattress
MattressNatural mattressOrganic mattress
Mattress
matress
single bed
tagName Organic Mattress
variantFirmness Soft

Again, in this example, description is not used, but neither is title. tagKeyWords and saleKeyWords include many repeated words, and both tagName and h1 contain the same information. The inclusion of variantFirmness – as a relatively very important field – may also come as a surprise to a user.

These two examples are intended to illustrate the difficulties associated with training an optimal expression. With events, we can remove this complexity, and automatically determine which fields should be considered when training the expression, and with what associated weighting.

Why use machines to train the data?

One question we get is why we need machine learning to determine the importance of each field. I mean, you can evaluate each field and determine which ones are most important, right? 

We learned this first hand when building NeuralSearch. Initially, the neural expression was being hand-crafted by our team. We had years of experience with customer datasets and search configurations. Even in those highly-capable hands, the resulting expressions were very different.

Consider the two customer examples from above:

Trained by Events Human Expert
name:0.51401407,

categoryPath3:0.4297026,

categoryPath2:0.3915629,

categoryPath1:0.33121085,

color:0.20838235,

auxdescription:0.17819962

name:1.0,

categoryPath3:0.6,

categoryPath2:0.6,

categoryPath1:0.4

Most of the selected fields have been appropriately identified, and in the same weighted ‘order’; however, the relative weightings are different. The nDCG@10 — a method we can use to measure the relevance for a particular query/results pair — for the expression trained by events was measured at ~0.6; the nDCG@10 for the expression configured by the human expert was measured at ~0.4. This is an extremely significant difference in search performance, to have been only affected by the expression.

Trained by Events Human Expert
categoryLevel3Name:0.22846536,

variantTopStyle:0.22119533,

categoryLevel4Name:0.21810511,

tagName:0.2164325,

variantFirmness:0.21558715,

tagKeyWords:0.19900157,

allTagNames:0.19536306

saleKeyWords:0.17452367,

h1:0.17995015

dealTitle:1.0,

categoryLevel4Name:0.4,

allTagNames:0.4,

categoryLevel3Name:0.3,

dealDescription:0.3

categoryLevel2Name:0.2,

categoryLevel1Name:0.1,

There are more significant differences between these two expressions: most of the fields selected by the human expert are not included in the event-trained expression, and the weighting scales are not close.

Additionally, NeuralSearch is continuously improving and field weights are adjusted automatically over time. Search trends are continuously changing, new long tail queries are created, new products and pages are added or removed from your index. It necessitates automatic updating behind the scenes. 

Current Algolia customers who already have events connected to transition to NeuralSearch seamlessly provided they have collected sufficient data to provide feedback to the machine learning algorithms. New customers will need to set up events and generate enough data to determine the best field weights to help overcome the cold start problem

Sign up today to join the waitlist for the self-service edition of Algolia NeuralSearch. By starting today, you can configure events and be ready to jump in with AI-powered search when it’s available!

About the author
Emma Wilson

Director of Product Management

linkedin

Recommended Articles

Powered byAlgolia Algolia Recommend

Unveiling the search algorithm: how Algolia improved search
product

Nicolas Dessaigne

Co-founder & board member at Algolia

How to optimize an AI algorithm
ai

Rasit Abay

Senior Data Scientist

What is end-to-end AI search?
ai

Abhijit Mehta

Director of Product Management