Learn · Guide
How do you ground an AI agent in your company's own data?
Published 31 October 2026
Short answer. You ground an AI agent in your own data by putting five things in place. Your data sits in one place where every figure traces back to its record. A company dictionary says what your words and numbers mean. The agent looks things up in your own sources at the moment it answers. Every answer shows its source. And when there is no source, the agent says so. Then you test it with questions you already know the answers to, before anyone relies on it.
This guide explains each part, how to set it up step by step, how to check that it works, and what it does not promise. What grounding is, and why AI is confidently wrong without it, is in the post Grounding is the antidote to hallucinations.
Five things must be in place
| Part | What it does | Without it |
|---|---|---|
| A data foundation | Brings the data from your systems into one place, where every figure traces back to its record. The data foundation, explained | The agent reads exports and spreadsheets, and repeats their errors with a source attached. |
| The company dictionary | Says what your words and numbers mean, and how they connect. | The agent finds the right table and counts the wrong thing. |
| Lookups in your own sources | Lets the agent search your data and documents each time it answers, with its own access. | The agent answers from what the model learned, which never included your company. |
| A source on every answer | Shows the file and page, or the table and row, behind each answer. | Nobody can check the answer without doing the work again. |
| An answer when there is no source | Makes the agent say “I can’t find this in your data”, or point to where the answer may be. | A missing fact turns into a confident guess. |
Set it up in seven steps
-
Choose the questions. Start with one question your company answers every month, such as what you spent on freight last quarter. Write down which systems and documents the answer touches. That list is the agent’s first set of sources. The same first step is in Get your data in order before you buy another AI tool.
-
Bring the sources into one place. Connect those systems to the data foundation, so the figures come from one warehouse, updated on a schedule, where each figure traces back to its record. Documents such as policies and contracts stay where you keep them, as long as the agent can read them and point to the page.
-
Write down what your words and numbers mean. Add the terms the questions use to the company dictionary. Does “revenue” mean before or after discounts? Which accounts count as freight? When does your financial year start? Which customer is which when the same customer appears twice? A person in the company knows these answers; the agent knows only what is written down. The company dictionary
-
Give the agent a way to look things up. Looking things up in your own sources right before answering is called retrieval; the method is known as RAG. For figures, the agent queries the warehouse. For documents, it searches the text, by exact words, by close matches or by meaning. The agent connects with its own access, which your IT, in-house or your IT partner, sets up and your company controls. Give it read access only, and only to what the person asking may see; the guardrails guide explains why. The Model Context Protocol, MCP, is an open standard for this kind of connection between an AI application and your data sources (MCP specification).
-
Tell the agent to answer only from what it found, and to show where. Its instructions say: use only the sources you looked up, not general knowledge, and give the source with every answer: the file and page, or the table and row, and the date of the data. Model providers recommend exactly this. Anthropic’s guide for its Claude models, for example, advises restricting answers to the documents provided and asking for a source behind each claim (Anthropic, Reduce hallucinations).
-
Tell the agent what to do when there is no source. Its instructions give it permission to say “I can’t find this in your data”, and to say where the answer might be. The same guide names this permission as a basic way to reduce false answers.
-
Write every answer to the logbook. The logbook keeps the question, the answer, the query and the tables or documents the agent read. When someone asks later where a number came from, the logbook shows it. The logbook
What a grounded answer shows
Every answer from a grounded agent has four parts:
| Part | What it shows |
|---|---|
| The answer | The figure or the fact, in the company’s own words |
| The source | The file and page, or the table and row, that the answer comes from, as a link the person can open |
| The date of the data | When the data was last updated, so the person knows how current it is |
| What it could not find | Any part of the question with no source, said out loud |
If one of the four is missing, the agent is not yet grounded.
Test it before anyone relies on it
Evals are repeatable tests that run the agent on questions with known answers. Before anyone relies on the agent, run evals with four kinds of question:
- Questions with known answers. Take them from reports you have already checked, such as last quarter’s month-end report. The agent’s answer must match, and its source must be the right record.
- Questions with no answer in the data. Ask about a supplier you have never used, or a period before your data starts. The agent must say it cannot find it.
- Questions in your own words. Use the company’s terms, such as “open invoice” or “freight”. The agent must count what the company dictionary says, not what the word means elsewhere.
- A sample of sources. Open some of the sources the agent gives, and check that they say what the answer says.
Run the evals again after every change of model, sources, company dictionary or instructions. Anthropic’s guide notes that these techniques reduce false answers but do not remove them entirely, which is why the testing never stops.
What grounding does not promise
- The source can still be the wrong one. The agent can pick the wrong row or misread a document. Because the source comes with the answer, a person can see it and correct it.
- Messy data gives messy answers, with a source. Grounding works only as well as the data foundation under it.
- Current is not live. A warehouse updated every night answers questions about yesterday well. The date of the data on every answer tells the person what they are looking at.
So the operator, the person in the company who checks the agent’s work and signs it off, stays in charge. An answer to a question inside the company can run in “acts alone”. Before a figure goes to anyone outside the company, the agent “asks first”. Where an answer feeds a booking, “the operator signs off”. The longer version of these limits is in the post on grounding linked at the top of this guide.
Sources
- Anthropic: Reduce hallucinations, Claude documentation, read 31 October 2026
- Model Context Protocol: Specification, read 31 October 2026