Algolia Recommend lets you display recommendations on your website.
Recommendations help users broaden their search and explore more items.
Users can jump to similar or complementary items when they don’t find a precise match.
How Recommend works
Recommendations rely on supervised machine learning models.
Algolia trains these models on your product data and user interactions.
Recommend uses two different algorithm types: collaborative filtering and content-based filtering.
- Collaborative filtering analyzes user events from the last 30 to 90 days.
Recommend builds an interaction table between
userToken and objectID.
It then counts how often each user interacts with each record.
It then uses this data in a collaborative filtering algorithm.
The algorithm finds other records that are similar or frequently bought together:
- Similar when the same users interact with them.
- Frequently bought together when the same users bought them.
- Content-based filtering analyzes key attributes of items, such as titles or descriptions, to find similar items.
Recommend models
Algolia Recommend builds models from your and user events.
Given a source item’s objectID, the trained model recommends related records.
Frequently bought together
The Frequently bought together model comes in two variants:
relaxed and strict.
Relaxed variant
The relaxed variant is the default.
It recommends items that are likely bought together.
It uses collaborative filtering to infer relationships from past purchases.
For example, users often buy product A with product B, and product B with product C.
Recommend can then suggest product C for product A.
This can happen even if those two items weren’t bought together.
This increases catalog discovery but can introduce inferred pairings.
Strict variant
The strict variant recommends only items that appeared together in the conversion events you select for training.
If you don’t select any events, Recommend uses all conversion events by default (for example, add-to-cart and purchase).
The Related items model recommends related items, based on:
- User interactions (click and conversion events) (collaborative filtering)
- Attributes (content-based filtering). Use content-based filtering to recommend related content instead of related products.
Content-based filtering for Related items (Related content)
Content-based filtering can improve relevance compared to using only collaborative filtering.
It lets you show recommendations when you don’t have enough click and conversion events.
With content-based filtering, you can increase catalog coverage.
Users then get recommendations for items with little interaction data.
You can use both content-based and collaborative filtering together.
In that case, Recommend returns a merged set of recommendations from both models.
Trending items and Trending facets value
The Trending items model looks for items in your product catalog that have become popular.
It bases this on conversion events.
This could be global for the entire catalog or within a specific facet (category), like winter sweaters.
The Trending facets value model looks for facet values that became more popular.
For example, you can recommend trending facet values within the categories facet.
You can use both models together.
For example, show trending categories on your home page in a carousel layout.
Then show the trending items for each category in the carousel cards.
Looking similar
The Looking similar model recommends related items.
It bases these recommendations on the images in your index.
It doesn’t require any events.
For more information, see Set up Looking similar.
Events requirements for the models
To create relevant recommendations,
each model needs a minimum number of events or items with attributes.
The Frequently bought together and Related items models collect data from the last 30 days.
If this data isn’t enough, they extend the collection period to 90 days.
Similarly, the Trending items and Trending facets value models first gather data from the last 15 days.
If needed, they expand this period to the last 30 days.
Each model also has a maximum number of events it can use for training.
If there are too many events or items with attributes, the model ignores them.
Each model generates up to 30 recommendations.
Events selection
By default, each model trains on all the events it receives.
To make your recommendations more relevant, select which events to include.
Event selection applies to the Frequently bought together, Related items, Trending items, and Trending facets value models.
Each model only lists the event types it trains on.
For example, users often add several similar items to their cart and buy only one of them.
Training the Frequently bought together model only on purchase events keeps the model focused on items that users actually bought together.
Select events in the Events customization section when you create a model, or in the model’s Settings tab.
Event selection isn’t compatible with events uploaded from a CSV file.
To train on all available events again, restore the default settings.
Training frequency
After setting up a model for the first time, it starts training.
After this initial training, models retrain once every day.
You can’t change how often a model retrains.
This ensures your recommendations stay up-to-date as your catalog changes over time.
The training process can start at any moment during the day.
The duration depends on your catalog size and the resources available.
See also
Last modified on September 16, 2026