Databricks Genie started as a way for users to query data through a browser interface using natural language. Ask Genie brings that same capability into the command line, allowing engineers to interact with their data directly from the environment where they already build and work.
This is a follow-on to the Genie overview, and it is a far more engineering-facing feature. Genie has historically lived in the browser: log into Databricks, ask your questions there. Ask Genie moves that into the terminal, where engineers can use it as part of their existing development workflow rather than switching tools.
From browser queries to development workflows
For engineers, the command line is where much of the development process happens. It is where code is written, tested, and executed. Data engineers use it to build pipelines, investigate datasets, and understand how information moves through a system.
A large part of building a data lakehouse for reporting involves exploring the data itself. Engineers need to understand how tables connect, where specific metrics come from, and whether the structures they are building actually represent the business correctly. There is a lot of nuance in that work.
Being able to ask questions directly from the command line makes that process faster. Instead of writing a query manually every time they need to investigate something, engineers can ask Genie questions such as “What were sales last quarter?” or “How is this metric calculated?” and use the answer as part of their workflow. Querying data programmatically is not new. Doing it inside Databricks at this level is.
The problem with AI-generated SQL
Generating SQL is not a new capability. Large language models can already write queries. The harder problem is knowing whether the query and the result are actually correct.
A model can generate a SQL query that runs successfully but still produces the wrong answer. It may select the wrong table, misunderstand a business definition, or use a metric differently from how the organization defines it. If you ask it to print hello world, it can validate that it did that. If you ask it what sales were last year, it has no way to know the number is right.
For example, asking an AI tool to calculate last year’s sales sounds straightforward. But the answer depends on many decisions:
- Which revenue tables should be used?
- Are refunds included?
- Are cancelled orders excluded?
- What definition of “sales” does the business use?
A query can be technically valid and still be wrong.
Why governance changes the equation
This is where Ask Genie differs from a general-purpose AI coding assistant.
A tool like Claude can generate SQL based on the information it has available. It will write the queries, but it is guessing. It has no concept of right or wrong for your business, because it has no access to the organization’s data definitions and governance rules.
Ask Genie works within the Databricks environment and connects with Unity Catalog, Databricks’ governance layer. That means reference queries, approved metric definitions, acceptable ranges, and permission checks all sit behind the answer.
- Without data contextGenerates SQL based on the prompt aloneWith Databricks governanceUses context available within the data platform
- Without data contextNo knowledge of approved metric definitionsWith Databricks governanceCan reference governed metrics and definitions
- Without data contextLimited ability to validate whether results make senseWith Databricks governanceCan compare against reference queries and expected outcomes
- Without data contextNo understanding of data access rulesWith Databricks governanceFollows permissions through Unity Catalog
Using known results to improve confidence
One way to make AI-generated queries more reliable is to give the system something it can compare against. If a company already knows the approved revenue figure from a previous quarter, that result can act as a benchmark.
A script can pull sales per quarter, and if the known quarter matches, there is far more confidence that the formula is right and that the next figure will be too. The same approach can then be applied to similar questions.
This does not remove the need for review, but it gives AI a way to validate its output instead of simply generating a plausible answer.
- Business question
“What were sales last quarter?”
- Ask Genie
Generates SQL using available context.
- Governance layer
Applies definitions, permissions, and reference logic.
- Answer
A result that can be reviewed with greater confidence.
From individual questions to automated workflows
Moving Genie into the command line also creates possibilities beyond asking individual questions. Because it can be used programmatically, teams can integrate it into scripts and recurring workflows.
For example, a script could run every day and ask what new trends are appearing in the data, identify unusual patterns, or help monitor specific metrics. These are the softer questions that usually wait for someone to have time to look.
It can also be plugged into agentic development tools such as Claude Code, so governed data queries become part of the same workflow engineers already use to write and test code.
A more connected way to work with data
Ask Genie does not replace the technical work required to build reliable data systems. The value comes from reducing the amount of manual work required to explore data, understand relationships, and answer questions during development.
The difference between a general AI assistant and a governed data AI system is the context behind the answers.
By moving Genie from a standalone browser experience into the command line, Databricks makes it easier for engineers to use AI as part of the process of exploring, building, and maintaining modern data platforms.
If you are bringing AI into your data workflows and want the definitions and permissions behind it to hold up, we are happy to talk it through.
