10.1 AI/BI Genie Architecture & Space Setup
Key Takeaways
- Databricks AI/BI Genie functions as a conversational AI interface built on Compound AI System principles, integrating LLMs with Unity Catalog metadata and Databricks SQL Warehouses.
- Genie space access requires both space-level permissions (CAN VIEW, CAN EDIT, or CAN MANAGE) and underlying Unity Catalog table permissions (SELECT and USE CATALOG/SCHEMA).
- Databricks SQL Warehouses (Serverless or Pro) power Genie query execution, providing low-latency SQL processing and automatic scaling.
- Curating Genie spaces by restricting access to gold-layer curated tables and removing staging tables improves intent parsing accuracy by eliminating schema noise.
- Genie spaces are distributed through workspace ACLs, shareable links, and iframe embeds into external apps after datasets, warehouses, and trusted assets are curated.
10.1 AI/BI Genie Architecture & Space Setup
Databricks AI/BI Genie represents a paradigm shift in enterprise business intelligence, replacing static dashboards with an intelligent, conversational interface. Built upon the principles of Compound AI Systems, Genie combines state-of-the-art Large Language Models (LLMs), deep integration with Unity Catalog governance, and the high-performance Databricks SQL (DBSQL) engine. Rather than relying on a single monolithic model to answer questions, Genie orchestrates specialized components to parse business intent, inspect governed data schemas, generate optimized SQL, and execute queries securely on serverless compute.
Architectural Overview & Query Execution Pipeline
Understanding how AI/BI Genie processes natural language questions is essential for data analysts designing enterprise spaces. When an end user submits a prompt like "What were our top 5 revenue-generating products in Q1 2026?", Genie routes the request through a multi-stage execution pipeline designed for security, accuracy, and performance.
| Pipeline Stage | Orchestrating Component | Primary Responsibility |
|---|---|---|
| 1. Intent Parsing & Context Assembly | Genie LLM Agent & Space Metadata | Evaluates user prompt against space instructions, table descriptions, sample questions, and trusted assets to determine semantic intent. |
| 2. Schema & Catalog Resolution | Unity Catalog Integration | Fetches column definitions, data types, primary/foreign key constraints, and table relationships restricted to the user's explicit permissions. |
| 3. SQL Generation & Validation | Databricks SQL Compiler & LLM | Generates ANSI-compliant Spark SQL, performs semantic validation, and checks against system syntax rules before execution. |
| 4. Query Execution & Compute | Databricks SQL Warehouse | Executes the validated SQL query on a Serverless or Pro SQL Warehouse using the Photon query processing engine. |
| 5. Result Formatting & Synthesis | Visual & Textual Synthesizer | Formats tabular output, generates default chart visual representations, and writes a natural language summary of the results. |
The pipeline ensures that the LLM never accesses raw data directly during the translation phase; it operates exclusively on metadata, column names, comments, and predefined space context. Data retrieval occurs strictly within the governed Databricks SQL engine during Stage 4.
Designing and Provisioning a Genie Space
A Genie Space is a curated workspace object that exposes specific tables, views, and semantic context to business users. Creating an effective space requires deliberate planning regarding dataset boundaries and target user personas.
To provision a new Genie Space in the Databricks Workspace interface:
- Navigate to the AI/BI Genie section in the left navigation sidebar and click New Space.
- Provide a clear Space Name and Description that articulate the business domain (e.g., Executive Sales & Revenue Analytics).
- Select an existing SQL Warehouse (Serverless SQL Warehouses are recommended due to instant startup times and automatic scaling).
- Add governed Unity Catalog tables and views that contain the necessary analytical data.
- Save the space draft and initiate initial curation by adding space instructions.
-- Example: Creating a gold-layer view optimized for Genie Space inclusion
CREATE OR REPLACE VIEW main.finance_gold.v_monthly_revenue_summary AS
SELECT
c.customer_id,
c.customer_segment,
DATE_TRUNC('month', o.order_date) AS order_month,
SUM(o.net_amount) AS total_revenue,
COUNT(DISTINCT o.order_id) AS total_orders
FROM main.sales_silver.orders o
JOIN main.sales_silver.customers c ON o.customer_id = c.customer_id
WHERE o.order_status = 'COMPLETED'
GROUP BY 1, 2, 3;
COMMENT ON VIEW main.finance_gold.v_monthly_revenue_summary
IS 'Curated gold-layer view containing completed monthly revenue and order counts segmented by customer.';
Security, Privileges, and Warehouse Access Model
AI/BI Genie operates under a strict dual-layer security model that combines workspace object permissions with Unity Catalog data governance policies. End users cannot bypass data access controls through conversational prompts.
Workspace Access Control List (ACL) Permissions
Space creators manage user capabilities using three workspace privilege levels:
- CAN VIEW: Allows users to interact with the space, ask natural language questions, view generated charts, and export results. Users cannot edit space instructions or table configurations.
- CAN EDIT: Enables data analysts to add/remove tables, update space instructions, curate sample questions, attach trusted assets, and evaluate benchmarks.
- CAN MANAGE: Grants full administrative control, including deleting the space, modifying workspace permissions, and altering warehouse bindings.
Unity Catalog Privilege Enforcement
When a user asks a question in a Genie space, query execution inherits that specific user's identity (or a defined service principal context). To successfully execute generated queries, the user's identity must possess:
USE CATALOGon the parent catalog.USE SCHEMAon the parent schema.SELECTon all queried tables and views.CAN USEpermission on the assigned Databricks SQL Warehouse.
If a user lacks SELECT privileges on a specific column or table, Unity Catalog blocks query execution at runtime, returning an authorization error without exposing unauthorized data.
-- Granting required Unity Catalog privileges for Genie Space users
GRANT USE CATALOG ON CATALOG main TO ROLE sales_analysts;
GRANT USE SCHEMA ON SCHEMA main.finance_gold TO ROLE sales_analysts;
GRANT SELECT ON VIEW main.finance_gold.v_monthly_revenue_summary TO ROLE sales_analysts;
GRANT CAN USE ON SQL WAREHOUSE `prod-serverless-warehouse` TO ROLE sales_analysts;
Distributing and Embedding Genie Spaces
Creating a Genie space is only half of the exam objective — you must also share and distribute it.
| Distribution method | Typical use |
|---|---|
Workspace / account ACL share (CAN VIEW, CAN RUN/CAN EDIT, CAN MANAGE) | Internal analysts and business users in Databricks |
| Shareable link | Privileged users open the space directly from a copied URL |
| Embed in an external app (iframe) | Bring Genie chat into a portal, intranet, or custom application outside the workspace UI |
| Open Sharing (when enabled for the org) | Controlled sharing patterns for users outside the immediate workspace boundary |
Analyst checklist before distributing:
- Curate only the Unity Catalog datasets the audience should see; Genie answers are bounded by both space curation and the runner’s data permissions.
- Attach a right-sized SQL Warehouse so embedded/shared usage remains responsive.
- Verify trusted assets and instructions so external consumers do not receive brittle SQL.
- Prefer least-privilege ACLs: start with
CAN VIEW/CAN RUNfor consumers; reserveCAN MANAGEfor owners.
Table Selection & Schema Curation Best Practices
Including raw, staging, or uncleaned tables in a Genie space degrades SQL generation quality. Analysts should follow structured curation rules during space setup:
- Expose Gold-Layer Tables Only: Limit space objects to clean, aggregated, gold-layer star schema tables or consolidated analytical views. Exclude bronze (raw ingestion) and silver (cleaning/staging) tables.
- Minimize Table Redundancy: Avoid adding multiple tables containing duplicate or overlapping metrics. If both
ordersandorder_line_itemsare included, explicitly document their granular relationship. - Declare Primary and Foreign Keys: Unity Catalog primary and foreign key constraints serve as critical metadata signals. Genie utilizes declared relationships to construct accurate
JOINconditions automatically. - Prune Unnecessary Columns: Exclude technical surrogate keys, internal ETL timestamps, and raw payload strings to reduce context overhead and prevent model confusion.
Which permission level in a Genie space allows an analyst to add tables, edit space instructions, and curate sample questions?
Which Unity Catalog privilege is strictly required for an end user to execute a Genie query against an underlying gold-layer view?
How does AI/BI Genie prevent unauthorized users from accessing confidential table columns?