Inspect Coveo Machine Learning models
Inspect Coveo Machine Learning models
- Access your browser’s network monitoring tool
- Leverage Coveo Machine Learning
- Configure and train Coveo Machine Learning models
- Review Coveo Machine Learning candidates using the "Models" page
- Automatic Relevance Tuning models
- Query Suggestion models
- Content Recommendation models
- Dynamic Navigation Experience models
- Smart Snippet models
Coveo Machine Learning (Coveo ML) models leverage AI-powered recommendations to provide your users with the best possible search experience according to their context, so you must ensure that your models are properly implemented and well-trained.
This guide provides guidelines to analyze, review, and test different aspects of a Coveo-powered implementation. It shouldn’t be considered an official, definitive guide to testing an implementation before it goes live, but rather a guide showcasing the basic components that Coveo implementations typically include. Every Coveo implementation is different and may require custom configuration. Therefore, you may notice discrepancies between the components and features listed in this guide and those you’re using in your actual implementation. If you encounter issues, or have any questions related to this article, contact Coveo Support for help. |
Access your browser’s network monitoring tool
-
Open your web browser’s developer tools.
NoteThe examples in this article use the Google Chrome developer tools. For browser-specific information, see:
-
Select the Network tab.
Leverage Coveo Machine Learning
If your implementation doesn’t leverage Coveo ML, see Leverage Machine Learning to learn more about Coveo’s available machine learning and deep learning algorithms.
Configure and train Coveo Machine Learning models
Depending on your context, needs, and available data, you may have to change the configuration and training settings for the default Coveo ML models.
Review Coveo Machine Learning candidates using the "Models" page
You can use the Models (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console to ensure that your Coveo ML models have relevant candidates to suggest to your users.
|
Once you have met the prerequisites to create your model, you can review the candidates (if any) that are suggested by Coveo ML.
To review these candidates and other useful information about your model, access the Models (platform-ca | platform-eu | platform-au) page, and then select the model that you want to inspect.
You can use the information provided on this page to ensure that all of the prerequisites for model creation have been met. You can also review Coveo ML candidates that are automatically shown to your users.
Automatic Relevance Tuning models
Typically, Automatic Relevance Tuning (ART) boosts the ranking score of the five best search results for a given query.
You can use the Model Testing (platform-ca | platform-eu | platform-au) page of the Administration Console to compare the ranking of two Coveo ML ART models. You can also use it to evaluate the efficiency of a given ART model compared to the default ranking behavior provided without ART.
Test your ART model
Once you have analyzed the candidates for your ART model on the Models page and tested its ranking behavior on the Model Testing page, you may want to test its workability in your actual implementation.
-
Access a search interface which leverages the ART model that you want to test.
-
In the search box, perform a query for which your model is able to recommend items.
-
Enable debugging mode by appending
&debug=true
to the current URL. -
In the network monitoring tool, under the Name column, select the latest request to the Search API. The request path should contain
/rest/search/v2
. -
Select the Preview tab.
-
Find and expand the
executionReport
property, and then expand thechildren
sub-property. You should now be able to see the whole path that your query took before the results were returned to the search interface. -
Expand the
PreprocessQuery
property, and then expand thechildren
sub-property. -
Expand the
CallingRevealTopClicks
property, and then expand theresponse
sub-property. -
Expand the
predictions
property.Under
predictions
, you should see the items that were suggested by ART and their ranking score.NoteEach suggested item shown under
predictions
is identified by the value of itscontentIdValue
field.
Query Suggestion models
You can use the Model Testing (platform-ca | platform-eu | platform-au) page of the Administration Console to compare the suggestions provided by two Coveo ML Query Suggestion (QS) models.
For more information on QS models, see:
Test your QS model
Once you have tested a QS model on the Model Testing page, you may want to test its workability in your actual implementation.
-
In the search box, start typing queries for which your model is able to provide suggestions
-
Ensure that the expected suggestions are displayed.
Note
In non-production environments, you may not have enough data to see query suggestions appear in the search box. This is because QS models have thresholds to prevent infrequent queries from polluting the suggestions. They only deliver suggestions for queries that were performed and followed by at least one click on search results. However, when testing a QS model in a non-production environment, you can activate the test configuration mode to reduce the frequency thresholds which discard queries or clicks that were not performed frequently enough. |
Content Recommendation models
Coveo ML Content Recommendation (CR) models use views and search actions from all of your users to predict and suggest the most relevant content for the user in their current session.
To learn how to configure recommendations, see Deploy Content Recommendations (CR).
Test your CR model
-
Access a recommendation interface which leverages the CR model that you want to test.
-
Access one of the pages that should be considered as a recommendation by your CR model.
-
Verify that a view event is logged when the page loads.
-
In the network monitoring tool, under the Name column, select the view event request. The request path should contain
/rest/ua/v15/analytics/view
. -
Select the Payload tab. You should now see the request payload sent to the Search API.
-
You should, at a minimum, find the following fields and note their values:
-
contentIdKey
-
contentIdValue
-
location
Notes-
If you also want this page to be considered a specific type of item, ensure that the
contentType
field is populated as expected. -
If you leverage custom user context, you should also validate that the
customData
object contains the expected key-values.
-
-
Validate that the recommended items match the view event request.
-
Access the Content Browser (platform-ca | platform-eu | platform-au) page of the Administration Console.
-
In the search box, enter the
contentIdKey
andcontentIdValue
that were returned in the view event request payload, separated by theContains
operator (=
). -
The item that you inspected should be the only search result returned in the Content Browser.
-
-
Access another page that contains a recommendation interface whose output should come from your CR model.
-
In the network monitoring tool, under the Name column, select the latest request to the Search API. The request path should contain
/rest/search/v2
. -
Select the Payload tab. You should now see the request payload sent to the Search API.
-
Find and expand the
actionsHistory
property, which is essential for content recommendations to work properly.Verify that
actionsHistory
meets the following criteria:-
It contains an object that matches a view event for the page from which you accessed the current page.
-
Its latest item is an object that matches a view event for the current page.
-
-
Ensure that the
recommendation
property contains a value. -
Select the Preview tab.
-
Ensure that the request is routed to the query pipeline that contains the CR model.
Dynamic Navigation Experience models
If you leverage the Coveo ML Dynamic Navigation Experience (DNE), you may want to ensure that the model orders facets and facet values according to the current context (see Deploy Dynamic Navigation Experience (DNE)).
You must first ensure that the search interface incorporates the required components:
-
If your interface relies on the Coveo Atomic library:
-
If your interface relies on the Coveo Headless library:
Test your DNE model
-
Access a search interface which leverages the DNE model that you want to test.
-
In the search box, perform a query for which your model is able to recommend items.
-
Enable debugging mode by appending
&debug=true
to the current URL. -
In the network monitoring tool, under the Name column, select the latest request to the Search API. The request path should contain
/rest/search/v2
. -
Select the Preview tab.
-
Find and expand the
executionReport
property, and then expand thechildren
sub-property. You should now be able to see the whole path that your query took before the results were returned to the search interface. -
Expand the
PreprocessQuery
property, and then expand thechildren
sub-property. -
Expand the
CallingRevealFacetSense
property, and then expand theresponse
sub-property. -
Expand the
facetSenseResults
property.Under
facetSenseResults
, you should see several properties which reveal actions from DNE. These include the following:-
facetOrdering
: the order in which the facetable fields are presented to the user according to their context. -
rankingBoost
: the boost granted to the facetable fields according to the user’s context. -
valuesOrdering
: the order in which the values for each facet are displayed.
-
-
Find the
userContext
property. This displays the context upon which DNE bases its suggestions, apart from the query itself.
Smart Snippet models
If you leverage Coveo ML Smart Snippets, you may want to ensure that your model properly provides snippets of text.
You must first ensure that the search interface incorporates the required components:
-
If your interface relies on the Atomic library:
-
If your interface relies on the Headless library:
Test your Smart Snippet model
You can test the model on a search interface that contains the required components, and for which the traffic is directed to the query pipeline that you associated with your Coveo ML Smart Snippet model.
Perform a query that would likely trigger a snippet to appear in the search results.
You scope an item for your model from which to extract snippets.
It contains a header that reads When exactly is a model retrained?
.
When you perform the query When is a model retrained
, you see the following:
You can also inspect the request to the Search API to get detailed information about the model’s output for a given query.
-
Access a search interface which contains the required components, and in which the traffic is directed to the query pipeline that you associated with your Coveo ML Smart Snippet model.
-
In the search box, perform a query that would likely trigger a snippet to appear in the search results.
-
In the network monitoring tool, under the Name column, select the latest request to the Search API. The request path should contain
/rest/search/v2
. -
Select the Preview tab.
-
Find and expand the
questionAnswer
property. It provides detailed information about the model’s output for this specific query. This property won’t appear if the model can’t provide snippets for the current query.