Enable Trusted Agents with Data Cloud
Learning Objectives
After completing this unit, you’ll be able to:
- Describe Data Cloud’s role in retrieval augmented generation.
- Explain how Data Cloud supports testing, monitoring, and guardrails for agents.
- Explain how Data Cloud enables Agentforce Analytics.
Explore the Importance of Trusted Agents
Your agents are your company’s voice to customers, so it’s vital that agents are grounded, compliant, and accountable. With Data Cloud, you can ground prompts in enterprise data with retrieval augmented generation (RAG) and monitor agents with AI guardrails and analytics. This ensures that your agents are more accurate and ethical. In this unit, learn how Data Cloud powers RAG, AI guardrails, and analytics.
Learn About Retrieval Augmented Generation
RAG is a way to ground prompt requests to large language models (LLMs). Grounding is when you add contextual, specific information to prompts to enhance the quality, accuracy, and relevance of the LLM-generated output. RAG involves retrieving relevant information from a knowledge base (using a retriever), augmenting the prompt by combining this information with the original prompt, and generating a response. Hence the term, RAG.
Here are some key terms for understanding RAG. Learn more in Retrieval Augmented Generation: Quick Look.
-
Unstructured data: Data that doesn’t have a specific, consistent format and can’t be easily stored in a typical relational database. After you ingest unstructured data, chunk it so you can create vector embeddings.
-
Vector embeddings: A numerical representation of unstructured data that machines can read. Vector embeddings measure the semantic similarity of different pieces of text, enabling accurate and relevant results in generative AI prompts and searches.
-
Vector data store: Type of database that’s designed to store vector embeddings.
-
Search index: A data structure that stores chunked and vectorized data that can be searched and retrieved from other applications.
-
Retriever: The link between the prompt and the search index. Retrievers search data sources for relevant information to augment the prompt. Ensemble retrievers are a collection of individual retrievers that conducts searches from multiple sources in parallel.
There are two options for implementing RAG for agents.
- Quick start with Agentforce Data Library
- Advanced set up in Data Cloud
Let’s dive into each option.
Data Cloud Enabled: Explore the Agentforce Data Library
The Agentforce Data Library (ADL) is a preconfigured, quick-start RAG solution. It’s your agents’ personal, organized data source.
When you add a data library, either in Agent Builder or from Setup, Salesforce automatically builds a RAG-powered solution with Data Cloud using default settings for all of the components: vector data store, search index, and retriever. You can set up and customize these components individually.
ADLs only support unstructured data. These include:
- Knowledge articles
- Files
- Web search
Learn more in Agentforce Data Library Basics.
Data Cloud Implemented: Customize RAG Fully with Data Cloud Setup
Implementing RAG directly in Data Cloud takes more time, but gives you more control over data ingestion and processing, greater variety of data sources, and precise retrieval mechanisms beyond basic search (such as hybrid search).
With advanced setup, you can ground prompts in any data that’s been brought into Data Cloud. For example, ingest CRM records with unstructured long-text fields and chunk the data. Then create a vector data store and search index. Use the retriever from the search index to ground prompts. When you use these prompts in your agents, you give them a more comprehensive understanding of your customers and your organization. You can give your agents access to harmonized data, zero-copy data, and real-time data, both structured and unstructured.
RAG with Data Graphs
Data graph records provide a flattened view of related data in the form of a JSON string that you can retrieve quickly. For example, create a data graph that models relationships between customer profiles and sales order details. Then use the data graph to ground prompts for agents.
Here are the main benefits of using data graphs for RAG.
- Integrates data from multiple sources including CRM data and data from external lakes through Zero Copy, without the need to create an ensemble retriever.
- Converts data to JSON format, which maintains relational data and is easily understood by agents.
Let’s summarize the differences between ADLs and customizable Data Cloud setup.
Agentforce Data Library |
Customizable Data Cloud Setup |
---|---|
|
|
Data Cloud Enabled: Ensure Security with AI Guardrails
AI needs guardrails to protect data security and keep humans in the loop. This ensures AI usage complies with your organization’s security, privacy, regulatory, and AI governance policies.
Agentforce guardrails include the Einstein Trust Layer and generative AI audit and feedback trail. These features are powered by Data Cloud. Agentforce also has its own guardrails. Learn more in Trusted Agentic AI.
Explore the Einstein Trust Layer
The Einstein Trust Layer protects customer data through robust security features and guardrails, like zero data retention, toxicity detection, secure data retrieval, and dynamic grounding. It improves the safety and accuracy of outputs while ensuring the responsible use of AI agents across the Salesforce ecosystem.
Generative AI Audit and Feedback Trail
The audit trail provides the data you need to track AI agent actions and outputs. This data is stored and analyzed in Data Cloud:
- Prompt ID and user data
- Prompt text and PII-masked prompt
- Safety and toxicity score
You can log feedback on agent responses through the Feedback API. Feedback data includes:
- Thumbs-up and thumbs-down reactions and reason text
- Accept, regenerate, modify, and decline or ignore actions
- Modified final response used
Data Cloud Enabled: Explore Agentforce Analytics
After your agents are deployed, monitor their performance with Agentforce Analytics. Data is stored and processed in Data Cloud. Display results using Data Cloud dashboards and reports.
Pre-built insight dashboards include:
- Data masking
- Toxicity in responses
- User trends
- Acceptance rates
You can also build your own custom dashboards.
Data Cloud Enabled vs. Implemented
Let’s summarize the features of enabling and implementing Data Cloud.
Data Cloud Enabled |
Data Cloud Enabled and Implemented |
---|---|
|
|
Next Up
Now you know the different benefits of Data Cloud enablement and implementation for Agentforce. You also know how Data Cloud powers Agentforce capabilities with unified data, RAG, AI guardrails, and analytics. Next, learn how to implement Data Cloud for Agentforce.
Resources
- Salesforce Help: Using Retrieval Augmented Generation
- Salesforce Help: Agentforce Data Library
- Salesforce Help: Data Graphs
- Salesforce Help: Einstein Trust Layer
- Salesforce Help: Generative AI Audit and Feedback Data
- Salesforce Help: Agentforce Analytics
- Trailhead: Introduction to Data Cloud Reports