--- title: Relevance Inspector slug: mbad0273 canonical_url: https://docs.coveo.com/en/mbad0273/ collection: tune-relevance source_format: adoc --- # Relevance Inspector The [**Relevance Inspector**](https://platform.cloud.coveo.com/admin/#/orgid/search/relevanceInspector/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/relevanceInspector/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/relevanceInspector/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/relevanceInspector/)) (RI) is a tool that allows members of the **Administrators** [built-in group](https://docs.coveo.com/en/1980#built-in-groups) to assess and troubleshoot the relevance of the search results returned for a specific [query](https://docs.coveo.com/en/231/). More specifically, it lets users inspect: * The [query parameters](https://docs.coveo.com/en/13#tag/Search-V2/operation/searchUsingPost) applied to a [query](https://docs.coveo.com/en/231/) before it reaches the [query pipeline](https://docs.coveo.com/en/180/). * The [query pipeline](https://docs.coveo.com/en/180/) in which the [query](https://docs.coveo.com/en/231/) was routed. * The [query pipeline](https://docs.coveo.com/en/180/) [rules](https://docs.coveo.com/en/236/) that affected the [query](https://docs.coveo.com/en/231/). * The [query](https://docs.coveo.com/en/231/) parameters applied to the [query](https://docs.coveo.com/en/231/) after it went through the [query](https://docs.coveo.com/en/231/) pipeline. * The search results that were returned for the [query](https://docs.coveo.com/en/231/), along with their respective [fields](https://docs.coveo.com/en/200/), field values, and ranking scores. To use RI, you must first find the unique identifier associated to the [query](https://docs.coveo.com/en/231/) you want to inspect. See [Find the unique identifier](#find-the-unique-identifier) for instructions on how to find this value. > **Note** > > The Relevance Inspector can replay queries that are up to seven days old. ## Find the unique identifier When accessing the [**Relevance Inspector**](https://platform.cloud.coveo.com/admin/#/orgid/search/relevanceInspector/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/relevanceInspector/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/relevanceInspector/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/relevanceInspector/)) page from the [Coveo Administration Console](https://docs.coveo.com/en/183/), you must use the query's unique identifier to access the information available for this specific [query](https://docs.coveo.com/en/231/). The unique identifier differs based on whether queries target the [Search API](https://docs.coveo.com/en/13/) or the [Commerce API](https://docs.coveo.com/en/103#tag/Search): * For queries targeting the Search API, the unique identifier is called `searchUid`. * For queries targeting the Commerce API, the unique identifier is called `responseId`. > **Note** > > The Relevance Inspector currently doesn't support queries targeting the [Passage Retrieval API (PR API)](https://docs.coveo.com/en/o86c8334/). ### Find the query's `searchUid` If the query you want to inspect was performed in a search interface that targets the Search API, you must find the `searchUid` associated with this query. . Open the [search interface](https://docs.coveo.com/en/2741/) in which you want to inspect how the [query](https://docs.coveo.com/en/231/) would behave. . Open your web browser's developer tools. > **Note** > > The examples in this article use the **Google Chrome** developer tools. > For browser-specific information, see: > > * [Google Chrome](https://developers.google.com/web/tools/chrome-devtools/open) > > * [Mozilla Firefox](https://developer.mozilla.org/en-US/docs/Tools) > > * [Safari](https://support.apple.com/en-ca/guide/safari/sfri20948/mac) . Select the **Network** tab. . In the search box of the [search interface](https://docs.coveo.com/en/2741/), perform the desired [query](https://docs.coveo.com/en/231/). . Back in the developer tools window, under the **Name** column, click the latest request to the Search API. The request path should contain `v2`. . Find the `searchUid` property, and then copy the value. ![`searchuid` in developer tools](https://docs.coveo.com/en/assets/images/tune-relevance/find-searchuid.png) ### Find the query's `responseId` If the query you want to inspect was performed in a search interface that targets the Commerce API, you must find the `responseId` associated with this query. . Open the [search interface](https://docs.coveo.com/en/2741/) in which you want to inspect how the [query](https://docs.coveo.com/en/231/) would behave. . Open your web browser's developer tools. > **Note** > > The examples in this article use the **Google Chrome** developer tools. > For browser-specific information, see: > > * [Google Chrome](https://developers.google.com/web/tools/chrome-devtools/open) > > * [Mozilla Firefox](https://developer.mozilla.org/en-US/docs/Tools) > > * [Safari](https://support.apple.com/en-ca/guide/safari/sfri20948/mac) . Select the **Network** tab. . In the search box of the [search interface](https://docs.coveo.com/en/2741/), perform the desired [query](https://docs.coveo.com/en/231/). . In the developer tools window, under the **Name** column, click the latest request to the Commerce API. The request path should contain `commerce`. . On the **Preview** tab, find the `responseId` property, and then copy the value. ![`responseid` in developer tools](https://docs.coveo.com/en/assets/images/tune-relevance/find-responseid.png) ## Use the Relevance Inspector . Access the [**Relevance Inspector**](https://platform.cloud.coveo.com/admin/#/orgid/search/relevanceInspector/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/relevanceInspector/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/relevanceInspector/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/relevanceInspector/)) page of the [Coveo Administration Console](https://docs.coveo.com/en/183/). . Under **Type a Search UID**, enter the `searchUid` or `responseId` of the [query](https://docs.coveo.com/en/231/) to inspect, and then click **Inspect**. ![type a `searchuid` in Relevance Inspector | Coveo Platform](https://docs.coveo.com/en/assets/images/tune-relevance/ri-searchuid.gif) > **Note** > > There may be a delay before the [query](https://docs.coveo.com/en/231/) is available for inspection. . Under **Query journey**, the page now shows the following expandable sections. They correspond to the different steps of the [query](https://docs.coveo.com/en/231/) execution: * [**Results returned**](#results-returned) * [**Query sent to pipeline**](#query-sent-to-pipeline) * [**Query pipeline selection**](#query-pipeline-selection) * [**Query pipeline rules and models**](#query-pipeline-rules-and-models) * [**Query sent to index**](#query-sent-to-index) . Inspect the information to troubleshoot the [query](https://docs.coveo.com/en/231/). > **Note** > > In [search interfaces](https://docs.coveo.com/en/2741/) built with the [Coveo Atomic library](https://docs.coveo.com/en/atomic/latest/), you can access RI directly from the search interface. > > [.stem] > To inspect a [query](https://docs.coveo.com/en/231/) from an Atomic search interface > > . Perform a [query](https://docs.coveo.com/en/231/) in the search box. > > . Select and hold Alt (Windows) or Option (Mac) and double-click anywhere in the search interface. > > . Click the **Open in Relevance Inspector** button. > > The [query](https://docs.coveo.com/en/231/) will open in the [**Relevance Inspector**](https://platform.cloud.coveo.com/admin/#/orgid/search/relevanceInspector/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/relevanceInspector/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/relevanceInspector/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/relevanceInspector/)) page of the [Coveo Administration Console](https://docs.coveo.com/en/183/). > > Note that this option isn't available on search interfaces built with the [Coveo JavaScript Search Framework](https://docs.coveo.com/en/187/). ## Results returned This section shows the result [items](https://docs.coveo.com/en/210/) that the [query](https://docs.coveo.com/en/231/) returned, as shown in the search interface where the [query](https://docs.coveo.com/en/231/) was performed. The table shows the score that was attributed by each [ranking factor](https://docs.coveo.com/en/1624/) of the [index](https://docs.coveo.com/en/204/). You can also expand a given search result to get more information about ranking scores attributed by [Coveo Machine Learning (Coveo ML)](https://docs.coveo.com/en/188/) [models](https://docs.coveo.com/en/1012/) or [query ranking expressions (QREs)](https://docs.coveo.com/en/1472/). ![Returned results section in Relevance Inspector | Coveo](https://docs.coveo.com/en/assets/images/tune-relevance/ri-results-returned-section.png) > **Note** > > When using RI, the original user query is replayed. > However, the results may vary because RI considers the current [indexed](https://docs.coveo.com/en/204/) [items](https://docs.coveo.com/en/210/), pipeline configuration, and user permissions of the person replaying the [query](https://docs.coveo.com/en/231/). > Therefore, if there are any differences in the [indexed](https://docs.coveo.com/en/204/) [items](https://docs.coveo.com/en/210/), pipeline configuration, or user permissions between the person using RI and the original user who executed the [query](https://docs.coveo.com/en/231/), RI may display different results compared to what the original user obtained. ### Fields In the **Returned results** section, you can select the **Fields** tab to get information about the [fields](https://docs.coveo.com/en/200/) and field values available for each returned result item. ![fields tab](https://docs.coveo.com/en/assets/images/tune-relevance/ri-fields.png) ## Query sent to pipeline When you click **See details**, this section shows the [query parameters](https://docs.coveo.com/en/13#tag/Search-V2/operation/searchUsingPost) that were applied to the [query](https://docs.coveo.com/en/231/) before it reached the [query](https://docs.coveo.com/en/231/) pipeline. Those represent the request payload sent to the [Search API](https://docs.coveo.com/en/52/). > **Note** > > Some available parameters are JSON objects (for example, `actionsHistory`). > You can expand these objects to get more information. ![query sent to pipeline section](https://docs.coveo.com/en/assets/images/tune-relevance/ri-query-sent-to-pipeline.png) ## Query pipeline selection This section shows in which [query pipeline](https://docs.coveo.com/en/180/) the [query](https://docs.coveo.com/en/231/) was routed. See [Query pipeline routing mechanisms and rules](https://docs.coveo.com/en/1666/) for further information about [query](https://docs.coveo.com/en/231/) routing. When you click **See details**, this section lists all the pipelines available in the [Coveo organization](https://docs.coveo.com/en/185/) along with the reason why a given [query pipeline](https://docs.coveo.com/en/180/) was selected or not. ![query pipeline selection section](https://docs.coveo.com/en/assets/images/tune-relevance/ri-query-pipeline-selection.png) ## Query pipeline rules and models This section shows how the [query pipeline](https://docs.coveo.com/en/180/) rules along with the associated ML models were evaluated and executed according to the [query](https://docs.coveo.com/en/231/) you're inspecting. Click a rule or model type to see more details on the execution of a specific rule or model and how they modified the [query](https://docs.coveo.com/en/231/). ![query pipeline rules | Coveo](https://docs.coveo.com/en/assets/images/tune-relevance/ri-query-pipeline-rules.png) ## Query sent to index When you click **See details**, this section shows the [query parameters](https://docs.coveo.com/en/13#tag/Search-V2/operation/searchUsingPost) that were applied to the [query](https://docs.coveo.com/en/231/) after it went through the [query](https://docs.coveo.com/en/231/) pipeline. This represents the final information sent to [query](https://docs.coveo.com/en/231/) the [index](https://docs.coveo.com/en/204/). > **Note** > > Some available parameters are JSON objects (for example, `facets`). > You can expand these objects to get more information. ![query sent to index section](https://docs.coveo.com/en/assets/images/tune-relevance/ri-query-sent-to-index.png) ## Required privileges The following table indicates the [privileges](https://docs.coveo.com/en/228/) required to access the Relevance Inspector. [%header,cols="2,2,1"] |=== |Action |Service - Domain |Required access level .2+|Access the Relevance Inspector |Organization - Organization Search - Replay any query |View |Search - Execute queries |Allowed |===