Coveo Machine Learning Content Recommendations Deployment Overview

The output of a Coveo Machine Learning (Coveo ML) Content Recommendations (CR) model depends on the history of recent user actions and recorded Coveo Usage Analytics (Coveo UA) search, click, and view events (see About Content Recommendations).

More usage analytics data provides better recommendations, so you should start sending view events to Coveo UA as soon as possible (see How Long Do Coveo ML Models Take to Start Improving Relevance?).

In a technical documentation site, you could add a People Also Viewed recommendation interface to complement the table of contents and suggest articles which are frequently viewed by other users with similar session navigation history. A Recommended Articles component is rendered at the bottom of each article (including this one) on

Deploying Coveo Machine Learning Content Recommendations (CR)

  1. Optionally, plan the types of content to recommend:

    A Coveo ML CR model can be configured to learn only from usage analytics events pertaining to one or several specific types of content. Therefore, unless you want to create a model that outputs generic recommendations, you should plan ahead.

    You want to design a Recommended Articles interface, and a Recommended Courses interface.

    You determine that the Recommended Articles interface should only take the KBArticle content type into account, whereas the Recommended Courses interface should take the TrainingVideo or InteractiveTutorial content types into account.

  2. Optionally, plan the contextual user information to leverage:

    You can determine what contextual user information is relevant to your use-case, and send this data along with each usage analytics event and query to allow your Coveo ML Content Recommendations model to further personalize its output (see About Custom Context).

    You want the output of your recommendation interfaces to be tailored to the products owned by the end user.

    You determine that you should leverage this contextual user information.

  3. Get an access token:

    You need an access token granting limited privileges to:

    Depending on your use case, you can use either:

    See also Choose and Implement a Search Authentication Method.

  4. Send usage analytics events:

    1. Send view events.

      As soon as possible, use the coveoua.js script to start recording usage analytics view events in the web pages which correspond to the indexed items you want to be able to recommend (see Sending Usage Analytics View Events).

    2. Send search and click events.

      Coveo ML CR models can also learn from search and click events originating from other search interfaces configured against the same Coveo organization. Ensure that all of your search pages are properly configured to send standard usage analytics events (see Get Started With Coveo Usage Analytics).

  5. Create a Coveo ML CR model and associate it with a CR-dedicated query pipeline.

    • Use a query pipeline dedicated to CR models to ensure that other search optimization features, such as Coveo ML Automatic Relevance Tuning (ART) or query ranking expressions (QRE), don’t interfere with the output of the CR models.

    • When you want to power distinct recommendation interfaces (e.g., Recommended Technical Articles, Recommended Experts, Recommended Courses, etc.), configure a separate model for each planned interface. Associate them all with the same CR-dedicated query pipeline and add a specific condition to each model.

    Don’t use the Default query pipeline for your CR model. Otherwise, all search interfaces routing their queries to the Default pipeline will essentially break.

    1. In the Coveo Administration Console, access your CR-dedicated query pipeline, or create one.

    2. Create a CR model.

    3. Associate the CR model with your query pipeline, optionally with a condition.

  6. Include a recommendation interface in your web pages.

    Coveo JavaScript Search Framework 1.667.24 (July 2016) The Coveo JavaScript Search Framework offers a Recommendation component that you can configure in your web pages to create one or more recommendation interfaces (see Integrating a Coveo Recommendation Interface in a Web Page).

    For a Recommendations widget in a ServiceNow service portal, see Configure a Recommendations Panel.

What’s Next?

You may now want to have a look at an actual code sample to consolidate your understanding of the Coveo ML CR deployment process in a website.