When AIRec returns recommendations, the response contains a top-level structure with a request ID and a ranked list of result items. This page describes every field in that response, including the filtering algorithms mapped to MatchInfo values.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| RequestId | String | The request ID. |
| Result | List\<Result Item\> | The ranked list of recommended items. Each entry is a result item. Items are ordered by recommendation ranking. |
Parameters of a result item
| Parameter | Type | Description |
|---|---|---|
| TraceId | String | The event tracking ID. Always ali. Upload this value with user behavior data on the recommended item. |
| ItemId | String | The ID of the recommended item. |
| ItemType | String | The type of the recommended item. |
| MatchInfo | String | The filtering algorithm used to select the item. See MatchInfo values for the full mapping. |
| Weight | int | The recommendation weight multiplier. 1 means no weight increase. A value greater than 1 means an increased weight is applied. |
| flowWeight | double | The traffic throttling adjustment applied to the recommendation weight. 0 means unaffected. A positive value means the weight is increased. A negative value means the weight is decreased. |
| Position | Integer | The zero-indexed display position of the item. Results are sorted by this value. This parameter is informational and can be ignored. |
| TraceInfo | String | The event tracking string for algorithmic attribution. When a user behavior event (such as a click) occurs on a recommended item, upload this value together with the behavior data. The value varies per item. |
| message | String | A semicolon-delimited string with five fields that describe the recommendation reason. See message field structure below. |
Using TraceId and TraceInfo for event tracking
TraceInfo is required for algorithmic attribution. When a user interacts with a recommended item — for example, by clicking it — upload TraceInfo along with the behavior data. Without this, AIRec cannot attribute user behavior back to the recommendation that triggered it, which degrades the quality of future recommendations.
TraceId is a fixed identifier with the value ali.
Message field structure
The message field is a string of five substrings separated by semicolons (;):
| Position | Content | Notes |
|---|---|---|
| 1st | The MatchInfo value, or the matchType value from debug_result | Identifies the filtering algorithm |
| 2nd | The item ID and type of the recommended item that is filtered | Empty if the result was generated without historical behavior data |
| 3rd | The timestamp when filtering was triggered, accurate to seconds | 0 if the result was generated without historical behavior data |
| 4th | A human-readable description of the recommendation reason | Use this for debugging why an item was recommended |
| 5th | The timestamp in DateTime format | Use this for debugging |
MatchInfo values
The MatchInfo field identifies which filtering algorithm selected the item. The following table maps each value to its algorithm.
| MatchInfo value | Filtering algorithm |
|---|---|
minor | Recommendation based on positions |
custom | Custom recommendation |
hilp | Loop exposure |
hot_new, hot_full, hot_common, hot_mid, or pool_div_hot_common | Recommendation of best-selling items |
search_full | Recommendation of supplementary items when personalized and best-selling items are insufficient |
new_new | Recommendation of new items |
emb_item2vec_common, emb_tag2vec_common, or emb_title2vec_common | Recommendation of items similar to those on which user behavior has recently occurred |
i2i_scategory_common, i2i_common_common, i2i_channel_common, i2i_swing_common, i2i_pcategory_common, i2i_u2scategory_common, or i2i_u2pcategory_common | Recommendation based on collaborative filtering |
u2x2i_u2category_common or u2x2i_u2category_new | Recommendation for items of preferred categories |
u2x2i_u2channel_common or u2x2i_u2channel_new | Recommendation of content from preferred channels |
u2x2i_u2author_common or u2x2i_u2author_new | Recommendation of content that is created by preferred authors |
u2x2i_u2shop_common or u2x2i_u2shop_new | Recommendation of items from preferred stores |
u2x2i_u2brand_common or u2x2i_u2brand_new | Recommendation for items of preferred brands |
u2x2i_u2tags_common or u2x2i_u2tags_new | Recommendation of items with preferred tags |
u2x2i_u2organization_common or u2x2i_u2organization_new | Recommendation of items published by preferred organizations |
u2x2i_umu2x_common | Recommendation based on Umeng information |
u2x2i_nuu2x_common or u2x2i_u2vector_common | Recommendation based on user information |