Databricks Genie: from natural language to answers you can defend

Pull-quote: “Genie quality is a data modelling problem wearing a prompting costume.”
Databricks Genie is a natural-language interface over data you explicitly curate, and that word explicitly is the whole design. A Genie Agent is not pointed at your warehouse. You choose the tables, you write the instructions, you supply the example queries, and Genie generates SQL against that bounded set, runs it on a SQL warehouse, and hands back both the result and the query it used.
That constraint is what makes a Genie answer defensible, and it is also why most disappointing Genie deployments are not model failures. They are modelling failures: ambiguous column names, two tables that could both answer the same question, no declared grain, no comments. The interface exposes whatever clarity your data already had.
This post is the entry point of a series. It assumes you know SQL and have a Unity Catalog metastore, and it assumes nothing about Genie. By the end you will be able to build a space, explain why a user can never see data they are not entitled to, and prove the space works before anyone relies on it.
What you will be able to do
- Explain what Databricks Genie is, what it is not, and where its scope boundary sits.
- Build a Genie Agent from the six inputs it reads, in the order that produces the fewest surprises.
- Diagnose a wrong answer as a naming, grain, or example-coverage problem rather than a prompting problem.
- Explain how Unity Catalog permissions, lineage, and query history make an answer auditable after the fact.
- Stand up a benchmark question set and use it as a regression suite across every change to the space.
- Run a readiness checklist before exposing a space to anyone outside the build team.
What is Databricks Genie, and what is it not?
Databricks Genie is a natural-language interface over a curated set of Unity Catalog tables and views that generates SQL, executes it on a SQL warehouse, and returns the result alongside the query it ran. The unit of configuration is a Genie Agent: a named scope containing the data you expose plus the guidance Genie uses to interpret questions about it.
Four things it is not, because each mistaken expectation produces a different disappointment:
- Not a chatbot over your whole warehouse. Genie sees the tables in the space and nothing else. Coverage is a curation decision you make deliberately, table by table.
- Not a replacement for a semantic model. Genie consumes semantics; it does not invent them. If revenue has three definitions in your Gold layer, Genie will happily give you three answers.
- Not deterministic. The same question phrased two ways can generate different SQL. That is why evaluation is a regression suite rather than a one-time sign-off.
- Not a governance bypass, and not a governance boundary either. Queries run as the asking user, so entitlement is decided by Unity Catalog, not by which tables you added.
What goes into a Genie Agent?
A Genie Agent reads six inputs, and the quality of an answer traces back to one of them almost every time.
| Input | What it does | Where it lives |
|---|---|---|
| Tables and views | Sets the scope boundary Genie can query | Unity Catalog, selected into the space |
| Column comments and descriptions | Tells Genie what a field means | Table and column metadata |
| Primary and foreign key constraints | Signals the intended join paths | Declared on the table, informational |
| General instructions | Business rules, defaults, preferred tables | The space configuration |
| Example SQL queries | Question and query pairs that fix the pattern | The space configuration |
| SQL functions and metric views | Calculations with one governed definition | Unity Catalog objects |

Two of these deserve emphasis. Example SQL queries change answer quality more than anything else you can add: a few question and query pairs teach Genie the join path, the filter conventions, and the grain you expect, in a form far more precise than prose. Metric views are the durable fix for definitional drift, because a metric view is a Unity Catalog object that defines dimensions and measures once, so a measure carries the same definition into Genie, dashboards, and anything else that reads it.
How do you set one up, in order?
Build in dependency order, because every later step is cheaper once the earlier ones are done. Fixing names after writing thirty instructions means rewriting the instructions.
- Pick one subject area. One space per subject, not one space per department. If two tables in your candidate list could both answer “how many active customers”, you have a curation problem to settle before you start.
- Fix the model you are exposing. Rename ambiguous columns, or expose a view with clear names where you cannot rename the table. Declare the grain of every fact table. This step is the whole post, and skipping it is why the later steps disappoint.
- Write comments on every exposed table and column. Genie reads these as primary input, not as documentation garnish. One clause per column, saying what it means and what unit it is in.
- Declare primary and foreign keys. These constraints are informational in Unity Catalog, meaning they are not enforced, but they communicate the intended join paths so Genie does not guess.
- Attach a warehouse and add the tables. Serverless keeps start-up out of the user’s experience. Then add the tables, and only the tables, that the subject area needs.
- Write general instructions for real business rules. Fiscal calendar, which status codes mean active, which table is authoritative for revenue. Rules, not descriptions of columns you already commented.
- Add example SQL queries for your most common questions. Start with the ten questions people actually ask, each paired with the query you would write by hand.
- Register SQL functions or metric views for contested calculations. Anything with a company-specific definition belongs in a function or a metric view rather than in prose that Genie has to re-derive.
You know the space is working when you ask a question from your benchmark set, the generated SQL uses the join path from your example queries, and the number matches what your existing report produces. If the SQL invents a join, the model or the example set is incomplete. That is a data problem, not a prompt problem.
Why is Genie quality a data modelling problem, not a prompting problem?
Because Genie’s inputs are your schema, your names, and your comments, so the ceiling on answer quality is set by how clearly your data describes itself. No instruction block compensates for a table with columns named amt, amt_2, and amt_final.
Three modelling defects account for most wrong answers. Ambiguity is the first: two tables or two columns that could each plausibly answer a question, with nothing to distinguish them. Undeclared grain is the second: expose an order-line fact and an order-header fact in the same space without saying so, and a sum across a join double-counts while looking entirely reasonable. Missing conformance is the third: when each mart has its own customer table, Genie cannot know which one you meant, because neither can a new analyst.
This is why a Genie Agent is a good acceptance test for a Gold layer. If a curated, documented, conformed set of tables exists, standing up a space is a short exercise. If it does not, the space surfaces exactly which parts of the model were never finished. The pattern choices behind that layer are covered in data architecture patterns and fit.
How do Unity Catalog permissions and lineage make an answer defensible?
Because Genie executes generated SQL as the user who asked, every Unity Catalog control applies unchanged, and every answer leaves an audit trail in the same places a hand-written query would.
Entitlement first. A user who lacks SELECT on a table in the space gets no data from it, regardless of the space’s membership list. Row filters restrict which rows that user sees, and column masks apply to sensitive fields, so two people can ask an identical question and correctly receive different answers. Adding a table to a space is a curation act, not a grant, which is worth saying explicitly in any governance review because the two get confused.
Auditability second. Genie shows the SQL it generated, so a user can inspect the logic instead of trusting a number. That statement lands in query history attributed to the asking user, and Unity Catalog lineage records which tables and columns fed it. When somebody asks where a figure came from three weeks later, the answer is a query you can read, a user who ran it, and a lineage graph, not a screenshot.

