Create and manage a Product Recommendation (PR) model

This is for:

System Administrator

Coveo Machine Learning (Coveo ML) Product Recommendation (PR) models suggest to end users products that suit their profile, context, and buying behaviors. The results that are returned by the Coveo ML PR service can be integrated in a Coveo for Commerce search interface.

To take advantage of Coveo ML PR, members with the required privileges must first create their PR models.

Prerequisites

  1. Coveo Machine Learning (Coveo ML) Product Recommendation (PR) models use usage analytics (UA) events to relevantly target and suggest products to your customers. Therefore, you must log commerce events to ensure that your commerce interfaces correctly track user interactions.

  2. Depending on the recommendation strategy you want to leverage, ensure your commerce interface is tracking the proper events:

    Recommendation strategy Recommended location Required events Optional events

    Cart recommender (cart)

    Cart page

    detail

    purchase

    None

    Frequently bought together (frequentBought)

    Product display page (PDP)

    purchase

    refund

    add (to cart)

    remove (from cart)

    Frequently viewed together (frequentViewed)

    Product detail page

    detail

    click

    Popular items (Bought) (popularBought)

    Home page / No results page

    purchase

    refund

    Popular items (Viewed) (popularViewed)

    Home page / No results page

    detail

    click

    User recommender (user)

    Home page

    detail

    purchase

    refund

    add (to cart)

    remove (from cart)

Important

If there are less than 100 events available for your PR model, the model is empty and doesn’t provide recommendations. With 100 events or more, your model starts to learn and improve.

Create a PR model

  1. Depending on whether models have already been created in your Coveo organization:

  2. Click Next.

  3. (Optional) In the Learning interval section, you can change the default and recommended Data period and Building frequency.

  4. Click Next.

  5. (Optional) In the Apply filters on dataset section, you can add filters to refine the data that the model uses to make its recommendations. By narrowing down the dataset that a model uses, you can better customize relevancy for specific user groups and use cases. You can apply filters on all events, or on every event that belongs to a specific category, such as search, click, view, or custom events.

    Example

    You want your PR model to return recommendations that pertain to a specific user group, so you add a data filter to ensure that only a specific set of analytics are used by the model for training purposes.

    1. In the Select a dimension dropdown menu, select the dimension on which you want to base the learning of the model.

    2. In the Select an operator dropdown menu, select the appropriate operator.

    3. In the Select value(s) dropdown menu, add, type, or select the appropriate value.

    4. You can optionally add other filters by clicking Add.

  6. Click Next.

  7. In the Name your model input, enter a meaningful display name for the model, and then click Start building.

    Note

    On the Models (platform-ca | platform-eu | platform-au) page, under the Status column, in the model row, the value is most probably Inactive.

    The model value will change to Active when the model creation is complete (typically within 30 minutes, depending on the amount of usage analytics data to process). The model can only return recommendations when its status is Active.

    For more information on Coveo ML model statuses, see the Status column reference.

  8. (Optional) If you want to specify advanced parameters for your model, you can use the Advanced tab of the model configuration.

  9. You can then associate the model with a pipeline to take advantage of the model in a search interface.

    Important

    Make sure to follow the model association leading practices before associating your model with your production query pipeline.

Tip

If you have the Enterprise edition, group this PR model and your other implementation resources together in a project. See Manage projects.

Edit a PR model

  1. On the Models (platform-ca | platform-eu | platform-au) page, click the model you want to edit, and then click Edit in the Action bar.

  2. On the subpage that opens, select the Configuration tab.

  3. Under Name, you can optionally edit the model’s display name.

  4. (Optional) In the Learning interval section, you can change the default and recommended Data period and Building frequency.

  5. (Optional) In the Apply filters on dataset section, you can add filters to refine the data that the model uses to make its recommendations. By narrowing down the dataset that a model uses, you can better customize relevancy for specific user groups and use cases. You can apply filters on all events, or on every event that belongs to a specific category, such as search, click, view, or custom events.

    Example

    You want your PR model to return recommendations that pertain to a specific user group, so you add a data filter to ensure that only a specific set of analytics are used by the model for training purposes.

    1. In the Select a dimension dropdown menu, select the dimension on which you want to base the learning of the model.

    2. In the Select an operator dropdown menu, select the appropriate operator.

    3. In the Select value(s) dropdown menu, add, type, or select the appropriate value.

    4. You can optionally add other filters by clicking Add.

  6. Click Save.

  7. On the Models (platform-ca | platform-eu | platform-au) page, under the Status column, in the model row, the value is most probably Updating.

    Note

    The model value will change to Active when the model edition is complete (typically within 30 minutes, depending on the amount of usage analytics data to process). The model can only return recommendations when its status is Active.

    For more information on Coveo ML model statuses, see the Status column reference.

  8. You can then associate the model with a pipeline to take advantage of the model in a search interface.

    Important

    Make sure to follow the model association leading practices before associating your model with your production query pipeline.

