---
schema_version: "1"
id: 7e2c26343a43762740532c24d7439c186985628d4f63537556d77f6335747feb
title: Test an Individual Retriever
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/data/264-0-0/c360_a_ai_retriever_test_create.md
canonical_url: https://help.salesforce.com/s/articleView?id=data.c360_a_ai_retriever_test_create.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 4b5ed042ab990581d1dfee468db08c0360a5ea7620c65b58cad5d576d2097b08
description: Test a retriever configuration to ensure accurate responses from your AI agents. Save retriever configurations as new versions of the retriever in AI Models (formerly Einstein Studio). Activate them for use in agents with prompt templates, Flow, and apps.
products:
  - Data 360
release: "264"
---
# Test an Individual Retriever

Test a retriever configuration to ensure accurate responses from your AI agents. Save retriever configurations as new versions of the retriever in AI Models (formerly Einstein Studio). Activate them for use in agents with prompt templates, Flow, and apps.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>All Editions</strong> supported by Data 360. See <a href="https://help.salesforce.com/s/articleView?id=data.c360_a_dc_editions.htm&amp;language=en_US" target="_blank">Data 360 edition availability</a>.</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:left;vertical-align:top;" id="d149833e61">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d149833e61 ">To manage retrievers or versions in AI Models (create, edit, test, and
              delete)</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d149833e61 ">
              <p>Allow users to manage models in AI Models AND Access to Field Relationship
                Path object</p>
              <p>OR</p>
              <p style="margin-bottom:0;">Data Cloud Architect permission set</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d149833e61 ">To access data with retrievers</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d149833e61 ">
              <p>For the Knowledge object, make sure that the user has read access to the object
                and has the app permission: Allow View Knowledge </p>
              <p style="margin-bottom:0;">For all other standard objects,
                make sure that the user has read access to the object and appropriate sharing
                rules. For more information see, <a href="https://help.salesforce.com/s/articleView?id=platform.admin_sharing.htm&amp;type=5&amp;language=en_US" target="_blank"><u>Set Your Internal Organization-Wide Sharing
                    Defaults</u></a>.</p>
            </td>

          </tr>
        </tbody>
      </table>

## Configure Retriever

Customize your retriever configuration with filter conditions, expected source data, and expected results.

1. In AI Models on the Retrieve tab, select **Test Retriever**. Alternatively, select **Test Retriever** for an individual retriever from the drop-down action menu.
    
    You can't test default retrievers that were automatically created.
2. Select a mode for testing the retriever. In the basic mode, the retriever playground returns a source recall score and a response time. In the advanced mode, the playground returns an AI-generated context recall score and a context precision score based on an expected answer to a test question. For more information on metrics and costs, see, [Retriever Metrics and Results](https://help.salesforce.com/s/articleView?id=data.c360_a_ai_retriever_test_metrics.htm&type=5&language=en_US) and [Billing Considerations for Testing Retrievers](https://help.salesforce.com/s/articleView?id=data.c360_a_ai_retriever_test_billing.htm&type=5&language=en_US).
3. Select a retriever that you want to test and validate.
    
    The retriever configuration panel shows the search index and retriever details for review.
4. Include all records or filter records that meet the conditions to customize retriever configuration. Configure up to ten filter conditions for retrieval of records based on filter conditions.
    
    For example, define simple filter conditions such as "document published date is after 2022" or " Company name is equal to Salesforce."
    
    To select field values at run time, define dynamic filter conditions. For example, to select a car make and model at run time for questions about car mileage, define filter conditions such as, 1. Make Equal to {!$Make} and 2. Model Equal To {!$Model}.
    
    Select the conditional logic to use filters when all conditions are met, any condition is met, or custom conditional logic is met. For example, with the test question about car mileage, add a third condition, 3. ModelYear greater than 2000. You can configure a custom condition where conditions 1 AND (2 OR 3) are met.
5. Modify the number of results that you want the retriever to return.
    
    If the results to a question don’t include the expected response, increase the number of results returned.
6. Customize the fields returned by the retriever by adding or removing existing fields.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/images/icon_note.png)
    
    Note The retriever returns these new fields when you save the configuration and use it with agents.
7. (Optional) Preview and validate citations for a retriever by configuring citations.
    1. To automatically generate citations that include the source URL, and a heading text, select **Standard Citations**.
    2. To customize the citation, select **Custom Citations**. Optionally, enter a base URL, source DMO field that contains the full link or a URL path that can be combined with the base URL, and the source DMO field to use for the citation heading. For example, if the source DMO contains a citation to a specific help page such as [Retrieve Data](https://help.salesforce.com/s/articleView?id=data.c360_a_ai_retriever.htm&language=en_US&type=5). Enter a base URL of [https://help.salesforce.com/s/articleView?id=&language=en\_US](https://help.salesforce.com/s/articleView?id=&language=en_US) and the URL path would be the source DMO field that contains the document ID, data.c360\_a\_ai\_retriever.htm. If the source DMO has a field with the entire URL path, then don’t enter a base URL path. Set the URL path to the source DMO field that contains the entire URL path.
    3. Click **Save**.

## Test Your Retriever

Enter a natural language query and set expected source data to evaluate how accurately your retriever returns content. Expected source data is the content you expect for a correct response.

1. In the Test Retriever panel, ask a test question. In the advanced mode, you can also test your retriever responses based on an expected answer to the test question.
2. Optionally, define dynamic filter values.
3. To test your retriever responses from expected sources, select **Configure Expected Source Data**.
4. Select data model object records if you know which records contain the response or select keyword search.
    
    For hybrid search retrievers with keyword matches, select expected source data by keyword search or data model object records. Otherwise, you can only select by data model object records. Select data model object records if you know which records contain the response to your test question. Select records based on a keyword search if you know what your response should include, such as, for a question related to paid time-off, you can enter “PTO or Time-off”.

**Configure Expected Source Data**

![Configure expected source data to compare retriever response with expected response. Select data model object records or search for records by a keyword.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/data_cloud/images/RTP_Configure_Expected_source.png)

After you run your test, the Test Retriever panel shows the number of documents retrieved by the retriever. In the Review Results panel, review the overlap between the top chunks returned by the retriever and the expected source data chunks. Verify validity of sources with links to citations for the retrieved chunks. Optionally, customize retriever configuration to get an optimal response. Save tested configurations as new versions.

#### See Also

- [Retriever Filters Reference](https://help.salesforce.com/s/articleView?id=data.c360_a_retriever_filter_reference.htm&release=264.0.0&type=5 "Configure filter conditions for retrieval accuracy when you create or test retrievers in AI Models (formerly Einstein Studio). Use filter conditions to filter records retrieved for search queries. You can configure up to ten filter conditions for an individual retriever.")
- [Create an Individual Retriever](https://help.salesforce.com/s/articleView?id=data.c360_a_ai_retriever_create.htm&release=264.0.0&type=5 "To improve the relevancy of the content returned to a prompt for a particular use case, create a custom individual retriever in AI Models (formerly Einstein Studio). To customize the retriever, select its search index, define filters, and specify what information it returns.")