---
schema_version: "1"
id: 7daceed6fa009856660daa1531106bb184a3920ba2f1d839f329cfc21e2635ea
title: Use a Custom Retriever
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/data_library_custom_retriever.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.data_library_custom_retriever.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: dc94078cca0678392a21b2ae01fc2bff14f81890261147b6a2c31404be924c30
description: Use custom retrievers to connect to more types of data sources in Data 360 including ensemble retrievers, or, connect companion orgs to data libraries and search indexes configured in your home org.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Use a Custom Retriever

Use custom retrievers to connect to more types of data sources in Data 360 including ensemble retrievers, or, connect companion orgs to data libraries and search indexes configured in your home org.

### 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: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions with the Einstein for Platform or Einstein or Agentforce for Sales or Service add-on, or Agentforce Foundations</td></tr></tbody></table>

To use Agentforce Data Libraries, you must have Data 360 [set up](https://help.salesforce.com/s/articleView?id=data.c360_a_setup_provision.htm&language=en_US&type=5). Data libraries consume Data 360 credits.

To connect to a custom retriever from your home org, you must first [create a search index in Data 360](https://help.salesforce.com/s/articleView?language=en_US&id=data.c360_a_search_index_ground_ai.htm&type=5) and then [create a retriever for that search index](https://help.salesforce.com/s/articleView?language=en_US&id=data.c360_a_ai_retriever_create.htm&type=5) and activate it.

1. From Setup, in the Quick Find box, enter Agentforce Data Library, and then select **Agentforce Data Library**.
2. Click **New Data Library**. Enter a name and the API name automatically populates. Optionally, enter a description. Click **Save**.
3. For Data Type, from the dropdown menu, select **Custom Retriever**.
    
    ![The data library source menu with Custom Retriever highlighted.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/images/data_library/data_library_custom_retriever_select.png)
4. The available custom retrievers appear in a table.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_note.png)
    
    Note You can only connect to retrievers that exist in the home org. To use a data library in a companion org, you must first configure the data library in the home org.
    
    Select the retriever that is linked to the data library or data you want to access. Only active retrievers are listed.
    
    ![The list of available custom retrievers with the file retriever selected.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/images/data_library/data_library_custom_retriever_list.png)
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_note.png)
    
    Note Considerations for selecting a retriever.
    
    - A retriever with the File\_… prefix connects to your uploaded file search index.
    - A retriever with the KA\_… prefix connects to Knowledge based search indexes.
    - A retriever with the Web\_… prefix connects to web sources. Web search data libraries are read-only; you can view and manage existing libraries but can't create new ones.
    - In your home org, you can only connect to retrievers created in Data 360.
    - You can only connect to retrievers that exist in the home org. To use a data library in a companion org, you must first configure the data library in the home org.
    - When you create a data library with a custom retriever in a companion org, you can’t delete the associated retriever in the home org. To delete it in the home org, you’ll first need to deselect the retriever in the companion org.
    - Dynamic pre-filters aren’t supported when using a data library with the Answer Questions with Knowledge prompt template. Only static pre-filters are supported. As a workaround, use a separate data library for each category or brand, or use a custom Apex invocable action to pass filter values at runtime.
5. To use an ensemble retriever and assign multiple data libraries to your agent, first [Create an Ensemble Retriever](https://help.salesforce.com/s/articleView?id=data.c360_a_ai_retriever_ensemble_create.htm&type=5&language=en_US). Once you’ve created your ensemble retriever, you can select it from the list of active retrievers.
    
    ![Data library setup with the ensemble retriever selected from available Data 360 retrievers.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/images/data_library/data_library_ensemble_retriever.png)
6. Save your work.

Now you can connect agents to more types of data stored in Data 360, or you can connect data libraries and data from your home org with agents in your companion orgs. To link your companion org to multiple data libraries in your home org, create a custom retriever type data library and select the associated retriever for each library.