Search code examples
azureazure-cognitive-servicesazure-machine-learning-service

Recommendation API: what is the difference between null results and empty results


In the Azure Recommendation API sample there is a snippet like this:

     if (itemSets.RecommendedItemSetInfo != null)
        {
            ...
        }
        else
        {
            Console.WriteLine("No recommendations found.");
        }

So I assume that nullable recommended set means no recommendations. But what is the case with this set being not nullable but still empty ( as I am having it running the example)?

I provided my own usages and catalog files. I have not too many entries there however for i2i recommendations I have results and for u2i there is an empty set. AllowColdItemPlacement doesn't change a think here.


Solution

  • We did not mean to convey a difference in meaning between null recommendations and empty recommendations. I will check why we may be sending two different types of results. Either way, don't treat those two cases as different cases.

    If you are not getting results for user-to-item recommendations, most likely there was no data for that user when the build was created or the items that the user interacted with do not have enough co-occurrences with other items in the usage.

    What to do when you get empty recommendations is up to you, you may decide to not show any recommendations, or back-fill with popular items you may want to promote.

    Thanks!

    Luis Cabrera Program Manager - Recommendations API.