Skip to main content

Take it to the Limit: Art of the Possible in AI/BI

Summary

  • Advanced AI/BI Techniques: This video explores advanced techniques for AI/BI Dashboards and Genie that go beyond basic analytics to unlock deeper insights and business outcomes.
  • Lakehouse Integration: Learn how to leverage the Databricks Data and AI platform lakehouse architecture to incorporate AI seamlessly into dashboards and handle large-scale data.
  • Best Practices and Limits: Discover real-world techniques for pushing the boundaries of what's possible with current product capabilities and roadmap directions.

Take it to the Limit: Art of the Possible in AI/BI

Watch: Take it to the Limit: Art of the Possible in AI/BI
Talk by Adam Levine, Staff Software Engineer, Databricks ; Noah Sommerfeld, Sr. Delivery Solution Architect, Databricks
Think you know everything AI/BI can do? Think again. this video explores the art of the possible with Databricks AI/BI Dashboards and Genie, going beyond traditional analytics to unleash the full power of the lakehouse. From incorporating AI into dashboards to handling large-scale data with ease to delivering insights seamlessly to end users — we’ll showcase creative approaches that unlock insights and real business outcomes. Perfect for adventurous data professionals looking to push limits and think outside the box.
Intelligent analytics for everyone: https://www.databricks.com/product/business-intelligence
BI meets AI: https://www.databricks.com/resources/ebook/business-intelligence-meets-ai
Explore the only unified platform for agent systems: https://www.databricks.com/product/artificial-intelligence
See all the product announcements from Data + AI Summit: https://www.databricks.com/events/dataaisummit-2025-announcements

FAQs

What is Genie and how does it enhance analytics?

This video explains Genie as an AI-powered tool that helps deliver insights seamlessly to end users, enhancing the analytics experience beyond traditional dashboards.

How can you incorporate AI into dashboards?

This video shares advanced techniques for seamlessly incorporating AI into dashboards on the Databricks Data and AI platform for enhanced insights.

What is the advantage of lakehouse architecture for BI?

According to this video, the lakehouse architecture enables handling large-scale data efficiently while integrating AI capabilities, unlocking more powerful analytics.

What advanced features are covered in this video?

This video covers creative approaches and advanced techniques for using AI/BI Dashboards and Genie to push product capabilities to their limits.

Full transcript

