Search by Algolia
Feature Spotlight: Query Rules
product

Feature Spotlight: Query Rules

You’re running an ecommerce site for an electronics retailer, and you’re seeing in your analytics that users keep ...

Jaden Baptista

Technical Writer

An introduction to transformer models in neural networks and machine learning
ai

An introduction to transformer models in neural networks and machine learning

What do OpenAI and DeepMind have in common? Give up? These innovative organizations both utilize technology known as transformer models ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

What’s the secret of online merchandise management? Giving store merchandisers the right tools
e-commerce

What’s the secret of online merchandise management? Giving store merchandisers the right tools

As a successful in-store boutique manager in 1994, you might have had your merchandisers adorn your street-facing storefront ...

Catherine Dee

Search and Discovery writer

New features and capabilities in Algolia InstantSearch
engineering

New features and capabilities in Algolia InstantSearch

At Algolia, our business is more than search and discovery, it’s the continuous improvement of site search. If you ...

Haroen Viaene

JavaScript Library Developer

Feature Spotlight: Analytics
product

Feature Spotlight: Analytics

Analytics brings math and data into the otherwise very subjective world of ecommerce. It helps companies quantify how well their ...

Jaden Baptista

Technical Writer

What is clustering?
ai

What is clustering?

Amid all the momentous developments in the generative AI data space, are you a data scientist struggling to make sense ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

What is a vector database?
product

What is a vector database?

Fashion ideas for guest aunt informal summer wedding Funny movie to get my bored high-schoolers off their addictive gaming ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Unlock the power of image-based recommendation with Algolia’s LookingSimilar
engineering

Unlock the power of image-based recommendation with Algolia’s LookingSimilar

Imagine you're visiting an online art gallery and a specific painting catches your eye. You'd like to find ...

Raed Chammam

Senior Software Engineer

Empowering Change: Algolia's Global Giving Days Impact Report
algolia

Empowering Change: Algolia's Global Giving Days Impact Report

At Algolia, our commitment to making a positive impact extends far beyond the digital landscape. We believe in the power ...

Amy Ciba

Senior Manager, People Success

Retail personalization: Give your ecommerce customers the tailored shopping experiences they expect and deserve
e-commerce

Retail personalization: Give your ecommerce customers the tailored shopping experiences they expect and deserve

In today’s post-pandemic-yet-still-super-competitive retail landscape, gaining, keeping, and converting ecommerce customers is no easy ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Algolia x eTail | A busy few days in Boston
algolia

Algolia x eTail | A busy few days in Boston

There are few atmospheres as unique as that of a conference exhibit hall: the air always filled with an indescribable ...

Marissa Wharton

Marketing Content Manager

What are vectors and how do they apply to machine learning?
ai

What are vectors and how do they apply to machine learning?

To consider the question of what vectors are, it helps to be a mathematician, or at least someone who’s ...

Catherine Dee

Search and Discovery writer

Why imports are important in JS
engineering

Why imports are important in JS

My first foray into programming was writing Python on a Raspberry Pi to flicker some LED lights — it wasn’t ...

Jaden Baptista

Technical Writer

What is ecommerce? The complete guide
e-commerce

What is ecommerce? The complete guide

How well do you know the world of modern ecommerce?  With retail ecommerce sales having exceeded $5.7 trillion worldwide ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Data is king: The role of data capture and integrity in embracing AI
ai

Data is king: The role of data capture and integrity in embracing AI

In a world of artificial intelligence (AI), data serves as the foundation for machine learning (ML) models to identify trends ...

Alexandra Anghel

Director of AI Engineering

What are data privacy and data security? Why are they  critical for an organization?
product

What are data privacy and data security? Why are they critical for an organization?

Imagine you’re a leading healthcare provider that performs extensive data collection as part of your patient management. You’re ...

Catherine Dee

Search and Discovery writer

Achieving digital excellence: Algolia's insights from the GDS Retail Digital Summit
e-commerce

Achieving digital excellence: Algolia's insights from the GDS Retail Digital Summit

In an era where customer experience reigns supreme, achieving digital excellence is a worthy goal for retail leaders. But what ...

Marissa Wharton

Marketing Content Manager

AI at scale: Managing ML models over time & across use cases
ai

AI at scale: Managing ML models over time & across use cases

Just a few years ago it would have required considerable resources to build a new AI service from scratch. Of ...

Benoit Perrot

VP, Engineering

Looking for something?

facebookfacebooklinkedinlinkedintwittertwittermailmail

Just a few years ago it would have required considerable resources to build a new AI service from scratch. Of course, that’s all changed. Yet, this is just a very small first step: the actual challenge of running AI at scale is sustaining quality over time and variance. 

