00:00:05.919 --> 00:00:08.160
Welcome to the Dashboard Effect Podcast.
00:00:08.240 --> 00:00:08.960
I'm Brick Thompson.
00:00:09.199 --> 00:00:10.000
And I'm Landon Oakes.
00:00:10.240 --> 00:00:21.039
So, Landon, uh last couple of episodes, we've been talking about various terms and architectures and frameworks and so on, uh, dealing with data and data lake houses.
00:00:21.280 --> 00:00:34.719
Um, there's a term that's being used more widely that we're using internally a lot when you're talking about a medallion architecture, which is typically bronze, silver, gold, and then you're doing your analytics and reporting off that gold layer.
00:00:34.960 --> 00:00:37.280
But the the new term is a platinum layer.
00:00:37.439 --> 00:00:41.840
Um I'm not sure this is official anywhere, but a lot of different companies are using it.
00:00:42.000 --> 00:00:53.920
So I said we are platinum layer refers to getting the data ready for LLMs to be able to write good queries and infer the right things about the data so that you can get good answers.
00:00:54.159 --> 00:01:00.159
So I'd like to just take five minutes and talk about how do you get to a good platinum layer.
00:01:00.640 --> 00:01:02.240
Yeah, this is a great topic.
00:01:02.479 --> 00:01:07.040
Um and while while we feel pretty good about our approach now, obviously it's it's new, right?
00:01:07.120 --> 00:01:08.239
And people are still learning.
00:01:08.400 --> 00:01:13.920
So I mean uh right now we have there's really two foundations, like two key things that actually enable that, right?
00:01:14.159 --> 00:01:20.640
One, which is the most important, is going to be your markdown files that tell you about the business.
00:01:20.799 --> 00:01:25.519
They tell you about the data in that it can expect when it's querying.
00:01:25.680 --> 00:01:27.920
Um they call out any key gotchas, right?
00:01:28.079 --> 00:01:34.640
So if there's I don't know, two different versions in one column, like that it needs to be very clear what do you use when.
00:01:35.120 --> 00:01:45.120
So you've got your usual data lake house, but you're saying you need markdown files for context for the LM to be able to look at that and understand how to interpret what it's seeing.
00:01:45.680 --> 00:01:45.920
Exactly.
00:01:46.239 --> 00:01:46.400
Okay.
00:01:47.040 --> 00:01:47.280
All right.
00:01:47.359 --> 00:01:58.799
And so all those things you were talking about, business context, gotchas in the data, maybe ways the business thinks about certain calculations that um wouldn't be totally obvious, that type of thing.
00:01:59.040 --> 00:01:59.519
That makes sense.
00:01:59.760 --> 00:02:04.959
So you think that's the most important piece is to get that in the lake house so it can the LLM can reference that.
00:02:05.439 --> 00:02:06.640
Yeah, that's what we've seen.
00:02:06.799 --> 00:02:08.080
So we've tried it without it.
00:02:08.240 --> 00:02:11.360
Um it was a mixed bag of what you'd got, right?
00:02:11.599 --> 00:02:21.520
Like AI is non-deterministic, so one time it would write the query, you know, with using this column over here that signifies actually the unit price, for instance.
00:02:21.680 --> 00:02:23.520
Other times it would use this over here.
00:02:23.759 --> 00:02:39.039
And so, you know, there's just little subtleties in the data that it just kind of picked what it needed because it didn't know 100% of the data at the time because not going out and getting data within writing its query, that'd take a long time and it'd be expensive.
00:02:39.360 --> 00:02:44.000
Um it writes its data, you know, it writes its query, then gets the data back.
00:02:44.560 --> 00:02:48.719
So, you know, technically it it can get into a loop where it's like, okay, I'm gonna go pull this data.
00:02:48.800 --> 00:02:51.919
All right, I've looked at it, I don't like that, let me change it.
00:02:52.080 --> 00:02:52.240
Yeah.
00:02:52.479 --> 00:02:53.520
Go pull another one back.
00:02:53.599 --> 00:02:58.639
But now you're talking, you know, your user might be sitting there for 10 minutes while it tries to figure out what it should do.
00:02:59.280 --> 00:03:06.319
Well, when we were testing uh the fabric data agent a couple of months ago, we found it just was really hit and miss, often miss.
00:03:06.400 --> 00:03:09.280
And I think we determined the missing piece was the context.
00:03:09.520 --> 00:03:09.680
Yeah.
00:03:09.919 --> 00:03:14.080
If you can get if you can give the fabric data agent the right context, it can do a much better job.
00:03:14.159 --> 00:03:14.319
Trevor Burrus, Jr.
00:03:14.479 --> 00:03:14.800
Exactly.
00:03:15.039 --> 00:03:15.919
Um so okay.
00:03:16.080 --> 00:03:19.120
So what else what else is important in the platinum layer?
00:03:19.199 --> 00:03:19.520
Aaron Ross Powell, yeah.
00:03:19.680 --> 00:03:22.080
And then the the second one that we found is modeling.
00:03:22.400 --> 00:03:27.439
So, you know, how do you shape your data to actually work with AI?
00:03:27.759 --> 00:03:35.919
And one of the key things is that it's so far what we're seeing is it's different than what um, you know, a BI tool would want, right?
00:03:36.080 --> 00:03:46.879
What BI tool wants denormalized star schema type of a layout, um, you know, at lower grains, et cetera, where I have like my line data, line level data, my header data.
00:03:47.039 --> 00:03:54.719
And you just kind of have to know if I use this column on this visual, it's gonna work if I try to use it at a different level.
00:03:54.800 --> 00:03:58.560
Like maybe I'm using it at um a sales, like an invoice line level.
00:03:58.639 --> 00:04:01.360
Okay, it's not gonna work now because it's not at the right level.
00:04:01.520 --> 00:04:03.439
And that's usually the job of the analyst.
00:04:03.840 --> 00:04:13.199
Um but for for AI, what we found is like the more we can dumb down that data, you know, not have different grains at different different levels.
00:04:13.360 --> 00:04:25.439
So what I mean by that is if I have like a total invoice price of a thousand and there's three lines making that up, you know, one might be three hundred, the other one might be three hundred, and then um four hundred, right?
00:04:25.680 --> 00:04:25.920
Right.
00:04:26.240 --> 00:04:30.000
So if I sum my total of a thousand, I'm gonna get three thousand.
00:04:30.160 --> 00:04:32.560
If I sum the right column, I'm gonna get a thousand.
00:04:32.800 --> 00:04:34.160
Gosh, right answer.
00:04:34.480 --> 00:04:40.800
So the more we can take those decisions off of what AI needs to worry about, the better results we've seen.
00:04:40.959 --> 00:04:45.920
Um we've almost gotten to a point where it's a hundred percent accurate every time.
00:04:47.120 --> 00:04:48.639
But not for all of their data, right?
00:04:48.879 --> 00:04:49.839
Because that's crazy.
00:04:50.000 --> 00:04:52.800
But for certain use cases, that's how we kind of attack it.
00:04:53.199 --> 00:04:55.439
So, all right, so you don't go to the lowest grain.
00:04:55.600 --> 00:05:00.319
You go to the grain that's likely where people or users are going to be asking questions.
00:05:00.480 --> 00:05:03.279
Um you don't denormalize into star schema.
00:05:03.600 --> 00:05:06.959
Um you were saying normally in gold layer, you go to that.
00:05:07.439 --> 00:05:09.759
Oh sorry, normal normalize a star schema.
00:05:10.000 --> 00:05:10.959
You're denormalizing.
00:05:11.439 --> 00:05:14.240
You take denormalization to like a whole nother level, right?
00:05:14.639 --> 00:05:17.120
So taking all those tables and cramming them into a single table.
00:05:17.439 --> 00:05:18.240
Even more, yeah.
00:05:18.319 --> 00:05:18.720
Yes.
00:05:19.120 --> 00:05:19.439
Okay.
00:05:20.000 --> 00:05:25.839
Um there's also renaming of columns, renaming of tables, so it's easy to understand what they are.
00:05:26.000 --> 00:05:27.600
What what else goes into it?
00:05:28.079 --> 00:05:30.000
Yeah, I mean, those are the big ones, right?
00:05:30.160 --> 00:05:37.040
So there's another thing that you just reminded me is um you know cleaning table names and column names.
00:05:37.120 --> 00:05:38.480
Ideally you have that in your goal there anyway.
00:05:38.720 --> 00:05:39.120
Yeah, right.
00:05:39.279 --> 00:05:51.279
However, um if you anybody's written reports, they know that sometimes to make a certain visual work for this one person who really needs it, we needed to add three columns that do some really weird stuff.
00:05:51.519 --> 00:05:56.720
Doesn't really make sense unless I'm in the report itself and it makes the visual work.
00:05:56.959 --> 00:05:58.160
Um get rid of those.
00:05:58.240 --> 00:06:01.519
If you don't want those, it's gonna confuse it, right?
00:06:01.839 --> 00:06:04.480
Um so things like that, cleaning it, etc.
00:06:04.879 --> 00:06:11.680
Then we usually, we know when it has kind of its super denormalized table by area, usually is what we'll do.
00:06:11.839 --> 00:06:16.560
So you know, invoices, profit and loss, etc.
00:06:17.439 --> 00:06:24.160
Um, plus the context on what data it's looking at, you know, what uh what people might ask, different things like that.
00:06:24.480 --> 00:06:29.279
You know, it's it's we've been really, really impressed with uh the uh quality.
00:06:29.439 --> 00:06:31.040
And that reminds me of one final thing.
00:06:31.519 --> 00:06:37.519
The last thing we need to do is in in a previous podcast we talked about how we usually do views.
00:06:37.759 --> 00:06:38.079
Yeah.
00:06:38.399 --> 00:06:43.120
So when I go hit this table, it's gonna go run all my calculations and cram that data together.
00:06:43.519 --> 00:06:50.720
So it's running all the real time into this big table, and then it's getting those from the gold layer that's probably using views from the silver layer.
00:06:51.120 --> 00:06:51.360
Exactly.
00:06:51.519 --> 00:06:52.480
That's hitting the okay.
00:06:52.720 --> 00:06:54.240
So it's going through all those steps.
00:06:54.560 --> 00:06:55.519
Yeah, yeah, exactly.
00:06:55.680 --> 00:07:00.800
And so you can imagine, right, if I'm refreshing a Power BI report every hour, that's fine.
00:07:00.879 --> 00:07:02.879
You know, we have a dollar for it to work.
00:07:03.279 --> 00:07:03.360
Right.
00:07:03.680 --> 00:07:05.040
It can finish and then it just shows up.
00:07:05.199 --> 00:07:06.639
Meanwhile, the old one is showing up.
00:07:07.040 --> 00:07:07.759
Yeah, exactly.
00:07:08.160 --> 00:07:09.040
And that works great.
00:07:09.199 --> 00:07:12.720
However, um with AI, it's going and out, it's getting that data on demand.
00:07:14.160 --> 00:07:19.120
So if you know it's gonna take 10 minutes to respond, people are gonna blame them.
00:07:19.199 --> 00:07:20.079
I mean, it's not gonna work.
00:07:20.160 --> 00:07:20.240
Yeah.
00:07:20.720 --> 00:07:21.040
I'm done.
00:07:21.120 --> 00:07:21.519
I'm leaving.
00:07:21.839 --> 00:07:23.279
You're gonna wonder if it's even running.
00:07:23.439 --> 00:07:23.519
Right.
00:07:23.920 --> 00:07:24.000
Yeah.
00:07:24.160 --> 00:07:26.079
So it needs to be peppy really fast.
00:07:26.399 --> 00:07:33.279
So we do actually take that added step of taking um that data once we put it into the nice platinum.
00:07:33.759 --> 00:07:36.079
Denormalize denormalized model.
00:07:36.399 --> 00:07:38.240
We we save it off every night.
00:07:38.720 --> 00:07:39.439
Materialize it.
00:07:39.680 --> 00:07:41.439
Yes, materialize it as its own area.
00:07:41.519 --> 00:07:42.319
So now it's really quick.
00:07:43.439 --> 00:07:43.600
Okay.
00:07:44.079 --> 00:07:53.279
There's another piece that's not really part of the platinum layer, but key, which is to have an MCP server that the LLM is talking through to look at the data.
00:07:53.600 --> 00:07:53.680
Yeah.
00:07:54.079 --> 00:08:03.920
Which can also give it hints on here's how you're gonna build good queries, here's bad ones, make sure you look at the context markdown files, here's how we've organized things.
00:08:04.000 --> 00:08:05.439
That's probably in the context files.
00:08:05.600 --> 00:08:16.160
But yeah, having that extra piece so you're not just pointing um, say, Claude directly at views or tables, you're actually giving it a little more help on the way.
00:08:16.480 --> 00:08:21.920
You're you're gonna need some kind of connector anyway, but it's kind of a specialized connector that has that company in mind.
00:08:22.399 --> 00:08:22.800
Absolutely.
00:08:22.959 --> 00:08:24.160
Yeah, that's a good call-out.
00:08:24.399 --> 00:08:28.959
And it's it's you know the you we can you can do a lot with those MCP servers too.
00:08:29.120 --> 00:08:37.919
Like one of the things that uh we've done that we really like is we have like a business user MCP server that's really limited to these AI schemas because they're expecting the numbers to be right.
00:08:38.159 --> 00:08:38.480
Yeah, yeah.
00:08:38.720 --> 00:08:42.960
So we've got to really tightly control what it can see and what it can do to make those numbers right for them.
00:08:43.279 --> 00:08:50.879
But you can have an analyst who's like, I want to just like have Claude help me build queries to pull numbers that I really need.
00:08:51.039 --> 00:08:53.600
I want to learn about all this other stuff that we can't see.
00:08:53.759 --> 00:08:56.080
So you can open it up for people like that.
00:08:56.320 --> 00:08:58.480
Um it's been really cool what it can do.
00:08:58.559 --> 00:09:01.200
It's you know, we've been starting to use it for development at this point.
00:09:01.360 --> 00:09:07.200
Like, all right, give me the first version of this query that's gonna be really complicated to mash all this data together.
00:09:07.440 --> 00:09:11.919
Um it, you know, won't get it right the first time, but it gives you a huge head start.
00:09:12.159 --> 00:09:13.039
Yeah, that's cool.
00:09:13.360 --> 00:09:15.759
All right, I think that covers the topic for today.
00:09:15.919 --> 00:09:16.799
Platinum layer.
00:09:17.039 --> 00:09:17.440
Thank you.
00:09:17.759 --> 00:09:18.159
Thank you.
00:09:18.399 --> 00:09:18.960
All right.