AI agents need business context to stop hallucinating SQL joins
The biggest problem with enterprise AI is often not the model. It is the information you give the model before it starts working. Many organizations assume that if an AI agent can see the database schema, it has everything it needs. That assumption breaks down very quickly in large enterprises.
A database schema tells an AI what tables and columns exist. It does not explain why those tables exist, which ones the business trusts, or how analysts have successfully combined them over time. Without that business context, the agent has to guess. That is where hallucinated joins and incorrect answers come from.
DataHub’s Context Intelligence takes a different approach. Instead of relying only on metadata about tables, it analyzes years of SQL query history to identify how experienced analysts have already answered business questions. Those validated queries become a semantic index that AI agents can search before generating SQL. Rather than inventing new joins, the agent starts with joins that have already worked in production.
This changes how organizations should think about enterprise AI. The goal is not simply to connect an LLM to a data warehouse. The goal is to provide the AI with the accumulated knowledge of the business. Historical query activity becomes a strategic asset because it captures practical business logic that usually exists only in analysts’ work.
For executives, this has important implications. Companies have spent years building data warehouses, but they have also spent years building institutional knowledge that is rarely documented in a structured way. Query history contains part of that knowledge. If AI can retrieve it efficiently, the quality of its decisions improves without requiring employees to manually recreate years of documentation.
The approach also supports governance. When AI relies on previously validated business logic instead of generating SQL entirely from scratch, organizations gain more consistency in reporting and analytics. That is particularly valuable for finance, operations, compliance, and other functions where different interpretations of the same data can create expensive mistakes.
The early evidence shows why context matters. During testing at Miro, exposing AI agents directly to the company’s Snowflake environment resulted in incorrect answers more than 65% of the time. The environment contained over 10,000 tables, leaving the agents without enough business context to reliably determine which data assets matched each question. The issue was not the capability of the AI model. It was the absence of semantic guidance.
DataHub builds on existing metadata infrastructure instead of creating an entirely new AI platform
One of the strongest parts of this announcement is that it does not depend on rebuilding enterprise data infrastructure. That matters because large organizations rarely replace core systems. They extend them.
DataHub originally focused on metadata management and data lineage. Data lineage tracks how information moves from operational systems into data warehouses and eventually into dashboards, reports, and business applications. Companies rely on this capability for regulatory compliance, operational troubleshooting, and helping new engineers understand complex data environments.
Over the years, DataHub built technology that extracts SQL query logs, parses them, and maps relationships across enterprise data systems. That capability already operated at production scale. Context Intelligence simply applies the same foundation to a new use case: providing semantic context for AI agents during runtime.
Shirshanka Das, Co-founder and CTO of DataHub, summarized the shift clearly by saying, “The consumption layer has changed from humans to agents.” The infrastructure remains largely the same. The consumer has changed.
That is an efficient strategy. Organizations generally receive better returns when they reuse proven infrastructure instead of introducing entirely new technology stacks. Existing metadata systems already contain information about data quality, ownership, relationships, governance, and usage. Extending those assets for AI reduces implementation risk while preserving previous investments.
Another important point is maturity. Context Intelligence is not based on experimental technology created solely for this product launch. It uses SQL parsing and query-log extraction capabilities that have already been refined through years of enterprise deployments. That gives organizations more confidence than approaches that depend on newly developed infrastructure with limited operational history.
The scale behind the platform reinforces this position. DataHub began as an open source project developed at LinkedIn, where Shirshanka Das led data infrastructure for nearly 11 years before co-founding the company. Today, the project has more than 15,000 contributors and over 3,000 production deployments worldwide. It supports more than 100 connected metadata sources. Across its deployment base, PostgreSQL is the most connected source, followed by MySQL, Oracle, and major cloud data warehouses including Snowflake and Google BigQuery.
For executives evaluating AI investments, this highlights an important principle. Enterprise AI succeeds when it builds on trusted operational systems rather than bypassing them. Metadata platforms already capture how data is created, governed, and used across the organization. Adding semantic intelligence to that existing foundation is often faster, less disruptive, and more scalable than starting from scratch.
A project in mind?
Schedule a 30-minute meeting with us.
Senior experts helping you move faster across product, engineering, cloud & AI.
High-quality SQL query patterns become semantic knowledge that improves AI accuracy
Not every SQL query is useful for training or guiding an AI agent. Enterprise query logs contain a significant amount of noise. They include incomplete experiments, failed queries, temporary analyses, and one-off requests that do not represent trusted business logic. Feeding all of that directly into an AI system would simply transfer the noise into the results.
DataHub addresses this by identifying what it calls “golden queries.” These are SQL queries that have already demonstrated reliable business value. They typically come from experienced analysts or production data pipelines that organizations already trust. Instead of treating every query equally, the platform focuses on patterns that have consistently produced accurate outcomes.
The next step is what makes the system different. Rather than storing SQL as raw code, Context Intelligence extracts the underlying business meaning from these successful queries. DataHub refers to these structured definitions as “semantic anchors.” AI agents retrieve these semantic anchors before generating SQL, giving them access to established business context instead of relying only on table names and column relationships.
Shirshanka Das, Co-founder and CTO of DataHub, described the process by saying, “You can almost think of it as inverting text to SQL.” Instead of starting with natural language and immediately generating SQL, the system begins with validated SQL and derives the business concepts behind it. Those concepts then become reusable context for future AI requests.
This creates a more disciplined workflow for enterprise AI. Business logic evolves over time, and different departments often define the same metric differently. Revenue, customer activity, or operational performance may be calculated using different assumptions across finance, sales, and product teams. Without oversight, AI systems can easily produce inconsistent answers depending on which definition they encounter.
DataHub includes a human validation layer to address this challenge. Domain experts can review AI-generated context, identify conflicting metric definitions, evaluate the potential impact of proposed changes, and approve updates before they become available to AI agents. Human expertise remains part of the process, particularly where business definitions require judgment rather than automation.
For executives, this is an important governance capability. AI should accelerate decision-making, but it should not create multiple versions of the truth inside the same organization. Maintaining consistent semantic definitions helps improve trust in AI-generated analysis while reducing the operational risks associated with inconsistent reporting.
This also reflects a broader shift in enterprise AI. Organizations are moving beyond simply giving models more data. The focus is increasingly on giving models better data, supported by validation, governance, and business meaning. That produces more reliable outcomes than relying on model capability alone.
Miro improved AI analytics by adding a semantic context layer between users and its data warehouse
Miro’s experience demonstrates a challenge that many enterprises will recognize. Large data environments are valuable because they contain extensive information, but their scale also makes them difficult for AI systems to navigate without additional guidance.
Miro was already using DataHub for data lineage tracking and impact analysis when it began testing AI analytics agents against its Snowflake environment. The company found that allowing AI agents to interact directly with the warehouse did not produce reliable results. With more than 10,000 tables available, the agents struggled to determine which data assets matched each business question.
Ronald Angel, Product Manager for the Data Platform at Miro, told VentureBeat that direct natural language queries through Snowflake’s MCP resulted in incorrect answers more than 65% of the time. The issue was not SQL generation itself. The agents lacked sufficient context to identify the correct data before writing SQL.
Miro addressed this by changing the architecture rather than replacing the AI model. Instead of exposing the complete database schema, the company organized its information into well-defined data products. This limited what AI agents could access while providing much stronger business context for each request.
In the production workflow, users submit requests through Claude Chat or Claude Cowork. DataHub’s MCP then interprets the business request by combining metadata, entity relationships, historical query patterns, and the intended business purpose of each Snowflake table. Only after identifying the appropriate data assets does the request move to Snowflake’s MCP for SQL generation.
This sequence matters. Selecting the correct data assets before generating SQL significantly improves the quality of the final answer. The AI is making decisions based on business intent rather than attempting to infer meaning from technical database structures alone.
For executive teams, this highlights an important implementation principle. Enterprise AI performance depends as much on architecture as it does on model selection. Organizations often compare models based on benchmark performance, but real business outcomes frequently depend on how effectively context is delivered during inference. A stronger context layer can produce larger improvements than changing the underlying model.
The Miro example also reinforces the value of treating enterprise data as curated products instead of exposing every available asset to every AI application. Curated access improves reliability, strengthens governance, and reduces the likelihood that AI systems retrieve data that is technically available but operationally inappropriate for a given business question.
As organizations continue deploying AI agents across analytics, finance, operations, and customer functions, this architectural pattern is likely to become increasingly common. The objective is giving AI access to the right data, with the right business context, at the right time.
DataHub positions its context layer as a platform-neutral foundation for enterprise AI
The market for enterprise AI is becoming increasingly fragmented. Many technology vendors now offer their own semantic layers, memory systems, or contextual services. While these capabilities can be valuable, they often work best within a single ecosystem. That creates a challenge for organizations operating across multiple cloud platforms, data warehouses, and AI frameworks.
DataHub is taking a different position. Rather than replacing existing technologies, it is designed to provide business context that can be shared across them. The company’s Context Intelligence layer integrates with widely used frameworks and can provision semantic context into existing platforms, including Snowflake semantic views and Microsoft Fabric IQ.
This approach allows organizations to continue using their preferred infrastructure while improving how AI agents understand enterprise data. Instead of forcing businesses to migrate to a new platform, the context layer becomes an additional capability that enhances existing investments.
Shirshanka Das, Co-founder and CTO of DataHub, explained the reasoning by saying, “A lot of times people want to be platform neutral when it comes to their context layer.” That reflects a broader reality across large enterprises. Most organizations manage multiple vendors, cloud providers, analytics tools, and AI applications simultaneously.
For executives, platform neutrality has practical value beyond technical flexibility. It reduces the risk of becoming dependent on one vendor for business knowledge. Business context often represents years of accumulated operational expertise, governance policies, and analytical practices. Preserving control over that knowledge allows organizations to adapt their technology strategy without losing the semantic foundation that supports AI.
This also improves interoperability. As AI agents become embedded across finance, operations, customer service, engineering, and supply chain functions, they will increasingly need consistent access to shared business definitions. A centralized context layer helps ensure that different AI systems operate from the same understanding of the organization’s data, regardless of which application or model they use.
The long-term opportunity extends beyond today’s AI models. Foundation models will continue to evolve rapidly, and enterprises are likely to adopt multiple models over time. Organizations that separate their business context from any individual AI platform will be better positioned to evaluate new technologies without rebuilding the semantic layer each time they change vendors.
Runtime context is becoming a strategic differentiator in enterprise AI
The conversation around enterprise AI is shifting. Early discussions focused heavily on model performance and computing power. Those factors remain important, but many organizations are discovering that business value increasingly depends on the quality of context provided to AI during execution.
Industry analysts believe this will become one of the defining competitive areas for enterprise technology.
Kevin Petrie, Analyst at BARC, noted that DataHub differentiates itself by integrating metadata across both structured and unstructured information, including documents and images. Many competing solutions concentrate primarily on structured database tables. While structured data provides trusted operational facts, unstructured information often contains business policies, product documentation, technical knowledge, and other information that gives AI a more complete understanding of the business.
As enterprises expand AI deployments, this broader context becomes increasingly valuable. Business decisions rarely depend on structured data alone. They often require combining operational metrics with documentation, governance policies, product specifications, customer feedback, and institutional knowledge. AI systems that can access both forms of information are better positioned to generate responses that reflect real business intent.
Michael Ni, VP and Principal Analyst at Constellation Research, argued that control of runtime context could become the next major platform battleground because it influences how AI systems make decisions across data, workflows, and enterprise operations.
Ni also offered an important caution for technology buyers. He said, “Buyers need to be careful, since many vendors only support a portion of the full context capabilities required for AI and agentic solutions. Buyers should be clear on their context management requirements, as vector memory isn’t business meaning, business meaning isn’t governance, and governance isn’t execution.”
That distinction is significant for executive decision-making. Many AI platforms promote capabilities such as vector databases or long-term memory, but these technologies solve only part of the problem. Remembering information is different from understanding business definitions. Business meaning is different from governance. Governance alone does not ensure that AI executes tasks correctly. Each layer addresses a different requirement within an enterprise AI architecture.
For business leaders, this means evaluating AI platforms as complete operational systems rather than collections of individual features. A strong context strategy should include trusted business definitions, governance controls, metadata, historical usage patterns, and mechanisms for continuous updates as the business evolves.
Organizations that establish this foundation will be better positioned to deploy AI at scale across multiple business functions. As AI agents become responsible for more analytical and operational work, reliable context will increasingly determine whether they deliver consistent business value or create additional operational risk.
Main highlights
- Context determines AI accuracy: AI agents perform better when they understand business meaning. Leaders should treat historical SQL queries and business context as strategic assets to reduce hallucinated joins and improve the reliability of enterprise analytics.
- Build on existing data foundations: Organizations can accelerate AI adoption by extending mature metadata and lineage platforms instead of creating new infrastructure. Reusing proven systems lowers implementation risk while preserving previous technology investments.
- Govern business meaning: High-quality, human-validated SQL patterns create consistent semantic definitions that AI can reuse. Leaders should establish governance around business metrics to ensure AI produces trusted and repeatable results across departments.
- Curate data before exposing it to AI: Miro’s experience shows that limiting AI access to well-defined data products improves accuracy far more than exposing an entire data warehouse. Executives should prioritize semantic context layers as part of every enterprise AI architecture.
- Keep your context layer platform-neutral: Business knowledge should remain independent of any single AI model or technology vendor. A platform-neutral context strategy gives organizations greater flexibility to adopt new AI capabilities without rebuilding enterprise knowledge.
- Treat runtime context as a competitive advantage: The next phase of enterprise AI will be defined by how well systems understand business context during execution. Leaders should evaluate AI platforms on their ability to combine metadata, governance, structured and unstructured information, and continuously updated semantic intelligence.
A project in mind?
Schedule a 30-minute meeting with us.
Senior experts helping you move faster across product, engineering, cloud & AI.


