Loading
Agentforce and Einstein Generative AI
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Add Citations to Prompt Template Responses

          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

          Available in: Lightning Experience
          Available in: Enterprise, Performance, and Unlimited Editions with the Einstein for Platform, or Einstein or Agentforce for Sales or Service add-on, or Agentforce Foundations
          User Permissions Needed
          To create and manage prompt templates in Prompt Builder:

          Prompt Template Manager permission set

          • Manage Prompt Templates
          • Execute Prompt Templates

          OR

          Customize Application permission set

          To create and manage retrievers: Data Cloud permission set
          To run prompts with Einstein Search: Data Cloud User permission set

          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.

          Note
          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.
          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.

          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.

          Note
          Note Turning on citations affects the entire prompt template. If a prompt template contains multiple retrievers, then citations are returned for all of them.
           
          Loading
          Salesforce Help | Article