The gap between "point the AI at your data warehouse" and "the AI actually gets the right answer" just got a number: 65% failure rate.
The Summary
- DataHub is releasing Context Intelligence, a layer that mines SQL query logs to build a semantic index that AI agents can query via MCP, LangChain, Google's Agent Development Kit, and CrewAI
- At Miro, AI agents querying Snowflake directly got wrong answers more than 65% of the time across 10,000+ tables
- The fix: Use years of analyst query history as a knowledge base so agents see joins that actually worked, validated by humans who ran them
- DataHub's open source lineage project has 15,000+ contributors and 3,000 production deployments worldwide
The Signal
The promise of text-to-SQL agents falls apart the moment you point them at a real enterprise data warehouse. Miro's data team learned this when their agents failed 65% of the time, not because the language model was weak, but because 10,000 tables with no semantic layer is a context desert. The agent has no way to know which `user_id` column in which table actually maps to which business concept. So it guesses. And it's wrong most of the time.
DataHub's solution is to treat SQL query logs as training data. Every join an analyst has written, every filter condition that worked, every aggregation pattern that made it into a dashboard becomes a retrievable artifact. The Context Intelligence layer indexes this history and exposes it through standard agent frameworks: Model Context Protocol, LangChain, Google's Agent Development Kit, CrewAI. When an agent needs to answer "how many active users did we have last quarter," it can see how a human analyst solved that same question six months ago.
"For the first time, enterprises can turn years of analyst query history into a living, retrievable knowledge base where agents stop hallucinating joins because they have access to the joins that have worked before."
This is not semantic layer theater. DataHub has been tracking data lineage in production for years, built originally at LinkedIn where co-founder Shirshanka Das ran data infrastructure for 11 years. The open source project has 15,000 contributors and runs in 3,000 production environments. The query log infrastructure was already there for compliance audits and operational triage. Repurposing it for agent context is an architectural shortcut that actually makes sense.
Key technical moves:
- Mining existing SQL logs instead of requiring manual metadata tagging
- Exposing context through multiple agent frameworks simultaneously
- Building on proven lineage infrastructure already deployed at scale
The timing matters because every data team is getting pressure to "make our data AI-ready" without any clear map of what that means. The instinct is to dump schema documentation into a vector database and hope retrieval-augmented generation does the rest. But schema alone doesn't tell you which tables analysts actually use together, or which join patterns cause performance problems, or which metrics definitions have been deprecated but still live in the warehouse.
The Implication
If you're building agents that need to query enterprise data, query logs are higher-signal than schema docs. They show you what actually worked, not what the data model says should work. The gap between those two things is where 65% failure rates come from.
Watch whether Context Intelligence gets traction outside Snowflake environments. The architectural pattern works anywhere you have structured query logs. If it does, we'll see similar approaches from other data catalog vendors within six months. The agent economy needs better context primitives, and query history is sitting right there.