How products are ranked in the results
The order in which products are ranked on the search engine results page (SERP) or in the product listing page (PLP) is not random. When the Sorting feature is applied in Empathy Platform, products are ranked internally by calculating a product score. Product scores are used by the search engine to order the product results.
Every time a shopper performs a search query, a score is calculated for each product based on product properties, on the product success among shoppers, and on business rules designed to fulfill your business strategy in your commerce store.
Points are calculated based on a synergy of functionalities and tools, most of them configurable, leading to the following scoring criteria:
- Term position: rules to boost the score of product results whose fields contain search terms in the same order as they are provided in the search query.
- Equalize: rules to add product scoring weighting based on product catalogue fields and attributes.
- Query ranking: rules to boost or bury the ranking positioning of single products or group of products.
- Customization: rules that change the product score based on custom KPIs.
- Wisdom of the crowd: gives an extra boost to products calculated from contextual data about shopper interactions with the commerce store.
The points for each criterion are added up to give the product’s overall score:
Term position score + Equalize score + Query ranking score + Wisdom of the crowd score + Customization score = Overall Product Scoring
The products are then ranked in order using the overall score, from highest to lowest. Where there is more than one product with the same overall score, tiebreakers are used as a backup criterion to break any ties between identical or similar products.
When the shopper performs a search query, the Search microservice is responsible for calculating the product scoring and displaying the product results on the SERP accordingly.
See how product scoring affects product ranking in real time by using the Explain tool in the Empathy Platform Playboard.
Term position criterion
The term position criterion automatically adds an extra boost to products whose searchable fields match the search terms in the same order as they are provided in the query. Term position applies only to queries containing more than one search term.
For example, a shopper searches for “blue jeans” and the search engine’s been configured to add additional points for term exact matches in the second position of the description field. The search engine finds the term as an exact match appearing in the second word of the description: “These jeans are made of 70% recycled cotton…”.
Term position is defined and integrated into the Empathy Platform thanks to the Search microservice. For further information about term position, contact your Key Account Manager.
The equalize criterion is about the importance and the weighting of the product fields and attributes based on four key criteria: textual match, semantic match, global business rules, and function score.
To configure scoring calculations based on the match of search terms with specific searchable attributes of the product catalogue you use the Equalize tool in the Empathy Platform Playboard. Searchable attributes stand for feed fields and attributes that are indexed as searchable in the search engine.
The textual match criterion calculates points based on the search query's textual relevance to specific product catalogue attributes. For this criterion, points are scored for each search term that matches a given searchable attribute of the product catalogue. You configure textual match by defining a specific weighting in a range from 1 to 10 for each searchable attribute. At query time, the overall textual match scoring is calculated by adding up the points of all searchable attributes matching the search terms.
Textual match examples
Imagine you set up textual match scoring in the Equalize management tool for Color and Name attributes. If shoppers happen to search for "red dress" but your product catalogue only has two red dresses along with multiple red products, you can give more relevance to the Color attribute rather than to the Name one for the SERP to display a wider range of red products. Then, the search query "red dress" returns the red dresses in your catalogue together with other products, a higher position, whose color attribute matches the search query, such as red skirts.
Let’s see this example with numbers and in different scenarios. Textual match points usually go from 1 to 10, but they can be customized via the Empathy Platform Instance Management Console (IMC). Considering the configuration of the product catalogue fields’ weighting is the one shown in the following table:
Attribute Equalize Name 10 Reference 5 Color 1 Root categories 1
Situation 1: Single term present in one field
A shopper searches for the term “dress”. The search engine finds matches in a single field for three products:
... "_id": "Product A", "Name": "asymmetric midi gown", "Reference": "dress-0154651236", "Color": "red”, “Root categories": "women”, ... "_id": "Product B", "Name": "floral print tunic", "Reference": "summer-0001356848", "Color": "red”, "Root categories": "dresses”, ... "_id": "Product C", "Name": "asymmetric midi dress", ”Reference": "woman-0819432108", "Color": "red”, "Root categories": "women”, ...
Item Attribute Product A Reference Product B Root categories Product C Name
The products are ordered as first Product C, then Product A, and finally Product B.
Situation 2: Single term present in multiple fields
A shopper searches for the term “dress”. The search engine finds matches in several fields:
Item Attribute Product A Name
Product B Reference Product D Name
If the search term appears in more than one field, only the field with the highest weighing in Equalize determines the points for that search term; it does not add up the points for each field where the term is present. The points for each product are:
- Product A: 10
- Product B: 5
- Product C: 1
- Product D: 10
In this case, a tiebreaker occurs between Product A and D, however usually it's resolved with other scoring criteria such as customization or global business rules. Product B is listed third, and finally, Product C.
Situation 3: Multiple terms found in one or more fields
A shopper searches for the terms “red" and "dress”. The search engine finds matches in the following fields:
Item Term Attribute Product A dress
Product B dress
Product C dress Root categories Product D dress Name
If a search query contains more than one search term, it adds up the different points for each term found in any of the fields to determine the overall textual relevance points for the product. The scores for each product are:
- Product A: 10 + 10 = 20
- Product B: 5 + 5 = 10
- Product C: 1 = 1
- Product D: 10 = 10
In this case, Product A is listed in the first position. Although Product D and Product B have the same textual score, Product D is listed next since the dress term is found in the Name field, which has a higher relevancy.
The semantic match criterion is very similar to textual match, as it calculates points based on the search query's textual relevance to specific AI enriched product catalogue attributes. For this criterion, points are scored for each search term that matches a searchable attribute of the product catalogue enriched thanks to AI-driven semantic models. As for textual match, you configure semantic match by defining a specific weighting in a range from 1 to 10 for each attribute enriched with a certain source (for example, foundational models). At query time, the overall semantic match scoring is calculated by adding up the points of all searchable enriched attributes matching the search terms.
Imagine a shopper searches for "sparkly dress" around New Year's Eve, but the searchable non-enriched attributes of your product catalogue for dresses only have party or silk as values. You want to increase the number of results for this kind of search query, so you give more relevance to the semantic match scoring in the Equalize management tool for the attribute enriched with semantically similar suggestions. Then, these products enriched with semantically related terms similar to party, in this case sparkly, will be returned in a higher position as they match the shopper's search query.
The global business rules criterion allows you to customize certain product categories' relevance based on specific business scenarios. Concretely, when setting up global business rules, you define ranking values for boosting or demoting given product catalogue attributes' relevance on the SERP. Thus, at query time, these values add or demote points to the product's organic scoring. If query results match multiple business rules, all rules are taken into account for calculating the final scoring.
The Equalize management tool allows you to configure the rule attribute's weight that modifies the product relevance in product ranking. The scope of the rule, that's whether it adds or demotes relevance, is instead defined through the Search microservice. For more information about the global business rules scope, contact your Key Account Manager.
Global business rules example
Imagine that, setting up your product catalogue, you have added product attributes like On sale for the current products' collection, and Latest added for the next products' collection. For Black Friday sales, you can increase the weighting for the On sale attribute to make it more important and decrease the weighting for the Latest added attribute. Thus, the search engine places the products on sale in the first position and the products new in the catalogue in the last positions. The rule can be used for a limited time and then deactivated.
Let’s see this example with numbers and in different scenarios. Global business rules points usually go from 0 to 100, but they can be customized via the Empathy Platform IMC. Considering the configuration of the product catalogue fields’ weighting is the one shown in the following table:
Global business rule Equalize Latest added 100 Women 65 On sale 20
Given the global business rules weighting configured in Equalize, the additional points that are added to the product scoring are shown here:
Product Meets global business rule criterion Equalize weighting Points for global business rules A Latest added 100 100 B Women
85 C Latest added
Thus, the product ranking will be product C, product A, and lastly, product B.
The function score criterion allows you to add or remove relevance to product results based on one or more functions applied to the values numeric fields. When you set up the function score, you associate product catalogue fields with a value in a given range to be added or removed from the organic score at query time. For example, you configure boosting rules in a range from 1 to 100, and demoting rules from —100 to 1. This is useful to change product scoring based on numeric fields related to custom KPIs. When shoppers launch a search query, each product result containing fields associated with the rule scores an additional or reduced relevance, as indicated by the rule. When multiple function score rules apply to a product, all rules are taken into account to calculate the product's final scoring.
The list of fields to be used within function score rules and the related scoring range are defined with the Search microservice. For more information about function score definition, contact your Key Account Manager.
Function score example
Imagine that you have configured several KPIs to be customized via Equalize, like Units sold, Purchase history, or Stock broken sizes. If you want to increase the weighting of products with broken sizes (for example, you’ve configured this KPI for products with two sizes with no stock as they’re already sold out), you give more importance to the Stock broken sizes KPI. Then, the weighting you configure via Equalize applies to those products with two broken sizes.
Let’s see this example with numbers and in different scenarios. Function score points usually go from 0 to 100, but they can be set up with negative values for your instance to decrease the product scoring, as they can be customized via the Empathy Platform IMC. Considering the configuration of the product catalogue fields’ weighting is the one shown in the following table:
Function score Range when the KPI applies Equalize Units sold >200 units 10 Stock broken sizes With two or three sizes sold out. 35 Purchase history When there is already a purchase of an article. 10
Given the function score weighting configured in Equalize, the additional points that are added to the product scoring are shown here:
Product Meets function score criterion Equalize weighting Points for function score A Units sold 10 10 B Stock broken sizes
45 C Units sold
Thus, the product ranking will be product B, product C, and lastly, product A.
Learn more about how function score works
Depending on the function score mode, the scores of the products are combined differently—they can be multiplied, summed, or averaged, the first function matching a filter is applied, and the maximum or minimum score is the one used…
The score of each function can be defined by a certain weight to control their impact on products and a limit can be applied to the new score restricting it to a maximum. The new score obtained from the combination of several functions is combined with the score obtained from the query in different ways:
- Multiply: query score and function score is multiplied (default).
- Replace: only the function score is used, the query score is ignored.
- Sum: query score and function score are added.
- Avg: average of query and function score.
- Max: maximum of query score and function score.
- Min: minimum of query score and function score.
The different types of functions that can be configured are the following:
- Script score: you can wrap another query and optionally customize its scoring with a computation derived from other product’s numeric field values using a script expression. The resulting score is multiplied by this of the query.
- Weight: you can multiply the query score by a provided weight. Random: you can generate scores that are uniformly distributed from 0 up to 1, but not including it.
- Field value factor: you can use a product field to influence the score by multiplying the field value or applying common or natural logarithm, squaring the field value or taking its square root, or reciprocating the field value.
- Decay functions: you can score a product with a function that decays depending on the distance of a product numeric field value from another you give as origin. . The origin is used to define the halfway from which the distance is calculated. A scale is given as well to define the rate of decay.
Query ranking criterion
Query ranking criterion is about forcing the otherwise organic product scoring based on contextual business scenarios. Specifically, the Empathy Platform Playboard's Query Ranking management tool allows you to give specific search query results a one-off boost or downgrade on both the SERP and PLP. For example, you display on top of the SERP discounted products from your previous seasonal collection to empty your stock, and at the same time demote products that are out of stock.
You can configure two criteria using the Query Ranking management tool:
Product ranking: allows you to override the organic score by forcing the boosting or burying of specific products to the first or last positions on the SERP. Product ranking is useful to feature key products on the first page or to demote products to the bottom that you don’t want to actively promote, according to your business strategy. When configuring product ranking rules, you indicate a search query for boosting or burying products and select the products on which the rule is applied. If a product doesn't match the query, that product is neither boosted nor returned. You can associate each search query with several products at the same time and organize the order in which the selected products are displayed on the SERP. However, you can rearrange the order using the Empathy Platform Playboard by dragging and dropping the products as required.
Product ranking example
Imagine that you have a surplus of products you want to sell as soon as possible. You decide to boost Product A, with an organic product score of 15,000 points. By boosting it, you add 1,000,000 points to the product score, so the new score is 1,015,000. Then, you want to boost two more products, Product B and Product C in this same order, with an organic product score of 7,500 and 53,700 respectively. With this boosting, you’re positioning these three products on top of the results list.
You must know that, whether you boost several products at the same time, the boosted products are ranked based on the order of boosting, and the points added to each of them are multiplied (1,000,000 points for the last busted, 2,000,000 for the second, and 3,000,000 for the first). Consequently, this is the final product scoring:
- Product A: 3,015,000
- Product B: 2,007,500
- Product C: 1,053,700
The same happens when you bury products, but using very small numbers to multiply by: the score of the third product buried is multiplied by 0.0001, the second buried is multiplied by 0.0002, and the first in the list is multiplied by 0.0003. These are the final product scoring when burying the same products as before:
- Product A: 4.5
- Product B: 1.5
- Product C: 5.37
With this burying, you’re positioning these three products at the bottom of the results list.
Attribute ranking: allows you to softly boost or bury a group of products on the SERP based on their attribute values. By configuring attribute ranking rules, you indicate a search query for softly boosting or burying products and associate it with specific product catalogue attribute values. At query time, the positioning of those product results with the attribute values indicated in the rule is promoted or decreased on the SERP, based on the configuration.
Attribute ranking example
Imagine that you’ve heard that a certain color or fabric is now trendy and you want to give a push to the products of your clothing catalogue having these attribute values. Therefore, you decide to boost Attribute value A, so you add 20 points to the organic score of these products where this attribute is present.
You must know that, whether you boost several product attribute values at the same time, the boosted products are ranked based on the order of boosting and boosting points are doubled (this is, 20 points for the last boosted, 40 for the second, 60 for the first, and so on). So, when boosting Attribute value B, you add 20 points to the products having this attribute, but other extra 20 points to products having Attribute value A. Let’s see how additional points are added to the product scoring in the following table:
Organic product score Attribute value boosting Final product score Product A 250 Attribute value A (+40) 290 Product B 75 Attribute value A + B (+60) 135 Product C 110 Attribute B (+20) 130
On the other hand, buried attribute values are always multiplied by 0.2, no matter how many attributes you buried.
Organic product score Attribute value burying Final product score Product A 250 Attribute value A (x0.2) 50 Product B 75 Attribute value A + B (x0.2) 15 Product C 110 Attribute B (x0.2) 22
You can implement in the Search microservice any customized scoring calculation to change the product score based on your commerce store's specific behaviors.
For designing and integrating customization calculations, contact your Key Account Manager.
Wisdom of the crowd criterion
Wisdom of the crowd determines the dynamic relevance of the product based on shoppers' behavior and interactions. It adds points to the overall product scoring based on context, in other words, for products with which shoppers have had some type of interaction in the previous days, whether they are specific products or products with similar attributes. These shopper-intent interactions are used to give an extra boost to products. If context is not enabled, then no additional points are added to the overall score.
To know more about how Empathy Platform uses contextual data, check Contextualize overview.
There are two context types that can be used: context that affects specific products and context that affects products with similar attributes:
Specific product context: for each search query, Empathy Platform stores a list of the products that shoppers have had some type of interaction with during the day and assigns them points according to whether shoppers have clicked, added to the cart, or purchased the product.
For example, possible points for interactions might include:
Clicks: 1 point per interaction
Add-to-cart: 2 points per interaction
Checkout: 3 points per interaction
These interaction points are added for a given product and added to the product's overall score. Often points given for context do not modify the product’s position significantly. For example, a highly clicked product for a given query might result in the product receiving additional points equivalent to a business rule that has a weighting of 1 in Equalize.
For more information on how product interactions are gathered, see Shopper interactions tracked in your store.
Similar attributes context: depending on each product catalogue feed and business scenario, you can configure the fields relevant for identifying products such as family, subfamily, and product attributes.
For each search, Empathy Platform stores shopper interactions with family, subfamily, and attribute values, storing values of these fields rather than product IDs themselves.
Similar attributes context example
For example, a shopper searches for “T-shirt” and clicks on Product A, which comes from the “T-shirt” family, “Basic T-shirts” subfamily, and “Sleeveless” attribute.
Contextualize stores the interactions with these T-shirt types and builds intent models similar to the table below for the “T-shirt” query, where depending on the type of interaction, the points are added up for each family, subfamily, and attribute.
Family Context points Subfamily Context points Attribute Context points T-shirt 18,856 Basic t-shirts 10,856 Short sleeve 12,856 Baby t-shirt 1,567 Graphic t-shirts 7,567 Sleeveless 9,567 Tops 1,096 W-B t-shirts 6,096 Patterned 3,096
With context enabled and for a given search query, additional points are awarded to each product that has one of the popular values in the context intent model. By default, the top 5 most popular values are taken. For example, if Product A belongs to the Graphic t-shirts subfamily, additional points are awarded.
The points depend on the popularity of the search term. The equivalent weighting in Equalize would be a value of between 0 and 1 (remember usually these values are decimal numbers).
There are times when the catalogue definition criterion may result in many products with an identical overall score. This usually happens where there are few or no business rules and the context is not active.
In these cases, backup criteria should be determined to decide which product should be ranked first or second. Tiebreakers are applied after the points for catalogue definition, business rules, and wisdom of the crowd have been added up.
Fields that are commonly used to resolve tiebreaks are numerical fields:
- Created on
- Business margin
- Stock level
If a tiebreaker is not set up to resolve conflicts resulting from identical product overall scores, products are shown in the order in which they are indexed by the search engine. Generally speaking, if business rules and context are set up for the product catalogue, few tiebreak situations will occur; however, it's a good best practice to set up a tiebreaker to cover any eventualities.