Configuring a Coveo Commerce Query Pipeline (Advanced)

You should enable Coveo Machine Learning (Coveo ML) Automatic Relevance Tuning (ART), Query Suggestions (QS), and Dynamic Navigation Experience (DNE) (see Coveo ML). These will do most of the heavy lifting to ensure the relevance of your solution.

You can also tune your query pipeline components to further improve the relevance of your solution. This article provides guidelines on how to do so in the context of Coveo for Commerce.

To be clear: the following guidelines don’t replace the Coveo ML models listed above, but merely supplement them.

In the Coveo Administration Console, in the Query Pipelines tab, select the target pipeline and navigate to the pages indicated below.

Ranking Weights

To avoid granting excessive importance to item keywords that are too common or irrelevant, tune query pipeline ranking weight rules roughly as follows:

  • Set Keyword in concepts, Item last modification, and Keyword frequency to 0.

  • Lower Keyword proximity to 3.

  • If item titles aren’t distinctive and well formatted, lower Keyword in title to 4.

commerce ranking weights

Ranking Expressions

Use ranking expressions to leverage useful keywords which may have been left behind by the above ranking weights tuning. More precisely, you will want to boost products whose category or brand field value matches a query keyword. If other fields contain relevant keywords which may be used in queries, boost them as well.

To do so, use the $splitValues query extensions to extract query keywords. You can then use $removeMatchingValues to remove irrelevant keywords, such as AND/OR/(/), which appear in thesaurus expansions. Compare the resulting keywords with target fields. If successful, apply a ranking modifier of +30, as in the example below:

Your items contain a category field and a brand_name field, which, as their names indicate, hold the product category and brand name. You create ranking expressions to apply a +30 ranking modifier on items whose values for those fields match query keywords.

You also have a color field which you decide to leverage in the same manner.

commerce ranking expressions

Thesaurus

Assuming you respect the leading practices, you can create query pipeline thesaurus rules for synonyms.

Your index contains several items pertaining to the unfortunately named ACME CTRLR game controller (user manual, troubleshooting articles, etc.).

Usage analytics reports indicate that a sizable portion of end users who are obviously looking for information on this product in your Coveo-powered community portal are actually searching for acme pad, and not getting any relevant results.

To address the issue, you create a thesaurus rule that expands acme pad to acme ctrlr.

ExpandACME

Stop Words

You can leverage stop words to remove certain irrelevant keywords from queries, such as to, in, of, etc. You should, however, do so carefully, and make sure to test the relevance of your solution with your stop words.

commerce stop words

Query Parameters

Add query pipeline query parameters to ensure the query syntax is disabled and to enable partial match. The query syntax should already be disabled by default, since most end-users don’t know how to leverage it. As for the partial match feature, it allows your Commerce solution to return result list items which don’t contain all queried keywords.

commerce query parameters

Recommended Articles