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
AI ReQL Code Assistant within the Admin UI can help you with creating the rules - just describe the desired behavior in your natural language.
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.
ReQL Code Assistant#
The AI ReQL Code Assistant can help you create ReQL filters and boosters or even ReQL-based Segmentations.
You can access the assistant by clicking the Code Assistant button in the Business Rules and Item Segmentations sections of the Recombee Admin UI.
Describe what you want to be the outcome of the rule in natural language (it even does not have to be English) and watch the Assistant generate the ReQL code for you.
We recommend that you always validate the generated filters and boosters before applying them.
If you need to make some amendments to the generated code, just continue in the conversation and the assistant will modify the rule according to your needs.
Explanation of existing code#
Open the Assistant on an existing rule and get a detailed explanation of how the rule works.
You can access your conversation history with the Assistant and pick up where you left off.