Use a retriever to search and return relevant data from a search index. Create and customize retrievers in AI Models (formerly Einstein Studio) for Retrieval Augmented Generation (RAG) in Data 360. Retrievers augment prompt templates by providing relevant, specialized grounding information for prompts.
Required Editions
| Available in: All Editions supported by Data 360. See Data 360 edition availability. |
Data Preparation
Data preparation for retrieval from a search index involves loading, chunking, vectorizing, and storing content in a search-optimized way. Data 360 uses a vector data store for unstructured data, such as documents and conversation histories. A search index stores chunked and vectorized data that can be searched and retrieved from other applications. You can create and manage search indexes in Data 360. They’re defined in a data space and associated with a data model object (DMO).
With advanced document processing and indexing capabilities in Data 360, retrievers can retrieve and ground agent responses by processing both text and images. Turn on image processing for the unstructured data model object search indexes to process documents with images and other visuals, such as tables and flow charts. For more information on advanced setup for search indexes, see Use Search for AI, Automation, and Analytics.
Search and Retriever Configuration
Search indexes are often designed for general usage, such as indexing an entire knowledge base. You use retrievers to conduct specialized searches on search indexes and provide relevant results to agents, prompt templates, flows, and other features. Individual retrievers for search indexes apply the multi-purpose search index to a particular use case. For example, retrievers can return content that’s filtered based on a category of articles, the most recent information (such as the last 90 days), or geographical region.
You build retrievers in AI Models and then activate it to make it available to Prompt Builder users. In Prompt Builder, you ground a prompt template with knowledge by inserting and configuring a retriever. At run time, the retriever provides the LLM with accurate, current, and pertinent information to improve the relevance, accuracy, and value of LLM responses.
Retrievers adhere to the data governance policies set up for your data. Row-level access checks make sure that users have access to the data and knowledge returned by the retriever.
Retrievers in Data Cloud One Configurations
When you create a retriever in a Data 360 home org, you can view it in the companion org and use it within Prompt Builder and Flow. You can also create and manage retrievers locally in a companion org. For more information see, Retriever Support in Data Cloud One and Data Cloud One Companion Connections.
Individual Retrievers
Use individual retrievers to retrieve data from from a search index. To create an individual retriever in AI Models, you select its search index, define filters, and specify what information it returns. Filters narrow the search focus to more relevant data. The search index defines the fields that you can use for filtering. You also configure the data returned to the prompt, including the fields of data to return and the number of results. Each time you edit and save an individual retriever, another version is created in AI Models. Only one version of a retriever can be active.
Data 360 no longer creates default Retrievers automatically when you create a search index. Previously, when you created a search index in Data 360, a default retriever was created automatically. You can use existing default retrievers in apps, such as Prompt Builder or flow.
Custom SQL Retrievers
Define, validate, and create retrievers with SQL queries directly in the retriever user interface (UI) without switching between the Query Editor, Apex, and Prompt Builder. Use parameterized queries to build reusable retrievers. Developers get a dedicated UI experience to programmatically build retrievers before deploying them in agents. You can also query other Data 360 objects such as data model objects (DMO), data lake objects (DLO), and calculated insights in the Custom SQL retriever UI.
Ensemble Retrievers
An ensemble retriever is a collection of individual retrievers. When you run an ensemble retriever, it executes the individual retrievers, combines their results into a single list, reranks the list according to relevance to the search request, and returns just the most relevant information to apps.
Considerations for ensemble retrievers:
- Ensemble retrievers don't support retrievers of type Code.
- Individual retrievers with dynamic filters can’t be part of an ensemble retriever.
- In the Retriever Playground, test and validate pre-filter conditions for individual retrievers only when you configure them separately. You can't edit or test individual retrievers directly within an ensemble retriever.
- Ensemble retrievers with custom SQL retrievers can’t be tested in the playground.
Dynamic Retrievers
Dynamic retrievers use placeholders that accept at run time values from prompt templates. A dynamic retriever has a placeholder for a value specified at runtime based on the needs of the prompt template.
- Get Trusted AI Responses with Retriever Citations
Citations link AI-generated responses to the source content relevant to each response. Citations allow users to compare the LLM response with the source data to verify the validity of the response and identify any potential inaccuracies or hallucinations. Enable citations in AI Models (formerly Einstein Studio) at the individual retriever level to give access to citations to solution components that call the retriever, such as a prompt template. - Manage Retrievers
Create and customize retrievers for Retrieval Augmented Generation (RAG) in Data 360. To see the list of retrievers, navigate to the Retrievers tab in AI Models (formerly Einstein Studio). To learn about a retriever, select View Details from the dropdown menu. Each time you edit a custom retriever and save the changes, a new version is created. You can create multiple versions, but you can have only one version active at a time. - Customize, Test, and Validate Retrievers with Retriever Playground
Fine-tune and validate retrieval logic for retrieval-augmented generation (RAG) systems by using retriever playground, reducing deployment risks, and verifying accurate AI outputs. Use AI Models (formerly Einstein Studio) retriever playground to configure pre-filters, select test data, and adjust result parameters to customize retrieval logic for domain-specific use cases, such as retrieving complaince documents or knowledge articles. - Retriever Filters Reference
Configure filter conditions for retrieval accuracy when you create or test retrievers in AI Models (formerly Einstein Studio). Use filter conditions to filter records retrieved for search queries. You can configure up to ten filter conditions for an individual retriever. - Retriever Support in Data Cloud One
Learn about retriever capabilities and limitations when you work with Data Cloud One home and companion orgs.
See Also
- Salesforce Help: Retrieval Augmented Generation (RAG)
- Salesforce Help:Ground with Knowledge Using Retrieval Augmented Generation
- Salesforce Help: Search for AI, Automation, and Analytics
- Salesforce Help: Retriever Support in Data Cloud One
- Trailhead: Retrieval Augmented Generation: Quick Look
- Rag Best Practices White Paper: Agentforce and RAG: Best Practices for Better Agents
- Salesforce Developer: Salesforce Data 360 Connect REST API: Retrievers Reference