Prerequisites
| Item | Why |
|---|---|
| Curated gold tables | Genie answers from what it can see; messy tables give messy answers |
| Table and column comments | Genie uses metadata to understand meaning |
| Clear join keys and primary/foreign key constraints | Better joins in generated SQL |
| Unity Catalog permissions | Users only see data they're allowed to |
| A serverless or pro SQL warehouse | Runs the generated queries |
COMMENT ON TABLE prod.sales.fct_orders IS 'One row per order line. Amounts in INR including tax.';
ALTER TABLE prod.sales.fct_orders ALTER COLUMN net_amount COMMENT 'Line amount after discounts, before tax, INR';
Design a Genie space
| Element | Guidance |
|---|---|
| Scope | One domain (e.g. sales performance), a handful of tables |
| Instructions | Business rules: fiscal year start, how "active customer" is defined, default filters |
| Example SQL | Verified queries for the top questions; Genie reuses them |
| Trusted assets / functions | Parameterised queries or SQL functions for key metrics |
| Audience | A defined group; start small |
Link metric definitions to the semantic layer where possible, so Genie and dashboards agree (see the semantic layer guide).
Test before launch
- Collect 30–50 real questions from the target users.
- Run them; mark answers correct, wrong or unclear.
- Fix with better metadata, instructions or example queries.
- Repeat until accuracy is acceptable for the use.
Operate it
- Review question history and feedback (thumbs down) weekly at first.
- Add examples for common question patterns that fail.
- Monitor warehouse cost from Genie queries.
- Make clear to users that answers show the generated SQL and should be checked for important decisions.
Dashboards vs Genie
| Use | Tool |
|---|---|
| Fixed KPIs viewed by many | AI/BI dashboards (or Power BI) |
| Follow-up and ad-hoc questions | Genie space linked from the dashboard |
Warning
Don't point Genie at raw or silver tables with cryptic columns to "save time". Wrong answers delivered confidently damage trust in the whole data platform.
Checklist
- Gold tables curated and commented
- Space scoped to one domain
- Instructions and verified example queries added
- Tested with real questions
- Feedback reviewed regularly
- Warehouse cost monitored