# Universal Models

> Source: https://docs.recombee.com/logics/universal

> For the complete documentation index, see [llms.txt](/llms.txt).

# Universal Models

Universal Recombee models for the most common use-cases.

## recombee:default

Default model ensemble aiming to work well in most common use cases. It is an ensemble of collaborative filtering and content-based recommendation, backed by popularity-based models when there's not enough data in the given context. The ensemble is being continuously optimized by AI so it automatically adapts to incoming data.

---

Applicable to endpoints

[Recommend Items to Item](/api/recommendations#request-recommend-items-to-item)·

[Recommend Items to User](/api/recommendations#request-recommend-items-to-user)·

[Recommend Users to Item](/api/recommendations#request-recommend-users-to-item)·

[Recommend Users to User](/api/recommendations#request-recommend-users-to-user)·

[Recommend Item Segments to Item](/api/recommendations#request-recommend-item-segments-to-item)·

[Recommend Item Segments to User](/api/recommendations#request-recommend-item-segments-to-user)·

[Recommend Item Segments to Item Segment](/api/recommendations#request-recommend-item-segments-to-item-segment)

## recombee:homepage

Universal model ensemble suitable for putting recommendations on the homepage / welcome-screen scenarios.

---

Applicable to endpoints

[Recommend Items to User](/api/recommendations#request-recommend-items-to-user)

## recombee:personal

Universal model ensemble suitable for user-based recommendations reflecting the personal tastes of the current user.

---

Applicable to endpoints

[Recommend Items to User](/api/recommendations#request-recommend-items-to-user)

---

Requirements

There must be interaction data for the user.

## recombee:similar

Universal model ensemble suitable for either recommending items which are similar to the given item (in case of Items-to-Item recommendation), or recommending users who are similar to the given user (in case of Users-to-User recommendation).

---

Applicable to endpoints

[Recommend Items to Item](/api/recommendations#request-recommend-items-to-item)·

[Recommend Users to User](/api/recommendations#request-recommend-users-to-user)

## recombee:popular

Universal model suitable for recommending globally popular items, taking into account all interaction types. More important actions (purchases, cart-additions) have higher weight for computing the popularity than less important actions (detail-views).

---

Applicable to endpoints

[Recommend Items to Item](/api/recommendations#request-recommend-items-to-item)·

[Recommend Items to User](/api/recommendations#request-recommend-items-to-user)

---

Requirements

Interaction data (Detail Views/Purchases/Cart Additions) must be present.

---

### Parameters

timePeriod

Duration

Default: **14d** 

The time period in which the popularity is measured.

---

userSegmentFilter

String

Default: **true**

[ReQL filter](https://docs.recombee.com/reql_filtering_and_boosting#reql-filtering) on top of user properties defining the segment of users among whom the popularity is calculated. For example, when user properties like `profession` and `country` are provided for some users, you may only ask for items popular among software developers in US and Canada: `'profession'=="software developer" and 'country' in {"US", "CA"}`.

---

interactionTypes

Enum Set

Default: **\[bookmarks, cartAdditions, detailViews, purchases, ratings, viewPortions\]**

Allowed Values: **bookmarks |** **cartAdditions |** **detailViews |** **purchases |** **ratings |** **viewPortions** 

Interaction types to be taken into account when computing the popularity. By default, all the interactions are taken into account. But for example by providing only `["purchases"]`, you will retrieve items which are most frequently purchased, no matter how frequently are they (or the other items) viewed, bookmarked, etc.

## recombee:popular-segments

Universal model ensemble suitable for recommending globally popular segments.

---

Applicable to endpoints

[Recommend Item Segments to User](/api/recommendations#request-recommend-item-segments-to-user)

---

### Parameters

timePeriod

Duration

Default: **14d** 

The time period in which the popularity is measured.

---

userSegmentFilter

String

Default: **true**

[ReQL filter](https://docs.recombee.com/reql_filtering_and_boosting.html#reql-filtering) on top of user properties defining the segment of users among whom the popularity is calculated. For example, when user properties like `profession` and `country` are provided for some users, you may only ask for items popular among software developers in US and Canada: `'profession'=="software developer" and 'country' in {"US", "CA"}`.

---

interactionTypes

Enum Set

Default: **\[bookmarks, cartAdditions, detailViews, purchases, ratings, viewPortions\]**

Allowed Values: **bookmarks |** **cartAdditions |** **detailViews |** **purchases |** **ratings |** **viewPortions** 

Interaction types to be taken into account when computing the popularity.

## recombee:recently-viewed

Model returning the list of recently viewed items for a particular user.

---

Applicable to endpoints

[Recommend Items to User](/api/recommendations#request-recommend-items-to-user)

---

Requirements

Detail Views must exist for the user.

---

### Parameters

maxAge

Duration

Default: **14d** 

Maximal age of the DetailView since the current timestamp.

---

recencyOrdering

Enum

Default: **descending**

Allowed Values: **ascending |** **descending** 

Order in which the items are returned with regard to the time when they were interacted. When the order is descending, the last interacted item is at the beginning of the list of recommendations. When it is ascending, the first interacted item matching the `maxAge` condition is at the beginning of the list.

## recombee:visually-similar

Model recommending similar items based on visual similarity (using deep-learning neural networks to process the images provided through the image properties). While the image similarity can take part in other Logics as well, in `recombee:visually-similar`, it is explicitly used as the primary model. Image processing may take some time. Therefore, changes in image item properties do not take effect in real-time. The functionality is still in beta mode.

_This Logic is not available in new databases by default. Please contact [support@recombee.com](mailto:support@recombee.com) if you want to use it._

---

Applicable to endpoints

[Recommend Items to Item](/api/recommendations#request-recommend-items-to-item)

---

Requirements

Some image properties must be defined for items, with valid image links provided for the majority of the items in the catalog.

---

### Parameters

useFallbackModels

Boolean

Default: **false**

Enable fallback models to make the recommendations if the model based on visual similarity cannot be used (e.g. due to a missing image for the given source item).

## recombee:similar-properties

Model recommending similar items based on item properties (numerical values, sets, and texts). While property values can take part in other Logics, in `recombee:similar-properties`, they are explicitly used as the primary data source for recommending similar items or uses. Various machine-learning methods, including NLP deep-learning networks that process unstructured text descriptions, are used to compute the similarities.

---

Applicable to endpoints

[Recommend Items to Item](/api/recommendations#request-recommend-items-to-item)·

[Recommend Users to User](/api/recommendations#request-recommend-users-to-user)

---

Requirements

Some properties must exist for the items/users, depending on the used API endpoint.

---

### Parameters

useFallbackModels

Boolean

Default: **false**

Enable fallback models to make recommendations if the model based on item properties cannot be used (e.g. due to missing property values for the given source item).

## recombee:emailing

Model ensemble suitable for recommending items in periodic e-mailing campaigns. It contains fine-tuned rotation settings so that the set of recommended items for a particular user changes with each e-mail sent.

By default, rotation only takes into account recommendations (e-mails) at most 14 days old. Should a longer time period be needed for your use case, kindly contact support@recombee.com.

---

Applicable to endpoints

[Recommend Items to User](/api/recommendations#request-recommend-items-to-user)

---

### Parameters

rotationPolicy

Enum

Default: **smart**

Allowed Values: **smart |** **total** 

A policy determining how strictly should already recommended items be rotated.

The default option "smart" contains fine-tuned rotation settings, which take into account the position of recommended items and enable some of the items to re-appear in further e-mails.

Option "total" never recommends items that have already appeared in previous e-mails.

## recombee:custom-sort

Model suitable for recommending items ordered by a ReQL expression given as a booster

---

Applicable to endpoints

[Recommend Items to Item](/api/recommendations#request-recommend-items-to-item)·

[Recommend Items to User](/api/recommendations#request-recommend-items-to-user)

## recombee:related-to-segment

Recommends items that are contextually related to the [Item Segment](https://docs.recombee.com/segmentations) and should be of interest to the user. Items may belong to the Segment or be outside it if they are strongly relevant.

Consider using [recombee:personal-from-segment](https://docs.recombee.com/logics/universal#recombee-personal-from-segment) if you want recommendations strictly limited to items within the Segment.

**Examples:**

* _News:_ For the "Climate Change" Segment, recommend articles about renewable energy (inside the Segment) or related topics like electric vehicles (outside the Segment).
* _Music:_ For the "Jazz" Segment, recommend jazz-related songs, including classic tracks (inside the Segment) or modern experimental pieces (outside the Segment).
* _E-commerce:_ For the "Digital Cameras" Segment, recommend products like digital cameras (inside the Segment) or accessories like tripods, lenses, or lighting kits (outside the Segment).
* _Video Streaming:_ For the "Science Fiction" Segment, recommend sci-fi movies (inside the Segment) or related dystopian thrillers (outside the Segment).

---

Applicable to endpoints

[Recommend Items to Item Segment](/api/recommendations#request-recommend-items-to-item-segment)

## recombee:personal-from-segment

Recommends items from the [Item Segment](https://docs.recombee.com/segmentations), tailored to the user's preferences.

Consider using [recombee:related-to-segment](https://docs.recombee.com/logics/universal#recombee-related-to-segment) if you don't need all the recommended items to belong to the Segment.

**Examples:**

* _News:_ For the "Environmental News" Segment, recommend articles on climate policy or renewable energy that align with the user’s reading history.
* _Music:_ For the "Jazz" Segment, recommend jazz songs matching the user’s listening habits.
* _E-commerce:_ For the "Digital Cameras" Segment, recommend digital cameras the user is most likely to be interested in, based on their browsing and purchase history.
* _Video Streaming:_ For the "Science Fiction" Segment, recommend sci-fi movies that match the user’s preferences.

---

Applicable to endpoints

[Recommend Items to Item Segment](/api/recommendations#request-recommend-items-to-item-segment)

## recombee:popular-from-segment

Recommends the most popular items within the [Item Segment](https://docs.recombee.com/segmentations), based on overall engagement. Use this Logic to highlight trending or widely appealing items.

**Examples:**

* _News:_ Most-read articles from the "World Politics" Segment.
* _Music:_ Most-streamed tracks from the "Rock" Segment.
* _E-commerce:_ Best-selling smartphones in the "Smartphones" Segment.
* _Video Streaming:_ Most-watched action movies in the "Action Movies" Segment.

---

Applicable to endpoints

[Recommend Items to Item Segment](/api/recommendations#request-recommend-items-to-item-segment)

---

Requirements

Interaction data (Detail Views/Purchases/Cart Additions) must be present.

---

### Parameters

timePeriod

Duration

Default: **14d** 

The time period in which the popularity is measured.

---

interactionTypes

Enum Set

Default: **\[bookmarks, cartAdditions, detailViews, purchases, ratings, viewPortions\]**

Allowed Values: **bookmarks |** **cartAdditions |** **detailViews |** **purchases |** **ratings |** **viewPortions** 

Interaction types to be taken into account when computing the popularity. By default, all the interactions are taken into account. But for example by providing only `["purchases"]`, you will retrieve items which are most frequently purchased, no matter how frequently are they (or the other items) viewed, bookmarked, etc.

## recombee:items-from-top-segment-for-you

This Composite Logic provides a comprehensive recommendation in a single response consisting of:

* **Top Segment for the User**: It identifies and returns the most relevant Item Segment (e.g., the top category) for the user from the specified Segmentation.
* **Top Items from the Segment**: Along with the Segment, it also returns a list of the top items within that Segment.

This Logic is ideal for recommending a section and its content together, making it particularly useful for personalized homepage sections.

If you want to display multiple distinct sections in a personalized order on your homepage, you can achieve this by making multiple Composite Recommendation requests within a single Batch call.

For more specific use cases, such as "Videos From The Top Genre For You" or "Products from the Top Category For You," there are specialized Logics available.

---

Applicable to endpoints

[Composite Recommendation](/api/recommendations#composite-recommendation)

---

### Composite Stages

For

Recommendation

Source

Result

User

Item Segment

Items

Source

Endpoint:   **Item Segments to User**

The Logic returns the most relevant Item Segment (e.g., the top category) for the user from the specified Segmentation.

---

Result

Endpoint:   **Items to Item Segment**

The Logic returns the list of the top items within the top Segment.

## recombee:because-you-interacted

This Composite Logic delivers two results within a single response consisting of:

* _Item the User Interacted With_: The Logic selects and returns an item that the user has interacted with, based on the interaction types specified by the interactionTypes parameter (e.g., Watched, Purchased, Liked).
* _Top Related Items_: Simultaneously, it returns a list of top items related to that specific interacted item.

This Logic is ideal for general "Because You..." scenarios, where recommendations are tailored based on the user's previous interactions. For more specific use cases, such as "Because You Bought" or "Because You Watched", there are specialized Logics available.

---

Applicable to endpoints

[Composite Recommendation](/api/recommendations#composite-recommendation)

---

### Composite Stages

For

Recommendation

Source

Result

User

Item

Items

Source

Endpoint:   **Items to User**

The Logic selects and returns an item that the user has recently interacted with.

#### Parameters

interactionTypes

Enum Set

Default: **\[bookmarks, cartAdditions, detailViews, purchases, ratings, viewPortions\]**

Allowed Values: **bookmarks |** **cartAdditions |** **detailViews |** **purchases |** **ratings |** **viewPortions** 

Defines which interactions are considered when selecting the item the user has interacted with

---

maxDaysAgo

Integer

Default: **30**

Defines the maximum number of days since the user interacted the item for it to be considered for the "Because" selection.

For example, setting maxDaysAgo to 7 will only consider items interacted within the last 7 days.

---

Result

Endpoint:   **Items to Item**

The Logic returns a list of top items related to a specific item, offering content the user is likely to be interested in.

## recombee:swiping-feed

This Logic is designed for infinite swiping feed experiences (such as reels or short-form video feeds), where users continuously browse content and can express feedback through likes or dislikes.

It optimizes recommendations in real time based on a configurable combination of user engagement (likes, number of viewed items, purchases), and time spent consuming content.

---

Applicable to endpoints

[Recommend Items to User](/api/recommendations#request-recommend-items-to-user)·

[Recommend Items to Item](/api/recommendations#request-recommend-items-to-item)

---

Requirements

[View Portions](https://docs.recombee.com/api/interactions#set-view-portion) shall be sent for consumed content, with the [autoPresented parameter](https://docs.recombee.com/api/interactions#set-view-portion-param-autoPresented) set to `true` and [timeSpent](https://docs.recombee.com/api/interactions#set-view-portion-param-timeSpent) specified

Likes and dislikes shall be sent as +1 / -1 [Ratings](https://docs.recombee.com/api/interactions#add-rating)

After a few items have been presented, call [Recommend Next Items](https://docs.recombee.com/api/recommendations#recommend-next-items) to retrieve the next batch of content

---

### Parameters

creationTimestamp

Property

Default: **None**

Property representing the creation time of an item, enabling the Logic to evaluate and prioritize newer content in recommendations.

---

timeSpentWeight

Double

Default: **0**

Weight (0–1) controlling the importance of [time spent](https://docs.recombee.com/api/interactions#set-view-portion-param-timeSpent) on content in the optimization.

---

likeWeight

Double

Default: **0**

Weight (0–1) controlling the importance of user likes (positive [Ratings](https://docs.recombee.com/api/interactions#add-rating)) in the optimization.

---

itemsShownWeight

Double

Default: **0**

Weight (0–1) controlling the importance of maximizing the number of items consumed by the user.

---

purchaseWeight

Double

Default: **0**

Weight (0–1) controlling the importance of [Purchases](https://docs.recombee.com/api/interactions#purchases) in the optimization.