Recombee Docs
Visit recombee.comStart Free
docs20User Documentation
adminuiAdmin UI
reql32ReQL
codeAPI Clients & Integrations
cookhatScenario Recipes
suitcaseMisc

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.

AI ReQL Code Assistant within the Admin UI can help you with creating the rules - just describe the desired behavior in your natural language.

Creating your own Business Rule in Admin UI using ReQL
Creating your own Business Rule in Admin UI 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

ReQL Code Assistant

ReQL AI Assistant in Admin UI using ReQL
ReQL AI Assistant in Admin UI using ReQL

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.

Code generation

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.

Conversations history

You can access your conversation history with the Assistant and pick up where you left off.

© Copyright 2024, Recombee s.r.o
docs.recombee.com