Grounding an Agent in Enterprise Data
Tämä sisältö ei ole vielä saatavilla valitsemallasi kielellä.
The question this module answers: What evidence does an agent need to do its job, and where should each piece of it come from?
When we build a traditional application, we know where its data comes from. A screen reads a Work Order. A flow queries a Service Appointment. An integration calls the finance ERP. A report runs against a set of objects someone chose on purpose.
An agent is different. A large language model knows a tremendous amount about the world, but it knows nothing about your business today. It doesn’t know which crew is on which truck this morning, what window dispatch confirmed for a delivery, or which version of a partner’s claim policy is in force. To work inside the enterprise, an agent needs evidence from the enterprise. That’s grounding.
Here’s how I define it: grounding anchors a model to verifiable, external data sources, so its answers are more accurate and it makes things up less. And for a data architect, that turns into a question you’ve been answering since chapter 1, in a new form: what data does this job need, where should it come from, and can we trust it?
Grounding is bigger than RAG
Section titled “Grounding is bigger than RAG”The easiest mistake to make is to treat grounding and RAG as the same thing. They aren’t.
Retrieval-augmented generation, RAG, is one way to ground a model: search a body of content, retrieve what looks relevant, and hand it to the model as context. It’s exactly right when the question is about content. Steve Trucking’s crew assistant gets asked, “How do I level this dishwasher model?” The answer is in an install guide, a document, and retrieval is how you find the right part of it (chapter 13).
Now take the Recipient’s agent. A Recipient asks, “Where’s my delivery?” We know exactly which fact that is: this delivery’s status, the window dispatch confirmed, and the truck’s latest position. Nobody should embed a million deliveries and ask a vector search which one looks most like the question. We know the fact we need, so we ask the system that owns it. That’s my rule for key facts: fetch them directly from the source of record, with a query, an API call or a direct lookup, not from semantic search.
So there are two kinds of grounding, and we’ll use the distinction all through this chapter:
- A known fact → deterministic access.
- Relevant knowledge → retrieval.
And many real jobs need both. When the care agent works a damage claim, it needs the delivery and its install photos, which are known facts on known records, and the partner’s claim policy, which is knowledge in a document.
Known fact, relevant knowledge, or both.
Context is not the same thing as grounding
Section titled “Context is not the same thing as grounding”There’s a second distinction. A model works from context, and context is a lot of things: the agent’s instructions, the conversation so far, the session, retrieved content, records, API responses, the results of actions it took.
Not all of that is grounding. A Recipient who says “I prefer mornings” has given the agent useful context. An instruction that says “Be brief” is context too. Neither is verifiable evidence about the enterprise. So in this chapter:
- Context is everything supplied to the model to help it reason.
- Grounding is the verifiable, external evidence supplied as context.
That distinction matters, because it tells you what’s ours. We aren’t designing every word that goes into an agent’s prompt. We’re designing the enterprise evidence the agent can use.
Context, memory or record?
Section titled “Context, memory or record?”One more line to draw, and it’s very much a data decision. Information an agent hears in a conversation can go three ways.
It can stay context: used in this conversation, then gone. It can become memory: kept for the agent, across this session or longer, so it doesn’t have to ask again. Or it can become an enterprise record: validated, stored in the system that owns it, and from then on, evidence for everyone.
Here’s why that’s ours to decide. A Recipient tells the agent, “The gate code changed. It’s 4417 now.” That’s useful, and it’s Restricted data. At Checkpoint 2 we gave the gate code its own small record, shared only with the crew assigned to that stop, for that day, and deleted when the delivery is done. If the agent simply remembers the new code, we now have a copy of a secret in a place our design never protected, with a lifetime nobody chose. If it matters, it goes through a narrow action onto the gate-code record, with the same protection as the original. If it doesn’t, it stays context and disappears with the conversation.
My test is the same one I’d use for any new copy of data: if the business would act on it later, it belongs in a record, validated, in the system that owns it. If it only helps this conversation, let it stay context. Memory sits in between, and it needs the same questions as any other store: what’s in it, who can read it, and when it’s gone.
Context, memory or record: a data decision, made before the agent hears anything.
Start with the job, not the data
Section titled “Start with the job, not the data”Data architects have always asked, “What data does this application need?” For an agent, I make the question more specific: what evidence does this agent need to do its defined job?
That last phrase matters. Steve Trucking’s care agent is helping with a late delivery. Salesforce holds a great deal about that delivery and the people around it, and the care staff using the agent can see a lot of it. That doesn’t mean the agent needs it. For this job, it needs the delivery, its confirmed window, its current status, the truck’s latest position, and the remedy the Retail Partner allows.
It doesn’t need the Recipient’s other deliveries, which may belong to other Retail Partners, and S2 says one partner never sees another’s Recipients. It doesn’t need the manifest, the partner’s prices or the five-year archive. And that’s my position on permission: an agent’s grounding sources are limited to what its defined job requires, inside the permissions of the user and the organization. Not everything the user could see. What the job needs.
Which brings us to the central principle of this chapter:
Give the agent the smallest useful set of authoritative, complete context its job requires.
Don’t read “smallest” as “as little as possible.” The word that carries the weight is useful.
The evidence the job needs, not everything the user could see.
More context isn’t necessarily better
Section titled “More context isn’t necessarily better”It’s tempting to assume that if some context is good, more must be better. For a model, it isn’t. Extra context brings in things that don’t apply, duplicate facts, stale values, evidence that contradicts itself, and more cost on every call. Very large contexts can also make it harder for a model to use the information that matters most.
But too little is its own failure. Say Redrock’s claim policy reads, “Damage reported within 30 days of delivery is credited.” The agent retrieves that sentence and approves a credit. Two paragraphs later, the same policy says haul-away items are excluded. Retrieving the first sentence without the second didn’t make the agent better grounded. It gave it incomplete evidence, and it answered confidently anyway.
Salesforce’s own architects put the risk plainly: “When grounding data is incomplete, agents produce plausible but incorrect information. Unlike deterministic queries that return ‘not found,’ agents fill gaps with inference” (Reliability for the Agentic Enterprise (opens in a new tab), Salesforce Architects, checked 2026-11-28). A report with a missing row shows a missing row. An agent with a missing paragraph fills it in.
That’s why the principle isn’t “the minimum context.” It’s the smallest useful set of authoritative, complete context.
Where can grounding come from in Salesforce?
Section titled “Where can grounding come from in Salesforce?”This is where grounding stops being only an AI topic and becomes a data architecture topic. At Steve Trucking, the evidence an agent needs lives in several places.
- Salesforce records. The Work Order, the Service Appointment with its confirmed window, the Case, the photo index. The delivery core of the business.
- Data 360. Data brought together from many sources, unified and made available to Salesforce and its agents. Chapter 15 covers when it’s the right home.
- External systems. Sometimes the authoritative data should stay where it is. FleetLink owns the truck’s position; the finance ERP owns invoices. The grounding is then an action, an API call or a federated read (chapter 14), not a copy.
- Knowledge and documents. Install guides, partner claim policies, procedures. These are indexed and retrieved when they’re relevant, and that’s where search indexes, retrievers and semantic search come in.
- The results of actions. An agent can gain evidence while it works. The finance agent’s eligibility check returns whether a claim qualifies, and that result becomes evidence for the next step.
So the architecture question isn’t “where can the agent get data?” It’s where should this particular piece of evidence come from?
Six questions about grounding
Section titled “Six questions about grounding”All through this chapter, we’ll test grounding with six questions. Module 3 goes deep on each; for now, learn the six.
- Relevant: does this evidence apply to this question or decision?
- Authoritative: is this the source we should trust for this fact?
- Current: is it fresh enough for this decision? Current doesn’t mean the newest data technically available. A partner agreement signed yesterday is perfectly current. A truck’s position from yesterday isn’t.
- Complete: do we have enough to understand it correctly, including the exceptions, the qualifications and the terms around it?
- Permitted: should this agent have this evidence for its job, within the permissions of the user and the organization?
- Traceable: can we tell where the evidence came from, and, for an important decision, what evidence the result was built on?
Relevant, authoritative, current, complete, permitted, traceable. Start asking them whenever enterprise data becomes an agent’s evidence.
The source of truth still matters
Section titled “The source of truth still matters”AI doesn’t retire one of the oldest questions in data architecture: what’s the source of truth? If anything, it makes the question more important.
A Recipient asks when the truck is coming. The Service Appointment says the confirmed window is 2 to 4. The partner’s manifest asked for “morning.” Yesterday’s text message said 1 to 3, before the route was rebuilt. Give the agent all three, and it doesn’t resolve anything. It picks one, and it sounds sure.
So the architecture decides first which source governs this fact. At Steve Trucking, the window a Recipient is told is the one dispatch confirmed, on the Service Appointment, and nothing else; Checkpoint 3 built the Recipient’s action so that’s the only window it returns. That looks like the survivorship work from chapter 6, and it is related. But grounding adds a twist: the conflicting values often aren’t three copies of one field. One is a field, one is a line in a manifest, one is a sentence in a message. The agent still has to know which one governs.
Three windows, one that governs.
Grounding provides evidence. It doesn’t resolve conflicting evidence on its own. That’s still our job.
The data architect’s boundary
Section titled “The data architect’s boundary”One last distinction keeps this chapter focused. Give the finance agent perfect grounding for a damage claim: the delivery, the install photos, the item’s price of $900, and Redrock’s policy that, say, a qualifying claim is credited at 20% of the item price. The agent recommends a credit of $360.
That’s wrong; it should be $180. But it isn’t a grounding failure. Every piece of evidence was right, and it was all there. The error happened in how the evidence was used. Grounding sets the evidence available for a decision. Reasoning decides how that evidence is used. And right grounding can still produce a wrong answer, which is exactly why module 4 keeps enough of the evidence and the reasoning to tell the two apart.
Salesforce gives you several ways to shape and inspect what happens after the evidence arrives: the agent’s instructions, deterministic logic in Agent Script, actions, testing and tracing. A data architect should understand them, because they set requirements for the data. But we don’t own all of them. Here’s the line I draw:
The data architect makes sure the agent has the right evidence. The broader agent architecture decides how the agent uses it.
The next module turns that into a concrete decision: when should an agent retrieve knowledge, and when should it go straight to the source of record?
What an Architect Decides Here
Section titled “What an Architect Decides Here”- For each agent, its defined job, and the evidence that job needs: no more, no less.
- For each piece of evidence, whether it’s a known fact (deterministic access) or relevant knowledge (retrieval).
- Where each piece should come from: a record, Data 360, an external system, a document, or an action’s result.
- What a conversation may turn into: context that’s gone, memory with its own rules, or a validated record in the system that owns it.
- Which source governs when sources disagree.
Beyond the exam: what AI changes. In my Dreamforce and TDX 2026 sessions, Architect Salesforce in the AI Era, I made the point that AI itself has to be tested, and “grounding and data accuracy” is on that list. An agent can’t tell you its evidence was incomplete. It fills the gap and sounds sure. So grounding isn’t a prompt detail. It’s data design, and it gets the same review as any other data.
Explore
Section titled “Explore”- Earlier in this course: Vectors and Embeddings (chapter 13), Copy, Virtualize or Federate (chapter 14), Data Security (chapter 12), and the Steve Trucking agents in Checkpoint 2.
- Salesforce Architects, Well-Architected: Reliability for the Agentic Enterprise (opens in a new tab), checked 2026-11-28.
- Salesforce Developers, Agentforce Developer Guide: Agentforce APIs and SDKs (opens in a new tab), checked 2026-11-28.
- Salesforce Help: Retrieve Data (opens in a new tab), checked 2026-11-28.
- Salesforce Help: Agentforce Observability Infrastructure (opens in a new tab), checked 2026-11-28.
