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.

Figure 1 Retrieval strategy

RES supports the following retrieval modes:

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:

  1. Choose Offline Jobs > Retrieval Strategy > Create to display the Create Retrieval Strategy page.
  2. 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.
  3. In the Compute Engine area, enter values for Service Name, Cluster Name, Configuration File Path, and Name.
  4. 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
  5. (Optional) Locate the row where the target retrieval strategy resides and click View to view input and output data.
  6. (Optional) On the displayed page, you can click Set Parameters to reset the parameters of the target strategy.
  7. (Optional) Select a strategy you want to delete and click Delete to delete it.
  8. 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

The Recommendation Based on Specific Behavior Popularity strategy is used to evaluate the item popularity in User Operation Behavior Table and generates item lists where items with wider popularity are displayed before less popular ones. For example, the strategy collects how many times an item is purchased to find out which items are purchased most frequently.
Table 1 Parameters

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
  • User Operation Behavior Table: Click to select the user operation behavior table stored in OBS. If the data format is set to csv, click to set data parameters as required.
General
  • General Data: General data is generated by the Initial User Profile-Item Profile-Standard Wide Table Generation operator in Feature Engineering. General data is JSON data generated by extracting user attributes, item attributes, and user behaviors from User Attribute Table, Item Attribute List, and User Operation Behavior Table.

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: Indicates that an item/content is exposed to users.
  • click: Indicates a user clicks an item or content.
  • collect: Indicates a user adds an item or content to favorites.
  • uncollect: Indicates a user removes an item or content from favorites.
  • search_click: Indicates a user clicks an item in the search results.
  • comment: Indicates that a user makes comments on an item or content.
  • share: Indicates that a user shares an item/content with others.
  • like: Indicates a user gives an item or content a thumb-up.
  • dislike: Indicates a user gives an item or content a thumb-down.
  • grade: Indicates that a user rates an item/content.
  • consume: Indicates that a user buys an item (primarily refers to commodities).
  • use: Indicates that a user watches videos/listens to a kind of music/reads something (primarily refers to content)...

View

Behavior Quantity Counting Mode

Mode you choose for counting how many times a behavior occurs.

  • pv: indicates page browsing traffic or click-through rate.
  • uv: Unique visitor. Only one record is recorded for a visitor.

pv

Attenuate Popularity

Whether to attenuate the item popularity over time. The options are as follows:

  • No
  • Yes

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

Table 2 Input Data

Data

Mandatory

Description

USER_BEHAVIOR

Yes

User Operation Behavior Table

Table 3 Output Data

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

The Recommendation Based on Comprehensive Behavior Popularity strategy works in a pattern the same as the Recommendation Based on Specific Behavior Popularity strategy. The difference is that the former uses the weighted popularity of several behaviors while the latter uses the popularity of a specific behavior.
Table 4 Parameters

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.

  • Enable:
  • Disable:

The function is disabled by default.

Data Source

Currently, two types of source data (Standard and General) are available.

Standard
  • User Operation Behavior Table: Click to select the user operation behavior table stored in OBS. If the data format is set to csv, click to set data parameters as required.
General
  • General Data: General data is generated by the Initial User Profile-Item Profile-Standard Wide Table Generation operator in Feature Engineering. General data is JSON data generated by extracting user attributes, item attributes, and user behaviors from User Attribute Table, Item Attribute List, and User Operation Behavior Table.

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:

  • view: Indicates that an item/content is exposed to users.
  • click: Indicates a user clicks an item or content.
  • collect: Indicates a user adds an item or content to favorites.
  • uncollect: Indicates a user removes an item or content from favorites.
  • search_click: Indicates a user clicks an item in the search results.
  • comment: Indicates that a user makes comments on an item or content.
  • share: Indicates that a user shares an item/content with others.
  • like: Indicates a user gives an item or content a thumb-up.
  • dislike: Indicates a user gives an item or content a thumb-down.
  • grade: Indicates that a user rates an item/content.
  • consume: Indicates that a user buys an item (primarily refers to commodities).
  • use: Indicates that a user watches videos/listens to a kind of music/reads something (primarily refers to content)...

You can click Add Behavior Weight to add a behavior weight. and are used to customize the weight.

