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
Alternatively you can send
booster as parameters of API recommendation requests.
All the items have one automatically created property
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.
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.