Using Query Suggestions (QS) in Coveo for Commerce
Using Query Suggestions (QS) in Coveo for Commerce
Coveo Machine Learning (Coveo ML) Query Suggestion (QS) models recommend relevant queries to visitors as they type in the search box. The model suggests queries based on the characters typed, prioritizing those that have been searched most frequently and resulted in the most clicks in the past.
|
If you use the Catalog source to index your catalog data, we recommend that you use Predictive Query Suggestions (PQS) instead of QS. Unlike Coveo ML QS models, which generate suggestions based on query-click patterns, PQS models leverage Coveo’s product embeddings and vector capabilities. Leveraging these capabilities allows PQS models to detect visitors' shopping objectives and react to intent changes in real time. This means that PQS models can suggest query candidates that are tailored to the current visitor's shopping context, whether they’re authenticated or not. |
Prerequisites
To leverage Coveo ML QS in your Coveo for Commerce implementation, make sure that:
-
The search interface where you want to integrate the model logs click events (see Log commerce events).
-
If your Coveo for Commerce implementation targets the Search API to handle search queries, the interface where you want to integrate the model logs search events.
-
If you’re targeting the Commerce API to handle search queries, as well as the Event Protocol to log events, search events are automatically logged using the information of the API request.
-
If you’re using the Commerce API to handle search queries, but use the Coveo UA Protocol to log events, the interface where you want to integrate the model must log search events.
-
-
You use a tracking ID to identify the storefront where you want to integrate the model.
Model creation
When creating a QS model for Coveo for Commerce, you must ensure that the model is configured to learn from the data of the storefront where it’s deployed.
-
Once you created the model, configure learning filters to ensure that the model only uses the data that’s relevant to the website on which it’s deployed.
Configure learning filters
When using QS models for a Coveo for Commerce organization, you must configure learning filters to ensure that the model only uses the data that’s relevant to the website on which it’s deployed.
To configure learning filters:
-
Once you’ve created your model, access the Models (platform-ca | platform-eu | platform-au) page.
-
Click the desired model, and then click More > Edit JSON in the Action bar.
-
In Edit a Model JSON Configuration, add the following
commonFilter
object:"commonFilter": "(c_context_website=@'<TRACKING-ID>')"
Where you replace
<TRACKING-ID>
with the tracking ID (registered by a property) defined for the website on which you want to use the model. -
Click Save.
If you have a model that you want to use on a website for which the registered tracking ID is barca_sports_us
, your JSON configuration should look like this:
{
"modelDisplayName": "Barca Sports US - QS",
"exportPeriod": "P3M",
"intervalTime": 1,
"intervalUnit": "WEEK",
"commonFilter": "(c_context_website=@'barca_sports_us')",
"exportOffset": "PT0S"
}
What’s next?
Once you’ve created and configured your QS model, you must associate it with the query pipeline you configured for the Search product discovery solution.