Supercharging Genie Performance With Metric Views

Krishna Bhupatiraju17 Jun 2026

Problem

A company puts a natural-language assistant on top of its warehouse so that business users can ask data questions without an analyst. At Databricks, the sales analytics team reported that Genie answers were "a coin toss": about 50% accurate on the internal benchmark. The causes were poorly documented tables, business rules the assistant could not know, and metrics that teams defined differently.

Example from the article: asked for "total customer consumption", Genie summed the usage column (DBUs) instead of multiplying it by the SKU price, and it returned "Q1" as January to March, but the fiscal year starts in February.

Solution in brief

Treat the assistant like a new hire and fix the data it reads, not the model. Build four layers: trusted core tables, metric views with joins, dimensions and definitions, a metric store with one definition per metric, and a nightly API regression test. Internal benchmark accuracy rose from about 50% to more than 95%.

Questions this case answers
  • How to raise the accuracy of a natural-language assistant that writes queries over a warehouse by giving it governed definitions instead of tuning the model
  • How to regression-test a text-to-SQL assistant so that accuracy does not decay as tables and business rules change
  • How to raise the accuracy of a natural-language analytics assistant (text-to-SQL) above 95%
  • How to stop an LLM assistant from guessing business definitions such as fiscal quarters or revenue

Tools and methods

  • Core tables — a few trusted tables with clear names and column descriptions.
  • Metric views (Unity Catalog) — objects that define metrics, joins, sources and dimensions in one place; exposed to the Genie Space.
  • Metric store — an internal YAML-driven tool; CI rejects a second definition of an existing metric.
  • Genie Spaces API — nightly benchmark questions checked against expected results.
Continue reading — it's free

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