Building an Explainable AI Research Agent With Databricks Genie

Ruo-Ting Sun, Chad Novek, Rohan Parikh18 Jun 2026

Problem

CVS Health forecasts sales for more than 7,000 retail stores, and every week business partners ask why the forecast is too low or too high, or why sales dropped. Weather, promotion, event or store closure? A data scientist took a ticket, checked stores one by one, tested hypotheses and wrote the story, which took one to three days. Driver dashboards and SHAP did not give field leaders a clear narrative, and data scientists ended up writing ad hoc SQL.

Example from the article: a user asks why sales dropped in a month, and the agent finds in the underlying tables that the month has only two weeks of data.

Solution in brief

The team built a research agent on Databricks AI/BI Genie (agent mode) over governed Unity Catalog data. Column descriptions, join keys and business-metric definitions are loaded into a Genie space, so the agent writes SQL, tests candidate explanations and answers in plain language.

Questions this case answers
  • How to answer why-questions about a metric change by testing candidate explanations over governed tables, so that a data scientist does not need to write ad hoc SQL for each request
  • How to teach a text-to-SQL agent business definitions through column comments and a dedicated context space
  • How to let business users get root-cause explanations of forecast and sales changes without waiting for a data scientist
  • How to make an LLM data agent answer 'why did the metric change' using governed company data

Tools and methods

  • Databricks AI/BI Genie, agent mode — multi-step root cause analysis across tables in Unity Catalog
  • Unity Catalog with AI-generated metadata — column descriptions drafted by a metadata builder and validated by domain experts
  • Genie knowledge store — joins, SQL expressions (measures, filters, metrics) and example SQL queries
  • Genie spaces — one domain-specific chat space per business problem, with a description that works as a manual
Continue reading — it's free

Google or a one-time email code. No password.