Algolia Recommend lets you display recommendations on your website. Recommendations encourage users to expand their search and browse more broadly. If an item isn’t exactly what users are looking for, they can quickly jump to similar or complementing items.
How Recommend works
Under the hood, recommendations rely on supervised machine learning models and the Algolia foundation.
There are two different flavors of recommendation algorithms.
Collaborative filtering works by analyzing user events.
First, the user events from the last 30 days are collected.
Recommend builds a table with
userToken as columns and
objectID as rows.
Each cell represents the number of interactions between a
userToken and an
Then, Recommend analyzes the table with a collaborative filtering algorithm.
For each item, the algorithm finds other items that share similar buying patterns across users.
Items are considered similar if the same set of users interacted with them.
Items would be considered bought together if the same set of users bought them.
Content-based filtering analyzes key attributes of items, such as their titles or descriptions, to find similarities.
Algolia Recommend builds models from your index and user events,
based on supervised machine learning algorithms.
objectID, the trained model recommends other
that are related, based on the characteristic model.
Frequently Bought Together
Frequently Bought Together recommends items that are often bought together. To find such items, Recommend looks at conversion events, which are events towards a goal, for example, a purchase. Two or more items are considered bought together if the same user performs conversions with these items on the same day.
You need to collect at least 1,000 conversion events with two or more items within the last 30 days.
The Frequently Bought Together model recommends up to 3 items.
Related Products and Related Content
The Related Products and Related Content models are hybrid model for recommending items that are related to each other based on:
- User interactions (click and conversion events) (collaborative filtering)
- Attributes (content-based filtering).
By using content-based filtering you will be able to show related content instead of related products.
If you want to train your Related Products model with only click and conversion events, you need to collect at least 10,000 within the last 30 days.
These models recommend up to 30 related items.
Content-based filtering for Related Products
Content-based filtering creates even more relevant recommendations compared to just relying on collaborative filtering, and also allow you to show recommendations when you didn’t collect enough user events yet. With content-based filtering you can maximize your catalog exposure, so that your users get relevant recommendations even on items that aren’t popular.
Trending Items and Trending Facet Values
The Trending Items model looks for items in your product catalog that saw a recent increase in popularity based on conversion events. Trends can be global, for example, recommend trending items in your entire product catalog. Trends can also be within a specific facet or category, for example, recommend trending winter sweaters.
The Trending Facet Values model looks for facet values that recently increased in popularity. For example, you can recommend trending categories (facet values) for the facet “categories”.
You need to collect at least 500 conversion events within the last 30 days.
Both models recommend up to 30 items or facet values.
You can use both models together. For example, on your home page, you can show trending categories in a carousel layout. In each card of the carousel, you can show the trending items for each category.
Migrating from the Recommend beta
Since June 30, 2021, Algolia Recommend is generally available. You can migrate your beta indices and update your user interface.
Storage and format
In the beta, recommendations were stored in an Algolia index with the following naming convention:
These beta indices don’t receive any updates since August 30, 2021.
After migrating your recommendations, you can delete the indices from the Recommend beta.
Updating your user interface
If you used the
Recommendations React component in the beta, see the upgrade guide for more information about updating to the latest Recommend UI library.
If you developed a custom component to show recommendations in your front end, see the Recommend API reference for more information about the returned response.