The Dashboard Effect

The Platinum Layer: Getting Your Data Ready for AI

Brick Thompson, Jon Thompson, Caleb Ochs, Landon Ochs Episode 173

Use Left/Right to seek, Home/End to jump to start or end. Hold shift to jump forward or backward.

0:00 | 9:29

The platinum layer sits on top of the standard medallion architecture, built specifically to get data ready for LLMs. In this episode, Brick and Landon break down what it takes to build one well.

Landon walks through the two foundations that make a platinum layer work: markdown files that give the LLM business context and call out data gotchas, and a modeling approach that goes further than typical BI denormalization. They discuss why AI models need a single grain of data to avoid summing errors, why report-specific columns need to be stripped out, and why the platinum layer gets materialized nightly instead of served through views.

They also cover the role of MCP servers in this setup, including why Blue Margin builds tightly scoped servers for business users asking direct questions and more open ones for analysts building queries.

If you've been wondering what actually separates a working AI data layer from a frustrating one, this episode covers the fundamentals.

Key Moments:

1:00 — Markdown Files & Context
2:05 — What Happens Without Context
2:58 — Fabric Data Agent Test
3:19 — Modeling for AI
4:25 — The Grain Problem
5:11 — Extreme Denormalization
5:28 — Cleaning Columns & Tables
6:37 — Nightly Materialization
7:43 — Why You Need an MCP Server
8:22 — Two Types of MCP Access

About Blue Margin

Blue Margin is a Microsoft Fabric and Power BI consultancy based in Fort Collins, Colorado. We help mid-market and private equity-backed companies build data platforms that hold up: clean architecture, trustworthy reporting, and dashboards teams actually use. The Dashboard Effect is where we talk through the technical decisions behind that work.

Learn more: https://bluemargin.com

SPEAKER_01

Welcome to the Dashboard Effect Podcast. I'm Brick Thompson.

SPEAKER_00

And I'm Landon Oakes.

SPEAKER_01

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. 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. But the the new term is a platinum layer. Um I'm not sure this is official anywhere, but a lot of different companies are using it. 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. So I'd like to just take five minutes and talk about how do you get to a good platinum layer.

SPEAKER_00

Yeah, this is a great topic. Um and while while we feel pretty good about our approach now, obviously it's it's new, right? And people are still learning. So I mean uh right now we have there's really two foundations, like two key things that actually enable that, right? One, which is the most important, is going to be your markdown files that tell you about the business. They tell you about the data in that it can expect when it's querying. Um they call out any key gotchas, right? 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.

SPEAKER_01

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. Exactly. Okay. All right. 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. That makes sense. 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.

SPEAKER_00

Yeah, that's what we've seen. So we've tried it without it. Um it was a mixed bag of what you'd got, right? 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. Other times it would use this over here. 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. Um it writes its data, you know, it writes its query, then gets the data back. So, you know, technically it it can get into a loop where it's like, okay, I'm gonna go pull this data. All right, I've looked at it, I don't like that, let me change it.

SPEAKER_01

Yeah.

SPEAKER_00

Go pull another one back. 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.

SPEAKER_01

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. And I think we determined the missing piece was the context.

SPEAKER_00

Yeah.

SPEAKER_01

If you can get if you can give the fabric data agent the right context, it can do a much better job. Trevor Burrus, Jr.

SPEAKER_00

Exactly.

SPEAKER_01

Um so okay. So what else what else is important in the platinum layer?

SPEAKER_00

Aaron Ross Powell, yeah. And then the the second one that we found is modeling. So, you know, how do you shape your data to actually work with AI? 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? 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. 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. Like maybe I'm using it at um a sales, like an invoice line level. Okay, it's not gonna work now because it's not at the right level. And that's usually the job of the analyst. 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. 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?

SPEAKER_01

Right.

SPEAKER_00

So if I sum my total of a thousand, I'm gonna get three thousand. If I sum the right column, I'm gonna get a thousand. Gosh, right answer. So the more we can take those decisions off of what AI needs to worry about, the better results we've seen. Um we've almost gotten to a point where it's a hundred percent accurate every time. But not for all of their data, right? Because that's crazy. But for certain use cases, that's how we kind of attack it.

SPEAKER_01

So, all right, so you don't go to the lowest grain. You go to the grain that's likely where people or users are going to be asking questions. Um you don't denormalize into star schema. Um you were saying normally in gold layer, you go to that. Oh sorry, normal normalize a star schema. You're denormalizing.

SPEAKER_00

You take denormalization to like a whole nother level, right?

SPEAKER_01

So taking all those tables and cramming them into a single table.

SPEAKER_00

Even more, yeah. Yes.

SPEAKER_01

Okay. Um there's also renaming of columns, renaming of tables, so it's easy to understand what they are. What what else goes into it?

SPEAKER_00

Yeah, I mean, those are the big ones, right? So there's another thing that you just reminded me is um you know cleaning table names and column names. Ideally you have that in your goal there anyway. Yeah, right. 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. Doesn't really make sense unless I'm in the report itself and it makes the visual work. Um get rid of those. If you don't want those, it's gonna confuse it, right? Um so things like that, cleaning it, etc. Then we usually, we know when it has kind of its super denormalized table by area, usually is what we'll do. So you know, invoices, profit and loss, etc. Um, plus the context on what data it's looking at, you know, what uh what people might ask, different things like that. You know, it's it's we've been really, really impressed with uh the uh quality. And that reminds me of one final thing. The last thing we need to do is in in a previous podcast we talked about how we usually do views.

SPEAKER_01

Yeah.

SPEAKER_00

So when I go hit this table, it's gonna go run all my calculations and cram that data together.

SPEAKER_01

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. Exactly. That's hitting the okay. So it's going through all those steps.

SPEAKER_00

Yeah, yeah, exactly. And so you can imagine, right, if I'm refreshing a Power BI report every hour, that's fine. You know, we have a dollar for it to work.

SPEAKER_01

Right. It can finish and then it just shows up. Meanwhile, the old one is showing up.

SPEAKER_00

Yeah, exactly. And that works great. However, um with AI, it's going and out, it's getting that data on demand. So if you know it's gonna take 10 minutes to respond, people are gonna blame them.

SPEAKER_01

I mean, it's not gonna work. Yeah.

SPEAKER_00

I'm done. I'm leaving.

SPEAKER_01

You're gonna wonder if it's even running. Right. Yeah.

SPEAKER_00

So it needs to be peppy really fast. So we do actually take that added step of taking um that data once we put it into the nice platinum. Denormalize denormalized model. We we save it off every night.

SPEAKER_01

Materialize it.

SPEAKER_00

Yes, materialize it as its own area. So now it's really quick.

SPEAKER_01

Okay. 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.

SPEAKER_00

Yeah.

SPEAKER_01

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. That's probably in the context files. 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. 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.

SPEAKER_00

Absolutely. Yeah, that's a good call-out. And it's it's you know the you we can you can do a lot with those MCP servers too. 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.

SPEAKER_01

Yeah, yeah.

SPEAKER_00

So we've got to really tightly control what it can see and what it can do to make those numbers right for them. 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. I want to learn about all this other stuff that we can't see. So you can open it up for people like that. Um it's been really cool what it can do. It's you know, we've been starting to use it for development at this point. Like, all right, give me the first version of this query that's gonna be really complicated to mash all this data together. Um it, you know, won't get it right the first time, but it gives you a huge head start.

SPEAKER_01

Yeah, that's cool. All right, I think that covers the topic for today. Platinum layer.

SPEAKER_00

Thank you. Thank you. All right.