Personalized Re-ordering of Rows (Advanced)
Introduction
It is usually the cornerstone of the OTT platform homepage to show the picks from various (micro) genres. You can make these rows truly personalized: Pick the top genres for the particular user, and also show the most appealing assets inside these rows. The same approach is besides the homepage often also used in the category pages, such as Movies or Series.
In order to achieve this level of personalization, you need to take the two following steps:
- Get a list of genres for the user in personalized order
- For each row request movies and series from the particular genre
Genres
In the first step, we will acquire the personalized order of genres for the particular user.
Segmentation Setup
Start by creating Segmentation of the items based on their genre or genres.
In the Recombee Admin UI, navigate to the Segmentations section and choose Create.
- Choose Segmentation Type - Property-based
- Pick Property from the list that determines the genres
After picking the property, a preview opens up and you can see what genres exist in your catalog and the number of items per genre.
Then confirm the settings by hitting the Create button.
You have now created the Segmentation based on genres, and you can proceed to recommend the genres (=Segments) to the user.
Scenario Setup
In the Recombee Admin UI, navigate to the Scenarios section and choose Create Scenario.
- Enter a Scenario ID, such as "homepage-genres"
- Choose Recommendation type - Item Segments to User
- Continue and choose Results Segmentation - genres Segmentation created in the previous step
Logic
The Logic defines the behavior of the recommendation engine.
- Choose the recombee:default logic type from the Universal Models
This particular Logic returns the Segments (=genres) in personalized order to give the user the top genres according to the user’s previous interactions.
Requesting Recommendations
You shall request the Recommend Items Segments to User endpoint of the Recombee API using an SDK of your choice.
You will get a list of recommended genres that define the order of the genre rows and that you will use in the next step to recommend videos from these categories.
Videos From the Categories
Now we will fill the individual rows with assets from the particular genres.
There will be a Recommend Items to User request for each created row.
Scenario Setup
In the Recombee Admin UI, navigate to the Scenarios section and choose Create Scenario.
- Enter a Scenario ID, such as "homepage-videos-per-genre"
- Choose Recommendation type - Items to User
Logic
The Logic defines the behavior of the recommendation engine.
- Choose the video:personal logic type from the Video models to recommend assets based on the user’s watching history
Based on the assetType
parameter you can choose what type of assets will be returned (e.g. movies, series, episodes, or movies and episodes, etc.).
Using the excludeAlreadyWatched
parameter you can either allow or filter out the titles the user has already watched.
Filters
Show Only Videos of the Particular Genre (Dynamic)
Each Recommend Items to User request shall display videos showcasing a particular genre (according to the list obtained in the previous part of this tutorial).
You will set the filter parameter of the Recommend Items to User API requests.
Based on whether you have a single genre per item (string property) or multiple genres per item (set property), the ReQL expression may look like:
String Property
'genre' == "<the particular genre>"
'genre' == "thrillers" # example for thrillers
Set of Genres
"<the particular genre>" in 'genres'
More Filters
Requesting Recommendations
You can send all the Recommend Items to User requests (one for each row) inside a single Batch request using an SDK of your choice.
Don’t forget to set the category filter (see the previous section).
Once you receive the assets for all the rows, you can show the user the top videos from the user’s favorite genres.