--- title: Associate a Dynamic Navigation Experience (DNE) model with a query pipeline slug: l1qf4156 canonical_url: https://docs.coveo.com/en/l1qf4156/ collection: leverage-machine-learning source_format: adoc --- # Associate a Dynamic Navigation Experience (DNE) 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 DNE 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/). ## Plan the usage of custom contexts While Coveo ML models can perform well without custom [context](https://docs.coveo.com/en/1345/) information, using custom contexts can take Coveo ML relevance one step further. You can [define custom contexts](https://docs.coveo.com/en/3389/) and then pass appropriate ones along with [Coveo Analytics events](https://docs.coveo.com/en/260/) and [queries](https://docs.coveo.com/en/231/) to allow Coveo ML to take them into account. > **Notes** > > * Custom context support is limited under the new [Event Protocol](https://docs.coveo.com/en/o88d0509#custom-context). > * If you're just getting started with Coveo ML, you can skip this step to take advantage of Coveo ML model types more quickly and easily, and consider using custom contexts in a second phase. :leveloffset!: ## Associate a DNE model > **Important** > > Follow the [model association leading practices](https://docs.coveo.com/en/l1qf4156#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). . In the **Advanced Configuration** section, you can optionally tune the following parameters: ** [Facet ordering](https://docs.coveo.com/en/l1qf4156#facet-ordering) ** [Facet value ordering](https://docs.coveo.com/en/l1qf4156#facet-value-ordering) ** [Facet value selection](https://docs.coveo.com/en/l1qf4156#facet-value-selection) ** [Ranking boost](https://docs.coveo.com/en/l1qf4156#ranking-boost) . Click **Associate model**. > **Important** > > When the DNE model has been associated with a query pipeline, make sure that the search interfaces in which you want to [deploy the model](https://docs.coveo.com/en/2918/) use [dynamic facets](https://docs.coveo.com/en/2918#step-2-configure-dynamic-facets-in-your-search-interface). ## Edit a DNE model association > **Important** > > Follow the [model association leading practices](https://docs.coveo.com/en/l1qf4156#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). . In the **Advanced Configuration** section, you can optionally tune the following parameters: ** [Facet ordering](https://docs.coveo.com/en/l1qf4156#facet-ordering) ** [Facet value ordering](https://docs.coveo.com/en/l1qf4156#facet-value-ordering) ** [Facet value selection](https://docs.coveo.com/en/l1qf4156#facet-value-selection) ** [Ranking boost](https://docs.coveo.com/en/l1qf4156#ranking-boost) . Click **Save**. > **Important** > > When the DNE model has been associated with a query pipeline, make sure that the search interfaces in which you want to [deploy the model](https://docs.coveo.com/en/2918/) use [dynamic facets](https://docs.coveo.com/en/2918#step-2-configure-dynamic-facets-in-your-search-interface). ## Associate a DNE model via a JSON configuration Advanced users may want to manage a model association via a JSON configuration to specify [association parameters](https://docs.coveo.com/en//3396/) that don't fit with the parameters available in the [Administration Console](https://docs.coveo.com/en/183/). . 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 a 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 [dots], and select **Associate a model in JSON view**. . On the **Associate a Model** subpage, in JSON view, replace the `` placeholder with the actual `ID` of the model you want to associate with the pipeline (see [Review model information](https://docs.coveo.com/en/1894/)). . Click **Associate model**. When the DNE model has been associated with a query pipeline, make sure that the search interfaces in which you want to [deploy the model](https://docs.coveo.com/en/2918/) use [dynamic facets](https://docs.coveo.com/en/2918#step-2-configure-dynamic-facets-in-your-search-interface). ## Edit a DNE model association via a JSON configuration Advanced users may want to manage a model association via a JSON configuration to specify [association parameters](https://docs.coveo.com/en//3396/) that don't fit with the parameters available in the [Administration Console](https://docs.coveo.com/en/183/). . 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 **Machine learning** tab, double-click the desired model. . If the **Edit a Model Association** subpage opens in JSON view, proceed to the next step. Otherwise, in the upper-right corner, click [dots], click **Switch to JSON view**, and then click **Switch to JSON view** in the confirmation window. . On the **Edit a Model Association** subpage, in JSON view, tune the JSON model association configuration as needed (see [Model association parameters](https://docs.coveo.com/en//3396/)). . Click **Save**. When the DNE model has been associated with a query pipeline, make sure that the search interfaces in which you want to [deploy the model](https://docs.coveo.com/en/2918/) use [dynamic facets](https://docs.coveo.com/en/2918#step-2-configure-dynamic-facets-in-your-search-interface). ## 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. ## Reference ### DNE advanced configuration options #### Facet ordering Specifies whether to enable facet ordering for this model association. This checkbox is selected by default because it's typically desirable for DNE models to display the most relevant facets first. You can however deselect this checkbox if you want to take advantage of the other DNE model options, without having your facets automatically ranked. #### Facet value ordering Specifies whether to enable facet value ordering for this model association. This checkbox is selected by default because it's typically desirable for DNE models to display the most relevant facet values within a given facet first. You can however deselect this checkbox if you want to take advantage of the other DNE model options, without having your facet values automatically ranked. #### Facet value selection Specifies whether to enable automatic selection of facet values for this model association. This checkbox is selected by default for models with the automatic selection of facet values enabled. (This checkbox is grayed and irresponsive for DNE models that don't have the [facet autoselect)(https://docs.coveo.com/en/3396#facet-autoselect-section) option configured.] When this option is selected, the fields to which the automatic selection of facet values is applied are displayed underneath. You can however deselect this checkbox if you don't want the automatic selection of facet values to apply for this model association. #### Ranking boost Specifies whether to enable ranking boost for items that match facet values determined as relevant by the model. This checkbox is selected by default because it's typically desirable for DNE models to boost items that match facet values determined as relevant by the model. You can however: * Deselect this checkbox if you want to take advantage of the other DNE model options, without having search results that correspond to relevant facets boosted. * Adjust the default boosting value applied to items matching relevant facet values. > **Notes** > > * When a result item is boosted by a DNE model, the [`rankingModifier`](https://docs.coveo.com/en/13#operation/searchUsingPost-response-results-rankingModifier) query response property takes the `Coveo DNE` value. > > * Increasing the ranking modifier above the recommended value can considerably alter your search results. ### Model association parameters You can use the following parameters when creating or editing a Coveo ML pass:q,a[DNE] model association. ## `id` (string) The unique identifier of the model association (automatically generated by the Coveo Search API). **Example**: `62579f33-a505-4d07-b77d-545aefb2eea1` ## `position` (integer [int32]) The position of the model in the order of execution (see [Reorder model associations](#reorder-model-associations)). **Example**: `8` ## `modelId` (string) The unique identifier of the model (see [Review model information](https://docs.coveo.com/en/1894/)). **Example**: `c7ab60e2-e6b8-41e8-be6a-ad5c8edc662e` ## `modelDisplayName` (string) The name of the model as selected when [creating the model](https://docs.coveo.com/en/3396/). This field is automatically filled with the name of the Coveo ML model. **Example**: `MyModelName` ## `modelEngine` (string) The ID of the Coveo ML model. This field is automatically filled with the ID of the Coveo ML model. **Example**: `pass:q,a[facetsense]` ## `modelStatus` (string) The [status](https://docs.coveo.com/en/3396#status-column) of the model. This field is automatically generated according to the current ML model status. **Example**: `ONLINE` ## `condition` (string) The unique identifier of the [condition](https://docs.coveo.com/en/2793/) that must be satisfied for a request to be processed by the ML model. **Example**: `c7ab60e2-e6b8-41e8-be6a-ad5c8edc662e` ## `conditionDefinition` (string) The QPL expression that indicates the condition defined for the model association (see [Query Pipeline Language (QPL)](https://docs.coveo.com/en/1449/)). This field is automatically filled when a [`condition`](#condition-string) is specified. **Example**: `when $searchHub is \"internalSearch\"` ## `cacheMaximumAge` (string) The maximum age of cached [query](https://docs.coveo.com/en/231/) results the ML model should accept, in the [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Time_intervals) format only including the seconds and milliseconds part. For each incoming query to be processed by the ML model, if a result set for an identical previously made query is available in the cache and this result set isn't older than the specified value, the ML model makes recommendations based on that cached query result set. Otherwise, the query is executed against the index. **Default**: `PT105` ## `locale` (string) The locale of the current user. Adding a `locale` parameter to a model association allows Coveo ML to provide more relevant recommendations by taking into account the user's language and regional preferences. **Example** The `locale` for a user in the United States would be: `en-US`. ## `rankingModifier` (integer [int32]) [[DNE]] The ranking score modifier the ML model should apply to each search result that matches relevant facet values (see [Ranking boost](https://docs.coveo.com/en/l1qf4156#ranking-boost)). The rankingModifier value must be a number between 5 and 100 (for example, `75`). **Default**: `50` ## `customQueryParameters` (JValue (object)) A JSON object representing the [additional parameters](https://docs.coveo.com/en/13#operation/searchUsingPost-mlParameters) to send to Coveo ML on all queries. This object allows you to specify the [`facetAutoSelect`](https://docs.coveo.com/en/l1qf4156#facetautoselect-boolean), [`facetOrdering`](https://docs.coveo.com/en/l1qf4156#facetordering-boolean), [`facetValueOrdering`](https://docs.coveo.com/en/l1qf4156#facetvalueordering-boolean), and [`rankingBoost`](https://docs.coveo.com/en/l1qf4156#rankingboost-boolean) DNE model association parameters. ### `facetAutoSelect` (boolean) Whether to enable automatic selection of facet values for this model association. **Default**: * `true` for DNE models with the [**Facet autoselect**](https://docs.coveo.com/en/3396#facet-autoselect-section) option enabled. * `false` for DNE models with the [**Facet autoselect**](https://docs.coveo.com/en/3396#facet-autoselect-section) option disabled. ### `facetOrdering` (boolean) Whether the model influences [facet](https://docs.coveo.com/en/198/) ordering according to the user query (see [Facet ordering](https://docs.coveo.com/en/l1qf4156#facet-ordering)). **Default**: `true` #### `maxRecommendations` (integer [int32]) The maximum number of facets that the model can expand and order when the [`facetOrdering`](https://docs.coveo.com/en/l1qf4156#facetordering-boolean) parameter is set to `true`. **Default**: `4` ### `facetValueOrdering` (boolean) Whether the model influences facet values ordering according to the user query (see [Facet value ordering](https://docs.coveo.com/en/l1qf4156#facet-value-ordering)). **Default**: `true` #### `maxRecommendations` (integer [int32]) The maximum number of facet values that the model can expand and order within a facet when the [`facetValueOrdering`](#facetvalueordering-boolean) parameter is set to `true`. **Default**: `8` ### `rankingBoost` (boolean) Whether the search results matching relevant facet values are boosted (see [Ranking boost](https://docs.coveo.com/en/l1qf4156#ranking-boost)). > **Note** > > If set to `false`, the boost specified in the [`rankingModifier`](https://docs.coveo.com/en/l1qf4156#DNE) parameter isn't applied. **Default**: `true` :leveloffset!: ### Code sample The following code sample shows a [DNE](https://docs.coveo.com/en/2907/) model association configuration in JSON: ```json { "position": 1, "modelId": "XXXXXX_facetsense_XXXXXXXX_XXXX_XXXX_XXXX_XXXXXXXXXXXX", "condition": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "rankingModifier": 75, "customQueryParameters": { "facetOrdering": { "isEnabled": true }, "facetValueOrdering": { "isEnabled": true }, "rankingBoost": { "isEnabled": true } }, "useAdvancedConfiguration": true } ``` For complete information on DNE model available association parameters, see [DNE model association parameters reference](https://docs.coveo.com/en/l1qf4156#model-association-parameters). ## 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 |===