You can click to delete a behavior type with a weight.

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.

  • Global Feature File: Click to select the OBS storage path of the file. If the file needs to be updated, click to update the global feature file and reset the configuration items that depend on the file.
  • User Feature: Select the user features extracted from the global feature file from the drop-down list by clicking for grouping recommendations.
  • Item Feature: Select the item features extracted from the global feature file from the drop-down list by clicking for grouping recommendations.

N/A

Behavior Quantity Counting Mode

Mode you choose for counting how many times a behavior occurs.

  • pv: indicates page browsing traffic or click-through rate.
  • uv: Unique visitor. Only one record is recorded for a visitor.

pv

Attenuate Popularity

Whether to attenuate the item popularity over time. The options are as follows:

  • No
  • Yes

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

Table 5 Input Data

Data

Mandatory

Description

USER_BEHAVIOR

Yes

User Operation Behavior Table

Table 6 Output Data

Name

Type

Description

WEIGHT_BEHAVIORS_REC_OFFLINE_CANDIDATES

CANDIDATES_SET

Candidate sets generated by the recommendation algorithm of comprehensive behavior popularity

ItemCF Recommendation

The ItemCF Recommendation strategy uses the classical recommendation algorithms to retrieve candidate sets.
Table 7 Parameters

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
  • User Operation Behavior Table: Click to select the user operation behavior table stored in OBS. If the data format is set to csv, click to set data parameters as required.
General
  • General Data: General data is generated by the Initial User Profile-Item Profile-Standard Wide Table Generation operator in Feature Engineering. General data is JSON data generated by extracting user attributes, item attributes, and user behaviors from User Attribute Table, Item Attribute List, and User Operation Behavior Table.
  • Time Range: A period for collecting behavior data. You can specify the start and/or end time, or leave it blank.

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:

  • view: Indicates that an item/content is exposed to users.
  • click: Indicates a user clicks an item or content.
  • collect: Indicates a user adds an item or content to favorites.
  • search_click: Indicates a user clicks an item in the search results.
  • comment: Indicates that a user makes comments on an item or content.
  • share: Indicates that a user shares an item/content with others.
  • like: Indicates a user gives an item or content a thumb-up.
  • grade: Indicates that a user rates an item/content.
  • consume: Indicates that a user buys an item (primarily refers to commodities).
  • use: Indicates that a user watches videos/listens to a kind of music/reads something (primarily refers to content)...

You can click Add Behavior Weight to add a behavior weight. and are used to customize the weight.

You can click to delete a behavior type with a weight.

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

Table 8 Input Data

Data

Mandatory

Description

USER_BEHAVIOR

Yes

User Operation Behavior Table

Table 9 Output Data

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

The UserCF Recommendation strategy uses the classical algorithms to retrieve candidate sets.
Table 10 Parameters

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
  • User Operation Behavior Table: Click to select the user operation behavior table stored in OBS. If the data format is set to csv, click to set data parameters as required.
General
  • General Data: General data is generated by the Initial User Profile-Item Profile-Standard Wide Table Generation operator in Feature Engineering. General data is JSON data generated by extracting user attributes, item attributes, and user behaviors from User Attribute Table, Item Attribute List, and User Operation Behavior Table.

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:

  • view: Indicates that an item/content is exposed to users.
  • click: Indicates a user clicks an item or content.
  • collect: Indicates a user adds an item or content to favorites.
  • search_click: Indicates a user clicks an item in the search results.
  • comment: Indicates that a user makes comments on an item or content.
  • share: Indicates that a user shares an item/content with others.
  • like: Indicates a user gives an item or content a thumb-up.
  • grade: Indicates that a user rates an item/content.
  • consume: Indicates that a user buys an item (primarily refers to commodities).
  • use: Indicates that a user watches videos/listens to a kind of music/reads something (primarily refers to content)...

You can click Add Behavior Weight to add a behavior weight. and are used to customize the weight.

You can click to delete a behavior type with a weight.

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

Table 11 Input Data

Data

Mandatory

Description

USER_BEHAVIOR

Yes

User Operation Behavior Table

Table 12 Output Data

Name

Type

Description

USERCF_REC_OFFLINE_CANDIDATES

CANDIDATES_SET

UserCF algorithm generated candidate set based on user-item relationships

ALS-based MF Recommendation

The ALS-based MF Recommendation strategy uses the user-item relationships as the original matrix and the ALS algorithms to decompose the original matrix. The decomposed results are expressed in the form of user vectors and item vectors that can be used to generate a new rating matrix to produce a result list storing items with the highest scores
Table 13 Parameters

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
  • User Operation Behavior Table: Click to select the user operation behavior table stored in OBS. If the data format is set to csv, click to set data parameters as required.
