As a starter, here I my bullets after tackling a few Genie Space quality iteration requests from real user cases.
Priority Origin: Consider adopt an industry data model fitting your user case from this repo,
Priority 0: Build Benchmark dataset
With at least 10 most representative question-answers (100% correct ones)
then iterate below items one small change/step at a time, verify improvement/regression
backup frequently structured output json of Genie room for your own version controls (by using either the ai-dev-kit genie export skills or write a notebook calling Genie export API yourself)
Priority 1: Unity Catalog Metadata (most effective)
Table and column comments/descriptions
Clear, descriptive naming conventions
Primary keys and foreign key relationships
Priority 2: Reduce Excessive # of tables per Genie space and # of columns per table
tables better under 20 per space
columns better under 50 per table
If you have excessive tables, consider either split into muliple spaces (if your have multiple domains), or if have to keep one space, use metric views/regular views to group tables into less (replacing original tables)
If you have excessive columns per table, either hide unused columns, or use metric views/regular views to group columns to less (replacing original tables)
Priority 3: Prompt Matching
Enable entity matching for categorical columns
Curate value lists for important dimensions
This will map user terms to data values (e.g., “Florida” → “FL”)
Priority 4: SQL Expressions (if sharable among multiple Genie rooms, prefer put in Metric Views)
Define measures for KPIs and metrics
Create filters for common conditions
Set up dimensions for grouping
Priority 5: SQL Examples
Priority 6: Join Definitions (if sharable among multiple Genie rooms, prefer put in Metric Views)
Priority 7: General Instructions (least effective)
Keep concise (under 2000 characters), see below proven template
Focus on business context
Convert complex instructions to Metrics View, SQL Expressions, Joins Defeinitions and SQL examples instead
One caution
Avoid encoding the same business logic in multiple places (including Metric Views) with slight differences. Databricks guidance is to avoid conflicting instructions across context types, because inconsistency hurts reliability.
-----below is an proven template structure for General Text Instruction----
# [SPACE METADATA] (100-200 chars)
Purpose: [One-line business capability]
Scope: [3-5 core data entities]
Users: [Specific target audience]
Domain: [Business area]
# [DATA FOUNDATION] (200-400 chars)
- Core tables with business descriptions
- Key relationships and join logic
- Value dictionaries for categorical data
# [BUSINESS TERMINOLOGY] (200-400 chars)
- Primary Terms: "synonym1", "synonym2"
- Metrics: "metric1", "metric2"
- Abbreviations: "HC"="headcount", "TL"="Technical Leader"
# [RESPONSE STANDARDS] (300-500 chars)
1. Required Fields: Always include [key identifiers]
2. Format Rules: [Date/number formatting]
3. Current Data: Use latest [time dimension] when "current" requested
# [ERROR HANDLING] (100-200 chars)
- No results: "No data found matching criteria..."
- Multiple matches: "Multiple records found, shown by [identifier]..."