How an AI agent uses business context to query financial data | DataHub
A bank needs to know how many loans issued in 2026 are high risk. The question sounds straightforward, but answering it correctly requires the agent to know what "high risk" actually means in this organization's specific context. That definition doesn't live in the database schema. It lives in a Notion document. In this demo from the DataHub March 2026 Town Hall, Co-Founder John Joyce walks through a live agent workflow against a banking dataset. The agent starts by searching DataHub for everything relevant to the question: business definitions pulled in from Notion and Confluence, the most highly used tables, and the schema context needed to construct an accurate query. Once it has that context, it generates and executes SQL against BigQuery — all in a single reasoning pass, without any manual query writing. The result: $19 million in commercial real estate loans classified as high risk. And critically, the agent doesn't just return a number, it cites its source. It references the commercial loan underwriting guidelines from Notion directly, surfacing the specific rule that any loan with an LTV ratio exceeding 75% qualifies as high risk, and uses that definition to shape both the query logic and the response back to the user. This is the practical difference that business context makes in an AI analytics workflow. Without the Notion document indexed in DataHub, the agent has no way to know what threshold defines high risk for this bank. It would either guess, apply a generic definition, or ask the user to fill in the gap. With DataHub providing that context layer — connecting unstructured business definitions from Notion and Confluence to structured data in BigQuery — the agent reasons over the full picture and gets the right answer. This pattern applies directly to any organization running analytics or AI workflows over data that spans multiple systems. The context layer is what separates an agent that hallucinates a query from one that produces a result you can act on. 📖 DataHub Agent Context Kit: https://docs.datahub.com/docs/dev-guides/agent-context/agent-context 🧠 What is context management? https://datahub.com/blog/context-management/ ➖ FIND MORE ABOUT DATAHUB 🚀 Join the DataHub open source community ▶︎ https://hubs.la/Q03YmhK20 🔍 Take the DataHub interactive product tour ▶︎ https://hubs.la/Q03Ymjqp0 ➡️ Explore DataHub's blog ▶︎ https://hubs.la/Q03YmjLN0 ➖ LinkedIn: https://www.linkedin.com/company/datahub-cloud/ X: https://x.com/DataHubCloud #DataHub #AgentContextKit #AIAgents #ContextManagement #BigQuery #Notion #Confluence #SQLGeneration #DataEngineering #FinancialData #LTV #BusinessGlossary