---
schema_version: "1"
id: 09cc2788df02d3f79b031f179fddecbb6f35e6a5bf7d3f52e356f12eea9fd7b1
title: Add Citations to Prompt Template Responses
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/prompt_builder_retriever_citations.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.prompt_builder_retriever_citations.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 11c7fa0317191931baf34e687e5792b49d8b5ee9507855e9c743062218b96c98
description: Add citations to your prompt templates so that your users can compare and verify the generated information with the source information. Sources include content used by agent actions, knowledge articles, and web pages.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Add Citations to Prompt Template Responses

Add citations to your prompt templates so that your users can compare and verify the generated information with the source information. Sources include content used by agent actions, knowledge articles, and web pages.

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

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d201368e69 ">
              <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="d201368e69 ">To create and manage retrievers:</td>

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

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

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

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

A citation links an AI-generated response to the original source of information, such as retrieved knowledge, that was used to generate the response. To learn more, see [Build Trust in AI Responses with Citations](https://help.salesforce.com/s/articleView?id=ai.generative_ai_trust_citations.htm&release=264.0.0&type=5 "Citations link AI-generated responses to the grounding sources that are relevant to the response. Use citations to see what information the large language model (LLM) used to generate the response, and to verify the validity of the source data. Citations help you identify potential inaccuracies or hallucinations in the generated responses, increasing your confidence in using AI tools.").

![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 Citations work with text output only. If a citation involves an image, then the output includes a clickable link to the image.

1. In Prompt Builder, create or edit a prompt template.
2. In the Prompt Template Workspace, click where you want to insert the retriever.
3. Type **@** or click **Insert Resource**, click **Retrievers**, and click **Configure Retrievers +**.
4. Select the retriever you want to add to the prompt template.
5. In the Response section of the Details tab on the Template Settings panel, turn on citations.
    
    ![Toggle to turn on citations on the Details tab in the Template Settings panel.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/images/prompt_builder_retriever_citations_toggle.png)
6. Change other template settings, if you want.
7. Click **Apply and Insert**.
8. Save your work.
9. Test your changes. Preview the prompt template and review the LLM-generated response.

When you invoke the prompt template, citations show up in the LLM response. **Sources** shows a numbered, clickable list of original sources used to generate the response. The inline numbers refer to the source number in the list.

![LLM response with inline citations and a list of sources at the end of the response.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/images/prompt_builder_retriever_citations_response.png)

If you embed a retriever that supports images in citations, then - in your prompt responses - it's possible to see citations with links to images. Support for images requires a search index that has image processing enabled. For details, see [Get Trusted AI Responses with Retriever Citations](https://help.salesforce.com/s/articleView?id=data.c360_a_ai_citations_retriever.htm&language=en_US).

![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 Turning on citations affects the entire prompt template. If a prompt template contains multiple retrievers, then citations are returned for all of them.

#### See Also

- [_Salesforce Help_: Build Trust in AI Responses with Citations](https://help.salesforce.com/s/articleView?id=ai.generative_ai_trust_citations.htm&language=en_US)
- [_Salesforce Help_: Citations in Retrievers](https://help.salesforce.com/s/articleView?id=data.c360_a_ai_citations_retriever.htm&language=en_US)