---
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.md), we highly recommend that you configure query pipelines and [Coveo Machine Learning (Coveo ML)](https://docs.coveo.com/en/188.md) for your search page for enhanced relevance.

A [query pipeline](https://docs.coveo.com/en/180.md) can be associated with one or more Coveo ML [models](https://docs.coveo.com/en/1012.md).
A pipeline can also contain custom relevance tuning [rules](https://docs.coveo.com/en/236.md) ([thesaurus](https://docs.coveo.com/en/2742.md), 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.md)

* [Automatic Relevance Tuning (ART)](https://docs.coveo.com/en/1013.md)

* [Query Suggestions (QS)](https://docs.coveo.com/en/1015.md)

* [Smart Snippets](https://docs.coveo.com/en/laea5490.md) (not supported in legacy search pages)

* [Dynamic Navigation Experience (DNE)](https://docs.coveo.com/en/2907.md)

> **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

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 **Add pipeline**.

1. In the **Add a query pipeline** panel that opens, select the **Configuration** tab.

1. Enter a **Pipeline name** (for example, `Commerce_Search_Main_Pipeline`).

1. (Optional) Enter a **Description** for the query pipeline to help Administration Console users understand its purpose.

1. (Optional) Select a **Use case** to [categorize your query pipeline](https://docs.coveo.com/en/l1be0007.md#use-case).

1. Under **Condition**, [create](https://docs.coveo.com/en/1959.md#create-a-condition) one of the following [query pipeline conditions](https://docs.coveo.com/en/2793.md), where you replace `<SEARCH_HUB>` with the search hub value of your search page.

   Create a `Search Hub is <SEARCH_HUB>` condition.

   **Examples**

If your search hub value is `Commerce_Search`, the condition for your main query pipeline should be `Search Hub is Commerce_Search`.
1. In the **Interface URL** section, you can optionally [define the URLs](https://docs.coveo.com/en/l1be0007.md#interface-url-section) of the search interfaces that use this query pipeline.

1. Click **Add pipeline**.

> **Note**
>
> Assuming each pipeline in your organization (except the default one) has a unique [condition](https://docs.coveo.com/en/2793.md) 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.md) and [Query Suggestions (QS)](https://docs.coveo.com/en/1015.md) can significantly improve relevance for end users performing manual [queries](https://docs.coveo.com/en/231.md) in your search page.
[DNE](https://docs.coveo.com/en/2907.md) leverages [Coveo Analytics events](https://docs.coveo.com/en/260.md) to order facets and facet values according to the user query.
[Relevance Generative Answering (RGA)](https://docs.coveo.com/en/nbtb6010.md) generates answers for natural language queries using [generative AI](https://docs.coveo.com/en/n9e90153.md) technology and displays the answer directly on the results page.

If you're using [RGA](https://docs.coveo.com/en/nbtb6010.md), you must also use a [Semantic Encoder (SE)](https://docs.coveo.com/en/nbtb0041.md) model to ensure that answers are always generated using the most relevant items.
[Smart Snippets](https://docs.coveo.com/en/laea5490.md) provide users with answers to their manual queries directly on the results page by displaying a [snippet](https://docs.coveo.com/en/laeb0292.md) of the most relevant result [item](https://docs.coveo.com/en/210.md).

> **Notes**
>
> * [RGA](https://docs.coveo.com/en/nbtb6010.md) 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.md) 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

1. [Create an ART model](https://docs.coveo.com/en/3397.md).

1. [Create a QS model](https://docs.coveo.com/en/3398.md).

1. [Create a DNE model](https://docs.coveo.com/en/3396.md).

1. [Create an RGA model](https://docs.coveo.com/en/nb6a0085.md) or [Create a Smart Snippet model](https://docs.coveo.com/en/l6he0424.md).

### 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.

1. [Associate the ART model](https://docs.coveo.com/en/l1ca1038.md) with your main query pipeline.

1. [Associate the QS model](https://docs.coveo.com/en/l1mf0321.md) with your main query pipeline.

1. [Associate the DNE model](https://docs.coveo.com/en/l1qf4156.md) with your main query pipeline.

1. [Associate the RGA model](https://docs.coveo.com/en/nb6a0104.md) and [SE model](https://docs.coveo.com/en/nb8b0088.md), or [associate the Smart Snippet model](https://docs.coveo.com/en/l6he0309.md), 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.md), [RGA](https://docs.coveo.com/en/nbtb6010.md), or Smart Snippets, you must [enable the feature in your search page](https://docs.coveo.com/en/na6f0383.md).

### Step 2c: Enable DNE, RGA, or Smart Snippets in your search page

Once you've created your [DNE](https://docs.coveo.com/en/2907.md), [RGA](https://docs.coveo.com/en/nbtb6010.md), 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.md#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.md) | Defines synonyms to expand in user queries. |
| [Featured results](https://docs.coveo.com/en/3376.md) | Provides a high-ranking score boost to certain [items](https://docs.coveo.com/en/210.md). |
| [Stop words](https://docs.coveo.com/en/3406.md) | Defines terms to ignore in the [basic query expression (`q`)](https://docs.coveo.com/en/178.md). |
| [Ranking expressions](https://docs.coveo.com/en/3375.md) | Increases or decreases the ranking scores of certain items by a certain amount. |
| [Ranking weights](https://docs.coveo.com/en/3412.md) | Fine-tunes the default weights of the standard [index](https://docs.coveo.com/en/204.md) [ranking factors](https://docs.coveo.com/en/1624.md#pre-tuned-ranking-weight-factors). |
| [Triggers](https://docs.coveo.com/en/3413.md) | Defines actions to execute in the search panel under certain circumstances. |
| [Filters](https://docs.coveo.com/en/3410.md) | Appends expressions to the basic (`q`), [advanced (`aq`)](https://docs.coveo.com/en/175.md), [constant (`cq`)](https://docs.coveo.com/en/179.md), [disjunction (`dq`)](https://docs.coveo.com/en/190.md), or [large (`lq`)](https://docs.coveo.com/en/214.md) query expression. |
| [Query parameters](https://docs.coveo.com/en/3411.md) | 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.md).
>
> * [Test your custom relevance tuning rules](https://docs.coveo.com/en/3255.md).

## Required privileges

The following table indicates the [privileges](https://docs.coveo.com/en/228.md) required to configure query pipelines and machine learning models for your hosted search page (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 search pages | Machine Learning | Models | View |
| View search pages | Organization | Organization | View |
| View search pages | Search | Search pages and IPX | View |
| Edit search pages | Machine Learning | Models | View |
| Edit search pages | Organization | Organization | View |
| Edit search pages | Search | Search pages and IPX | Edit |
| View query pipelines | Machine Learning | Models | View |
| View query pipelines | Organization | Organization | View |
| View query pipelines | Search | Query pipelines | View all |
| Edit query pipelines | Machine Learning | Models | View |
| Edit query pipelines | Organization | Organization | View |
| Edit query pipelines | Search | Query pipelines | Edit all |
| View machine learning models | Machine Learning | Models | View |
| View machine learning models | Organization | Organization | View |
| View machine learning models | Search | Query pipelines | View all |
| Edit machine learning models | Machine Learning | Models | Edit |
| Edit machine learning models | Organization | Organization | View |
| Edit machine learning models | Search | Query pipelines | View all |

## What's next?

Follow the [search page implementation guide](https://docs.coveo.com/en/nbha0121.md).