---
title: Associate an Intent-Aware Product Ranking model with a query pipeline
slug: na4f0342
canonical_url: https://docs.coveo.com/en/na4f0342/
collection: coveo-for-commerce
source_format: adoc
---
# Associate an Intent-Aware Product Ranking model with a query pipeline

When a [Coveo Machine Learning (Coveo ML)](https://docs.coveo.com/en/188.md) [model](https://docs.coveo.com/en/1012.md) has been created, it must be associated with a [query pipeline](https://docs.coveo.com/en/180.md) to be effective in a [search interface](https://docs.coveo.com/en/2741.md).

[organization](https://docs.coveo.com/en/185.md) [members](https://docs.coveo.com/en/2869.md) with the [required privileges](#required-privileges) can access the **Machine learning** tab of a query pipeline configuration page to manage Coveo ML model associations for that query pipeline.

## Leading practices

## Test the model efficiency

Once you've created a Coveo ML IAPR model, the leading practice is to test the model performance by doing an [A/B test](https://docs.coveo.com/en/3255.md).

This allows you to test the model on a chosen proportion of the traffic passing through a given query pipeline.
You can then assess the impact of the model by comparing the query pipeline [search performance metrics](https://docs.coveo.com/en/3255.md#key-performance-indicators-section) with and without the model.

Once satisfied with the model efficiency, you can [stop the A/B test](https://docs.coveo.com/en/3255.md#stop-an-ab-test) to make the model effective for all the traffic passing through the query pipeline.

:leveloffset!:

## Associate an IAPR model

> **Important**
>
> Follow the [model association leading practices](https://docs.coveo.com/en/na4f0342.md#leading-practices) when associating your model with your query pipeline.

1. On the [**Query Pipelines**](https://platform.cloud.coveo.com/admin/#/orgid/search/pipelines/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/pipelines/)) page, click the query pipeline for which you want to associate the model, and then click **Edit components** in the Action bar.

1. On the subpage that opens, select the **Machine learning** tab, and then in the upper-right corner, click **Associate model**.

1. In the **Model** dropdown menu, select the desired model.

1. On the right side, under **Condition**, you can select a [query pipeline condition](https://docs.coveo.com/en/2793.md) in the dropdown menu or [create a new one](https://docs.coveo.com/en/1959.md#create-a-condition).

   > **Important**
   >
   > A model association condition has a maximum size limit of 1000 characters.
   > If a condition exceeds this limit, you'll encounter an error when editing the model.
   > When this happens, you can't remove the condition from the **Edit a model association** panel.
   >
   > To resolve the error when editing a model association, do one of the following:
   >
   > * To remove the condition from the model association:
   >
   > .. If you're not already in the **Edit a model association** panel, on the [**Query Pipelines**](https://platform.cloud.coveo.com/admin/#/orgid/search/pipelines/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/pipelines/)) page, double-click the query pipeline, and then double-click the model association on the **Machine learning** tab.
   > .. Click [dots], and then click **Switch to JSON view**.
   > .. Remove the `condition` and `conditionDefinition` properties from the configuration.
   > .. Click **Save**.
   >
   > * To modify the condition:
   > .. On the [Conditions](https://docs.coveo.com/en/1959.md#edit-a-condition) page, select the condition that exceeds 1000 characters.
   > .. Click **Edit** in the Action bar, and then modify the condition configuration so it's under 1000 characters.
   > .. Click **Save**.

1. Click **Associate model**.

## Edit an IAPR model association

> **Important**
>
> Follow the [model association leading practices](https://docs.coveo.com/en/na4f0342.md#leading-practices) when associating your model with your query pipeline.

1. On the [**Query Pipelines**](https://platform.cloud.coveo.com/admin/#/orgid/search/pipelines/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/pipelines/)) page, click the query pipeline for which you want to edit a model association, and then click **Edit components** in the Action bar.

1. On the subpage that opens, select the **Machine learning** tab, click the desired model, and then click **Edit** in the Action bar.

1. On the right side, under **Condition**, you can select a [query pipeline condition](https://docs.coveo.com/en/2793.md) in the dropdown menu or [create a new one](https://docs.coveo.com/en/1959.md#create-a-condition).

   > **Important**
   >
   > A model association condition has a maximum size limit of 1000 characters.
   > If a condition exceeds this limit, you'll encounter an error when editing the model.
   > When this happens, you can't remove the condition from the **Edit a model association** panel.
   >
   > To resolve the error when editing a model association, do one of the following:
   >
   > * To remove the condition from the model association:
   >
   > .. If you're not already in the **Edit a model association** panel, on the [**Query Pipelines**](https://platform.cloud.coveo.com/admin/#/orgid/search/pipelines/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/pipelines/)) page, double-click the query pipeline, and then double-click the model association on the **Machine learning** tab.
   > .. Click [dots], and then click **Switch to JSON view**.
   > .. Remove the `condition` and `conditionDefinition` properties from the configuration.
   > .. Click **Save**.
   >
   > * To modify the condition:
   > .. On the [Conditions](https://docs.coveo.com/en/1959.md#edit-a-condition) page, select the condition that exceeds 1000 characters.
   > .. Click **Edit** in the Action bar, and then modify the condition configuration so it's under 1000 characters.
   > .. Click **Save**.

1. Click **Save**.

## Dissociate a model

1. On the [**Query Pipelines**](https://platform.cloud.coveo.com/admin/#/orgid/search/pipelines/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/pipelines/)) page, click the query pipeline from which you want to dissociate a model, and then click **Edit components** in the Action bar.

1. On the subpage that opens, select the **Machine learning** tab.

1. Click the model you want to dissociate from the pipeline, and then click **Dissociate** in the Action bar.

## Reorder model associations

The order in which [models](https://docs.coveo.com/en/1012.md) appear in the query pipeline **Machine learning** tab is only relevant when multiple models of the same type are present.
If there are no duplicate model types in the list, the model order has no effect and each model will either execute or not based on its individual condition.

However, when multiple models of the same type are present, the models are evaluated sequentially from top to bottom.
Models of a given type are evaluated one after another.
The first model of a given type is evaluated and executes only if its condition is satisfied.
Evaluation then continues with each subsequent model of the same type following the same rules.
This can result in multiple models of the same type being executed for the same query.
The order in which they execute is determined by their order in the list, with each model potentially overriding the effect of the previous model of the same type.

To reorder model associations in a query pipeline

1. On the [**Query Pipelines**](https://platform.cloud.coveo.com/admin/#/orgid/search/pipelines/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/pipelines/)) page, click the query pipeline in which you want to reorder model associations, and then click **Edit components** in the Action bar.

1. On the subpage that opens, select the **Machine learning** tab.

1. Click the model whose position you want to change, and then use the **Move up** or **Move down** arrows in the Action bar to change the position of the model.

## Required privileges

By default, members with the [required privileges](https://docs.coveo.com/en/1832.md#required-privileges) can view and edit elements of the [**Models**](https://platform.cloud.coveo.com/admin/#/orgid/ai-and-ml/models/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/ai-and-ml/models/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/ai-and-ml/models/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/ai-and-ml/models/)) page.

The following table indicates the privileges required to use elements of the **Models** page and associated panels (see [Manage privileges](https://docs.coveo.com/en/3151.md) and [Privilege reference](https://docs.coveo.com/en/1707.md)).

| Action | Service | Domain | Required access level | View model associations | Machine Learning | Models | View |
|---|---|---|---|---|---|---|---|
| Organization | Organization | View |  | View model associations |  |  |  |
| Search | Query pipelines | View |  | View model associations |  |  |  |
| Edit model associations | Machine Learning | Models | View |  |  |  |  |
| Edit model associations | Organization | Organization | View |  |  |  |  |
| Edit model associations | Search | Query pipelines | Edit |  |  |  |  |
