cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Genie Hub
Explore technical articles, practical guides, best practices, and real-world use cases to help you get the most out of Databricks Genie. Learn from the Databricks team, MVPs, and community experts.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Which context improves Genie accuracy most? I benchmarked 4 layers

SurajGhodke
Databricks Employee
Databricks Employee
I wanted to know which kind of business context actually moves Genie's accuracy, so I ran a small benchmark on samples.wanderbricks: 30 questions (15 scenarios in 2 phrasings), each with ground-truth SQL, adding one layer of context at a time in a new Genie Agent, two runs per layer.
 
Accuracy over 60 answers per layer:
โ€ข Tables only: 40%
โ€ข Plus Unity Catalog descriptions: 47%
โ€ข Plus metric views: 97%
โ€ข Plus example SQL: 100%
โ€ข Plus text instructions: 97%
 
What stood out:
โ€ข With tables only, Genie got 1 of 36 business-definition answers right. The SQL ran fine; the definitions were missing, for example which booking statuses count as revenue.
โ€ข Metric views fixed every definition they encoded.
โ€ข The one rule that didn't fit a measure (a repeat guest has two or more completed stays) needed an example query.
โ€ข Text instructions on top added nothing.
 
The full write-up, including a row filter and column mask test on synthetic data:
 
Has anyone measured something different, for example with text instructions or Genie Ontology snippets? I'd like to compare notes.
1 REPLY 1

DoTA
Honored Contributor

Thanks for sharing the numbers. The result that only 1 of 36 business-definition answers was right with tables alone is the most useful part, and it matches what you would expect when the definition of revenue lives only in people's heads. A few things that might change how far the layer ordering can be trusted:

1) Layers are confounded. A metric view bundles measure definitions, dimensions and comments in one object, so 'plus metric views' is several kinds of context at once. Running each layer on its own over the bare tables (and metric views vs example SQL head to head) would show whether example SQL alone also reaches the high 90s. Also check that the example queries are not near-copies of the test questions, otherwise 100% partly measures leakage.

2) Ceiling effect. With 30 questions, one miss is about 3 points, and once a layer sits at 97% there is no headroom left for anything stacked on top. 'Text instructions added nothing' may mean 'nothing left to fix'. A harder set (ambiguous column names, financial-period rules, multi-hop joins, questions that need a default filter) where the metric-view layer lands around 70-80% would be a fairer test of the later layers.

3) Variance. Genie output is not deterministic, so with two runs per layer I would report per-question pass counts (0/2, 1/2, 2/2) next to the mean. The 1/2 questions show exactly where the context is still thin. Grading on result sets rather than SQL text, and flagging cases where a wrong definition happened to return the same rows, keeps the score honest.

4) samples.wanderbricks is public, so a second run on a messier private-style schema would show whether the gap between layers holds.

Where I would expect text instructions to earn their place: global rules that apply to every query (default time window, always exclude test accounts, which currency, how to disambiguate 'customer'), since those do not fit a measure or a single example. A test case built around those rules could show a different result. Did you keep the same benchmark question order for every layer, or shuffle it?