{"id":8046,"date":"2026-08-07T12:26:31","date_gmt":"2026-08-07T16:26:31","guid":{"rendered":"https:\/\/workai.tv\/news\/2026\/08\/ai-data\/i-built-an-ai-data-agent-which-can-query-data-and-answer-business-questions-heres-how\/"},"modified":"2026-08-07T12:26:31","modified_gmt":"2026-08-07T16:26:31","slug":"i-built-an-ai-data-agent-which-can-query-data-and-answer-business-questions-heres-how","status":"publish","type":"post","link":"https:\/\/workai.tv\/news\/2026\/08\/ai-data\/i-built-an-ai-data-agent-which-can-query-data-and-answer-business-questions-heres-how\/","title":{"rendered":"I Built an AI Data Agent Which Can Query Data and Answer Business Questions. Here\u2019s How."},"content":{"rendered":"<h2>Share with your CDO<\/h2>\n<p>Building a working <a href=\"https:\/\/towardsdatascience.com\/i-built-an-ai-data-agent-which-can-query-data-and-answer-business-questions-heres-how\/\" target=\"_blank\" rel=\"noopener nofollow\">conversational data agent on BigQuery<\/a> turns out to require less code than most data teams assume, but far more deliberate instruction-writing than any vendor demo suggests. The author walks through constructing an avocado sales analytics agent using Google Cloud&#8217;s Conversational Analytics API, no custom model training required, and lands on a finding that shapes the entire build: the quality of the natural-language-to-SQL translation depends almost entirely on the specificity of the system instructions and verified query examples you write, not the underlying model&#8217;s raw capability.<\/p>\n<h2>What this means for your business<\/h2>\n<p>Organizations that have been waiting for data agents to &#8220;just work&#8221; out of the box are solving the wrong problem. The gap isn&#8217;t model intelligence, it&#8217;s institutional knowledge transfer. Every data team already carries implicit rules about how metrics are calculated, which regional hierarchies overlap, and when a simple average is statistically wrong. The build described here makes that tacit knowledge explicit and injectable. Whether your data platform is Snowflake, Databricks, or BigQuery, the core constraint is the same: the agent is only as reliable as the business logic you&#8217;ve written down.<\/p>\n<p>The weighted average price example buried in the instructions section is the most instructive moment in the piece. A naive agent running AVG(AveragePrice) across aggregated rows produces a confidently wrong number, and no business user querying through a chat interface will catch it. This is the recurring failure mode in self-service analytics: the error doesn&#8217;t surface as an error, it surfaces as a plausible-looking figure that gets cited in a board deck. The fix, writing explicit SQL rules and verified queries that encode correct aggregation logic, is low-tech but requires someone who understands both the data model and the business question deeply enough to anticipate the wrong path.<\/p>\n<p>The CDO who moves first on this isn&#8217;t the one with the fanciest platform choice, it&#8217;s the one who treats instruction-writing as a data product in itself, versioned, reviewed, and owned by someone accountable for answer quality. The vendors marketing &#8220;no-code agents&#8221; are technically right that setup is fast, but they&#8217;re quietly shifting the hard work from engineering to knowledge capture. If your team can&#8217;t articulate your metric definitions precisely enough to write them into an instruction set, the agent will hallucinate your KPIs with perfect grammatical confidence, and that&#8217;s a data governance problem, not an AI problem.<\/p>\n<h2>Concept deep-dive: Verified queries<\/h2>\n<p>Verified queries are human-authored, pre-approved question-and-SQL pairs that an agent treats as ground truth when generating responses. Think of them as worked examples in a textbook: they don&#8217;t cover every question, but they teach the pattern. In data agent systems, they serve as guardrails against plausible-but-wrong SQL generation, particularly for metrics where common intuition (a simple average) diverges from statistical correctness (a volume-weighted average). For any business-critical metric, a verified query is the difference between a useful agent and a liability.<\/p>\n<p><em>Based on reporting from <a href=\"https:\/\/towardsdatascience.com\/i-built-an-ai-data-agent-which-can-query-data-and-answer-business-questions-heres-how\/\" target=\"_blank\" rel=\"noopener nofollow\">I Built an AI Data Agent Which Can Query Data and Answer Business Questions. Here\u2019s How.<\/a>, originally published 2026-08-06 12:30:00.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Share with your CDO Building a working conversational data agent on BigQuery turns out to require less code than most data teams assume, but far more deliberate instruction-writing than any vendor demo suggests. The author walks through constructing an avocado sales analytics agent using Google Cloud&#8217;s Conversational Analytics API, no custom model training required, and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8047,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[146],"tags":[237],"tmauthors":[],"class_list":["post-8046","post","type-post","status-publish","format-standard","has-post-thumbnail","category-ai-data","tag-cdo"],"_links":{"self":[{"href":"https:\/\/workai.tv\/news\/wp-json\/wp\/v2\/posts\/8046","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/workai.tv\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/workai.tv\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/workai.tv\/news\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/workai.tv\/news\/wp-json\/wp\/v2\/comments?post=8046"}],"version-history":[{"count":0,"href":"https:\/\/workai.tv\/news\/wp-json\/wp\/v2\/posts\/8046\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/workai.tv\/news\/wp-json\/wp\/v2\/media\/8047"}],"wp:attachment":[{"href":"https:\/\/workai.tv\/news\/wp-json\/wp\/v2\/media?parent=8046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/workai.tv\/news\/wp-json\/wp\/v2\/categories?post=8046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/workai.tv\/news\/wp-json\/wp\/v2\/tags?post=8046"},{"taxonomy":"tmauthors","embeddable":true,"href":"https:\/\/workai.tv\/news\/wp-json\/wp\/v2\/tmauthors?post=8046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}