Context Infrastructure for AI Agents: What It Takes to Keep Context True
What is context infrastructure for AI agents?
Context infrastructure for AI agents is a common governed layer that gives every agent one relevant, reliable, and retained version of what enterprise data means, authored outside any single agent or data platform.
- Relevant means each agent gets the right context for the question
- Reliable means that context is accurate and trusted
- Retained means it persists, and someone keeps it current as the business changes
Ask a data agent how many active customers you have, and it will answer. And it will answer in the same confident tone whether it picked the right table and the current definition, or the wrong ones.
An agent sounds exactly as sure when it is wrong as when it is right.
Shirshanka DasCo-founder and CTO, DataHub
Giving an agent context is the easy part. Keeping that context true as tables change, metrics get redefined, and new agents arrive is much harder, and it’s the job a context platform exists to do.
The stakes are measurable. In EMA‘s November 2026 survey of 202 data and analytics decision-makers, 41% said their organization took a materially incorrect action or decision based on a wrong AI output in the past six months.
Where context infrastructure sits in the agent stack
Context infrastructure for AI agents holds what your organization’s data means: which tables are authoritative, how metrics are calculated, which accounts finance always excludes, and why. It lives outside any single agent, so every agent that asks the same question gets the same answer.
That makes it a different job from context engineering for AI agents, which shapes what goes into one agent’s context window on one turn. Context engineering techniques such as retrieval, compaction, and token budgets are necessary. But they assume someone has already decided what’s true. Context infrastructure is where that decision lives. (See our longer read on context engineering versus context management.)
Context infrastructure is also broader than a semantic layer. If you already define your top metrics in dbt, Looker, or Snowflake semantic views, keep that as the source of truth for those metrics. A context platform builds on it, covering the long tail of questions that hand-maintained semantic models never reach. There’s too much long-tail context to write by hand, so a context platform generates it from query history, BI definitions, and existing documentation, and people refine it from there.
Independent research points the same way. EMA found that organizations combining several context assembly methods reported materially wrong actions at 20%, against 48% for those relying on a single method. Making the semantic layer the primary source of context made no difference on its own (44% versus 43%). EMA is careful to note these are self-reported associations, not proof of cause.
For the architecture behind this layer, see our guide to the context layer for AI agents.
How context drifts: across agents and over time
The “retained” part of the opening definition is the hardest to deliver, because context drifts in two directions.
Across agents: every agent keeps its own version
When each agent is built with its own sources and its own notes, each one ends up with its own version of the truth. DataHub learned this from its own internal agents. In his CONTEXT 2026 keynote, Shirshanka Das described a customer intelligence agent that gave different answers to “How many customers do we have?” depending on whether it checked the CRM, which counts paying logos, or the warehouse, which counts anyone using the product. A project management agent filed 12 issues into the wrong project because all it knew were project names.
The tools around those agents made it worse. Nine tools in DataHub’s stack, from HubSpot and Zendesk to Snowflake and dbt, each ship with an assistant that wants to hold the company’s knowledge. Turn them all on, Shirshanka pointed out, and you get nine assistants, each building its own copy of what the organization knows.
The same thing happens at enterprise scale. After more than 100 teams at Optiver started documenting data for their agents, the platform team counted nearly 2,000 datasets documented independently, with one table described on more than a dozen separate pages. When different teams described the same data, only about two-thirds of the descriptions fully agreed.
The 2026 State of Context Management Report shows just how common this is. Of 250 IT and data leaders, 57% duplicate AI efforts across departments for lack of a unified context graph, and 57% find it hard to identify authoritative sources of truth.
Back to the active customer question. If your sales agent and your finance agent each carry their own definition, they will give two answers to one question. A context platform fixes this by holding one definition that every agent draws on. DataHub’s team found that once context lived in one shared layer, a correction made once reached every agent. Context tied to one vendor’s platform can’t serve agents running elsewhere, which is how convenience turns into lock-in.
Over time: the business changes and the context doesn’t
A shared layer solves the first kind of drift, but exposes the second: Tables get replaced. Metrics get redefined. Teams reorganize, and people start asking questions nobody documented. Context that was accurate at launch goes stale unless someone maintains it.
Stale context is dangerous because when agents fail on it, they fail quietly. In one of Optiver‘s evaluations, an agent found documentation describing a known issue that had been fixed three days earlier. It followed that documentation correctly and produced exactly the wrong answer.
Now suppose finance redefines “active customer” to exclude trial accounts. Nothing breaks. The agent keeps answering with the old definition, and it sounds just as certain as it did before.
The research suggests this is routine: In EMA‘s survey, 61% of organizations said missing, incomplete, or inconsistent context caused AI to misinterpret data at least occasionally. Another 46% caught wrong outputs before they caused harm, which means someone spent time catching them. EMA’s conclusion is that context needs the same ongoing management as data quality.
Even at the scale of one developer and one codebase, the pattern holds. In a 2026 arXiv paper, a developer who kept coding-agent context as structured artifacts written explicitly for the agents reports that out-of-date specifications were the primary failure mode, and that agents produced syntactically correct code that only failed in testing.
Organizations rarely see this coming. In the State of Context Management Report, 88% said they already had a fully operational context platform, yet 61% frequently delay AI initiatives because they can’t trust their data.
A context engineering project builds context for a single agent and moves on. Context management treats context as a living system.
John JoyceCo-founder, DataHub
Standing up context is a project. Keeping it true is an ongoing job. And because stale context fails without warning, the first part of that job is knowing when it has gone wrong.
How can you tell when context has gone wrong?
If stale context fails without warning, you can’t count on someone spotting a wrong answer in time. You need a real way to check whether context is still accurate before anyone acts on it. A certification badge can’t do that. It tells you how a table was labeled, not whether the agent’s answers are still right. Evals do.
Run context evals on real business questions
What is a context eval?
A context eval is a business question paired with a pass condition that defines a correct answer, such as referencing a specific certified table. Evals run against agents to measure whether the context they draw on produces accurate answers. Written before context is generated or edited, evals provide a baseline for showing improvement.
A context eval has three parts:
- A real question that people in the business actually ask
- The conditions for a good answer, such as a reference query, a known-good result, or a rule like “revenue is net of refunds”
- A separate judge agent that scores the response and records why
Domain experts write the questions and verify the expected answers. As DataHub engineer Chris Collins put it in his CONTEXT 2026 session on maintaining agent quality, when an agent gets worse, nothing alerts anyone. “It just keeps answering.”
Use the pass rate to block bad changes and catch drift
Run your evals every day and before every context change. The pass rate becomes two things at once: the gate a change has to clear before it ships, and the alarm that tells you when context has drifted. If the pass rate drops suddenly, look at what changed just before it: newly published documents, a schema change, or a refreshed job. Evals that flip between passing and failing usually point to conflicting documents or an ambiguous question.
You don’t need hundreds of evals to start. In his keynote, Shirshanka recommended about 20 real questions as a baseline, with a target pass rate, such as 85%, before an agent goes wide.
Optiver runs two kinds. Capability evals measure what agents still can’t do, so they start low on purpose. Regression evals check that nothing already working has broken, so they sit near 100% and any dip is a warning. Every correction a person makes becomes a new eval, so the same mistake doesn’t come back.
The results show up in accuracy. On real researcher questions with expert-verified answers, governed context raised Optiver’s agent accuracy from 42% to 74%, with 87% fewer heavy warehouse queries. In Optiver’s own summary: “Better answers, less work, lower cost.”
Miro took text-to-SQL accuracy from below 40% to over 90%, measured against 900 real business questions written by data experts.
This is what EMA means when it recommends measuring context failure as an operating metric. In the active customer example, the eval for that question fails the morning after finance changes the definition, before anyone acts on a wrong number.
But while an eval will tell you something broke, it doesn’t fix it, and it doesn’t tell you who should.
How do you fix context without reviewing everything?
Having a real person approve every change may work for a handful of documents. But it fails once context is generated at scale, when a single run can produce dozens or hundreds of documents. DataHub found this during its five-month private beta: the team built expert review into the product first, and almost nobody wanted to review generated context by hand (beta lessons).
The better approach puts evals in the reviewer’s seat and puts people where their judgment matters most.
Evals as the default gate
By default, generated context publishes immediately, and evals show whether it helps. When a pass rate drops, the team opens the failing eval, checks which documents the agent used, and corrects or unpublishes them.
For sensitive domains, you can turn auto-publish off and choose reviewers. If you leave the reviewer list empty, requests go to the owners of the tables and domains involved, plus admins. Reviewers can run evals against a proposed change before approving it, so they see what it would fix or break before anything goes live.
| Auto-publish | Approval first | |
| When to use it | Most domains, especially to cover the long tail quickly | Sensitive domains where a wrong answer carries regulatory or financial risk |
| What gates publishing | Eval pass rate | A named reviewer, informed by eval results |
| Who reviews | Owners investigate when evals fail | Chosen reviewers, or table and domain owners plus admins by default |
Agents report gaps, and owners approve fixes
The people and agents using context are the first to notice when it falls short, so a flagged interaction yields context every other agent can benefit from. When an agent hits a gap, it records one of four kinds of feedback:
- Missing
- Incorrect
- Conflicting
- User correction (a correction a user gave it mid-conversation)
Owners confirm the gap is real, fix the context, add an eval for the question that exposed it, and resolve it. People don’t need edit rights to help. Anyone can propose a change, including from Slack or Teams, and owners approve it.
Documents that prove themselves in evals can be certified, so agents treat them as authoritative rather than automatically derived.
In the active customer example, an agent flags conflicting definitions. The finance owner approves the updated definition, adds an eval for it, and the fix reaches every agent at once.
Human effort has the highest leverage in two places: writing the eval questions, and reviewing feedback from agents in production. (For the day-to-day practice, see our guide to agent context management.)
But it’s important to note that this loop never finishes: It runs for every domain, for as long as the business keeps changing, which raises the question of who should run it.
Build or buy: who runs the maintenance loop?
Building a first version of context infrastructure is feasible. Teams like Pinterest and Anthropic have built self-serve data agents grounded in business context, with dedicated teams behind them. A DIY pipeline can get you a convincing demo.
What you’re really deciding is who keeps it true for years. Here’s how the ongoing work splits:
| Ongoing work | If you build | With DataHub Cloud | Stays with your team either way |
| Keeping sources current | Your team maintains connectors as tables, dashboards, and owners change | Context Ingestion from more than 150 data sources; including structured data, semantic definitions, and unstructured knowledge sources | Deciding which sources matter |
| Refreshing context | Your team rebuilds generation as query patterns shift | Context Intelligence regenerates context on a schedule without overwriting human edits | Refining what’s generated |
| Catching drift | Your team builds and runs an eval harness | Daily eval runs with a pass rate per domain | Writing eval questions and expected answers |
| Fixing gaps | Your team builds feedback capture and routing | Context Feedback routes agent-reported gaps and user proposals to owners | Approving fixes, especially in sensitive domains |
| Serving every agent | Your team builds and maintains an integration per agent and platform | Context Activation serves one layer through Ask DataHub, the MCP server, and the Agent Context Kit | Choosing which agents get which domains |
Multiply the active customer fix by every metric in every domain, and the “if you build” column is where the cost sits.. Buying doesn’t take your team out of the loop. It moves their time from running the machinery to the judgment calls in the last column.
In DataHub Cloud, that work is organized so each domain gets its own owners, evals, and domain-scoped agent.
In an IDC study sponsored by DataHub (March 2026, five interviewed DataHub Cloud customers), the share of AI/ML models successfully moved to production rose from 25% to 55%, and the AI/ML project failure rate due to data quality and context issues fell from 32% to 24%.
For a step-by-step walkthrough of the full loop, from defining evals to improving with feedback, see the Build a Data Agent guide.
FAQs
What is the context of an AI agent?
What is the context of an AI agent?
The context of an AI agent is everything it can draw on when it answers: the system prompt and other instructions, tool results, conversation history, and knowledge about your business and data. For data agents, the most important part is business context, meaning which tables to trust and how your organization defines its metrics. Learn more about AI agent context.
Is RAG the same as context infrastructure for AI agents?
Is RAG the same as context infrastructure for AI agents?
No. Retrieval-augmented generation (RAG) retrieves relevant chunks of data, usually from a vector database, and adds them to an agent’s prompt when a question comes in. It helps agents work within context window limitations by pulling in only what’s relevant. But RAG improves relevance, not trustworthiness. If the documents it retrieves are stale or conflicting, it retrieves the wrong answer efficiently. Context infrastructure keeps what RAG retrieves accurate and current.
How do you manage context for AI agents?
How do you manage context for AI agents?
Managing AI agent context happens at two levels. Context engineering assembles dynamic context for each agent turn, deciding what goes into the window. Context management makes sure what goes in is accurate, current, governed, and consistent across every agent. Effective context engineering depends on the second, because the best assembly logic still fails if the underlying context is wrong. At enterprise scale, that second job needs a context platform that unifies technical, operational, business, and organizational context in one graph and delivers it to agents through standard interfaces. Learn more about context management.
How do you provide context to an AI agent?
How do you provide context to an AI agent?
Most teams provide context through the Model Context Protocol (MCP), an open standard for connecting agents to tools and data, or through an SDK. MCP standardizes how agents request context. It doesn’t decide whether that context is accurate, which is the job of the layer behind it. With DataHub, agents can hand questions to Ask DataHub or a DataHub agent, or make tool calls to DataHub’s search and context tools directly through the MCP server and Agent Context Kit.
Does context infrastructure for AI agents replace a semantic layer?
Does context infrastructure for AI agents replace a semantic layer?
No. If you maintain a semantic layer in dbt, Looker, Cube, or Snowflake semantic views, keep it as the source of truth for your highest-value metrics. Context infrastructure builds on it and covers the long tail of questions a hand-maintained semantic model doesn’t reach, drawing on query history, BI definitions, and documentation.
What’s the difference between context infrastructure and agent memory?
What’s the difference between context infrastructure and agent memory?
Agent memory is what a single agent carries from its own past work, such as earlier steps in a task or notes kept in persistent memory between sessions. Context infrastructure holds what the whole organization knows about its data, maintained by owners and shared by every agent. Memory helps one agent stay coherent. Context infrastructure keeps many agents consistent.
Who owns context infrastructure in a data organization?
Who owns context infrastructure in a data organization?
Ownership usually splits in two. Context engineers own the infrastructure that ingests, enriches, and delivers context to agents. Context stewards, typically domain experts in the business, own whether the context in their domain is correct, much as data stewards own data quality. Both work from the same evals and feedback.
Can one context platform serve agents across Snowflake, Databricks, and other platforms?
Can one context platform serve agents across Snowflake, Databricks, and other platforms?
Yes, if the platform sits outside any single vendor’s ecosystem. DataHub connects to 150+ data sources and serves the same context to agents running in Snowflake Cortex, Databricks Genie, Claude, ChatGPT, Cursor, LangChain, Microsoft Copilot Studio, and custom agents through MCP and SDKs. A context layer tied to one platform only sees that platform’s data.