Thanks for coming to the talk today. We're going to talk about uh AIBI, AIBI dashboards, AIB Genie uh and specifically how we can kind of push it to the limit. I'm a delivery solutions architect with the data bricks field engineering or So I work primarily with our big strategic customers making sure use cases are actually making it to production and then when they make it to production that they're running scalably sustainably all that kind of fun stuff.
Uh I've got. a staff engineer with the Genie team. So I'll be talking uh about some of the dashboard techniques that I've seen um that are really effective and then I'll pass it to later to talk about some of the Genie mechanics um that I think you guys will like. There's a number of different talks here this week. Um, if you're looking for talks about uh like intro to AIVI or if you're looking for talks about some of the newest features, uh, we've got some of the other uh, talks listed here on our slide.
Um, specifically for us, what we wanted to do was take a look and talk about some of the advanced techniques that you can do today um, that you can take back with you to your your company tomorrow um, and apply it. And so we'll talk about kind of the product as it exists today um, and some of the more advanced features that you can use to push it to the limit, so to speak. So I'll start us off here. Every product talk at summit this week starts off with this slide.
We're going to talk about some future facing things. Please don't take that as a promise uh legally speaking and some other things. Um but for us specifically uh and I are going to talk about how to push AI to the limit which means that in some cases we're going to be pushing right up against some of the rough edges in the product. Just know that where there's uh where there's limits or where some of the techniques are a little bit awkward.
Most of that stuff is roadmap to be easier in the next bit. Um but we thought some of the techniques that we're showing here today um would be still useful and still worth worth trying out and getting familiar with. Um so I wanted to start with why I'm so excited about AIBI in general. Um and if you the story behind it, most customers have a data platform that looks something like this. You've got data on one side that you know you're ingesting, you're doing some data engineering, uh you're doing maybe some machine learning, etc. uh and you you know you're then serving it as an output to users.
And the reason why I'm excited about AIBI specifically uh is I tend to think about data platforms kind of as input and output. So on the input side most people have you know you might have terabytes of data that you've put investment into. You might have thousands or millions of hours of compute um to build those data sets and you know you put thousands of hours into data governance making sure the data is clean and trustworthy and reliable and secure and you know doesn't breach PII and all that kind of fun stuff.
But it's the right the output side where you're actually taking that investment and you're leveraging it to do things like insights to do things like decisions, predictions. Uh and that's where you leverage the investment that you've made in the foundation to get the business value. And so for us uh when we're prepping this talk, um for us it was the more things that we can do, the more we can empower you to uh to improve the output, the better you can leverage that investment that you've made on your core data set.
And so that's why I I'm very passionate about AIBI, which is why I'm here giving this talk. Um, but it's it's a really cool way to expose the data and the investment that you've already made. Um, so with that, we're going to talk about three things today. First, we'll talk about how to infuse intelligence uh into your dashboards and I'll take a look at some of the techniques using things like AI query. Second, we're going to talk about how to design for scale.
Um, so thinking about the caching mechanics with AIBI and how you can best optimize for them to scale as you go up to thousands of users. Uh and then I'll pass to talk about the Genie feedback loop and a couple interesting techniques that we've seen on how to supercharge it uh and make it a faster feedback loop as you're curating your Genie space. Um so with that I want to talk about intelligence. When you're thinking about dashboard authoring there's generally three places intelligence tends to show up.
The first is around using Genai for authoring. Uh and there's some other talks this week if you want to learn about assistant um and the ways that assistant can help you with authoring. On the other side, we tend to have genai for consumption. So that's t tends to be the more the genie side where you have a business user asking question about the data. Uh and for that we we'd say okay genie is probably the right tool for that.
I want to specifically focus in the middle uh and take a look at a couple ways that you can use genai actually in your dashboard um and in some of your analysis. The key technique that I'll I'll talk about here is using a tool called AI query. Historically data platforms have had machine learning. You've had large language models. uh you've had a lot of capabilities but for analysts uh analysts have struggled to use it because a lot of those tools require SDKs or require hitting APIs or require Python and as an analyst doing some basic SQL or doing analysis from a dashboard that's a very hard interface to do so.
So data bricks rolled out what we call AI query and a handful of other AI functions that do um similar things or more specific things. Um but that gives analysts a a good interface to be able to incorporate that into their dashboard. AI query has two parts. It's got the model or the agent or the endpoint that you want hit and then you pass a plain English prompt and you get plain English back. Uh and so as a quick example here uh hitting something I took a screenshot of an example I did earlier, you know, hitting a claude model.
Uh just say hello and then you get the response back, you know, from claude. Uh if you're looking for more task specific things, there's a couple other AI functions out there like summarize or classify. Um but all of them can be used in a dashboard setting and you can use them uh outside dashboards as well in pipelines or from thirdparty tools. Um but I'll do a quick demo here of what that looks like and how you can incorporate that into your dashboard.
So I'll click out of here. I'll bring up my uh my demo dashboard. So I've got a demo dashboard here. I've called the bake house intelligence. This is built on the bake house data set that's available in every workspace. If you look under the samples catalog, I've got uh you know rough overview. I've got some information on sales here. Um got some information on sales. And so uh overall sales here. You can take a look at some of the numbers.
You know, here's how many things have been sold. Uh the first thing I'll talk about here is a little bit lower. We've got some review data. And so people have done reviews online of my bake house. And you can see their various things. And I'd like to analyze them in a couple interesting ways. Uh so if I take a look at the data here, you can see it's got review date and franchise, but I'd like to analyze that review data.
So uh first technique I'll show you is around AI query in terms of analyzing that plain text language. If I flip to my data tab here, got my review data. Uh right now it's just a basic select star from that sample data set. Uh and then I've got an AI query handy here uh that I I'll show here. I'm uh asking Metal Lama to do a response for me. I'm saying take the sentiment of that review for each review that you're looking at uh and classify it into positive or negative or mixed and then a little bit of prompt engineering here about you know give me some lowercase one word and then I want it as a sentiment column.
So, what I'll do, take this, I'll add it to my query. And if I run this, and I bring the results up, um, you can see when it uh when it runs, it will have a new column here called the sentiment of the review. Um, and then for each review here, we can see uh whether it's positive, negative, or mixed. And what that lets me do as a dashboard author, now I can come back to my dashboard. Uh and what I can do, I can drop a filter on uh and I can uh filter on that review data and I can filter on the sentiment.
Um and now I can filter now down to just the negative reviews for example. Um and I can see okay here's the negative reviews and was dis here's what people were disappointed by etc. So that's a basic kind of text analysis way. Uh but there's some other cooler things that you can do especially around uh overall dashboard commentary. When I build dashboards, I'm often giving the same sort of updates and synthesis every time.
Uh, and so if I go back to my data set, uh, I'll show you how you can use AI query to generate some of the higher level commentary and do some summarization that might be applicable in other ways. Um, so AI query is a function. It takes some data. It's got no built-in context about what you're doing. Uh, and so I've got a small table here that I've got where I've summed up the revenue and I've summed up the sales. And I'd like AI query to give me some commentary that I can put on my dashboard.
Uh in this case, I'm actually feeding it to a custom agent I've got deployed in the workspace. Uh and I'm doing a basic prompt that says just give me some commentary. Uh and I'm passing in the revenue dollars that I have here and I'm passing in the sales and say, you know, give me a couple sentences of commentary on it. So if I add this into it, uh sorry if I So what I'll do is I'll take this here and I'll turn this into a CTE.
So I'll say with base table if I spell it right as um like this then I'll say run this query use this data points etc and then return that as a result. Uh, and I can run this here. Uh, and I get a little bit of commentary. And it's not super insightful commentary, but it's interesting. It's a little bit easier and nicer to read than it would be to look at a raw table. Uh, but we can go further than that. AI query takes text.
There's different ways of representing entire tables as text with thinking like CSV. And so, one more example where I can do overall commentary for my dashboard. I've pre-built this example here. And I'll start at the bottom where I take basically I concatenate every row in a table and take and pull that together. Uh and I will pass that as context into my AI query. Uh and I give it a couple instructions here. Specifically, I say um hey, format the answer with HTML because that looks way better, uh etc.
And then I have a little bit up here where I'm taking every column in each row and I'm concatenating that back down together as well. So I'm turning the entire table into a string. Uh and if I run this here, uh it'll take the data take this uh this small table that I have here where I've grouped things by product. So I have some information products uh and it generates this commentary here and you can see it's a little bit formatted.
Um and you can see it's got a bit more of analysis about the different products. And what I can do is I can go uh back to here. I can take a visualization. I can take it on my sales summary and I'll do a table viz and I'll make my commentary visible. I will allow HTML formatting. And then I like to turn off the uh resizable so it appears nicely. And so now I've got this AI commentary widget that I can put at the top.
When I look at the dashboard I see the overall commentary. Uh and that's a nice way to enter the dashboard and get a bit of context. And this is specifically on sales data. Uh but you can imagine if you've got data in your company that you want to summarize. Uh you can imagine how this might be useful if you've got customer support cases, if you've got ticket data, um you've got all this kind of summary stuff that you want to want to do and not give the same commentary over and over.
That could be a helpful kind of way to surface that. So with that, I'll go back to the presentation here. Couple takeaways from this that I want you to walk away with. Uh, as you're thinking about infusing intelligence into your dashboard, take a look at the models and the agents and the other AI you have in your workspace. Uh, a lot of the stuff exists already. Think about using AI query if you're generating the same commentary all the time.
Um, or if you need to synthesize a bulk of data, especially plain text data. And the last thing in here, uh, if you're a data analyst, consider partnering with your data science team. um if you need a more specific agent, if you want people to build things, you know, with vector search or additional context, uh that can be a very helpful tool. Uh with that, I'll start the second section here. Uh and so that was the first kind of technique that you can use to push your dashboards to the limit.
Second one I want to talk about is about designing for scale. And there's three points that kind of set up this section that dashboard performance gets important as you scale. both from a user experience side if you're scaling to thousands of users you want to make sure the dashboard stays snappy uh stays responsive people are able to get that insight the second is around uh serving cost so as you scale your overall data set up to you know hundreds of gigabytes etc uh you want your dashboard to uh confidently do that without driving your costs through the roof thing to know is that AIBI dashboards gracefully scale so they've got there's functionality to use things in browser uh if you're working on a small data set and then it gracefully uses DBSQL as your data set starts to increase.
And so thoughtfully designing your dashboard around some of those mechanics, a really way to maintain both the uh both the cost optimization and the experience optimization. Uh and I'll walk through a couple mechanics here in the next little bit to show kind of where the design levers are. Um so the general guidance if you walk away from here, uh there's three points. One is keep the data set under the documented limit.
That's 100,000 records currently. uh if you have a data set's under 100,000 records it can the browser cache u and uh it can be very snappy. The second is use filters rather than parameters. Parameters will always fire a query uh to dbsql when you change them whereas filters are able to use uh and be transformed locally. And then the third point for some technical reasons I'll get into uh if you can publish the dashboard with embedded credentials uh that is use the dashboard author's credentials for the data access uh that's a much better experience or much more likely to be able to invoke caches uh than the publishers viewer.
Uh if you haven't thought about this before uh the whether a query is done or not is a little bit subtle. So, I've highlighted on the right uh the if you see the little spinner on widgets or if you're seeing the spinner on the overall dashboard, chances are a query is firing and you can load a dashboard and you can take a look at your query history to see specifically kind of what what things are are going there. Uh and so I'll show a quick example here.
I I took a video. There's uh three versions of this. The one on the left, it's the same data set. This is the TPCH sample data set that's available under the samples catalog. So feel free to run these queries yourself and run this test. Um but is 99,000 records. Uh and so I've put a limit there and you can see as I change through the filter uh it's a very snappy experience. It's happening all locally. Uh it's and it's going quickly.
The middle one I've done I've done a limit of 101,000 records. And I said that the current limit is 100,000 records for the local cache. Uh and you can see that so every time I change to a new thing you can see the little widget spinning. uh and you can see it's a little bit slower to respond because it's invoking DBS SQL which is powerful when you get a larger data set but if you can you know if there's no design reason to keep it to under 100,000 um then this is a good optimization to do and then just for completion on the right uh I've got the same version but using a parameter and you can see because I'm changing that parameter every time it's firing a query it's not able to use a local cache so if you're thinking about dashboards the number one tip uh keep your data sets under 100 thousand and you'll be able to have smoother experience this way.
Uh but if you've done some experimenting with dashboards, you know there's a bit of nuance um that's going on. You know that sometimes parameters can actually be cached. Uh and so I'll walk through some of the technical mechanics behind it um to get into some of the nuance here. Uh so this is a sample dashboard on the right. I've got a dashboard. Uh it's got a base data set. So again, select from my sample data. I've got some theoretical widgets.
So I've got some filters, some visualizations. Uh, and when you're thinking about a dashboard, you can think about how every widget applies a transformation to that base data set. And naively, without any optimizations, every widget will fire a query to the warehouse. And so in this case, I've got two widgets. The filter visualization, you can see they fire two queries to the warehouse. Uh, and this is this is basically how a dashboard works.
Uh, and it can be effective. But you can imagine as you start to scale that dashboard, as you start to add widgets, uh you add multiple pages, you can fit hundreds of widgets on a page, you'll quickly start to overwhelm the warehouse, uh you'll start to see queuing. Um and things will just be a little bit slower and less snappy. And so AIBI dashboards as it exists, um and the engineering team is always making changes in optimization.
So always keep an eye out on the documentation. U the and sorry about the cutting out here. Um but the way it exists today there's two services. First is uh inside the dashboard or inside the side there's a check says when you change the widget when you change a filter when you load things it's going to check is the data set already in the browser uh and is it under 100,000 rows and if it is it can just serve it from inside the browser and that was the demo that I showed earlier um keeping things under 100,000 rows.
If it's not, if it's either it's larger or if it's not already there, it goes to the workspace um or the data plane that we like to call it. There's a check there that says, has the same query been run by the same user with hours? And if it has been, then it's able to pull it from a query cache. If it's not, then it sends it to the warehouse to execute and likely add to the query cache as it goes. So there's a couple comments that to make along the way here.
Uh the first is uh because of that check keeping data sets under 100,000 records is the number one optimization tip uh to have when you're designing dashboards. It's the easiest and fastest and most effective change you can make. The second is know that because of the performance and the way that cache works uh that dashboard data will be cached up to 24 hours by default. Uh so that your your dashboard is cost optimized, scalable, etc.
Uh you can manually refresh that data by clicking the refresh button on the dashboard. Um but it's a behavior of the way the queries work to keep uh dashboards cost efficient. The third thing is uh because it checks to see is the same query been run by the same user. This is where embedded credentials becomes very important. You publish your dashboard with embedded credentials. Everybody's sharing the same cache. And what that means is if user one is going in in the morning and changing things, user two, three, and four will able to be able to use the same cache.
And if you run a job overnight to refresh the dashboard at 6 a. m. every day, users one, two, three when they come in in the morning will be able to hit the same cache. And so that's uh if your data permissions allow it, if you don't need rowle security, uh if you you know don't need individual access rights, then using embedded credentials is an effective optimization technique. And then the fourth thing to know is if you do all this right, if you design your dashboard accordingly, uh you can get you can get the compute charges for your dashboard down to as little as once per day because the this the dashboard the first time be cached uh and that you don't invoke DBSQL charges uh to load the dashboard and so this is why these mechanics are very important to keep in mind as you're developing uh there's two nuances to this uh and I'll show you talked about the general guidance earlier there's two nuances that based on now that you know both the browser local and the control plane cache uh some nuances that go into this that I'll show uh the first is if you've ever used parameters, uh if you're I I told you earlier every parameter fires a query.
If you've ever used parameters and you're going back and forth between values, you know that's actually not 100% true. Uh and so I've done a quick demo here where uh I'm using a parameter and you can see as I select a parameter, it fires a query. You see the little loading spinner. Uh and so I'll go back and forth between two. So I picked 168 and then I picked 69. And now when I go back to 68 because I've already picked it before, you'll see it loads very quickly.
There's no loader spinner and that's because that specific query has been cached. That same query that I would be fired when I pick 68 has been done by the same user within the last 24 hours. So, it's loaded from cache. And so, this is just one of those nuances uh to add on as you're starting to get more advanced with dashboards uh to keep in mind. And it sort of explains the behavior that you'll see when you're using parameters.
Uh the second other slightly more interesting uh example is uh using parameters to keep data sets less than 100,000. So here's an example dashboard. By default it's got 30 million records. This is the full line item data set samples catalog. Uh and you can see if I pick in filters they're firing queries. It's more than 100,000 records. It's 30 million. But if I come over to this parameter and I pick a strategically chosen value.
So, I filtered things by only those orders that are more than 1998. It's only 50,000 records, which means it now fits into cache. Uh, and so you can see here now that now that I have that as I pick filters, it loads very quickly. And so, a really good idea is if you've got even if you can't get your data set under 100,000 records, uh, it can be helpful to do this if you've got common filters like theing or the majority of your users access the data from headquarters.
If you have a parameter there with a default headquarters value, then the majority of users are going to get a nice cached experience, but it's still there available if somebody wants to change that parameter to a different date or a different office um or somewhere else and play. Uh so that's the second piece uh the around the behavior. So think about data sets within 100,000 records. Use your embedded credentials where it's possible uh because that will do the shared cache.
Uh if you use a scheduled job overnight, that can help build that cache for your users. Uh if you've got less than 100,000 rows, avoid using parameter use filters wherever possible. Uh and then lastly, if you don't like these mechanics, if you want your own custom shared cache um or specific things, you can consider using materialized views uh from the lakeflow project and those can be a good custom cache uh if you want specific behavior and control the refreshes more granularly.
So I'll pass to talk through some of the genie pieces. So yeah, let's switch over to Genie now. Um so I want to talk about how you can supercharge the feedback loop within Genie. And by that I mean the interplay between authors and consumers. Um and you know there's I think of this this feedback loop as having multiple stages, right? First the author kind of curates the genie space. Um and I'm going to show some advanced curation and instruction techniques which uh are maybe not obvious.
Um next consumers or business users come in and they ask questions. Um I'll show an API integration how to meet these consumers where they are. Um as well as our files feature which is in gated public preview right now. And then finally, you know, when you're reviewing what your business users are doing uh within the space, we have the monitoring tab. But what if you really want to go deeper and actually learn about uh what kind of questions they're asking, how Genie is performing, and I'll show a pattern I'm calling Genie on Genie to achieve that.
So before going into advanced curation, I wanted to give a general framework for how to think about this. So behind all the magic, you know, Genie ultimately is just data brick SQL under the hood um in a readonly execution environment. Now you might need to teach Genie about some of the more advanced features for now like AI query, sentiment analysis. Um you know as as a as a Genie product team, we're right now laser focused on quality and you know getting Genie to respond to correct answers and that means we're not you know opening up the full breadth of uh the default settings at the moment.
But as a space author, you do have the capability to add, you know, these these special instructions to enable your business users with these uh more powerful cases. Um, and the other thing I wanted to mention about instructions is they can influence uh follow-up questions, the starter questions that you see as well as visualizations. Great. So, I'm going to jump into the demo. So, this will be pretty rapid fire. Um, I will go over and jump ahead here.
Great. So, say I've set up this bake house franchise manager genie. This is the same data set that was showing. Um, I have this space. I want I want my franchise managers to come in here and be able to answer questions about how their franchises are doing. So, I've set up some curated starter questions. This question is, you know, how much daily revenue did my franchises generate? So, this is an opportunity to show um how you can use the current user SQL function to customize the starter questions based on who's asking the question.
So I've given a general instruction saying you know the user asking question questions is a franchise manager um as well as given a SQL instruction where I'm basically you know saying if if the user is to ask what are my franchises I I put a filter on this current fil current user um SQL function and I specify it in this uh franchise manager mappings table which I'll show in a sec. So here's what that franchise manager mappings table looks like.
Um, right now it's just myself and, our email addresses, and which franchise ids we control. And then if the user is to ask a question like, you know, how much daily revenue did my franchises generate from that instruction, Genie is able to connect the dots and basically return data that's relevant for me. So here's the join happening um for franchise ID in that mappings table that I specified. So one of the suggested follow-up questions here is, you know, what was the revenue generated by my franchises on May 15th?
So, this is an opportunity to show how you can influence suggested follow-up questions. Um, in the general instructions, I have a markdown section in the general instruction. Always a good idea. And I call out, you know, May 15th is International Cookie Day. Uh, and suggested follow-ups, ask about sales for this date. You know, maybe there is some big promotion running that day and I want to kind of uh influence my business users to go down that path.
So, this shows how you can kind of have a relationship with the people who are using Genie, suggest what they should look into next. So next I want to show uh showed uh sentiment analysis in the context of a dashboard but you can also do this in Genie. So I have this question here. How many positive and negative reviews did my franchises get? And I'm able to get this pie chart and do a quick spot check. So the way that I've set this up is basically a SQL instruction where I I provide a very simple you know what is the sentiment of my reviews example question and then I teach Genie about this AI analyze sentiment function using our foundation models and you know documentation uh in these instructions is a great place to call out you know this takes in a string it can return positive negative neutral or mixed and now genie is able to basically it knows about this function it can use it a more advanced case that I wanted to show here.
I'm I'm saying you know if if the user says run the following AI prompt on all reviews and then they specify a string I want to pass that string into the AI gen function and in this case you know concatenate it with a review um in mind and I've also given some usage guidance to Genie to kind of explain what I'm doing because it's more complex. So we can go over here. Um, so in this case, maybe the business user asks, "Run the following AI prompt on 10 reviews.
Generate a one-s sentence response to the review for an email." So here I have my reviews and Genie is very easily able to come up with, you know, a customized uh response for that particular product review. But, you know, we can get creative here. I'm saying, you know, generate a highQ response to the email. Um, I think that the sad one is is pretty funny. Maybe a six out of 10. Cool. So that's few a few of the advanced curation techniques.
So I I mentioned that files are currently in gated gated public preview soon to be ungated. And essentially this feature allows business users in a conversation to add CSVs or Excel spreadsheets and then they're um you know accessible within the context of that conversation. So when you drop the file can basically be done via this you know button here. Um, I can immediately see this data showing up from this sheet which is a bunch of customer emails.
So, what would be the use case here? So, say I'm a franchise manager. I have some, you know, unique processes for myself. I have some promo website and when users sign up, it drops their email address in a Google sheet. You know, pretty common. So, what I can do now is basically pull that data into Genie and join it with my govern data. So now I'm asking to break down the customers who signed up for the promo by country.
Genie is able to figure out, okay, there's a customer email address column from my spreadsheet, there's an email address column in my sales data, and I can uh get some quick insights out of here. So one of the reasons why we built this is we were finding lots of times people exported data from data bricks into spreadsheets and doing vlookups and that sort of pattern. So now instead your business users can bring that data into data bricks where you can audit it, learn about what they're doing and kind of have more visibility over over what they're doing.
Great. So one of the other ways to kind of drive usage increase this feedback loop is to actually meet these business users where they are. And while we want business users to come to data bricks using uh products like teams and slack is also very common. So, I've gone ahead and deployed this simple uh Genie Slackbot, probably 150 lines of Python, which calls our conversation API. And now I've basically added a bot to this workspace.
And I have this question here, which I'll kick off. What were the total weekly sales in May for all franchises? And once I fire that, uh hopefully Genie will respond in a second. Uh if the warehouse is asleep, then maybe not. Um basically, oh, there we go. Now we're thinking or that was from earlier. Anyway, uh the point is once Gener responds, you'll basically get, you know, a description, a formatted table, a query.
Um you can do all sorts of things with commands. I'm really just scratching the surface here. Um and once these business users actually ask these questions, you can analyze their usage. Um you know, in the monitoring tab where you can see the question that was asked. Um, you can look at the SQL that was generated. The monitoring tab also gives you the ability to kind of filter by positive and negative uh marked reviews, also kind of known as thumbs up, thumbs down.
Cool. So, what if I wanted to go deeper here and I have a 100 users in my Genie space. Um, they're asking all sorts of questions. I don't really know what's working well, what's working not, and I want to kind of take my space to the next level. So, you know, we have the full power of the lakehouse at our disposal. So I wanted to introduce this pattern I built called genie on genie. Essentially what you can do is um create you know a genie space that analyzes another genie space.
So in this case I've I've basically taken advantage of the audit logs which are one of the system tables that admins have access to and these contain kind of CRUD type operations that occur u in the workspace on you know um uh you know in dashboards genie all different products and so if we just go ahead and look at an example of what this looks like um I can ask what actions were taken in the genie space in the past week I can kind of see some highle crowd operations um but I've also configured this particular genie case um to look at you know the one that I've specified the one with this ID and so now with some additional instructions I can say you know what is the thumbs up and thumbs down rate for all the messages sent in this genie space and I can say I have a 25% thumbs up rate 12.
5% thumbs down rate um I could you know generate a line chart analyze these on an ongoing basis to see how my quality is evolving in an online setting and I can use that to determine whether it's you know ready to promote or how my space is doing. Another thing that I could do is I could ask about, you know, this file feature that I just demoed. How many files were added to the Genie space? Which users out of those files to the Genie space?
Maybe I set up a meeting with uh and I ask them, you know, why did you need to use this offline spreadsheet? Is there something about, you know, our our uh platform that we could fill this gap? And so, it's really about working with your business users to kind of unblock them, but still use the what they're doing to kind of inform how you can upgrade your platform. So one thing that is not contained in the audit logs is the actual message sent or the SQL query that was generated.
Um but we can we can still get this um so in this case I've I've created basically a daily um Python notebook which runs as a job and in this job it contains like 150 lines of Python code which calls our conversation API again and it basically will download the uh messages sent that day the query content and it'll drop them into a uh a table. So once this data is here, you know, I can look at the messages and the queries that have been occurring in the space in kind of this structured format.
So I can ask questions like what is the average number of tables used in queries? Um 1. 38. So that could give some indication of okay there's some joins going on. Uh maybe if this number is too high, it's too complex and I need to simplify my pipeline. And you know how is this working under the hood? again uh I'm using these uh SQL functions in this case AI extract to basically extract the table names from the query.
So that's kind of showing combining some earlier techniques we learned with this new technique or I could ask something like uh what are the common most commonly used tables in the queries and see you know what's being used a lot what's not being used a lot and you know trying to trim down the amount of context that Genie Space has. Great. So that was a lot so I want to give some takeaways. Um the first takeaway is instructions can unlock the full power of data brick SQL even if they're not exposed in you know the default product today.
Um you have the ability as the author to open up anything the data brick SQL can do as long as it's in that readonly execution environment. The second takeaway is that a AI enhanced data analysis is now for everyone in your organization. these techniques with AI extraction, classification, generative AI, you know, they can run these ongoed or ungoverned data, combine the two of them, and I think it's really going to drive a lot of productivity.
The third takeaway is that by reviewing these usage patterns from your business users, you can learn about gaps in your system, um, fill those gaps. You know, maybe people are doing sentiment analysis a lot in an ad hoc way in Genie and you want to turn that into an actual pipeline to reduce on cost. Like I think that's totally reasonable and so you should unblock your users to do these kinds of things but also learn from it and kind of optimize it.
Great. So just to kind of conclude what we talked about today. So first you know showed how you can infuse intelligence in dashboards using things like AI query um to do really powerful summarization and other things. Second showed how you know dashboards are designed for multiple scales. you know, if you keep your data sets under 100,000 rows, you can have that great client side caching behavior, but also um embedding credentials makes it so if if you have a large data set, you can kind of optimize for that.
Um, and then finally, we talked about how you can supercharge the Genie feedback loop with these more advanced techniques um and kind of work together with your business users um and try to achieve, you know, kind of bottoms up business intelligence where you're learning from each other rather than telling them they can't do things. And um yeah, I think it's exciting. Great. So yeah, as always, you can uh scan this QR code to continue your learning journey.
There's classes, self-paced and structured trainings. Um we have some AIBI video and demos linked here. Um and as always, yeah, complete your surveys. Uh let us know if there's anything useful here or things we could have improved on. And yeah, I think that's all we have planned.

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.