Dynamic re-ranker

Search results can change quickly, because some meanings of a word can become more popular than others. To keep up with these changes, you can use a dynamic re-ranker. This tool changes search rankings to match current trends automatically, which is more convenient than manually changing search rules. This approach is more scalable as it can handle a lot of changes.

The search engine learns from what people have been clicking on in the last 30 days, and then uses this information to make popular things show up higher in search results. For example, if users click nail polish results more often than nail remover when they search for nail, the nail polish will be shown higher in the results.

The re-ranker can also take into account purchases (assigned to the clicks that led to them) and revenue. By default, their weight is 0, so the re-ranker learns only from clicks.

The re-ranker works separately for full-text queries and for listings:

  • For full-text queries, it learns from clicks on the results of each query.
  • For listings, it learns from clicks on listing results (searchType is listing) and groups them by the filters used in the listing request, for example category or brand. The re-ranker works for listings only if you select at least one attribute.

Search rankings get updated every 12 hours to keep up with what users are looking for. This means you get search results that fit what users need, which can lead to more users taking action based on what they find. All of this happens without the need to make manual rules or add more filters to change how relevant the results are.

Impact on relevance

In the "About search engine" section you can check at what stage of search engine operations re-ranker is applied if enabled.

Requirements


This feature can be enabled only if:

  • more than 100,000 item.search.click events with the ID of the clicked item were generated in your workspace in the last 30 days;
  • item.search.click events contain item, the ID of the clicked item. It must be the same as the item's itemId in the item feed and sku in transaction events.

The click threshold is shared by full-text queries and listings: clicks from both count toward the same 100,000.

The re-ranker learns only from clicks that it can link to the search they came from. To link a click, its item.search.click event must contain the correlationId returned in the search response. Clicks without it are not used.

Exposure debiasing has an additional requirement: the events must contain the position of the clicked item.

Enabling dynamic re-ranker


  1. Go to AI Hub icon AI Hub > Indexes.
  2. From the list of indexes, click the one to which you want to apply the dynamic re-ranker.
    Result: The index statistics opens.
  3. Select the Settings tab.
  4. In the Dynamic Re-ranker section, click Define.
  5. Switch the Enabled toggle on.
    You can enable the dynamic re-ranker only if your workspace meets the requirements.
    Dynamic re-ranker settings with the item filter, number of items, and separate settings for full-text queries and listings
    Dynamic re-ranker enabled
  6. Optionally, filter the items that the re-ranker can promote.
  7. Select the number of promoted items.
  8. Configure the re-ranker for full-text queries.
  9. Configure the re-ranker for listings.
  10. Confirm the settings by clicking Apply.

Filtering items

This step is optional.
The engine prepares the ranking of promoted items every 12 hours. You can narrow down the scope of promoted items by applying filters. The filter applies to both full-text queries and listings.

  1. Next to Item filter, click Change.
    Result: A pop-up opens.
  2. From the Select value dropdown list, select an item attribute.
  3. From the Operator dropdown list, select a logical operator.
    You can find more information on Operators in the "Describing conditions by operators" section.
  4. From the Select value dropdown list, choose a value of the item attribute.
    This filter lets you only select a value from the list or an array , you can find more information in "Defining the values of operators ".
  5. To add more requirements to a condition, click and where and repeat steps 2-4.
  6. To add more conditions, click Add filter and repeat steps 2-5. Then, you must define the condition chaining (AND/OR).
    Condition chaining
    Condition chaining
  7. If you want to change the conditions from including to excluding items, click the Matching word in "Matching these conditions".
    Enabling and disabling condition matching
    Enabling and disabling condition matching

Selecting number of promoted items

In this part of the process, define how many items in the search results will be promoted by the dynamic re-ranker. This setting applies to both full-text queries and listings.

In the Number of items field, enter the number of items which will be promoted in the search results.
You can promote up to 50 items.

Configuring re-ranker for full-text queries

