Retrieval Strategy
A retrieval strategy refers to a preliminary selection among a large number of items for the final generation of a personalized candidate set for each user. Multiple retrieval modes are built inside the retrieval strategy. You can select a retrieval mode tailored to your business environments. For details, see Figure 1.
RES supports the following retrieval modes:
- Recommendation Based on Specific Behavior Popularity
- Recommendation Based on Comprehensive Behavior Popularity
- ItemCF Recommendation
- UserCF Recommendation
- ALS-based MF Recommendation
- Business Rule-Historical Behavior-based Recommendation
- Business Rule-Manual Import
- Recommendation Based on Attribute Matching
- UCB-based Recommendation
Creating a Retrieval Strategy
On the Create Retrieval Strategy page, you can select appropriate strategies as needed to perform offline computing tasks and generate candidate sets.
To create a retrieval strategy, perform the following steps:
- Choose Offline Jobs > Retrieval Strategy > Create to display the Create Retrieval Strategy page.
- On the Create Retrieval Strategy page, specify values for Name, Scenario, and Description.
- Name: Name of the retrieval strategy to be created, which must start with Retrieval- and consists of only letters, digits, hyphens (-), and underscores (_). The name must contain no more than 64 characters.
- Scenario: You can select a scenario created on the Global Configurations page.
- In the Compute Engine area, enter values for Service Name, Cluster Name, Configuration File Path, and Name.
- Click Add Retrieval Strategy and select a proper strategy from the drop-down list box based on business requirements. Move your cursor to the question mark next to the strategy name to view the help information. Figure 2 Add Retrieval Strategy area
- (Optional) Locate the row where the target retrieval strategy resides and click View to view input and output data.
- (Optional) On the displayed page, you can click Set Parameters to reset the parameters of the target strategy.
- (Optional) Select a strategy you want to delete and click Delete to delete it.
- After configuring all parameters, click OK. Generally, it may take several minutes or tens of minutes to run the job. The duration depends on the amount of your selected data and resources. Please wait.
You can switch to the retrieval strategy list to view the basic information about retrieval strategies. In the retrieval strategy list, the status of the newly created job is Computing. When it changes to Successful, the job execution is complete. The generated candidate set ID will be used by the online service to generate a recommendation list. If the status of a retrieval job changes to Failed, click the job name. On the job details page that is displayed, view the job logs and troubleshoot the faults.
Recommendation Based on Specific Behavior Popularity
| Parameter | Description | Default Value |
|---|---|---|
| Strategy Alias | Name of the selected strategy, which consists of Chinese characters, letters, digits, underscores (_), spaces, or hyphens (-) and cannot start or end with a space. The name can contain no more than 60 characters. | Name of the selected retrieval strategy |
| Data Source | Currently, two types of source data (Standard and General) are available. Standard
General
| Standard |
| Time Range | Period during which the behavior data is collected for matching. | Data of the current month |
| Behavior Type | In the Recommendation Based on Specific Behavior Popularity strategy, if a behavior type is determined, recommendation is performed based on the popularity of this behavior. Types of behaviors are:
| View |
| Behavior Quantity Counting Mode | Mode you choose for counting how many times a behavior occurs.
| pv |
| Attenuate Popularity | Whether to attenuate the item popularity over time. The options are as follows:
| No |
| Maximum Recommendation Results | Maximum number of recommendation results that can be generated. This parameter is used in the recommended candidate sets of Output Data. | 100 |
| Data | Mandatory | Description |
|---|---|---|
| USER_BEHAVIOR | Yes | User Operation Behavior Table |
| Name | Type | Description |
|---|---|---|
| HOT_REC_OFFLINE_CANDIDATES | CANDIDATES_SET | Candidate sets generated by the recommendation algorithm of specific behavior popularity |
Recommendation Based on Comprehensive Behavior Popularity
| Parameter | Description | Default Value |
|---|---|---|
| Strategy Alias | Name of the selected strategy, which consists of Chinese characters, letters, digits, underscores (_), spaces, or hyphens (-) and cannot start or end with a space. The name can contain no more than 60 characters. | Name of the selected retrieval strategy |
| Advanced Function | If the data source type of a combined job is set to General, the Advanced Function option is enabled. Note that only General data is supported for the Recommendation Based on Comprehensive Popularity strategy. Advanced function refers to whether to use the grouping recommendations based on the user features or item features selected in the global feature file.
| The function is disabled by default. |
| Data Source | Currently, two types of source data (Standard and General) are available. Standard
General
| Standard |
| Time Range | Period during which the behavior data is collected for matching. | Data of the current month |
| Behavior Weight | If multiple behavior types exist, specify this parameter to quantify scores of the corresponding behavior types. User behaviors:
You can click Add Behavior Weight to add a behavior weight. You can click | View 1.0 |
| Global Feature File | This parameter is valid only when the Advanced Function is enabled. You can set Type to User Feature or Item Feature.
| N/A |
| Behavior Quantity Counting Mode | Mode you choose for counting how many times a behavior occurs.
| pv |
| Attenuate Popularity | Whether to attenuate the item popularity over time. The options are as follows:
| No |
| Maximum Recommendation Results | Maximum number of recommendation results that can be generated. This parameter is used in the recommended candidate sets of Output Data. | 100 |
| Data | Mandatory | Description |
|---|---|---|
| USER_BEHAVIOR | Yes | User Operation Behavior Table |
| Name | Type | Description |
|---|---|---|
| WEIGHT_BEHAVIORS_REC_OFFLINE_CANDIDATES | CANDIDATES_SET | Candidate sets generated by the recommendation algorithm of comprehensive behavior popularity |
ItemCF Recommendation
| Parameter | Description | Default Value |
|---|---|---|
| Strategy Alias | Name of the selected strategy, which consists of Chinese characters, letters, digits, underscores (_), spaces, or hyphens (-) and cannot start or end with a space. The name can contain no more than 60 characters. | Name of the selected retrieval strategy |
| Data Source | Currently, two types of source data (Standard and General) are available. Standard
General
| Standard |
| Time Range (days) | Data in the latest N days is preferred, for it is more likely to reflect user preference accurately. The value must be no less than 30 days. | 30 |
| Behavior Weight | If multiple behavior types exist, specify this parameter to quantify scores of the corresponding behavior types. Behaviors with weights are:
You can click Add Behavior Weight to add a behavior weight. You can click | Item exposure with the weight at 1.0 |
| Nearest Neighbors of an Item | If the ItemCF algorithm is used, specify a certain number of nearest neighboring items to build a set of nearest neighbors for this item. | 50 |
| Similarity Measurement Method | Method to calculate the similarity between user features or item features. If the ItemCF algorithm is selected, each item is represented as a feature vector for users who have performed operations on it. Each dimension of the vector is a <user_id, score> tuple in which score indicates the weight of user_id. This parameter determines which function should be used to calculate the similarity between item vectors. Similarity measurement methods are:
| Cosine similarity |
| Buckets in One Group | Combined parameter used to filter the nearest neighbors of an item. The larger the value is, the stricter filter conditions are. | 5 |
| Groups of Buckets | Combined parameter used to filter the nearest neighbors of an item. The smaller the value is, the stricter filter conditions are. | 4 |
| Maximum Recommendation Results | Maximum number of recommendation results that can be generated. This parameter is used in the recommended candidate sets of Output Data. | 100 |
| Data | Mandatory | Description |
|---|---|---|
| USER_BEHAVIOR | Yes | User Operation Behavior Table |
| Name | Type | Description |
|---|---|---|
| ITEMCF_REC_OFFLINE_CANDIDATES | CANDIDATES_SET | ItemCF algorithm generated candidate set based on user-item relationships |
| ITEMCF_REC_OFFLINE_CANDIDATES | CANDIDATES_SET | ItemCF algorithm generated candidate set based on item-item relationships |
UserCF Recommendation
| Parameter | Description | Default Value |
|---|---|---|
| Strategy Alias | Name of the selected strategy, which consists of Chinese characters, letters, digits, underscores (_), spaces, or hyphens (-) and cannot start or end with a space. The name can contain no more than 60 characters. | Name of the selected retrieval strategy |
| Data Source | Currently, two types of source data (Standard and General) are available. Standard
General
| Standard |
| Time Range (days) | Data in the latest N days is preferred, for it is more likely to reflect user preference accurately. The value must be no less than 30 days. | 30 |
| Behavior Weight | If multiple behavior types exist, specify this parameter to quantify scores of the corresponding behavior types. Behaviors with weights are:
You can click Add Behavior Weight to add a behavior weight. You can click | View 1.0 |
| Nearest Neighboring Users | If the UserCF algorithm is used, you can specify a certain number of nearest neighboring users to build a set of nearest neighbors for yourself. | 50 |
| Similarity Measurement Method | Method to calculate the similarity between users or items. For details, see Table 7. | Cosine similarity |
| Buckets in One Group | Combined parameter used to filter the nearest neighbors of a user. The larger the value is, the stricter filter conditions are. | 5 |
| Groups of Buckets | Combined parameter used to filter the nearest neighbors of a user. The smaller the value is, the stricter filter conditions are. | 4 |
| Maximum Recommendation Results | Maximum number of recommendation results that can be generated. This parameter is used in the recommended candidate sets of Output Data. | 100 |
| Data | Mandatory | Description |
|---|---|---|
| USER_BEHAVIOR | Yes | User Operation Behavior Table |
| Name | Type | Description |
|---|---|---|
| USERCF_REC_OFFLINE_CANDIDATES | CANDIDATES_SET | UserCF algorithm generated candidate set based on user-item relationships |
ALS-based MF Recommendation
| Parameter | Description | Default Value |
|---|---|---|
| Strategy Alias | Name of the selected strategy, which consists of Chinese characters, letters, digits, underscores (_), spaces, or hyphens (-) and cannot start or end with a space. The name can contain no more than 60 characters. | Name of the selected retrieval strategy |
| Data Source | Currently, two types of source data (Standard and General) are available. Standard
General
| Standard |
| Time Range (days) | Data in the latest N days is preferred, for it is more likely to reflect user preference accurately. The value must be no less than 30 days. | 30 |
| Behavior Weight | If multiple behavior types exist, specify this parameter to quantify scores of the corresponding behavior types. Behaviors with weights are:
You can click Add Behavior Weight to add a behavior weight. You can click | View 1.0 |
| Implicit Vector | Parameter used by the ALS algorithms to specify the implicit dimension size of user and item vectors. If an offline computing task fails, set this parameter to a value less than 10. | 10 |
| Maximum Iterations | Maximum number of iterations in iteration optimization. If an offline computing task fails, set this parameter to a value less than 10. | 10 |
| Regularization Coefficient | Parameter used by the ALS algorithm to specify the regularization coefficient for the cost parameter in the optimization objective to avoid fitting. | 0.01 |
| Maximum Recommendation Results | Maximum number of recommendation results that can be generated. This parameter is used in the recommended candidate sets of Output Data. | 100 |
| Data | Mandatory | Description |
|---|---|---|
| USER_BEHAVIOR | Yes | User Operation Behavior Table |
| Name | Type | Description |
|---|---|---|
| ALSCF_REC_OFFLINE_UIREC_CANDIDATES | CANDIDATES_SET | ALS algorithm generated candidate set based on user-item relationships |
Business Rule-Historical Behavior-based Recommendation
| Parameter | Description | Default Value |
|---|---|---|
| Strategy Alias | Name of the selected strategy, which consists of Chinese characters, letters, digits, underscores (_), spaces, or hyphens (-) and cannot start or end with a space. The name can contain no more than 60 characters. | Name of the selected retrieval strategy |
| Data Source | Currently, two types of source data (Standard and General) are available. Standard
General
| Standard |
| Time Range (days) | Data in the latest N days is preferred, for it is more likely to reflect user preference accurately. The value must be no less than 30 days. | 30 |
| Behavior Type | View by default. For details, see Table 1. | View, 1 |
| Maximum Recommendation Results | Maximum number of recommendation results that can be generated. This parameter is used in the recommended candidate sets of Output Data. | 100 |
| Data | Mandatory | Description |
|---|---|---|
| USER_BEHAVIOR | Yes | User Operation Behavior Table |
| Name | Type | Description |
|---|---|---|
| CUSTOMRULE_REC_OFFLINE_UIREC_CANDIDATES | CANDIDATES_SET | CustomRule generated candidate set based on user-item relationships |
Business Rule-Manual Import
| Parameter | Description |
|---|---|
| Strategy Alias | Name of the selected strategy, which consists of Chinese characters, letters, digits, underscores (_), spaces, or hyphens (-) and cannot start or end with a space. The name can contain no more than 60 characters. Name of the selected retrieval strategy |
| OBS Address | Address where you can select custom item lists. |
Input Data
N/A
You can select the lists of manually edited recommendation results (item IDs) from an OBS path.
| Name | Type | Description |
|---|---|---|
| MANUALRULE_REC_OFFLINE_UIREC_CANDIDATES | CANDIDATES_SET | Manually edited candidate sets |
Recommendation Based on Attribute Matching
The Recommendation Based on Attribute Matching strategy uses user-profile-related attributes and item-profile-related attributes to perform matching tasks and retrieve items with high matching degrees for you.
| Parameter | Description | Default Value |
|---|---|---|
| Strategy Alias | Name of the selected strategy, which consists of Chinese characters, letters, digits, underscores (_), spaces, or hyphens (-) and cannot start or end with a space. The name can contain no more than 60 characters. | Name of the selected retrieval strategy |
| Global Feature File | File needed before you use the nearline strategy. The global feature file contains all feature fields and data types of users and items in the offline data. The feature types must be consistent. Global Feature Files describes details of the global feature file. | N/A |
| Match Type | Profile matching type. The options are as follows:
| Match users with items |
| Matching Feature Pair | A pair of features that associated a user with an item Set this parameter according to the actual situation. If the feature similarity of the matched item and user is high, the memory needs to be improved as needed. You can click | N/A |
| Recommendations | Maximum number of items that can be recommended to a user. | 10 |
| Buckets in One Group | Number of buckets in a recommendation group. The larger the value is, the stricter the similar items are filtered. | 5 |
| Groups of Buckets | Number of bucket groups. The smaller the value is, the stricter the similar items are filtered. | 4 |
| User Profile Storage | The data comes from updated user profile data of Update User Profile Based on User Data or user profiles of Initial User Profile-Item Profile-Standard Wide Table Generation. | N/A |
| Item Profile Storage | The data comes from updated item profile data of Update Item Profile Based on Item Data or item profiles of Initial User Profile-Item Profile-Standard Wide Table Generation. | N/A |
| Maximum Recommendation Results | Maximum number of recommendation results that can be generated. This parameter is used in the recommended candidate sets of Output Data. | 100 |
UCB-based Recommendation
| Parameter | Description | Default Value |
|---|---|---|
| Strategy Alias | Name of the selected strategy, which consists of Chinese characters, letters, digits, underscores (_), spaces, or hyphens (-) and cannot start or end with a space. The name can contain no more than 60 characters. | Name of the selected retrieval strategy |
| Data Source | Currently, two types of source data (Standard and General) are available. Standard
General
| Standard |
| Time Range (days) | Data in the latest N days is preferred, for it is more likely to reflect user preference accurately. The value must be no less than 30 days. | 30 |
| Behavior Weight | If multiple behavior types exist, specify this parameter to quantify scores of the corresponding behavior types. Behaviors with weights are:
You can click Add Behavior Weight to add a behavior weight. You can click | View 1.0 |
| Min. Number of Behaviors | Minimum number of users who have performed operations on an item. A user only behaved on an item once. | 30 |
| Tradeoff Parameter | Tradeoff parameter is a balancing parameter of two opposing situations and ranges from 0 to 1. In RES, alpha is a tradeoff parameter between exploration and exploitation. If the value of alpha is close to 0, it is more suitable to explore likely valuable but less popular items. If the value of alpha is close to 1, it is more suitable to deeply exploit the items with the highest scores. | 0.5 |
| Maximum Recommendation Results | Maximum number of recommendation results that can be generated. This parameter is used in the recommended candidate sets of Output Data. | 100 |
| Data | Mandatory | Description |
|---|---|---|
| USER_BEHAVIOR | Yes | User Operation Behavior Table |
| Name | Type | Description |
|---|---|---|
| UCB_REC_OFFLINE_CANDIDATES | CANDIDATES_SET | Candidate set generated by the UCB algorithms |
Last Article: Feature Engineering
Next Article: Ranking Strategy





































Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.