Use retrievers in prompt templates to search for and return relevant information from knowledge that's indexed in Data 360. Retrievers augment prompt templates by providing relevant, specialized grounding information for prompts. Retrievers are created in AI Models (formerly Einstein Studio).
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 |
Retrievers as Resources
In Prompt Builder, you can add a retriever as a resource to a prompt template. You can select from these types of retrievers:
- Individual retrievers created in AI Models
- Ensemble retrievers created in AI Models
- Web retrievers created in Agentforce Data Library
Retriever Settings
After adding an active retriever to a prompt template, you can use the Template Settings side panel to fine-tune retriever settings, such as:
- Search Text: A fully dynamic field that uses merge fields from your prompt template inputs or free text to search the indexed data. The search text input to the retriever is limited to 255 characters, globals, and prompt inputs. To insert merge fields, use the resource picker above the search text area.
- Output Fields: The returned fields in the retriever that contain the search results. By default, all fields defined in the retriever configuration are added to the LLM prompt. However, you can select just the fields you want from the available output fields of the retriever.
- Number of Results: The maximum number of retrieved results, such as 15 knowledge article chunks or 10 similar case chunks.
If no value is specified for the list of output fields or the number of results, Prompt Builder uses the values set when the Einstein Search Retriever was created. Access to retrievers and their data is controlled by the Data Cloud permission sets.
Data Returned From the Retriever
Data returned from the retriever is shown in the Prompt Builder Preview Resolution in JSON format. The prompt template response is then customized based on the search criteria.
Considerations
The search text field for retrievers is limited to globals and prompt inputs. It can’t use other sources, such as related list, Flow, or Apex.