In the Dynamic Reranker for full-text query section:

  1. Using the Strength slider, set how strongly the re-ranker changes the results. For details, see Strength.
  2. Optionally, switch off Exposure debiasing.
    Exposure debiasing is enabled by default. For details, see Exposure debiasing.

Configuring re-ranker for listings

In the Dynamic Reranker for listing section:

  1. From the Attributes dropdown list, select the attributes that the popularity of items is calculated for.
    These are the names of the filters that your website sends in listing requests, for example category or brand. You must select at least 1 and can select up to 5 attributes. If you don't select any, the re-ranker doesn't work for listings.
  2. Using the Strength slider, set how strongly the re-ranker changes the results. For details, see Strength.
  3. Optionally, switch on Exposure debiasing.
    Exposure debiasing is disabled by default. For details, see Exposure debiasing.

Strength


Strength defines how much the re-ranker changes the score of an item. The re-ranker multiplies the score by 1 + strength × signal, where the signal is the result calculated by the re-ranker for the item.

  • At 0%, the results are the same as without the re-ranker.
  • At 100%, the re-ranker has the strongest effect.

Strength is applied when the search request is processed, so its changes don't wait for the next ranking update.

Exposure debiasing


Users click items at the top of the results more often than items lower down, partly because they see them first. Without a correction, items that are already at the top get more clicks and stay at the top because of their position, not because they are more relevant. Exposure debiasing corrects this: a click on an item shown low in the results counts more than a click on an item shown at the top.

How it works

  1. The engine estimates how likely users are to look at each of the first 20 positions in the results, based on the search engine logs from the last 90 days. You don't need to send additional events.
  2. Each click is weighted by the inverse of that likelihood. Clicks on positions lower than 20 get the same weight as position 20.
  3. The re-ranker uses the weighted clicks in the same way as it uses clicks without debiasing. Only clicks are weighted; purchases and revenue are not.

If your workspace doesn't have enough data to estimate how likely users are to look at each position (fewer than 150,000 query-item pairs in which the item was shown on at least two different positions), the engine uses a default estimate. With the default estimate, a click on position 20 or lower counts about 6.5 times as much as a click on position 1 for full-text queries, and about 7.3 times as much for listings.

For listings, the estimate is calculated separately for each combination of filters, for example category and brand. Listing requests sorted by an attribute, such as price, are not used, because the position of an item in sorted results doesn't reflect its relevance.

Requirements for exposure debiasing

The item.search.click events must contain correlationId, item, and position:

  • position must be the absolute position of the item in the results. If your website uses pagination, don't restart counting on each page. Positions can be counted from 0 or 1; the engine detects it automatically.
  • A click without position is counted as a click on position 1, so its weight doesn't change.

Impact on results

  • Exposure debiasing changes only the ranking of the items promoted by the re-ranker (the Number of items setting). Other results are not affected.
  • Strength is applied to the result after debiasing.
  • Items with a low number of clicks (counted before weighting) are not re-ranked, so a single click can't promote a new or rarely displayed item too much.
  • Items pinned with query rules are not moved. Boosts from query rules are multiplied by the re-ranker's multiplier; debiasing changes only the re-ranker's part.
  • Changes to the setting take effect after the next ranking update.
  • The Preview tab doesn't show the effect of exposure debiasing.

Default settings

  • For full-text queries, exposure debiasing is enabled by default, including indexes where the re-ranker was enabled earlier.
  • For listings, exposure debiasing is disabled by default.

You can also change these settings with the reranking.dynamicReranker.fullTextDebiasEnabled and reranking.dynamicReranker.listingDebiasEnabled parameters in the index configuration.

When to disable exposure debiasing

  • Disable it if the position sent in events doesn't match the actual position of the item on your website, for example when you change the order of results on your side or when pagination restarts the count.
  • Be careful when enabling it if your store has little traffic. The engine then uses the default estimate, which may not fit your store.

Canonical URL: https://hub.synerise.com/docs/ai-hub/ai-search/dynamic-reranker