How do you evaluate a space before anyone trusts it?
Build a benchmark question set with known-correct answers and treat it as a regression suite. A space without one is a demo, because nobody can say whether last week’s instruction change made it better or worse.
Genie provides a benchmark capability inside the space for this purpose: you store questions along with the correct answer or reference SQL, then re-run the set and compare. Cover four categories deliberately. Include the common questions people actually ask. Include questions with a known trap, such as one that invites a double-count across grains. Include questions that need a governed calculation, to check the function or metric view gets used. Include questions the space should decline, because a confident answer drawn from data that cannot support it is the most damaging failure mode.
Then run the set on a schedule and after every change: new tables, edited instructions, a new example query, a schema change upstream. Capture user feedback in the interface so real misses become benchmark cases, and review the questions that produced no answer or a rejected one, since those are your coverage backlog. Accuracy on a fixed set over time is the only number worth reporting, and it is the number that decides when the space is ready to widen.

Where this goes wrong
Too many tables in one space. The symptom is Genie choosing the wrong table for a routine question. The cause is ambiguity: several tables could answer it and nothing says which is authoritative. Split by subject area and remove near-duplicates, or hide them behind a view.
Column names treated as documentation. The symptom is correct SQL against the wrong column, which is the hardest failure to spot because nothing errors. The cause is missing comments on fields whose names do not carry meaning. Comment every exposed column, and rename in a view where the table cannot change.
Instructions used to patch the model. The symptom is an instruction block that keeps growing while quality stays flat. The cause is prose compensating for structure. Instructions should carry business rules that no schema could express, not corrections for names you could fix.
Launched with no benchmark. The symptom is an executive receiving a wrong number in week two, after which the project is finished regardless of what you fix. The cause is exposing a space before establishing what correct looks like. Benchmark first, pilot group second, wide access third.
Treating the table list as a security boundary. The symptom is a governance review that finds a space exposing a table with sensitive columns and concludes Genie leaked data. The cause is confusing curation with entitlement. Unity Catalog grants, row filters, and column masks decide what any user sees, and they are where the control belongs.
Common questions
Can Genie show a user data they are not permitted to see?
No. Genie runs the generated SQL as the user asking the question, so Unity Catalog grants, row filters, and column masks all apply. Adding a table to a space makes it visible to Genie’s query generation, not to users who lack SELECT on it. Two users asking an identical question can correctly receive different results.
Do I need a semantic layer before using Genie?
Not to start, but you need one definition per measure as soon as more than one person asks the same question. Metric views give a measure a single governed definition in Unity Catalog that Genie, dashboards, and applications all inherit, which is what stops three consumers from producing three revenue numbers.
How many tables should a Genie Agent contain?
Few enough that you could explain every join path out loud without checking. One subject area per space is the working rule. Breadth comes from having several focused spaces, not from one space that contains everything and picks wrongly.
What happens when Genie cannot answer a question?
It will still attempt SQL over the data it has, which is why coverage matters and why your benchmark set should include questions the space is supposed to decline. Reviewing unanswered and rejected questions is how you find the gap between what users want and what you curated.
Where can I see the SQL behind an answer?
In the answer itself, since Genie returns the generated query, and afterwards in query history attributed to the user who asked. Unity Catalog lineage shows which tables and columns that query touched, so an answer can be reconstructed weeks later without a screenshot.
Next steps
Pick one subject area, write ten questions your users actually ask, and answer them by hand in SQL before you create the space. Those ten queries become your example set and the first version of your benchmark, and the exercise usually surfaces two or three modelling problems you would otherwise have discovered in front of an audience.
Then read putting Genie inside your data engineering process, which turns the benchmark set from a launch gate into a definition of done for promoting Silver tables to Gold. If the platform underneath is being sized or budgeted at the same time, where Databricks spend actually goes covers the warehouse settings that decide what a Genie Agent costs to keep available. More engineering writing sits in the Signals index.
Zorost builds these spaces on client lakehouses as a trusted Databricks partner, where a space does not reach users until it passes its benchmark set and the generated SQL has been read by someone who knows the model.
