--- title: Configure query pipelines and machine learning for your hosted search page slug: na6f0383 canonical_url: https://docs.coveo.com/en/na6f0383/ collection: build-a-search-ui source_format: adoc --- # Configure query pipelines and machine learning for your hosted search page After you [create your search page](https://docs.coveo.com/en/na2g0545/), we highly recommend that you configure query pipelines and [Coveo Machine Learning (Coveo ML)](https://docs.coveo.com/en/188/) for your search page for enhanced relevance. A [query pipeline](https://docs.coveo.com/en/180/) can be associated with one or more Coveo ML [models](https://docs.coveo.com/en/1012/). A pipeline can also contain custom relevance tuning [rules](https://docs.coveo.com/en/236/) ([thesaurus](https://docs.coveo.com/en/2742/), featured results, stop words, etc.), which allows you to modify incoming search requests as required. Hosted search pages created with the builder support the following Coveo ML models, among others: * [Relevance Generative Answering (RGA)](https://docs.coveo.com/en/nbtb6010/) * [Automatic Relevance Tuning (ART)](https://docs.coveo.com/en/1013/) * [Query Suggestions (QS)](https://docs.coveo.com/en/1015/) * [Smart Snippets](https://docs.coveo.com/en/laea5490/) (not supported in legacy search pages) * [Dynamic Navigation Experience (DNE)](https://docs.coveo.com/en/2907/) > **Note** > > Each of the Coveo ML models listed here are optional, but we highly recommend configuring all of them for an optimal search experience. You'll likely want to configure a **_main_** query pipeline that's used to process manual search requests from your search page. Your RGA, ART, QS, DNE, and Smart Snippet models will be associated to this query pipeline. ## Step 1: Create the main 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 **Add pipeline**. . In the **Add a Query Pipeline** panel that opens, select the **Configuration** tab. . Enter a **Pipeline name** (for example, `Commerce_Search_Main_Pipeline`). . (Optional) Enter a **Description** for the query pipeline to help Administration Console users understand its purpose. . (Optional) Select a **Use case** to [categorize your query pipeline](https://docs.coveo.com/en/l1be0007#use-case). . Under **Condition**, [create](https://docs.coveo.com/en/1959#create-a-condition) one of the following [query pipeline conditions](https://docs.coveo.com/en/2793/), where you replace `` with the search hub value of your search page. Create a `Search Hub is ` condition. **Examples** If your search hub value is `Commerce_Search`, the condition for your main query pipeline should be `Search Hub is Commerce_Search`. . In the **Interface URL** section, you can optionally [define the URLs](https://docs.coveo.com/en/l1be0007#interface-url-section) of the search interfaces that use this query pipeline. . Click **Add Pipeline**. > **Note** > > Assuming each pipeline in your organization (except the default one) has a unique [condition](https://docs.coveo.com/en/2793/) based on a distinct search hub value, all manual search requests originating from your search page will now be routed to your new pipeline. ## Step 2: Configure machine learning models Configuring Coveo ML [Automatic Relevance Tuning (ART)](https://docs.coveo.com/en/1013/) and [Query Suggestions (QS)](https://docs.coveo.com/en/1015/) can significantly improve relevance for end users performing manual [queries](https://docs.coveo.com/en/231/) in your search page. [DNE](https://docs.coveo.com/en/2907/) leverages [Coveo Analytics events](https://docs.coveo.com/en/260/) to order facets and facet values according to the user query. [Relevance Generative Answering (RGA)](https://docs.coveo.com/en/nbtb6010/) generates answers for natural language queries using [generative AI](https://docs.coveo.com/en/n9e90153/) technology and displays the answer directly on the results page. If you're using [RGA](https://docs.coveo.com/en/nbtb6010/), you must also use a [Semantic Encoder (SE)](https://docs.coveo.com/en/nbtb0041/) model to ensure that answers are always generated using the most relevant items. [Smart Snippets](https://docs.coveo.com/en/laea5490/) provide users with answers to their manual queries directly on the results page by displaying a [snippet](https://docs.coveo.com/en/laeb0292/) of the most relevant result [item](https://docs.coveo.com/en/210/). > **Notes** > > * [RGA](https://docs.coveo.com/en/nbtb6010/) and Smart Snippets aren't supported in the same hosted search page. > You must choose to use one or the other. > > * Smart Snippets aren't supported in legacy [JavaScript Search Framework](https://docs.coveo.com/en/375/) search pages. > Legacy search pages appear with a **Legacy Editor** badge on the [**Search Pages**](https://platform.cloud.coveo.com/admin/#/orgid/search/search-pages/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/search-pages/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/search-pages/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/search-pages/)) page. > > ![Legacy Editor badge interface screenshot | Coveo](:https://docs.coveo.com/en/assets/images/build-a-search-ui/legacy-editor-badge.png) ### Step 2a: Create the models . [Create an ART model](https://docs.coveo.com/en/3397/). . [Create a QS model](https://docs.coveo.com/en/3398/). . [Create a DNE model](https://docs.coveo.com/en/3396/). . [Create an RGA model](https://docs.coveo.com/en/nb6a0085/) or [Create a Smart Snippet model](https://docs.coveo.com/en/l6he0424/). ### Step 2b: Associate the models with your main query pipeline Associate the models with the [main query pipeline](#step-1-create-the-main-query-pipeline) that you created for your search page. . [Associate the ART model](https://docs.coveo.com/en/l1ca1038/) with your main query pipeline. . [Associate the QS model](https://docs.coveo.com/en/l1mf0321/) with your main query pipeline. . [Associate the DNE model](https://docs.coveo.com/en/l1qf4156/) with your main query pipeline. . [Associate the RGA model](https://docs.coveo.com/en/nb6a0104/) and [SE model](https://docs.coveo.com/en/nb8b0088/), or [associate the Smart Snippet model](https://docs.coveo.com/en/l6he0309/), with your main query pipeline. > **Note** > > Assuming the ART and QS models are created successfully, and the main query pipeline is properly configured, the ART and QS features should now be enabled in your search page. > For [DNE](https://docs.coveo.com/en/2907/), [RGA](https://docs.coveo.com/en/nbtb6010/), or Smart Snippets, you must [enable the feature in your search page](https://docs.coveo.com/en/na6f0383/). ### Step 2c: Enable DNE, RGA, or Smart Snippets in your search page Once you've created your [DNE](https://docs.coveo.com/en/2907/), [RGA](https://docs.coveo.com/en/nbtb6010/), or Smart Snippet model and associated it with your main query pipeline, you must [enable the feature in your search page configuration](https://docs.coveo.com/en/na2g0545#enable-smart-snippets). > **Note** > > Smart Snippets aren't supported in legacy search pages. > Legacy search pages configurations appear with a **Legacy Editor** badge on the [**Search Pages**](https://platform.cloud.coveo.com/admin/#/orgid/search/search-pages/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/search-pages/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/search-pages/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/search-pages/)) page. > > ![Legacy Editor badge interface screenshot | Coveo](:https://docs.coveo.com/en/assets/images/build-a-search-ui/legacy-editor-badge.png) ## Step 3: Define custom relevance tuning rules (advanced) If needed, you can define custom relevance tuning rules in the [main query pipeline](#step-1-create-the-main-query-pipeline) that you created for your search page. Use the following table as a reference: |=== | 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/). ## What's next? Follow the [search page implementation guide](https://docs.coveo.com/en/nbha0121/).