The Short Answer
Grounding is the difference between an agent that quotes approved policy and one that formulates something that sounds correct. In Agentforce, the Grounding layer consists of four components built in sequence: which sources are declared as the source of truth, how content is chunked and tagged for retrieval, how user permissions are preserved at the moment of retrieval, and what happens when no suitable source is found.
Most failures we see in pilots are not model failures. They are failures of a knowledge base no one has owned for two years, of documents that were cut in the middle of a table, and of a lack of a fallback path. Therefore, the work begins with a content readiness assessment, not by writing instructions.
The broader context for choosing a use case appears in Agentforce for Enterprises.
The Four Layers of Grounding
| Layer | What's Determined Here | Sign It's Broken | Evidence It Works |
|---|---|---|---|
| Sources | Which repositories are declared as sources of truth and who owns them | Two conflicting answers to the same question | List of sources with Owner and review date |
| Representation | Chunking, Metadata, and tagging by product, language, and version | Retrieved chunk is unrelated to the question | Measured Recall on a known set of questions |
| Permissions | How user context restricts retrieval | Internal content appears in a customer's answer | Persona testing for each permission level |
| Transparency | Citations, Freshness, and Fallback path | Answer without source and without admitting lack of knowledge | Percentage of answers with valid citation |
Layer 1: Declaring Sources of Truth
The first step is not technical. You take the twenty most frequently asked questions in the chosen process, and for each question, you identify where the correct answer currently resides. The result is almost always surprising: some answers are in a Knowledge article, some in a CRM field, some in a document held by a team lead, and some in the heads of two veteran people.
Every source brought in needs a named owner, an agreed-upon update frequency, and a last review date. A source without an owner becomes a source of outdated information within months, and the agent will continue to confidently quote it. Sources without owners stay out, even if they are rich in content.
The difficult decision is what not to connect. Email repositories, chat channels, and sales presentations seem like a goldmine but turn out to be a primary source of incorrect answers because they don't distinguish between a draft, a rejected proposal, and approved policy.
The fundamentals of cleaning and preparing the knowledge base are detailed in Agentforce Knowledge Readiness.
Layer 2: Chunking, Metadata, and Relevance
Good retrieval depends less on the model and more on how content is broken down. Cutting by a fixed number of characters destroys tables, step-by-step lists, and eligibility criteria—precisely the content from which accurate answers are derived. It's better to cut by structure: a subheading, a step in a process, or a table row kept intact with its context.
Metadata is what allows you to narrow the search space before the model even comes into play. Minimum tagging to require: product or service line, market or country, language, target audience (customer or internal), expiration date, and approval status. Without market and language tagging, an agent in a global organization will mix policies from two countries in the same answer.
Relevance testing is quantitative, not intuitive: Build a set of 50 to 100 real questions with the correct answer and source, and measure in how many cases the correct chunk appeared in the retrieval. A low Recall score indicates a representation issue, and addressing it is much cheaper than replacing a model or rewriting instructions.
Layer 3: Permissions at the Moment of Retrieval
This is the layer that causes pilot failures during security reviews. The rule is simple: Retrieval must run in the user's permission context, not in the context of a broad integration account. If a piece of information was hidden from the user in the interface, it must also be hidden from the agent's answer.
In practice, three checks are required. First, a mapping between external source classification levels and Profiles and Permission Sets in Salesforce. Second, Persona testing: Run the same ten questions as an agent, manager, and external customer, and compare answers. Third, handling mixed content – a document that is mostly public but has one sensitive paragraph must be cut or not included.
In a public channel, the safe default is a whitelist: only content explicitly marked as approved for the customer is added to the index available to the external agent. A blacklist approach will always miss one document.
The responsibility model between the organization, Salesforce, and the model provider is detailed in Agentforce Security and Shared Responsibility.
Layer 4: Citations, Freshness, and Fallback
These three mechanisms transform an agent from an opaque system into one that can be audited. A true citation points to the actually retrieved chunk, not to an article the model mentions in the text – this is the difference between evidence and decoration. The percentage of answers with valid citations is one of the few metrics a non-technical manager can read and understand.
Freshness requires a written SLA: pricing policies reviewed quarterly, service procedures semi-annually, regulatory content immediately upon change. Content past its expiration date should automatically be removed from the index, not remain until someone notices the error.
Fallback is the behavior most important to test before exposure to customers. The agent should explicitly state that it has no approved information and escalate, rather than formulating a plausible answer. A good test question: ask about a non-existent product and see if the agent invents service terms for it.
Scenario: An Insurance Company with 900 Knowledge Articles
An insurance company wanted an agent to answer policy terms for contact center representatives. The first pilot failed: 40% of answers were incorrect or partial. Analysis showed the problem was entirely in the source layer – out of 900 articles, 380 hadn't been updated in over three years, and 60 of them contradicted newer articles on the same topic.
The team didn't touch the model. They narrowed the index to three core products, only about 140 articles, assigned owners to each product line, and archived conflicting articles. They added tagging for product, version year, and approval status, and switched to chunking by section instead of fixed length.
The second round on the same set of 80 test questions achieved much higher accuracy, and importantly – in cases where there was no source, the agent escalated to a human instead of guessing. The conclusion that led to expansion was not "the AI improved" but "we know what it's based on."
Risks and Precautionary Actions
| Risk | How It's Detected Late | Precautionary Action |
|---|---|---|
| Conflicting sources | Different answers to the same question among representatives | Archiving old versions and a single source of truth for each topic |
| Chunking that breaks structure | Partial answers in multi-step processes | Chunking by section while preserving context heading |
| Permissions at integration level | Exposure of internal content on a customer channel | Retrieval in user context and Persona testing |
| No expiration date | Quoting policies that have been retired | SLA for updates and automatic removal from index |
| Undefined Fallback | Formulating a convincing answer without a source | "No approved information" path tested in every version |
Metrics for the Grounding Layer
| Metric | Definition | Frequency |
|---|---|---|
| Retrieval recall | Percentage of questions where the correct chunk is retrieved | Every version |
| Citation validity | Percentage of answers with an existing and valid source | Weekly |
| Content freshness | Percentage of articles in the index within their expiration date | Monthly |
| Fallback rate | Percentage of inquiries escalated to a human due to lack of source | Weekly |
| Permission leakage | Number of exposure findings in Persona tests | Every version |
A high Fallback rate is not a failure – it's a map of content gaps. The list of questions that led to Fallback is the best priority order for writing new articles.
When internal capacity for establishing a controlled Grounding layer is lacking, Agentforce and AI Service is the practical path forward.
Checklist Before Connecting an Agent to Sources
- ☐ Twenty most common questions mapped to their current answer source
- ☐ Every source in the index has a named owner and update frequency
- ☐ Conflicting sources identified and archived
- ☐ Tagging exists for product, market, language, audience, and expiration date
- ☐ Chunking preserves tables and step-by-step lists
- ☐ Retrieval runs in the user's permission context
- ☐ Persona testing performed for every relevant permission level
- ☐ Test set of 50 questions exists with correct answers and sources
- ☐ Citations refer to the actually retrieved chunk
- ☐ Fallback path is formulated and tested in the customer channel
