Concepts / Getting insights and analytics / Configuring Personalization
Nov. 06, 2019

Configuring Personalization

It’s all about Facets

User preferences come from facets. They center around the categories (facets) of items that a user frequently interacts with. For example, a user can have a preference for a certain author or genre when searching books, sport items while looking for clothing, or gaming software while looking for media. Thus, to make a personalized search, the facets of your search need to be personalized.

Let’s take an online bookshop as an example. To personalize search results, it is far more important to know which genre or author was bought by the user than knowing the title of the book that was bought. When we know the genre or author the user likes, we can provide results based on this preference.

Balancing events and facets

The personalization score assigned to each record during a search operation consists of the importance you give to two aspects:

  • The event
  • The facet

These scores are not accumulated, but rather provide a ratio in comparison to other scores. Let’s look at the following example for our online bookshop:

  • The importance for the author facet is set to 10%
  • The importance for the genre facet is set to 100%

  • The importance for the buy event is set to 100%
  • The importance for the like event is set to 10%

This would mean you would rate a preference in a certain genre ten times more important than a preference for an author while generating preferences. Also, a user liking a product would be less significant in determining the personalization score than buying a product.

Let’s see how everything ties together in terms of results. We have two customers in our example online bookshop, Customer A and Customer B, and we’ve tracked some events.

Over the years, Customer A has bought hundreds of Classic Novels. This means that within the search of Customer A, Classic Novels will be boosted a lot. Whenever Customer A searches for “Jane”, for example, it would show the Jane Austin collection as the first result because of personalization.

Customer B, on the other hand, has bought a lot of Romantic Novels and liked very few Classic Novels. Since we give more weight to buying as opposed to liking a book, results that fall in the Romantic Novels genre will get a boost for Customer B. Thus, whenever Customer B searches for “Jane” (like Customer A did), instead of Jane Austin, we would get results for Jane Henry (with over 40 romance novels) at the top.

By now, the importance of facets in user preference should be clear. Next to that, it’s important to keep in mind that personalization is different for every use case and can be configured in a lot of different ways. Before implementing it, please make sure to have a good idea of what makes sense for your use case.

Why not use products instead of facets?

Because it is inefficient and ultimately not what personalization is about. Preferences are not on individual products but on categories of products (i.e., facets).

Suggesting a specific book based on a previous like, purchase, or interaction will prove to be nearly impossible: the amount of Rules to create is immense. And this amount will grow bigger as time goes on. Going this way is not scalable and requires you to work on your search every single day.

When personalizing on facets, we prevent you from doing maintenance work while still giving personalized results to your end user. Because each event you send to Algolia will contribute to this personalization strategy, we’ll be able to return items that are really specific to the users’ interests.

Prioritize your facets

Some facets are more important for your personalization strategy than others. In the example of our online bookshop, we may want to give the genre facet more importance than the author facet. The reasoning behind this could be that our catalog has a wide variety of books, and a lot of different authors. Promoting an author would not make sense in the case where each author has only one or two books available in our catalog.

Personalization works only with a lot of data

The importance of your facets depends on the use case. When creating your personalization strategy, it is important to gather as much data as possible as to what converts the most users. For example, let’s say our online bookshop is a front for a physical bookshop which has been around for years. If the data gathered from the offline shop showed that people buying books with a red cover are more likely to buy other red-covered books, it may make sense to give a high importance to the color of a book’s cover other facets.

Relevance and Ranking is still at the top

Your personalization strategy does not replace Algolia’s default ranking strategy. Rather, like all criteria in the ranking formula, it enhances the ranking by boosting results depending on the user preferences.

Each record will be given a “personalization score”. This score will act in combination with the relevancy score we normally apply. This means that your results will always reflect textual and custom ranking, but a user’s preferences will be mixed in, and the order of these results may depend on the user’s interests.

Personalization only impacts the order in which the results are shown, giving a boost to items the user may be interested in.

Troubleshooting and improving personalization

Via the Dashboard - Simulating Personalization

With all that configuration, we’ve designed an interactive tool that lets you use your production data in a safe sandbox environment that will let you test your personalization strategy in action. In this screen, you can add or remove events and facets or change their weights and see the impact on a user search results immediately. Once you are satisfied with the results, you can save your changes and this will automatically refresh the profiles for all your users.

Via the API

It’s possible to get the different scores related to relevancy when performing a search. This makes it easier to understand the impact personalization has on your relevancy.

In order to retrieve the scores related to personalization, set the getRankingInfo to true while performing the search. The JSON response with your records will contain three relevant scores in the _rankingInfo.personalization attribute: filterScore, rankingScore and score.

1
2
3
4
5
6
7
8
9
{
  "_rankingInfo": {
    "personalization": {
      "filterScore": 12,
      "rankingScore": 20,
      "score": 17
    }
  }
}

Did you find this page helpful?