Introduction to ReQL

Recombee Query Language (ReQL) provides an elegant way for applying business rules or any other rules to the recommendations. It allows expressions to be evaluated on candidate items, telling the recommender how to handle each item based on the values of the item’s properties.

There are two types of the ReQL expressions:

  • filter – for selecting a subset of items which can be used in recommendation
  • booster – for preferring some items over the others

You can create your custom filter/booster Business Rules in the Recombee Admin UI and apply them to your Scenarios.

Creating own Business Rule

Creating your own Business Rule in GUI using ReQL

Alternatively you can send filter and booster as parameters of API recommendation requests.

Filters and boosters use the property values of the individual items (or users). Read this part of Getting Started guide or this tutorial for more information on uploading the item catalog.

All the items have one automatically created property itemId.

Filtering and Boosting

In filtering, the expression must return boolean value for each item. If the value returned is true, the item passed the filter; if the value is false, the item does not pass and will be discarded.

Read more about filtering

In advanced applications, besides filtering, you may wish to boost recommendation rates of some items. In contrast to filtering, where items may be completely blocked, in boosting, you may tell the recommender to prefer some items over others.

Indeed, by default, it is a task of the recommender itself to select the items which are the most relevant. However, it may be your policy to purposefully bias the recommender toward your business goals.

Read more about boosting