Gravatar for

Question by Wim Nijmeijer, Jun 2, 2017 6:48 AM

Recommendations Context question


I cannot seem to set a Context when defining the training set for the ML. Why is that? Because for example my context is BusinessUsers, and i only want to train the dataset with BusinessUsers context. Currently this does not seems possible?


1 Reply
Gravatar for

Answer by François Lachance-Guillemette, Jun 2, 2017 11:42 AM

Yes, this is possible, but I don't think you should.

Most use cases are covered by the context and ML trains its model using it.

If you send Page Views with some context, then send queries using that same context, ML should automatically adapt its results related to this context.

In other words, BusinessUsers should see recommendations tailored from what BusinessUsers have seen in the past.

If you _don't_ have Page Views with context, or if you have a very specific use case, here is how to add the condition:

In the Query Pipelines section, on any pipeline defined there, you can add a Condition on which to apply the pipeline.

There happen to be a "Context" key, so you can create a condition like, for example, "Where Context "user_type" is "BusinessUser". Adapt this query to match how you define a "BussinessUsers" and it should not filter users.

Here is the link to the documentation if you need more information: Managing Query Pipeline Conditions

Note that with this solution, you would still need a "blank" Recommendations pipeline so that other people than BussinessUsers get recommendations.

Let me know if this works for you! :)

Ask a question