---
schema_version: "1"
id: 2108bbb59fc49ae26ef72d7a0fc98be448095da9112901eebef072f7cdbafa6e
title: Add an Ensemble Retriever to a Prompt Template
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/prompt_builder_retriever_ensemble.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.prompt_builder_retriever_ensemble.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: cae5f509e4081468ad2a85056fd6369b23add343c2e32513d8523ba62911d36e
description: Use ensemble retrievers in prompt templates to ground your LLM prompts with relevant knowledge. An ensemble retriever is a collection of individual retrievers. When you run an ensemble retriever, it executes the individual retrievers, combines their search results into a single list, reranks the list according to relevance to the search request, and returns just the most relevant information to the prompt or agent. Ensemble retrievers conduct searches from multiple sources in parallel.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Add an Ensemble Retriever to a Prompt Template

Use ensemble retrievers in prompt templates to ground your LLM prompts with relevant knowledge. An ensemble retriever is a collection of individual retrievers. When you run an ensemble retriever, it executes the individual retrievers, combines their search results into a single list, reranks the list according to relevance to the search request, and returns just the most relevant information to the prompt or agent. Ensemble retrievers conduct searches from multiple sources in parallel.

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

<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:center;vertical-align:top;" id="d122707e69">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d122707e69 ">To create and manage prompt templates in Prompt Builder:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d122707e69 ">
              <p>Prompt Template Manager permission set</p>
              <ul>
                <li>Manage Prompt Templates</li>

                <li>Execute Prompt Templates</li>

              </ul>
              <p>OR</p>
              <p style="margin-bottom:0;">Customize Application permission set</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d122707e69 ">To create and manage retrievers:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d122707e69 ">Data Cloud permission set</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d122707e69 ">To run prompts with Einstein Search:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d122707e69 ">Data Cloud User permission set</td>

          </tr>
        </tbody>
      </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 These instructions assume that the ensemble retriever has been created and configured in AI Models. To learn more, see [Create an Ensemble Retriever](https://help.salesforce.com/s/articleView?id=data.c360_a_ai_retriever_ensemble_create.htm&language=en_US).

1. In Prompt Builder, create or edit a prompt template.
2. In the Prompt Template Workspace, click where you want to insert the ensemble retriever.
3. Type **@** or click **Insert Resource**, click **Retrievers**, and click **Configure Retrievers +**.
4. Select the ensemble retriever you want to add to the prompt template.
5. Optionally, change retriever settings in the Template Settings side panel.
    1. **Descriptors**: Change the **Label** and **Description** for this retriever in your prompt template.
    2. **Search Text**: Focus your search by specifying additional criteria. Select a resource or specify search text.
    3. **Output Fields**: If available for the selected retriever, select one or more returned fields of data to ground your prompt.
    4. **Number of Results**: If available for the selected retriever, specify the maximum number of retrieved results.
6. Click **Apply and Insert**.
7. Save your work.
8. Test your changes. Preview the prompt template and review the LLM-generated response.