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.Documentation Index
Fetch the complete documentation index at: https://algolia.com/llms.txt
Use this file to discover all available pages before exploring further.
How Recommend works
Recommendations rely on supervised machine learning models that are trained 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
userTokenandobjectIDand counts how often each user interacts with each record. It then uses a collaborative filtering algorithm to find 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 similarities.
Recommend models
Algolia Recommend builds models from your and user events. Given a source item’sobjectID, 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 and recommends items that are likely bought together. It uses collaborative filtering to infer relationships from past purchases. For example, if users often buy product A with product B, and product B with product C, Recommend can suggest product C for product A 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).Related Items
The Related Items model recommends items that are related to each other 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 so that users get recommendations for items with little interaction data. When you use both content-based and collaborative filtering, Recommend returns a merged set of recommendations from both models.Trending Items and Trending Facet Values
The Trending Items model looks for items in your product catalog that have become popular (based on conversion events). This could be global for the entire catalog or within a specific facet (category), like winter sweaters. The Trending Facet Values model looks for facet values that increased in popularity. For example, you can recommend trending facet values within thecategories facet.
You can use both models together.
For example, show trending categories on your home page in a carousel layout
and show the trending items for each category in the carousel cards.
Looking Similar
The Looking Similar model recommends items that are related to each other based on the images provided 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. If the data collected from the last 30 days isn’t enough, the Frequently Bought Together and Related Items models extend the collection period to 90 days. Similarly, the Trending Items and Trending Facet Values models initially gather data from the preceding 15 days and expand to the last 30 days if needed. 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.| Model | Input type | Minimum number | Maximum number |
|---|---|---|---|
| Frequently Bought Together | Conversion events with two or more items | 1,000 | 3,000,000 |
| Related Items | Click and conversion events | 10,000 | 3,000,000 |
| Related Content | Items with values in their content-based attributes | 10 | 1,500,000 |
| Trending Items | Conversion events | 250 | 3,000,000 |
| Trending Facet Values | Conversion events | 250 | 3,000,000 |