Edit a PR model JSON configuration

  1. Access the Models (platform-ca | platform-eu | platform-au) page.

  2. Click the desired model, and then click More > Edit JSON in the Action bar.

  3. In the Edit a Model JSON Configuration panel that appears, modify the existing model configuration:

    {
      "modelDisplayName": "<MODEL_DISPLAY_NAME>",
      "exportPeriod": "<EXPORT_PERIOD>",
      "intervalTime": <INTERVAL_TIME>,
      "intervalUnit": "<INTERVAL_UNIT>",
      "commonFilter": "<COMMON_FILTER>",
      "customEventFilter": "<CUSTOM_EVENT_FILTER>",
      "exportOffset": "<EXPORT_OFF_SET>",
      "searchEventFilter": "<SEARCH_EVENT_FILTER>",
      "viewEventFilter": "<VIEW_EVENT_FILTER>",
      "extraConfig": [<ADVANCED_ML_PARAMETERS>],
    }

    Where:

    • modelDisplayName (string) is the name of the model appearing on the Models (platform-ca | platform-eu | platform-au) page.

    • exportPeriod (ISO-8601 string, required) is the period defining the age of the usage analytics data used to build the model. Must be in the ISO8601 period format (that is, PyYmMwWdDThHmMsS).

      Note

      Unless an exportOffset is specified, the exportPeriod uses the moment when the model was generated as a base.

    • intervalTime (integer, required) is the number of intervalUnit (that is, DAY, WEEK, or MONTH) between each update of the model. Must be between 1 and 30 inclusively.

    • intervalUnit (string enum, required) is the duration unit of the interval between each update of the model. See intervalTime. Accepted values are: DAY, WEEK, and MONTH.

    • commonFilter (string) is the filter to apply to the common event dimensions (shared by all event types) in the export. Multiple filter parameters are joined with the AND operator.

    • customEventFilter (string) is the filter to apply to the custom event dimensions in the export. Multiple filter parameters are joined with the AND operator.

    • exportOffset (ISO-8601 string) is the offset of the usage analytics data used to build the model. Must be in the ISO8601 period format (that is, PyYmMwWdDThHmMsS). The default value is PT0S, meaning that all events are considered when building a model (the exportPeriod is based on the moment the model was generated).

      Example

      You want to ignore events that occur on the current day, so you set the exportOffset value to P1D.

    • searchEventFilter (string) is the filter to apply to the click and search event dimensions in the export. Multiple filter parameters are joined with the AND operator.

    • viewEventFilter (string) is the filter to apply to the view event dimensions (shared by all event types) in the export. Multiple filter parameters are joined with the AND operator.

    • extraConfig (array of string) are additional advanced parameters used to tailor the model to your use case.

  4. Click Save to apply your changes.

Delete a PR model

Important

You must dissociate a model from all its associated query pipelines before deleting it. Models aren’t automatically dissociated from pipelines when they’re deleted.

  1. On the Models (platform-ca | platform-eu | platform-au) page, click the ML model that you want to delete, and then click More > Delete in the Action bar.

  2. In the Delete a Model panel that appears, click Delete model.

Review active model information

On the Models (platform-ca | platform-eu | platform-au) page, click the desired model (must be Active), and then click Open in the Action bar (see Reviewing Coveo Machine Learning model information).

Reference

"Status" column

On the Models (platform-ca | platform-eu | platform-au) page of the Administration Console, the Status column indicates the current state of your Coveo ML models.

The following table lists the possible model statuses and their definitions:

Status Definition Status icon

Active

The model is active and available.

check-circle

Build in progress

The model is currently building.

target16px

Inactive

The model isn’t ready to be queried, such as when a model was recently created or the organization is offline.
Click See more details for additional information (see Review model information).

warningtriangle

Limited

Build issues exist that may affect model performance.
Click See more details for additional information (see Review model information).

warningtriangle

No query pipeline

The model isn’t associated with a query pipeline.
Click Associate with a query pipeline to go to the Query Pipelines page.

warningtriangle

No case assist configuration

The model isn’t associated with a case assist configuration.
Click Associate with a case assist configuration to go to the Case Assist page.

warningtriangle

Soon to be archived

The model will soon be archived because it hasn’t been queried for an extended period of time.
Click Delete to remove the model.
Learn more about archived models.

warningtriangle

Error

An error prevented the model from being built successfully.
If it’s a temporary system error, check back soon. Otherwise, click See more details for additional information (see Review model information).

critical

Archived

The model was archived because it hasn’t been queried for at least 30 days.
Click Delete to remove the model.
Learn more about archived models.

n/a

“Learning Interval” section

In the Learning interval section, you can modify the following:

  • Data period: The usage analytics data time interval on which the model will be based.

  • Building frequency: The rate at which the model is retrained.

Set the Coveo ML model training Building frequency based on the Data Period value. Less frequent for a larger Data Period and more frequent for a smaller Data Period as recommended in the following table.

Data period

Building frequency

Daily

Weekly

Monthly

1 month

check

check

3 months (Recommended)

check

6 months

check

The more data the model has access to and learns from, the better the recommendations. As a general guide, a usage analytics dataset of 10,000 queries or more typically allows a Coveo ML model to provide very relevant recommendations. You can look at your Coveo Usage Analytics (Coveo UA) data to evaluate the volume of queries on your search hub, and ensure that your Coveo ML models are configured with a training Data period that corresponds to at least 10,000 queries. When your search hub serves a very high volume of queries, you can consider reducing the data period so that the model learns only more recent user behavior and be more responsive to trends.

A Coveo ML model regularly retrains on a more recent Coveo UA dataset, as determined by the Building frequency and Data period settings, to ensure that the model remains up-to-date with the most recent user behavior.

Note

If you’re testing the model in a sandbox environment in which very little analytics data is available to train the model, you can activate the Test configuration mode advanced option to ensure the model provides recommendations.

Required privileges

By default, members with the required privileges can view and edit elements of the Models (platform-ca | platform-eu | platform-au) page.

The following table indicates the privileges required to use elements of the Models page and associated panels (see Manage privileges and Privilege reference).

Action Service - Domain Required access level

View models

Machine Learning - Models
Organization - Organization
Search - Query pipelines

View

Edit models

Organization - Organization
Search - Query pipelines

View

Machine Learning - Models

Edit