For the complete documentation index, see llms.txt. This page is also available as Markdown.

Diversification rules

The Diversification rule enables automatic reordering of products to ensure a balanced and varied product display, while preserving the overall ranking logic.

Overview

Diversification helps avoid repetitive product sequences (e.g. same brand or similar items) and improves product discovery without sacrificing performance.

Key benefits include:

  • Improved product discovery

  • Reduced visual repetition

  • Increased engagement and CTR

  • Maintained business control and performance

How it works

When applied, Diversification does the following:

  • Runs on the final returned set: It executes after all other custom rules, filters, and maximum display limits (e.g., a cap of 8 items) have already been applied.

  • Reorders existing results only: The algorithm does not fetch replacement items from your catalog. It only shuffles the existing list of products that successfully passed your prior rules to maximize variation across the selected attributes.

  • Functions on a best-effort basis: If the final list of products contains a high concentration of identical values (for example, if 6 out of 8 products share the same brand or fiche_id), the algorithm will spread them out as much as possible (e.g., A, B, A, B, A, A, A, A). However, visual repetitions will inevitably remain because there are not enough distinct values in the final subset to completely avoid consecutive duplication.

  • Modifies display order only: Product scores and underlying strategy logic remain unchanged.

Where it applies

The Diversification rule is applied on the overall strategy, after all ranking and rules have been executed. This ensures global diversity across all combined rules.

Example: avoiding multiple products from the same brand across a full recommendation list.

Attribute support

Diversification can be configured on any product attribute available in the catalog, regardless of type:

Type
Examples

String

brand , category , color

Numeric

price , rating , margin

Boolean

on_sale , new_arrival

Up to 3 attributes can be combined simultaneously.

Typical use cases

Common scenarios where diversification is useful include:

  • Avoiding showing multiple products from the same brand consecutively

  • Mixing different product types within a category (e.g. a skincare routine)

  • Balancing price ranges within a recommendation list

  • Alternating between promotional and full-price products

Last updated

Was this helpful?