General
  • General Data: General data is generated by the Initial User Profile-Item Profile-Standard Wide Table Generation operator in Feature Engineering. General data is JSON data generated by extracting user attributes, item attributes, and user behaviors from User Attribute Table, Item Attribute List, and User Operation Behavior Table.

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:

  • view: Indicates that an item/content is exposed to users.
  • click: Indicates a user clicks an item or content.
  • collect: Indicates a user adds an item or content to favorites.
  • search_click: Indicates a user clicks an item in the search results.
  • comment: Indicates that a user makes comments on an item or content.
  • share: Indicates that a user shares an item/content with others.
  • like: Indicates a user gives an item or content a thumb-up.
  • grade: Indicates that a user rates an item/content.
  • consume: Indicates that a user buys an item (primarily refers to commodities).
  • use: Indicates that a user watches videos/listens to a kind of music/reads something (primarily refers to content)...

You can click Add Behavior Weight to add a behavior weight. and are used to customize the weight.

You can click to delete a behavior type with a weight.

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

Table 14 Input Data

Data

Mandatory

Description

USER_BEHAVIOR

Yes

User Operation Behavior Table

Table 15 Output Data

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

The Business Rule-Historical Behavior-based Recommendation strategy can select items on which you have performed operations, for example, items that you have clicked five times. This strategy can be applied to "content recommendations" and "e-commerce recommendations".
Table 16 Parameters

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
  • User Operation Behavior Table: Click to select the user operation behavior table stored in OBS. If the data format is set to csv, click to set data parameters as required.
General
  • General Data: General data is generated by the Initial User Profile-Item Profile-Standard Wide Table Generation operator in Feature Engineering. General data is JSON data generated by extracting user attributes, item attributes, and user behaviors from User Attribute Table, Item Attribute List, and User Operation Behavior Table.

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

Table 17 Input Data

Data

Mandatory

Description

USER_BEHAVIOR

Yes

User Operation Behavior Table

Table 18 Output Data

Name

Type

Description

CUSTOMRULE_REC_OFFLINE_UIREC_CANDIDATES

CANDIDATES_SET

CustomRule generated candidate set based on user-item relationships

Business Rule-Manual Import

The Business Rule-Manual Import strategy helps you customize item lists that are used as the candidate sets for online services.
Table 19 Parameters

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.

Table 20 Output Data

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.

Table 21 Parameters

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
  • User item matching
  • User matching
  • Item matching

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 to access the page for adding a matching feature pair. On the displayed page, set the alias of the feature pair, match the user feature name and item feature name based on the global feature file, and set the weight.

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

The UCB-based Recommendation strategy, with comprehensive consideration of behavior types and amounts in User Operation Behavior Table, calculates a score for each item and finally returns several items with the highest scores.
Table 22 Parameters

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
  • User Operation Behavior Table: Click to select the user operation behavior table stored in OBS. If the data format is set to csv, click to set data parameters as required.
General
  • General Data: General data is generated by the Initial User Profile-Item Profile-Standard Wide Table Generation operator in Feature Engineering. General data is JSON data generated by extracting user attributes, item attributes, and user behaviors from User Attribute Table, Item Attribute List, and User Operation Behavior Table.

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:

  • view: Indicates that an item/content is exposed to users.
  • click: Indicates a user clicks an item or content.
  • collect: Indicates a user adds an item or content to favorites.
  • search_click: Indicates a user clicks an item in the search results.
  • comment: Indicates that a user makes comments on an item or content.
  • share: Indicates that a user shares an item/content with others.
  • like: Indicates a user gives an item or content a thumb-up.
  • grade: Indicates that a user rates an item/content.
  • consume: Indicates that a user buys an item (primarily refers to commodities).
  • use: Indicates that a user watches videos/listens to a kind of music/reads something (primarily refers to content)...

You can click Add Behavior Weight to add a behavior weight. and are used to customize the weight.

You can click to delete a behavior type with a weight.

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

Table 23 Input Data

Data

Mandatory

Description

USER_BEHAVIOR

Yes

User Operation Behavior Table

Table 24 Output Data

Name

Type

Description

UCB_REC_OFFLINE_CANDIDATES

CANDIDATES_SET

Candidate set generated by the UCB algorithms