All Products
Search
Document Center

:Test on recommendation operations

Last Updated:Sep 18, 2023

Before you perform traffic switchover, you can test the operations to obtain recommendation results by using a server SDK of Artificial Intelligence Recommendation (AIRec). Alternatively, you can also use the call testing feature in the AIRec console.

Test the operations to obtain real-time recommendation results

Important

After you confirm that start data is uploaded, you can perform a user experience test.

The test must be complete before you use real traffic to verify the recommendation effect.

After you set the Scenario ID, Test User, and Recommended Commodities parameters, you can click Request Results to obtain recommendation results. Then, you can perform other operations based on your preferences and interests, request recommendation results again, and then perform tests to check whether the recommendation results meet your interests. You can turn on or off Custom to specify whether to provide personalized recommendation results.

During the test, behavioral data is automatically pushed to the system. You can view detailed information on the Behavior Messages tab of the Data and Record Query page. If you deploy AIRec on an app, a mini program, or a PC, real-time behavioral data of users is also synchronized to AIRec.

In the returned results of a user experience test, you can click Click, Favorite, Add, or Buy to perform the corresponding operation. When you perform one of the operations, an entry of behavioral data is automatically generated in the background to test the recommendation effect. If you request recommendation results again, the returned results vary based on the operation that you performed.

image..png

In addition to the recommendation results, AIRec also returns the corresponding recommendation reason. This helps you better understand how the recommendation algorithm works and verify whether the recommendation results meet your business requirements.

Common recommendation reasons include recommendations of popular items, recommendations of new items, recommendations based on historical user behavior, and recommendations based on user preferences for specific brands, stores, tags, channels, authors, or platforms. Recommendations based on historical user behavior refer to recommending items similar to those that users have clicked on. Recommendations based on user preferences refer to determining the brands, stores, tags, channels, authors, or platforms that users prefer based on the items that they have clicked on and recommending items that meet the same preferences. In this view, both the types of recommendations are based on the historical click behavior of users. If a recommendation is performed based on historical user behavior or user preferences, you can click Details to view the clicked item based on which the recommendation results are returned, and the time when the click operation is performed.

In addition, if an item is recommended because an increased weight or traffic quota is allocated to the item, the recommended item is marked with an Allocate Weight or Support sign. For more information about the recommendation reasons, see Return result.

View behavioral data on the Data and Record Query page

image..png

Obtain recommendation results by using a server SDK

For more information about how to obtain recommendation results by using a server SDK, see Obtain recommendation results.

Possible causes of recommendation failures

If no recommendation result is returned during the user experience test, you can refer to the following possible causes:

1. Your request parameters are invalid.

After you set the Scenario ID parameter, the returned results must contain the ID of this scenario.

If you specify a user that is not contained in user tables, this user is regarded as a new user.

When you set the Recommended Commodities parameter, make sure that the value is smaller than the maximum number of recommendation items. In a user experience test, the maximum number of recommendation items is 10.

Note: In the recommendation results that are obtained by using a server SDK, the maximum number of recommendation items is 50. To obtain recommendation results that contain related commodities, you must also set the Existing Commodity parameter in the item_id:item_type format. The following figure shows the parameters. Request parameters2. The number of items that meet the recommendation conditions is small. No available items in the item pool can be pushed to users. Therefore, no result is returned.

3. If an InternalServerError error is returned, try again later. If this error occurs multiple times, you can contact the technical engineers for help.

Query and analyze historical recommendation results

After you obtain recommendation results by using a server SDK, you can query historical recommendation results on the Recommendation History Query tab.

Important

The RequestId parameter is not returned for a user experience test. Therefore, historical results for experience tests cannot be queried.

Query modes

Query historical recommendation results by using the return value of the RequestId parameter

After you obtain the recommendation results by using a server SDK, the RequestId parameter and the recommendation results are returned. The following figure provides an example. 1Enter the value of the RequestId parameter in the Request ID field on the Recommendation History Query tab and click Obtain Results.

2

Query historical recommendation results by using field combinations

You can also click Switch Query Mode to change the query mode. 3Enter the ID of the user in the User ID field and specify the time range for the query. To perform a fine-grained query, you can also set the Scene ID and Item ID to Be Checked parameters. Specify the value of the Item ID to Be Checked parameter in the item_id:item_type format.