How does Klevu rank products?

Before we start looking at how Klevu ranks products as part of our native algorithm, let’s look at the data we index by default.

What do we index?

At the time of indexing product data, Klevu collects product information such as the product’s name, URL, price, categories, stock status and a set of attributes associated with the product etc.

How is relevancy calculated?

Each of the product fields referenced above carries a certain weight from a ranking perspective. For example, in our algorithm, the name field is given the top priority and carries more weight, followed by the other fields such as categories and the long description. There are default weights assigned, however, over time, our search algorithm learns and adapts these weights based on user behavior.

Depending on where the keyword appears in the product fields, Klevu calculates an overall relevancy score for each product.

What are the different boosting scores and what is their impact on the relevancy score?

As the name suggests, boosting scores are used for boosting relevancy scores – they are multiplicative parameters. In other words, whatever the relevancy score of a product, it is multiplied with the relevancy score to obtain a new, final, relevancy score. This is the score that is used within our result ordering algorithm.

There are different ways a product can be boosted. Admin users can use bulk product promotions functionality from KMC to boost multiple products by creating rules. In this case, if there are multiple rules applying to the same product, the one with the highest boosting score is used. The other method for boosting products comes from either passing a boosting score in the feed or by using the individual product promotions feature in KMC to assign a score to each product. In this case, the score assigned overrides any score assigned to the respective product by any bulk boosting rule.

At this stage, the relevancy score is multiplied with the respective boosting score and the final score is calculated.

How do keyword-based product promotions and exclusions work?

Klevu also offers keyword-based product promotions, allowing users to specify products they want to show first when a certain keyword is searched. In this case, the promoted products are shown at the designated positions in the search results regardless of their boosting or relevancy scores (acting as hero SKUs). The opposite of this can also be achieved using the keyword-based product exclusions, where products can be removed from the search results for specific keywords.

What is the default product sorting/ordering algorithm?

First of all, Klevu separates products by their stock status. The products that are available and in stock are placed at the top, followed by the ones that are out of stock. Within each of these sections, if there are products boosted at a keyword-level, they are always boosted to the top positions. The remaining places in each set of search results are then sorted by their final relevancy score (after the boosting scores are multiplied with the relevancy score) in descending order.

When using smart category navigation, what impact do self-learning and manually set promotions have on product ranking?

The primary reason why the add-on smart category navigation is called smart is that it uses self-learning on category pages to automatically boost products that are in trend.

If you have used category specific promotions (category-specific bulk boosts and manually positioning products on top of the category pages), these promotions are only applicable to the respective category pages. These promotions are not respected in search results. If you have promoted certain products over others (using individual product promotions and bulk promotions rules) for search, such promotions are also respected on the category pages. In such cases, boosts given to an individual product from category navigation promotions and search promotions, both are applied to that product.

Where products are manually positioned on top of a category page, their positions are respected on that category page. The remaining places on the category page are filled up as per their promotions and taking self-learning into account.

How does Klevu handle exact matches, word inflections, synonyms, compound words and fuzzy matches?

By default, Klevu gives the highest priority to the exact match. As part of the indexing process, we normalize words to obtain their base forms (e.g. laptops -> laptop) and where applicable, we decompound the compound words (e.g. wineglass -> wine glass). Information on how synonyms are incorporated is available here: “How does the synonyms feature work in Klevu?“.

If Klevu cannot find an exact match, it turns the phrase into a fuzzy query and attempts to match words that are similar to the one inputted by the user.

How does self-learning affect search results?

What has been described above is the out-of-the-box behavior of our search algorithm. However as Klevu is built on a self-learning algorithm, we monitor several parameters of the search activity and automatically apply several parameters specific to individual stores. For example, we identify what matters the most to individual shoppers in real-time and apply the personalization to their set of results.

We maintain an internal score that acts as a tiebreaker in the case that the final relevancy scores for two separate products are the same. Klevu also learns which categories to boost over the others for individual queries. The list of search parameters is long and beyond the scope of this article, however, the major contributors to our core algorithms, that can be managed and configured by admin users have been explained above.