# Advanced configuration

The content added to a dataset comes in all shapes and forms, not all content is split equally among categories, price ranges, attributes. In some scenarios you may want more control over the recommendations to prioritize certain content over other. This section describes some of the options available with examples of use cases.

# Upweight

You can change the importance of content across the dataset by applying a weight function to the most relevant results. This can lead to a change in the order of the results, new content appearing or existing content disappearing from the results (compared to when not using the feature).

Usage

The feature is used by adding the w query string parameter to Similar or Explore requests and requires the presence of a selected item (the id field)

The weight function has the following format: w=<field>:<level>|<range>|<rangePercentage>|<method>.

Field Type Required Value Description
field String yes Metadata field name available in the dataset (E.g. price, category). Allowed metadata field types: number, string.
level Number yes Number between 0 and 1, excluding the limits, that decides how much to increase the importance for the matched content (the higher the value the higher the importance).
range Number no The relative range between the current selected item and other items in absolute value. The weight function will be applied only on matching items.
rangePercentage String no The relative range between the current selected item and other items as a percentage.
method String no Use value range when using range or rangePercentage configuration.

# Use Cases

# Similar price range

Sometimes a dataset can contain both affordable and luxury products. Users that visit a product page for an affordable product may not want / expect to see luxury products in the recommendations. With weighting you can make sure outliers are not suggested and / or moved towards the back in the list of results.

Use w=price:0.5|200||range to upweight all items based on price with a level of 0.5. All items that have a price between the price of the current item ±200 will have their importance increased.

Use w=price:0.7||10|range to upweight all items based on price with a level of 0.7. All items that have a price between the price of the current item ±10% will have their importance increased.

# More from the same category

Sometimes you need to offer recommendations for products that are part of smaller categories and the current results don't include all the items from the current item's category.

Use w=category:0.9 to upweight same category products by a factor of 0.9.

Last Updated: 6/7/2023, 3:36:33 PM