Popularity models

Updated at:

A popularity model computes a static popularity score for each product or document in your index based on historical user behavior. Popularity models use sort algorithms to calculate and quantize the static quality and popularity of each item. Models are built on offline computing and work across commerce and non-commerce scenarios. Any search use case where you want frequently engaged content to surface higher in results can benefit from a popularity model.

Examples:

  • An e-commerce site ranks t-shirts by the number of purchases and cart additions in the last 7 days.

  • A content platform ranks articles by the combination of views and likes over the last 30 days.

  • A B2B marketplace ranks suppliers by impression count and conversion rate in the last 14 days.

Each application supports a maximum of five popularity models.

How it works

A popularity model scores each item by combining signals across four dimensions:

DimensionOptions
EntityProduct or document, brand, merchant, leaf categories, level 1 categories
Time period1 day, 3 days, 7 days, 14 days, 30 days, time decay weighting
BehaviorExposure, click, add to favorites, add to cart, purchase, comments, likes
StatisticsCount, number of customers, frequency, click-through rate (CTR), conversion rate

Define each feature by picking one to two items from each dimension. The total number of features you can define equals the Cartesian product of all four dimensions.

Example features:

  • Number of times (statistics: count) a product (entity) received an exposure (behavior) in the last day (time period)

  • Sales volume (behavior + statistics) for the merchant (entity) a product belongs to, over the last 30 days (time period)

After training, the model outputs a single popularity score per item. Apply that score to a sort policy so search results reflect both relevance and real-world engagement.

Create and apply a popularity model

Three steps to use a popularity model:

  1. Create a model.

  2. Train the model and check the data report.

  3. Apply the popularity score to a sort policy.

Create a popularity model

  1. Log on to the OpenSearch console. In the left-side navigation pane, choose Search Algorithm Center > Sort Configuration. In the left pane, click Popularity Model Management, then click Create.

  2. Enter a model name and click Submit.

    On the popularity model creation page, select the Target Application (for example, medical) and enter a Model Name (for example, test_02). The model name must be 1 to 30 characters in length, must start with a letter, can contain uppercase letters, lowercase letters, digits, and underscores, and must be different from the names of your other models. For data preparation, use the data collection SDK to upload behavior data such as exposures and clicks, and make sure the application receives sufficient traffic. After you complete the form, click Submit.

  3. After submitting, you are redirected to a confirmation page. Return to the Popularity Model Management page.

    The page displays the Popularity Model Created success message and lists the operations that you can perform next:

    1. Check the Data Report to confirm that the data quality meets the requirements.

    2. Evaluate the model by using Search Test or A/B Test.

    3. Apply the popularity score in sort configuration.

    Click Done.

  4. Find the model you created and click Train in the Actions column. The latest version state changes to Scheduling. Wait for training to complete.

Manage a popularity model

Popularity Model Management page

The popularity model details page contains the following information:

  • Basic Information: the creation time, last training start time, model status (Available), and latest version state (Trained and ready).

  • Configuration Information: the Scheduled Task switch (enabled or disabled). Click Edit Scheduled Task to modify the training cycle.

  • Data Verification: the data integrity status (Available Data) and the integrity level, such as l1. Click Upgrade Conditions to view the details.

  • Training History: a table that lists the model version, version state, training start time, and training end time.

The left-side navigation pane contains Policy Configuration, Popularity Model Management, Category Prediction Model, CTR Prediction Model, and Custom Sorting Model.

Basic Information section

View the model's creation time, current status, last training start time, and latest version state.

Configuration Information section

Scheduled Task is enabled by default, which trains the model once a day. Click Edit Scheduled Task to set a custom training cycle.

Data Verification section

This section shows the data integrity status of your application: Available Data or Abnormal Data.

The system assigns one of two integrity levels based on your data quality:

Integrity levelDescriptionUpgrade condition
l0Completely unavailable. Required core fields are missing and the size of data is small, so subsequent data processing cannot be performed.Upgrades to l1 when item page views (IPVs) exceed 100 in the last 24 hours.
l1Core fields are available and model training conditions are met.N/A

What's next