Skip to content

Grounding, Retrieval, and Context

Chapter 16 of Data Architect, Part 3: The Modern Data Architect. Previous: Data 360 in the Enterprise (coming soon).

A large language model knows a tremendous amount about the world, and 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. For a data architect, that’s 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?

This chapter answers it in four steps, on Steve Trucking’s agents: the assistant Recipients talk to, the crew’s assistant, and the finance agent checking Redrock’s damage claim.

What evidence does the agent need? → How should it get it? → Can it trust it? → How do we know it worked?

  • Grounding is bigger than RAG. Retrieval is one way to ground a model. Records, Data 360, external systems, documents and the results of actions are others.
  • Grounding isn’t all of the context. Context is everything the model receives; grounding is the verifiable evidence in it. And what a conversation produces is context, memory, or a validated record, three different things with three different owners.
  • Start with the job, not the data. Give the agent the smallest useful set of authoritative, complete context its job requires. More context isn’t better.
  • Don’t search for a fact you already know how to find. Known fact, direct lookup; relevant knowledge, retrieval; and many decisions compose both.
  • Start with the sObjects. Structured, keyword, semantic or hybrid: choose the way of finding from the question, filter on what you know before you search by meaning, and chunk so the meaning survives.
  • The assistant is tireless. An agent asks far more often than a person, so every path has to be selective and limited at agent volume.
  • Six questions about grounding: relevant, authoritative, current, complete, permitted, traceable. Then one more: is it enough for the consequence of what the agent is about to do?
  • Grounding provides evidence; it doesn’t resolve conflicts. That takes written rules, and material ambiguity goes to a person.
  • A correct answer doesn’t prove the grounding is correct. Test the evidence and the failure cases you designed for, not just the answer.
  • Follow the evidence before you decide where it failed: source, data, retrieval or lookup, context, reasoning, decision, action.
  • The data architect makes sure the agent has the right evidence. The broader agent architecture decides how the agent uses it.
QuestionWhat it asksWhere it fails at Steve Trucking
RelevantDoes this evidence apply to this situation?The right clause, from Keystone’s policy, for a Redrock claim
AuthoritativeIs this the source that governs this fact?The portal claim’s $1,050, when the agreement says $900
CurrentIs it fresh enough for this decision?The Snowflake copy, to tell a Recipient where the truck is
CompleteIs there enough around it to interpret it correctly?The 30-day rule without the haul-away exclusion
PermittedShould this agent have it, for this job?The Recipient’s other deliveries, for a care agent helping with one
TraceableCan we tell where it came from, and what it contributed?“A policy” in the trace, instead of version 2026-03, section 4

Four modules, each standing on its own.

  1. Grounding an Agent in Enterprise Data. Grounding versus RAG and versus context; context, memory or record; starting from the job; the smallest useful set; where grounding comes from in Salesforce; the six questions in brief; and the data architect’s boundary.
  2. Choosing How the Agent Gets the Data. Look up the facts you know, starting with the sObjects; four ways to find things; filtering and chunking; Salesforce’s grounding paths; composed grounding on the finance agent’s damage claim; and the tireless assistant.
  3. Designing Grounding You Can Trust. The six questions in practice, provenance and the decision record, when trustworthy sources disagree, thresholds matched to consequence, checking again before action, and following the evidence.
  4. Test, Trace, and Improve the Grounding. Testing Center and the failure cases you designed for, the three retrieval-quality measures, Session Tracing and Platform Tracing, five whys to a root cause, deterministic logic, and test before production, observe after.

Check what stuck with the study guide.

  • For each agent, its job, and the evidence that job needs: no more, no less.
  • For each piece of evidence, whether it’s a known fact to look up or knowledge to find, and the way of finding.
  • Which source governs each fact, and the written rule when sources disagree.
  • Which data classifications may enter the model, and what each agent’s job permits.
  • What makes evidence traceable, and which decisions keep a point-in-time record.
  • The grounding threshold for each consequential decision, and what’s checked again before action.
  • The test cases that prove each decision, who owns each knowledge source, and what every release and model change triggers.

Beyond the exam: the current Data Architect exam guide predates agents, so nothing here maps to an exam objective. That doesn’t make it optional. Almost everything in this chapter has a name you already know: source of truth, effective dating, need to know, lineage, selective queries. What’s new is a consumer that never pauses. A person reading a stale value or half a policy often senses something is off. An agent answers anyway, fluently. So the checks that used to live in someone’s judgment have to live in the design. Each module ends with what AI changes.

Next: Architecture Trade-offs