Sub topic 1
Why Agents Need Grounding
Prerequisites
Assume you understand Salesforce objects, fields, permission sets, Knowledge articles, large language models (LLMs), and basic Agentforce concepts such as topics and actions.
Why agents need grounding
An LLM generates likely text from patterns in its training data. It does not automatically know your current product rules, support policies, or private Knowledge articles. It can also produce a confident but incorrect answer, called a hallucination.
Grounding connects the answer to trusted, retrieved content. Retrieval-augmented generation (RAG) is the pattern of finding relevant content first, then giving that content to the LLM as context. The agent can answer from your organization’s information instead of relying only on general model knowledge.
Where grounding fits in an Agentforce agent
An Agentforce agent receives a customer request, identifies the relevant topic, and selects an action. A knowledge action or prompt template can invoke a retriever. The retriever searches indexed content and returns relevant chunks, which are small sections of source documents. The model then uses those chunks to compose a response.
The Einstein Trust Layer in the request path
The Einstein Trust Layer applies security and governance controls around supported AI interactions. Depending on the configuration, it can help enforce access controls, protect sensitive data through masking, and apply organization policies. Grounding supplies the evidence, while the trust layer helps control how data is handled.
Preparing Knowledge articles for retrieval
Publish accurate, focused articles with useful titles, complete steps, and current language. Confirm that the article is available in the intended language and audience context. Remove obsolete instructions instead of indexing them beside newer versions.
For example, administrators can inspect recently published English versions with SOQL:
SELECT Id, Title, UrlName, PublishStatus, Language, LastPublishedDate
FROM Knowledge__kav
WHERE PublishStatus = 'Online'
AND Language = 'en_US'
ORDER BY LastPublishedDate DESC
LIMIT 20Data Cloud building blocks you need
A data stream brings source data into Data Cloud. A data model object (DMO) represents mapped data there. Data Cloud then chunks the article text, creates embeddings, and stores searchable representations in an index. A retriever queries that index and returns selected fields and chunks.
Bringing Knowledge content into Data Cloud
Connect Salesforce Knowledge through the appropriate Data Cloud ingestion path, map article fields, and include the text needed for answers. Configure refresh behavior so published changes reach the index. Validate the path from an online article to a returned chunk before connecting it to an agent.
Exercise
Why should an agent use a retriever instead of answering a policy question from general model knowledge?
Show answer
The retriever supplies current, organization-specific article content that the agent can use as grounded context.