Skip to main content

How to give AI agents the right business definitions and metrics

Summary

  • Give AI agents business definitions by modeling them as governed objects in your data catalog, not by pasting them into prompts. On Databricks, that means Unity Catalog metric views for KPIs, plus table and column descriptions.
  • Agent-facing metadata closes the language gap. Metric views can carry display names, synonyms and formats, so a question about "sales" lands on the governed revenue measure.
  • Authority signals settle conflicts. Certifying trusted assets and deprecating stale ones tells Genie which source to prefer.
  • Agents should reach definitions through a governed interface. The Genie One MCP server, which is generally available, lets MCP-compatible agents ask questions grounded in Genie Ontology (Public Preview) under the asker's own Unity Catalog permissions.
  • Test with benchmark questions, and fix each wrong answer where that meaning lives.

How to give AI agents the right business definitions and metrics

Put your business definitions where your data is governed, then make agents read them from there. An agent writing SQL against raw tables has to guess which revenue column is official and what makes a customer "active", and each session can guess differently. The pattern that holds up: define critical metrics once as governed code, describe them in the words people actually use, mark which assets are authoritative, and route agent questions through a layer that applies those definitions and the asker's permissions. Text instructions are the last resort, not the foundation.

Why prompts and raw table access fall short

Direct data access gives an agent reach, not meaning. Databricks' Genie One MCP announcement names the gaps: direct access doesn't tell an agent which sources, definitions or SQL joins are approved, and without shared context each client, model or session can interpret a definition differently. A definition copied into a prompt is also one more copy to keep in sync.

What to look for in a business-context layer for agents

Capability Why it matters
Metrics defined as governed code Each KPI is computed the same way for every dashboard, query and agent
Agent-facing metadata Synonyms, display names and descriptions map everyday words to the right measure
Declared relationships Agents follow known join paths instead of inventing them
Authority signals Certification and deprecation show which source wins a conflict
Permission-aware retrieval An agent only uses context the person asking is allowed to see
Standard access for any agent SQL and MCP let custom agents and assistants reach the same definitions
Built-in evaluation Benchmark questions catch drift before users do

How Databricks approaches business context for agents

Databricks keeps this context in Unity Catalog semantics, tools for defining standard business metrics and terms on top of catalog data.
1. Describe and relate your tables. Add table descriptions and column comments in Unity Catalog, and declare primary and foreign keys. The keys are informational and aren't enforced, but they document how tables relate.
2. Model KPIs as metric views. Unity Catalog metric views separate measure definitions from the fields used to group and filter them. You write the definition in YAML (source, fields, measures, plus optional joins and filter), and consumers query it with the MEASURE() function. Metric views are a Spark SQL feature: Apache Spark 4.2.0 added them with a CREATE VIEW ... WITH METRICS surface.
3. Add agent metadata. Each field or measure can carry display_name, synonyms and format (this requires Databricks Runtime 17.3 and YAML version 1.1). Genie Agents import the synonyms automatically.
4. Certify what you trust. The system.certification_status tag marks tables, views, dashboards, Genie Agents and other objects as certified or deprecated. Certification steers Genie One toward the assets your organization vouches for.
5. Define business terms in Pages (Beta). A Page is a governed definition of a term, entity or acronym. When Genie One answers a question about a concept that has a Page, it prioritizes the Page's definition over inferred context and cites it.
6. Curate Genie Agents for domain logic. In a Genie Agent, SQL expressions define measures, filters and fields with synonyms, and Genie applies that logic exactly as written. Parameterized example queries and Unity Catalog functions act as trusted assets that return verified answers. The curation guidance puts text instructions last.
7. Connect your agents. The Genie One MCP server (system.ai.genie_one_mcp) is generally available and answers questions grounded in Genie Ontology, which is in Public Preview. Genie Ontology combines the semantics you model with context inferred from dashboards, SQL queries and Genie Agents, and gates every snippet by Unity Catalog permissions. A Genie Agent MCP endpoint (Public Preview) scopes an agent to one curated Genie Agent instead.

Where to fix a wrong answer

Databricks' Genie Ontology guide says to correct each error where the business meaning belongs:

If the agent got this wrong Fix it in
A business term or synonym A Page
A measure, dimension, relationship or calculation A metric view
Which table or source to trust Unity Catalog metadata, certification or deprecation
Logic specific to one domain That Genie Agent's SQL expressions, example SQL or instructions

Genie Agent benchmarks score response accuracy at scale. Rerun them after you change a definition.

FAQs

Can agents built outside Databricks use the same definitions?

Yes. The Genie One MCP server exposes Genie to MCP-compatible assistants and coding agents, with the same ontology and permission enforcement as Genie One itself. Any SQL client can also query a metric view directly.

What happens when two definitions conflict?

Genie Ontology scores snippets by where they came from, how often they're used and how fresh they are, then resolves the conflict. A Page's definition takes priority over inferred context, and certification marks the assets your organization vouches for.

Do Unity Catalog permissions still apply to agents?

Yes. Metric views are Unity Catalog securable objects, and Genie only uses snippets extracted from assets the person asking has permission to see.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.