--- title: Optimize query pipelines and machine learning for IPX slug: n4c90194 canonical_url: https://docs.coveo.com/en/n4c90194/ collection: coveo-in-product-experience source_format: adoc --- # Optimize query pipelines and machine learning for IPX When you [create an IPX search interface](https://docs.coveo.com/en/3160/), two [query pipelines](https://docs.coveo.com/en/180/) are also created for your IPX configuration. The [query pipelines](https://docs.coveo.com/en/180/) and [models](https://docs.coveo.com/en/1012/) are created using default settings, and are fully functional with your IPX configuration. However, Coveo highly recommends that you [optimize the query pipelines](#optimize-your-IPX-query-pipelines) to enhance the user experience. Additionally, the minimum recommended [Coveo Machine Learning (Coveo ML)](https://docs.coveo.com/en/188/) [models](https://docs.coveo.com/en/1012/) for each [query pipeline](https://docs.coveo.com/en/180/) are also created and associated with the corresponding query pipeline. This helps increase the relevance of search results and enhances the overall search experience. ## Optimize your IPX query pipelines This section details how to optimize the [query pipelines that are automatically configured](#automatic-query-pipeline-configuration) for your IPX search interface. The following [query pipelines](https://docs.coveo.com/en/180/) and [Coveo Machine Learning (Coveo ML)](https://docs.coveo.com/en/188/) [models](https://docs.coveo.com/en/1012/) are automatically created for each IPX search interface: * A [**_search_** query pipeline](#search-query-pipeline) with an associated [Automatic Relevance Tuning (ART)](https://docs.coveo.com/en/1013/) [model](https://docs.coveo.com/en/1012/) and [Query Suggestion (QS)](https://docs.coveo.com/en/1015/) [model](https://docs.coveo.com/en/1012/). * A [**_recommendation_** query pipeline](#recommendation-query-pipeline) with an associated [IPX Recommendation (IPXRECS)](https://docs.coveo.com/en/p6hh0418/) [model](https://docs.coveo.com/en/1012/). > **Note** > > The recommendation [query pipeline](https://docs.coveo.com/en/180/) and the associated [IPXRECS](https://docs.coveo.com/en/p6hh0418/) [model](https://docs.coveo.com/en/1012/) are already fully optimized for use with the IPX search interface. > No further optimization is required. ### Search query pipeline The **_search_** [query pipeline](https://docs.coveo.com/en/180/) is the main [query pipeline](https://docs.coveo.com/en/180/) for your IPX search interface. It's used to process user [queries](https://docs.coveo.com/en/231/) from your IPX search interface to provide enhanced relevancy of search results. Queries routed through this [query pipeline](https://docs.coveo.com/en/180/) are modified and processed according to the query pipeline [rules](https://docs.coveo.com/en/236/) and assigned [Coveo Machine Learning (Coveo ML)](https://docs.coveo.com/en/188/) [models](https://docs.coveo.com/en/1012/). As such, you should modify the default configuration of the **_search_** [query pipeline](https://docs.coveo.com/en/180/) to add additional [models](https://docs.coveo.com/en/1012/) and to configure relevance tuning [rules](https://docs.coveo.com/en/236/), such as [thesaurus](https://docs.coveo.com/en/2742/) and ranking weight rules. #### Optimization recommendations The **_search_** [query pipeline](https://docs.coveo.com/en/180/) created for IPX already includes an [Automatic Relevance Tuning (ART)](https://docs.coveo.com/en/1013/) [model](https://docs.coveo.com/en/1012/) and [Query Suggestion (QS)](https://docs.coveo.com/en/1015/) [model](https://docs.coveo.com/en/1012/). For the best user experience, you should consider the following modifications: > **Note** > > * [RGA](https://docs.coveo.com/en/nbtb6010/) and Smart Snippets aren't supported in the same IPX interface. > You must choose to use one or the other. * [Edit](https://docs.coveo.com/en/3397#edit-an-art-model) the associated ART model. * [Edit](https://docs.coveo.com/en/3398#edit-a-qs-model) the associated QS model. * [Create](https://docs.coveo.com/en/nb6a0085#create-an-rga-model) a [Relevance Generative Answering (RGA)](https://docs.coveo.com/en/nbtb6010/) model, [associate the model](https://docs.coveo.com/en/nb6a0104/) with the **_search_** [query pipeline](https://docs.coveo.com/en/180/), and [enable](https://docs.coveo.com/en/3160#enable-relevance-generative-answering-rga) [RGA](https://docs.coveo.com/en/nbtb6010/) in the IPX search interface. * [Create](https://docs.coveo.com/en/l6he0424#create-a-smart-snippet-model) a [Smart Snippet](https://docs.coveo.com/en/laea5490/) model, [associate the model](https://docs.coveo.com/en/l6he0309/) with the **_search_** [query pipeline](https://docs.coveo.com/en/180/), and [enable](https://docs.coveo.com/en/3160#enable-or-disable-smart-snippets) [Smart Snippets](https://docs.coveo.com/en/laea5490/) in the IPX search interface. * [Create](https://docs.coveo.com/en/3396#create-a-dne-model) a [Dynamic Navigation Experience (DNE)](https://docs.coveo.com/en/2907/) model, [associate the model](https://docs.coveo.com/en/l1qf4156/) with the **_search_** [query pipeline](https://docs.coveo.com/en/180/), and [enable](https://docs.coveo.com/en/3160#reorder-facets) [Dynamic Navigation Experience (DNE)](https://docs.coveo.com/en/2907/) in the IPX search interface. * Define custom relevance tuning rules (advanced): [%header,cols="2"] |=== | Rule type | Use case | [Thesaurus](https://docs.coveo.com/en/3405/) | Defines synonyms to expand in user queries. | [Featured results](https://docs.coveo.com/en/3376/) | Provides a high-ranking score boost to certain [items](https://docs.coveo.com/en/210/). | [Stop words](https://docs.coveo.com/en/3406/) | Defines terms to ignore in the [basic query expression (`q`)](https://docs.coveo.com/en/178/). | [Ranking expressions](https://docs.coveo.com/en/3375/) | Increases or decreases the ranking scores of certain items by a certain amount. | [Ranking weights](https://docs.coveo.com/en/3412/) | Fine-tunes the default weights of the standard [index](https://docs.coveo.com/en/204/) [ranking factors](https://docs.coveo.com/en/1624#pre-tuned-ranking-weight-factors). | [Triggers](https://docs.coveo.com/en/3413/) | Defines actions to execute in the search panel under certain circumstances. | [Filters](https://docs.coveo.com/en/3410/) | Appends expressions to the basic (`q`), [advanced (`aq`)](https://docs.coveo.com/en/175/), [constant (`cq`)](https://docs.coveo.com/en/179/), [disjunction (`dq`)](https://docs.coveo.com/en/190/), or [large (`lq`)](https://docs.coveo.com/en/214/) query expression. | [Query parameters](https://docs.coveo.com/en/3411/) | Sets or overrides the values of certain search request parameters. |=== > **Leading practices** > > * Use custom relevance tuning rules sparingly and only for legitimate reasons. > > * [Apply your custom relevance tuning rules conditionally](https://docs.coveo.com/en/1959/). > > * [Test your custom relevance tuning rules](https://docs.coveo.com/en/3255/). ### Recommendation query pipeline The **_recommendation_** [query pipeline](https://docs.coveo.com/en/180/) is used solely for [IPX Recommendations (IPXRECS)](https://docs.coveo.com/en/p6hh0418/) to provide relevant suggestions in your IPX search interface. An [IPX Recommendation (IPXRECS)](https://docs.coveo.com/en/p6hh0418/) [model](https://docs.coveo.com/en/1012/) is automatically created and assigned to this query pipeline. [IPXRECS](https://docs.coveo.com/en/p6hh0418/) [models](https://docs.coveo.com/en/1012/) can't be associated with pipelines that contain other model types. > **Note** > > The IPX search interface lists a maximum of 5 item recommendations. > If there are less than 5 recommendations available for the given URL, only the available recommendations are shown. ![Coveo IPX recommendations](https://docs.coveo.com/en/assets/images/coveo-ipx/ipx-recommend.png) > **Notes** > > * The recommendation [query pipeline](https://docs.coveo.com/en/180/) and the associated [IPXRECS](https://docs.coveo.com/en/p6hh0418/) [model](https://docs.coveo.com/en/1012/) are already fully optimized for use with the IPX search interface. > No further optimization is required. > > * [IPXRECS](https://docs.coveo.com/en/p6hh0418/) [models](https://docs.coveo.com/en/1012/) can't be added manually. > To create a new [IPXRECS](https://docs.coveo.com/en/p6hh0418/) [model](https://docs.coveo.com/en/1012/), [create a new IPX search interface](https://docs.coveo.com/en/3160#create-an-ipx-interface). > > * A newly-created [IPX Recommendation (IPXRECS)](https://docs.coveo.com/en/p6hh0418/) [model](https://docs.coveo.com/en/1012/) may display an [error status](https://docs.coveo.com/en/1894#model-status). > This is expected because it doesn't have enough click events to generate recommendations yet. > Once 5 click events are available and the [IPXRECS](https://docs.coveo.com/en/p6hh0418/) [model](https://docs.coveo.com/en/1012/) rebuilds, the error disappears and the [model](https://docs.coveo.com/en/1012/) will begin to provide recommendations. > > ![IPXRECS showing error status | Coveo In-Product Experience](:https://docs.coveo.com/en/assets/images/coveo-ipx/ipxrecs-error-status.png) ## Automatic query pipeline configuration When [creating an IPX search interface](https://docs.coveo.com/en/3160#create-an-ipx-interface), the two query pipelines that are recommended for IPX, including their minimum associated [Coveo Machine Learning (Coveo ML)](https://docs.coveo.com/en/188/) [models](https://docs.coveo.com/en/1012/), are also automatically created. The [query pipelines](https://docs.coveo.com/en/180/) are associated to the IPX search interface using the IPX's search hub value. Specifically, the automatic configuration creates the following, where `` and `` is the name of your IPX configuration: * The [**_search_** query pipeline](#search-query-pipeline) for your IPX configuration uses the following settings: ** The query pipeline name is `Search pipeline - `. ** The [query pipeline condition](https://docs.coveo.com/en/2793/) is `Search Hub is and Context[IPX_Name] is and Recommendation is empty`. This condition is used to route the user queries from your IPX search interface to this query pipeline. **Example** For example, if your IPX configuration name is `IPX Workplace`, the created **_search_** [query pipeline](https://docs.coveo.com/en/180/) is: ![IPX search query pipeline | Coveo](https://docs.coveo.com/en/assets/images/coveo-ipx/ipx-auto-search-pipeline.png) * The [**_recommendation_** query pipeline](#recommendation-query-pipeline) for your IPX configuration uses the following settings: ** The query pipeline name is `Recommendation pipeline - `. ** The [query pipeline condition](https://docs.coveo.com/en/2793/) is `Search Hub is and Context[IPX_Name] is and Recommendation is Recommendation`. This condition ensures that your IPX uses this query pipeline for IPX recommendations. **Example** For example, if your IPX configuration name is `IPX Workplace`, the created **_recommendation_** [query pipeline](https://docs.coveo.com/en/180/) is: ![Coveo IPX recommendation query pipeline](https://docs.coveo.com/en/assets/images/coveo-ipx/ipx-auto-recommendation-pipeline.png) * The following [Coveo ML](https://docs.coveo.com/en/188/) [models](https://docs.coveo.com/en/1012/) that are associated with the appropriate query pipeline: ** An [Automatic Relevance Tuning (ART)](https://docs.coveo.com/en/1013/) [model](https://docs.coveo.com/en/1012/) named `ART model - ` with default settings that's associated with the **_search_** [query pipeline](https://docs.coveo.com/en/180/). ** A [Query Suggestion (QS)](https://docs.coveo.com/en/1015/) [model](https://docs.coveo.com/en/1012/) named `QS model - ` with default settings that's associated with the **_search_** [query pipeline](https://docs.coveo.com/en/180/). ** An [IPX Recommendation (IPXRECS)](https://docs.coveo.com/en/p6hh0418/) [model](https://docs.coveo.com/en/1012/) named `IPXRECS model - ` with default settings that's associated with the **_recommendation_** [query pipeline](https://docs.coveo.com/en/180/). > **Notes** > > * In addition to the automatically assigned [models](https://docs.coveo.com/en/1012/), Coveo recommends you configure and assign [other Coveo ML models](#optimization-recommendations) to the **_search_** query pipeline to further enhance the search experience. > > * If your Coveo [organization](https://docs.coveo.com/en/185/) license doesn't allow access to create a specific type of ML [model](https://docs.coveo.com/en/1012/), that model isn't created automatically. > **Important** > > If you delete an IPX configuration for which [query pipelines](https://docs.coveo.com/en/180/) and ML [models](https://docs.coveo.com/en/1012/) were [automatically created](https://docs.coveo.com/en/n4c90194#automatic-query-pipeline-configuration), the corresponding query pipelines, ML models, and conditions will also be deleted. > Make sure they're not used by other search interfaces before deleting the IPX configuration. > > Deleting an IPX search interface configuration is irreversible. ## What's next? [Test and add your IPX interface to your website](https://docs.coveo.com/en/n44d0184/).