--- title: Associate a Predictive Query Suggestion (PQS) model with a query pipeline slug: lcfm0406 canonical_url: https://docs.coveo.com/en/lcfm0406/ collection: coveo-for-commerce source_format: adoc --- # Associate a Predictive Query Suggestion (PQS) model with a query pipeline When a [Coveo Machine Learning (Coveo ML)](https://docs.coveo.com/en/188/) [model](https://docs.coveo.com/en/1012/) has been created, it must be associated with a [query pipeline](https://docs.coveo.com/en/180/) to be effective in a [search interface](https://docs.coveo.com/en/2741/). [organization](https://docs.coveo.com/en/185/) [members](https://docs.coveo.com/en/2869/) 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 PQS model, the leading practice is to test the model performance by doing an [A/B test](https://docs.coveo.com/en/3255/). 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#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#stop-an-ab-test) to make the model effective for all the traffic passing through the query pipeline. ## Validate that the model is effective To validate that your Coveo ML models work as expected, you can [inspect your models](https://docs.coveo.com/en/mc2g0297/). :leveloffset!: ## Associate a PQS model > **Important** > > Follow the [model association leading practices](https://docs.coveo.com/en/lcfm0406#leading-practices) when associating your model with your query pipeline. . 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. . On the subpage that opens, select the **Machine learning** tab, and then in the upper-right corner, click **Associate model**. . In the **Model** dropdown menu, select the desired model. . On the right side, under **Condition**, you can select a [query pipeline condition](https://docs.coveo.com/en/2793/) in the dropdown menu or [create a new one](https://docs.coveo.com/en/1959#create-a-condition). . Click **Associate model**. ## Edit a PQS model association > **Important** > > Follow the [model association leading practices](https://docs.coveo.com/en/lcfm0406#leading-practices) when associating your model with your query pipeline. . 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. . On the subpage that opens, select the **Machine learning** tab, click the desired model, and then click **Edit** in the Action bar. . On the right side, under **Condition**, you can select a [query pipeline condition](https://docs.coveo.com/en/2793/) in the dropdown menu or [create a new one](https://docs.coveo.com/en/1959#create-a-condition). . Click **Save**. ## Dissociate a model . 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. . On the subpage that opens, select the **Machine learning** tab. . 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/) 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 as 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. The first model with a satisfied condition is executed, and all subsequent models of the same type are ignored. To reorder model associations in a query pipeline . 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. . On the subpage that opens, select the **Machine learning** tab. . 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#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/) and [Privilege reference](https://docs.coveo.com/en/1707/)). [cols="3",options="header"] |=== |Action |Service - Domain |Required access level |View model associations |Machine Learning - Models Organization - Organization Search - Query pipelines |View .2+|Edit model associations |Organization - Organization Machine Learning - Models |View |Search - Query pipelines |Edit |===