Managing the lifecycle of ML models over time and across use cases proves to be essential to the long term success of investments in AI. For specific tasks such as translating languages or answering questions, minimal knowledge of Python is all it takes to interact with powerful pre-trained ML models, easily found on repositories such as Hugging Face

Integrating such a model at the heart of an API, is also relatively easy. Running AI-powered services in production does not differ from running “conventional” services; it might be more CPU intensive than typical CRUD applications, still, serving a large amount of requests with acceptable latency similarly boils down to how many machines to use – hence money.

However, while it may be easy to get started, it’s much harder to maintain, optimize, and scale AI over time. Managing the lifecycle of machine learning models over time and across use cases is essential for long-term success. 

The challenges of AI over time

There are scores of new AI models — each more capable than the next — with more hidden layers, more parameters, and different architectures. Game-changing ML models appear regularly, and adjusting their architecture is trivial; in practice, new ML models appear every second. Not all of them are efficient or even relevant to every business use case, but some can significantly improve results. How can you know if a new model is better than a previous one? Deploying ML models and comparing their performance is crucial. 

As an additional complication, the performance of a given ML model is known to change over time: their predictive ability or classification power decay. The reasons for this decay, known as concept drift, are beyond the scope of this article. It can be conceptualized as a consequence of “global context” changes: new habits appearing, usage of words evolving, seasons changing, people’s preoccupations shifting. To adapt to that, existing ML models must be monitored over time and manually or continuously retrained before being redeployed and compared.

Besides, note that these considerations are true for any single “intent” and there are many of such intents in an application. For example, in the world of Search:

  • Properly trained, some ML models like Retina Net or YOLO, can label items of interest in images – therefore enabling textual search over a set of images;
  • Others, like BART for NLI, can measure the probability for a text to relate to specific labels – therefore enabling content categorization;

Last, business key performance indicators are far from unique, and their importance varies depending on the concrete use case. Continuing the example of search:

  • For some businesses, the conversion rate is the most important metric to increase;
  • For other businesses, the generated revenue is the one to optimize

Running AI at scale is accepting all these variables and navigating a multi-dimensional landscape.

Operating AI at scale at Algolia

At Algolia, we handle all of this complexity on behalf of our customers, so that they can focus on their core business and get meaningful outcomes. Each customer is unique: their audience, their content, their preferred business KPIs… everything varies from one customer to another. Running AI at scale means supporting this variability while continuing to introduce new ML models or refining existing models. 

We have also been developing proprietary models for years now to solve precise problems such as search personalization, query understanding and matching, and ranking. We also augment our pipelines with existing pre-trained models – for example, we started our semantic search efforts with the Universal Sentence Encoder suite. Today, Algolia NeuralSearch uses a combination of several ML models to solve very specific search intent for very different use cases, and we will continue to introduce new models to increase the power of our search.

In a way similar to how versions are tracked in production, we keep extensive track of the ML models being used over time. This means that we can understand which instances have which combination of models, therefore which customers are using which versions. As we leverage these models to build dedicated data structures, this tracking is also key to trigger the updating of these derived data (e.g. indices).

Perhaps the most important aspect to improving ML models over time is tracking how models are performing to help customers achieve their business KPIs. Algolia customers configure their search and recommendation pipelines with events — clicks, conversions, purchases, ratings, add-to-cart, and so forth — and events are key to the success of an implementation. 

When deploying new ML models, we first monitor their impact on these KPIs for a small but significant part of customers’ traffic, and for a significant amount of time. Depending on the customer, it may take a couple of weeks to confirm that a particular model is improving the relevance of their search experience.

What does it mean to monitor ML? Developers are familiar with how conventional software is monitored to find errors. Input and output are generally pretty clear as deterministic, and many errors can be detected and captured as test cases. On the other hand, ML models are non-deterministic by nature: they are expected to answer in ways that cannot be predicted. Identifying incorrect behavior and alerting accordingly is an extremely complex problem, which only AI experts knowing their models can solve appropriately.

NeuralSearch with Algolia

With Algolia NeuralSearch, customers can benefit from state-of-the-art AI based search, while benefiting from Algolia’s renowned performance, reliability and quality. All this complexity – from the selection of ML models, to their deployment, monitoring and management over time – is handled by Algolia. 

Learn more about the tradeoffs of buying vs building AI search from scratch, or sign up today to see how NeuralSearch can work for your use case.

About the author
Benoit Perrot

VP, Engineering

linkedin

Recommended Articles

Powered byAlgolia Algolia Recommend

Data is king: The role of data capture and integrity in embracing AI
ai

Alexandra Anghel

Director of AI Engineering

How Algolia uses AI to deliver smarter search
ai

Julien Lemoine

Co-founder & former CTO at Algolia

AI is eating ecommerce
ai

Sean Mullaney

CTO @Algolia