Migrating to Recombee from Microsoft Cognitive Services Recommendations

Ondra Fiedler
Mar 22, 2018 · 4 min read

Microsoft has recently discontinued the Recommendations within the Azure Cognitive Services (MCSR). If you used this service, you are probably looking for some replacement now. This article demonstrates that migrating from MCSR to Recombee is very straightforward. Furthermore, our service will bring you much more capabilities, since Recombee specializes in recommendations and supports many innovative features.

About Recombee

Recombee is a SAAS solution, just like the Microsoft Cognitive Services Recommendations were. It provides recommendations through intuitive real-time API. Advanced artificial intelligence algorithms autonomously maximize conversion rate for all your personalization scenarios. Business needs can be expressed using flexible query language and added profit monitored in web user interface.

How to migrate

You can start by creating an instant account at recombe.com. Upon registration, you’ll get the ID of your database at Recombee and corresponding secret token.

Using the service is made easy thanks to the provided SDKs for many programming languages, such as .NET, Java, PHP or Python.

For generating recommendations, Recombee relies on historical user-item interaction data and attributes of items and users, similarly to MCSR. Therefore, it is good to start by uploading interactions between users and items (called usage events in MCSR) and item catalog to the Recombee cloud. Below are the instructions how to convert data from MCSR data structure to the Recombee one.

Uploading interactions

Usage event in MCSR is defined by <User Id>, <Item Id>, <Timestamp>, <EventType>. In Recombee, an interaction is also defined by <User Id>, <Item Id>, <Timestamp>, while there are multiple types of interactions such as purchases, cart additions or bookmarks.

You can map <EventType> to Recombee types in following way:

  • ClickDetailView

Sending an interaction to Recombee is very easy. For example, using our SDK in C#:

new AddPurchase("user-x", "item-y", cascadeCreate: true)

Timestamp is the current time by default, but a certain timestamp can be specified as an optional parameter.

For sending more interactions at once, Batch request can be used for fast processing, see this 5 minutes video tutorial for more info:

Uploading item catalog

Item catalog in MCSR was very simple: It was possible to set name, category, description, and feature list for an item identified by its unique ID. Recombee allows you to do much more: you can define your own properties (columns) with different data types.

You can start by defining the same structure as it was in the MCSR:

client.Send(new AddItemProperty("name", "string"));
client.Send(new AddItemProperty("category", "string"));
client.Send(new AddItemProperty("description", "string"));

and client.Send(new AddItemProperty(nameOfTheFeature, "string")); for each feature.

Setting values for item item-x is then also very easy, for example:

client.Send(new SetItemValues(
new Dictionary<string, object>() {
{"name", "Very fast computer"},
{"category", "Computers"},
{"description", "This computer is faster than ENIAC"}

Again, you can easily use Batch requests for fast processing.

The structure can be further enhanced. For example, the categories can be a set instead of a string, and hold values such as {"Electronics", "Computers", "Laptops"}. You can also create a property for the price of type double, and so on.

Submitted properties are utilized while computing the recommendations (especially for the cold start items) and can also be used in setting your business rules (more on that later).

In Recombee, users can also have properties, just like the items do.

Getting recommendations

Getting recommendations is very easy with Recombee. You don’t need to care about rebuilding the model anymore. Recombee is a real-time recommender, and the data you are submitting is immediately taken into consideration (this applies for consecutive requests within a batch as well).

If you used user-to-item recommendations in MCSR you can now use the RecommendItemsToUser endpoint:

var res = client.Send(new RecommendItemsToUser("user-25", 10));

It will return 10 items that are most relevant to `user-25`.

The replacement for item-to-item recommendation is the RecommendItemsToItem endpoint:

var res = client.Send(new RecommendItemsToItem("computer-6",
"user-42", 5));

It will return five related items to `computer-6`, which is currently viewed by `user-42`.

Beside these endpoints, Recombe provides also RecommendUsersToItem and RecommendUsersToUser, which return users instead of items. These can be used, for example, for identifying users, who could be interested in a new product, and therefore should be notified by an email or push notification in a mobile app (see our blogpost to learn more).

Furthermore, recommendation endpoints have many other parameters, which can be used to fine-tune the recommendations. See https://docs.recombee.com/api.html#recommendations for details.

One important parameter of these recommendation endpoints is the filter, which allows you to specify your business rules. The filter is expressed using our innovative query language ReQL. For example, you may:

  • exclude some items: 'itemId' not in {"item-x", "item-y"},
'in_stock' and 'category' in {"category-a", "category-b"} and 'date_published' > now()

Another possibility is to set a booster, and increase the probability of being recommended for some items. For instance, you can boost explicitly promoted items, items that were newly added, or items you’d like to sell out.


Migrating to Recombee from Azure Cognitive Services is easy and can be done in very short time. Moreover, you can use specific Recombee features such as powerful ReQL filters & boosters, recommendation endpoints that recommend users to items (for proactive emails or push notifications) and benefit from the fully real-time nature of the Recombee cloud solution.

Recombee blog

We develop global recommendation service and share our…