Skip to main content

Genie Agents Tutorial: Build & Customize AI Data Agents

Summary

  • Domain-Specific Agents: Genie Agents are AI assistants tailored by domain experts to answer specific questions on company data using natural language.
  • Custom Instructions: Define general instructions or add examples so Genie Agents behave in precise ways—like always including sales rep names in breakdowns.
  • Performance Monitoring: Track agent performance, gather user feedback with rating buttons, and continuously improve Genie Agents based on real usage patterns.

Genie Agents Tutorial: Build & Customize AI Data Agents

Watch: Genie Agents Tutorial: Build & Customize AI Data Agents
Master the basics of Genie Agents, domain-specific agents for exploring and acting on your company data.
Learn more about Genie Agents: https://www.databricks.com/product/genie/agents
Chapters:

Chapters

FAQs

What are Genie Agents?

Genie Agents are domain-specific assistants configured by experts to answer questions on company data using natural language. They inherit context from Unity Catalog including table descriptions and join relationships.

How can I customize how a Genie Agent behaves?

This video shows defining general instructions (like always including sales rep names in breakdowns) and adding examples. These customizations apply to all users who use the agent.

How can AI answer questions using live company data?

Genie Agents, shown in this video, are domain-specific assistants that answer natural language questions on company data by inheriting context from Unity Catalog including table descriptions, join relationships, and query history. Data analysts can curate agent behavior through general instructions and examples, ensuring accurate responses that leverage live company data for accurate, domain-specific insights.

Can enterprise search answer questions from dashboards and data, not just documents?

This video demonstrates Genie Agents can query structured data directly—not just documents—by building on Unity Catalog metadata. The agent understands relationships and can answer complex questions like 'show me sales opportunities by stage in each region' with granular breakdowns, going far beyond what static dashboards provide and enabling exploratory analysis of live data.

Can I see how users interact with my Genie Agent?

Yes. You can monitor agent performance and users can rate responses with feedback buttons, helping you understand what works and what needs improvement.

Full transcript

0:00 Introduction

Hi everyone. Today we'll be introducing Genie agents. Genie agents are domain specific assistants that can help your users answer questions on top of their data by simply asking in natural language. These agents are also defined and curated by domain specific experts so that they can ensure that the agent behaves in a very specific manner. To illustrate this, let's first imagine for a second that I'm a data analyst building assets for my sales team.
Now I want to build an agent that can answer questions for them. To do this, I'm going to go ahead and go to new Genie agent and select my relevant data. After I've created my agent, I can go ahead and start asking simple questions. such as show me all open sales opportunities in Apac. To answer these questions, Genie agents inherit a lot of context from Unity catalog. The Genie the table descriptions uh the join relationships and a lot of information that exists in previous queries and dashboards are automatically loaded into this Genie agent.

0:55 Prompting your Genie Agent

As you can see, Genie is able to correctly map open opportunities to very specifically those opportunities in discovery, demo, validation, and procurement status and gives me a breakdown of which exactly those are in. What's powerful about Genie is that it's not able to just answer questions on the tables, but I as a data analyst can actually really curate and tune this agent to behave in specific manners. So, as an example, let's just say on my team, I always want to make sure that my Genie agents include the sales rep name when users ask for a breakdown.

1:40 Updating Genie Agent instructions manually

I can go ahead and just tell the Genie agent to do this inside of general instructions. So, from here, I can define an instruction that says always include the sales rep's name when users ask for a breakdown of performance by sales reps. And now when I go ahead and save this instruction, I'm able to answer questions and it's able to leverage this instruction. So here I can say, show me which sales reps have the best overall performance in APAC.
Now when Genie answers these questions, it's able to leverage the instruction that I've defined for it. And this does this for all the users that may use this agent. Now you can see that when Genie is able to answer this question, it correctly includes the actual sales rep name instead of just the ID of that specific team member. But you can define more than just general text instructions as well. In the examples tab inside of a Genie agent, you're able to give the Genie agent more granular pieces of information to define very specific ways of answering your data questions.

2:45 Adding examples to your Genie Agent

So, as an example, I've been able to define a couple specific join relationships so that whenever Genie writes queries that go across these tables, it knows to respect that guidance. To better curate your Genie agents, we've also built a number of tools that can actually help authors define these instructions. So, let's just say for example that I asked Genie to show me the overall churn rate of customers in APAC. Now, I actually haven't added a definition of churn yet to my agent.
And so, as a result, Genie tries to answer it as best fit. So it defines that actually churn means a customer who has had one closed opportunity but then has later had a closed loss opportunity. And while this may be correct for some interpretation, my specific team defines churn as a customer who's basically had a closed want opportunity but just has never ordered again afterwards. So it's not necessarily that they have to have another closed lost opportunity.
To teach genie this, I can actually just go ahead and open Genie Code. Genie code can now help me edit my instructions to improve Genie's knowledge. So now I can say add an instruction that defines churned customers as those who have had a closed want opportunity but has not had another closed want opportunity in the next year. The Genie code agent is able to read the context from my existing Genie agent and then is able to suggest instructions for me to add.

3:49 Using Genie Code to update your Genie Agent instructions

I can look this over and now accept this which will then automatically improve my Genie agent. As you can see here, I can now go to my instructions and it's automatically added for me phrased properly to capture what I'm looking for. What's powerful about Genie agents is that I can continue improving it even after I've shared it with my other users. Here in the monitoring tab, I'm actually able to see all of the different questions that users have asked to my Genie agent in the past.

4:40 Monitoring and improving performance of your Genie Agent

And I can go ahead and even open them to understand what exactly the questions are, the results that they're getting, and improve my agent from there. Thanks everyone for listening in today. I really hope you now have a better understanding of how Genie agents work, and how to actually build and curate them for your specific teams. >>

Learn more about the Databricks Data and AI platform.

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