cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Context engineering for Genie

Niyojit
New Contributor II

Hello Team,

I have a client who is already using Genie One and Genie Agents, and I want to help them build a strong context layer to improve the quality and accuracy of responses.

I'm looking for guidance on the overall approach and best practices for implementing context engineering.

Specifically, I'd appreciate advice on the following:

  • What should be the first steps when building the context layer?

  • What are the recommended best practices for organizing business context?

  • How should we approach Business Glossaries, Metric Views, Domains, and metadata?

  • How do you decide what information should be included in the context layer?

  • Are there any reference architectures, implementation guides, or sample projects available?

  • If you've implemented context engineering for Genie in a production environment, what lessons learned or recommendations would you share?

I'm looking for a high-level implementation approach that can help me plan and execute this for my client.

Any guidance, documentation, or real-world experience would be greatly appreciated.

Thank you!

Niyojit
1 REPLY 1

ThomazNeto
New Contributor II

Good news: most of this is documented now. Start with the official "Curate an effective Genie Agent" best-practices page and the "knowledge store" page in the docs — they cover ~80% of what you're asking. A few things I'd emphasize on top:

1. First steps: don't start with the context layer, start with one narrow agent for one audience and one topic. Stay focused on the tables actually needed — the docs suggest aiming for around five, with a hard limit of 30 per space; if the topic needs more, pre-join related tables into views or metric views. Make sure UC table/column descriptions are genuinely good, and write a set of benchmark questions with expected answers before you tune anything. Iterate against that.

2. Hierarchy of context (this is the part people get backwards): well-documented datasets first, then example SQL queries (Genie matches user prompts to verified queries and learns from them), then SQL expressions for business semantics, and plain-text instructions last and sparingly — too many instructions actively hurts, because Genie struggles to prioritize them.

3. Glossary / Metric Views / Domains: treat UC metric views as the anchor. They're the governed home for KPI definitions, and from what's been published so far the Ontology appears to weight them as a trusted, curated input — so every metric defined there should pay off across Genie One, Agents, and anything else reading the Ontology. Glossary terms and Domains feed it too, but metric views are where I'd invest first.

4. What goes in the context layer: whatever your benchmark questions fail on. Seriously — let real failures drive curation instead of trying to model everything upfront. Also make use of knowledge mining in the knowledge store: it automatically suggests SQL expressions and join relationships based on UC metadata and author feedback, which cuts the manual work a lot.

5. References: docs → genie/best-practices and genie/knowledge-store. There's also a Databricks blog post on building high-performing Genie spaces (curating data, defining benchmarks, standing up a space from scratch) that's the closest thing to an implementation guide I've come across — worth searching for on the Databricks blog.

One honest caveat: the Ontology side of this (how exactly it weighs each input) is new and only partially documented, so build the parts with clear docs first — metric views, agent curation, benchmarks — and let the Ontology compound on top of that.

Thomaz A. Rossito Neto
Principal Data & AI — CI&T
thomazn@ciandt.com
linkedin.com/in/thomaz-antonio-rossito-neto