Too many teams are building AI applications without truly understanding why their models fail. Instead of jumping straight to LLM evaluations, dashboards, or vibe checks, how do you actually fix a broken AI app?
In this episode, Hugo speaks with Hamel Husain, longtime ML engineer, open-source contributor, and consultant, about why debugging generative AI systems starts with looking at your data.
In this episode, we dive into:
Why “look at your data” is the best debugging advice no one follows.
How spreadsheet-based error analysis can uncover failure modes faster than complex dashboards.
The role of synthetic data in bootstrapping evaluation.
When to trust LLM judges - and when they’re misleading.
Why most AI dashboards measuring truthfulness, helpfulness, and conciseness are often a waste of time.
If you're building AI-powered applications, this episode will change how you approach debugging, iteration, and improving model performance in production.
Get full access to Vanishing Gradients at hugobowne.substack.com/subscribe
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
SPEAKER_00Yeah, people's first knee-jerk reaction is, oh, my app is not that good. Let me import some LLM evaluation library and import all these off-the-shelf evaluators. No, that doesn't work because that doesn't really help you focus on what is broken. Too many teams are building AI applications without truly understanding why their
SPEAKER_02models and systems are failing. In this episode of Vanishing Gradients, I sit down with Hamil Hussain, longtime ML engineer, open source contributor, consultant, and dead set legend to discuss why error analysis is the foundation of building and debugging AI systems. Rather than jumping straight to LLM evaluations, LLM as judges or dashboards tracking vague metrics, Hamill walks through concrete strategies for systematically identifying failure modes, iterating on prompts and improving AI applications without
wasting time on
SPEAKER_02meaningless numbers. we dive into, or do we delve, why look at your data is the best debugging advice no one follows, how spreadsheet-based error analysis can reveal the biggest failure modes, the role of synthetic data in bootstrapping evaluation, when to trust LLM judges and when to ignore them, and why AI dashboards measuring truthfulness, helpfulness, and conciseness are often a total waste of time. This conversation actually started as a private Q&A for my Building LLM
SPEAKER_02Applications course on Maven. But when people kept reaching out saying, I need to see this, we decided to open it up. And as we're releasing this episode, we've just opened up the second cohort of the course. The first one was a blast. We had over 80 students from ICs to team leads and executives across companies like Meta, Adobe, TikTok, Ford, and even government and the US Air Force. The Discord has been incredibly active, and we've had guest speakers like Hamill, Swix, Charles Fry from Modal, Ravan Kumar from DeepMind, Eric Ma from Moderna,
SPEAKER_02and Charmaine Karandang from Lorikeet. For cohort two, students will also get access to all the guest lectures from cohort one, plus we're expanding on areas that resonated most. We'll be diving deeper into LLMs augmented with tool use, exploring how to build agentic workflows that integrate with business logic to create more robust, reliable software. Also, huge thanks to Charles Fry from Modal. He organized $1,000 in Modal credits for every student, and he'll be doing the same for the next cohort. I've done three Vanishing Gradients episodes with Charles in the past,
SPEAKER_02which I'll link to in the show notes if you want to check those out. And two of them were with Hamill as well. One quick note. Hamill does a lot of screen sharing throughout this conversation. We've done our best to talk through what's happening on the screen, but if there's anything you want more clarity on, we've linked to the full video live stream in the show notes. I don't monetize this podcast yet, so if you want to support it, share this episode, share the course, and tell friends who might be interested. As a thank you, I'm offering Vanishing Gradients listeners 25% off the course. Just use the code VG25 when you sign up.
SPEAKER_02Let's jump in. We're doing a live stream today that I'm so excited about with
my dear old friend
SPEAKER_02Hamil Hussain. What is up, Hamil?
SPEAKER_00Hey, thanks for having me. I'm glad to be back. Oh, dude, I'm really excited for this one for reasons that will become very apparent soon. Just wanted to let everyone know this is a live stream recording of a podcast
SPEAKER_02called Vanishing Gradients. And I'm going to put the link to the podcast in the chat. But if you like these types of conversations, do the obligatory like and subscribe and share with your friends. If you don't like it, Don't tell people you don't like it. Just don't listen to it. The other thing that I just wanted to make clear, this actually, we've opened this up to do it as a live stream. Originally, Hamill and I were going to do a Q&A on this topic as part of a course I'm teaching on building LL-empowered applications for data scientists and software engineers. We told everyone we're doing this and so many people were like,
I need to see this.
SPEAKER_02People were like DMing me, Hugo, I need Hamill's wisdom in my brain. So we decided to open it up and I am putting, yeah, dude, you've got a brain to brain information transfer that's happening these days, but we haven't opened up another cohort for the course, but you can put your name down if you want to get information about it in future. I'm also going to link to Hamill's blog. which is an incredibly valuable resource on all the types of things we're talking about. And in particular, I will say there are a lot of questions in the course discord
at the moment,
SPEAKER_02the building LLM applications discord, where we have a hundred people from a variety of different places with incredibly really interesting people having lots of great conversations but hamel is able to jump in to probably 30 to 40 percent of the questions and answer them with a blog post so the only reason i state that is we've got a lot of sophisticated people who are doing a lot of sophisticated generative ai application building whose questions can be answered by hamel's blog post so please do check out his blog and in fact I was speaking with Hamill about the topic today that we're
covering today.
SPEAKER_02And I was like, you should write a blog on it. And I think your response, Hamill, correct me if I'm wrong, was like, I will, but I'd prefer to like talk about it and get more ideas first in order to frame the conversation, which was the inspiration behind this. That's enough out of me, except one more thing. Hamill is a machine learning engineer with over 20 years of experience. worked with lots of innovative companies from Airbnb to GitHub to DataRobot, and at GitHub did early research, which early LLM research that's been used by OpenAI. He also has contributed numerous open source machine learning tools,
SPEAKER_02does a lot of consulting to help people build LLM-powered applications, and also... And I'll link to your post about this, Hamill, does office hours, which he puts on YouTube. And we may get to some of these today to discuss the topics. But these are office hours where people come and look at their applications with Hamill. And he talks them through how he would think about them. a lot of people tend to miss the step of error analysis, which is something we're going to talk about today. But without further ado, Hamill, I've introduced you.
Is there anything you'd like to add to your introduction on anything you're up to
SPEAKER_02now or anything top of mind?
SPEAKER_00No, that covers it. Yeah, that covers it. I will say that, okay, out of all the consulting I do and the office hours, it's very clear that there's one step everybody is skipping. And there's one kind of thing that you might hear a lot of, people like me say, which is, look at your data. And it's become obvious to me that people don't know what that means. Like, what do you mean? They might nod their head and say, yeah, look at the data, look at the data. But I have discovered that nobody or many people don't know
what that means.
SPEAKER_00And so I thought, OK, it's helpful to show that or to talk about that and show people what that means, because maybe it's not intuitive.
SPEAKER_02Without a doubt. And I think for people in you and me and a lot of our colleagues over the past couple of decades who've worked a lot with data, this is the part that is intuitive. There are lots of parts that aren't intuitive for me. So I'm wondering, what type of intuition do you want people to have? Or what do you mean when you say, look at your data?
SPEAKER_00Yeah. So actually what it is like systematically looking at your data. So what I mean, OK, what's data? So if you're building AI applications, you are going to have some kind of telemetry on those applications. So commonly something like traces. And I could show you some examples of traces. So maybe we can get right into sort of an example. I'm going to show maybe some different tools throughout this discussion,
SPEAKER_00but we can just start with one of them. So let me see if I can share my screen. Let's go. So let's say that I'm building an app. This is a toy example. So say you're building an application that summarizes Hacker News articles. What you want to do with your LLM application is collect telemetry. There's many different tools out there. Like today, I'm going to show you... Arise Phoenix. I'm also going to show Langsmith. There's many others, but, and I'll show you them in different contexts,
SPEAKER_00but you have telemetry and let me, and this is the screen that I'm looking at right now is one view of that telemetry. This is basically interactions with an LLM. I'm going to open up one of those and you can see, okay, these are logs of your application and just rendered a little bit nicely. And You can see what's happening here. You're a helpful assistant that creates accurate, extremely concise summaries. These should be sixth grade reading level, okay? And the user message is, please summarize this text.
SPEAKER_00And then you have a bunch of text. And then the summarization is this. I have an Odell, yeah. Yeah, I have an Odell something. And basically... what you want is you want to step through and look at your data. So what does that mean? So let's say Google, so there's something called error analysis. Okay, let's first step back. Let's say you're developing an application like this. You're like, hey, I have this summaries and okay,
it does a thing and you put a UI on top of it.
SPEAKER_00And you're like, yeah, I have a article summarizer. The question people get into really fast is, oh, How do I make this application better? And should you just do vibe checks? Yeah, you can use it. You can test it out, put some articles in there, see what's happening. And maybe you get a sense like, okay, it can be tweaked this way or that way. But when the application becomes sufficiently complex, it's really hard to do that. you can only rely on vibe checks so much like you might do some
vibe checks which is like ad hoc testing your application but you're not really sure if you're not really sure maybe you're not like discovering all the errors or if you fix one thing are you breaking something else if you try to fix the prompt or tweak it are you potentially breaking something else where is your application even breaking and also what should you test even there's so many things to test you could test
SPEAKER_00In more complicated applications, there could be function calls, it could be RAG, could be many different features, many different kinds of things that can be happening. What do you test exactly? People are like, where do I start?
SPEAKER_02I love it. And maybe I could give a very simplistic example of the one we discussed before the call, actually, before we went live, which is Andrew Ng's example, if you wouldn't mind. So Andrew Ng actually has a video, which I'll link to and I encourage everyone to watch, where it's not even, and I love it because it's not even to do with LLMs. He's talking about a cat photo classifier. And he says, okay, if we see a couple of cats are misclassified as dogs or vice versa, perhaps we want to start adding more dog samples or particular
dog samples, this type of stuff.
SPEAKER_02But then he says, if we start to look at the total amount of errors that are mislabeled as dogs or cats, and it's only 5% of them, you could spend months trying to fix this part of it. And you've only improved 5% of your errors. So when you do an error analysis, you can look at all the ones that are mislabeled as dogs, false positives and false negatives, all the ones that are mislabeled as tigers or whatever. And this is the table, right? He goes through and he shows ones that are mislabeled as dogs, as great cats,
SPEAKER_02something else, and so on. And then a column for comments as well. And this process actually tells you where the biggest errors are and what to focus on when fixing or iterating on your app. Is that a reasonable characterization?
SPEAKER_00Yeah. So the thing that surprised most people is a low-tech way. That's super straightforward. And anyone can do it.
SPEAKER_02I'm sorry to cut you off, but people, and I've noticed this in your office house, people don't want to do things by hand or look at spreadsheets either. People are like, I want to build a front end and use seven LLMs as judges connected in a trench coat or whatever, right? Yeah.
SPEAKER_00Yeah, people's first knee-jerk reaction is, oh, my app is not that good. Let me import some LLM evaluation library and import all these off-the-shelf evaluators. No, that doesn't work because that doesn't really help you focus on what is broken. And so what you can think of is like, instead of images, you're looking at traces and you are categorized and then you write down as you go along, this is this top, this axis on the top here,
SPEAKER_00this is like where it says dog, cat, whatever. You write down different kinds of errors that might be happening and you tick them off and you might even have some notes. Okay. This thing got misclassified as a dog. What happened? Oh, it's a pit bull. Okay, this thing was, there's a blurry and it got misclassified. But it was like a rainy day. Or whatever it is, you start writing down notes. And this seems like it's very, it is like uncool in a way.
SPEAKER_00Like you're not using AI, you're actually going through, you're getting your hands like super dirty. You're looking at your data. What always happens is that this clarifies everything. It clarifies what you should be working on next. What are the most important kinds of problems in your application? And then it also clarifies what you should even be evaluating. And then also like how to measure it. Like all these problems are addressed directly by looking at data.
And so there's a little bit more nuance to it of like, how do you look at data?
SPEAKER_00Okay. Can you actually put this stuff in a spreadsheet? What if you can't put it? Oh, that bunch of traces. How do you do that? Put that in a spreadsheet. Yeah. So there's error analysis has a couple of different components. One is looking at data, writing down some notes about what the errors are. And then after that, doing some data analysis analysis. on this spreadsheet that's in this picture here, you have to do some data analysis on it to see, hey, what actually, are there any patterns,
SPEAKER_00systematic patterns that I can pull out of here that make sense? And no matter how complicated your AI application is, this brings a lot of focus to it. Does that make sense?
SPEAKER_02It makes perfect sense. And it's my process as well.
SPEAKER_00Yeah. Once again, people have been like, how do I evaluate multi-turn conversations?
SPEAKER_02And you've asked, what are the business goals and what LLM calls you're using and that type of stuff. But when you ask them, what are the biggest failure modes? They're like, oh, I haven't really looked into that. 75% of them said, I haven't actually looked into that, right?
SPEAKER_00Yeah. So someone made a comment like, this error analysis is actually a confusion matrix. Yes. But let me show you. We're trying to pull out the idea. So let me share something else. The actual question then led to say, for a confusion matrix, you need ground truth, right?
SPEAKER_02And what if we don't have ground truth? Now, there's another question that I pose that if we have no ground truth about anything, what are we even building? Which I think seems philosophical, but it is actually highly practical as well.
SPEAKER_00Yeah, you don't need ground truth. I mean, there is some level of ground truth. You need taste and you need to be able to judge yourself whether or not something is correct or not, which is a form of ground truth. But it's often the case that you don't even know what you're looking for until you start looking at your data. So this is the kind of... If you were to put that thing that I was just showing in that from Phoenix, if you put it in a spreadsheet, okay?
SPEAKER_00and you're trying to do error analysis, it might look something like this, what I'm showing you here.
SPEAKER_02This is an Excel spreadsheet. And can you just talk us through the columns just in case we include this in the podcast that we release?
SPEAKER_00Yeah. So like this first column is a URL. I can't really see the URL because it's cut off. This is the actual text of the article in markdown form. There's a lot of it here. So you may not be the perfect thing for a spreadsheet, but it's okay. It's not horrible. And I'm trying to communicate the idea of doing this. I'm going to show you different ways of doing this that's not spreadsheet. But spreadsheet is often pretty good. Okay, so you might have, this is the input to the language model is this article text.
SPEAKER_00Okay, now let's skip all of these fields here for a moment because I'm going to come back to those. And this is the output of your LLM. This is a summary. Okay, and you can imagine, okay, if I'm going to go through this, I'm going to go through, let's say, 100 examples. And I'm just going to take notes on what went wrong, if anything. Maybe nothing went wrong. Maybe it's perfect. Maybe I'm okay with it. In which case, I'll have no failure here. But sometimes, I might make a note of some kind.
SPEAKER_00Like, hey, this is off topic. For example... Okay, this says something about, as I shared with my family, I made a decision to disband this company. And the summary is something about polar bears. So something went wrong, okay? This is, again, a toy example. This is a teaching example, but this happens... This is meant to simulate what actually the types of things that happen in real life.
SPEAKER_02And can I ask you a quick question? Something I always tell people is, of course, deciding the failure mode or no failure is important. And this may not be what you're talking about now, but we also want binary classification of accepted or not, right? As opposed to, once again, people in your office hours. Question I've heard a lot. Should I grade things between zero and five? And your response, which is always my response, is what's the difference between a three and a four then? You actually have to make a decision, good or bad as well.
SPEAKER_00Yeah, I would say start off with just notes. So even this, you might have just a notes column. So I would say I wouldn't put anything here. I wouldn't put anything there and say, OK, this the summary was completely off topic because I don't even know beforehand what these categories are in this column because I'm just starting to look at data. I have no idea. I don't care. I just want to look at it and write notes. OK.
SPEAKER_02And also to that point, summarization is something people think may be straightforward, but deciding whether something is a good summary or not is actually a totally multidimensional space.
SPEAKER_00Yeah, you don't know. You don't know. You have this idea, like you want to summarize articles. The process of going through and looking at these will help you refine what the hell you want. Exactly. Which is a lot of times that's what that's exactly what you need to do. You need to go through this exercise. Let's do another one. So this one here, I already have the answer here, just for humor, just humor me for a second. But this one is like some GitHub repo, something called Ropey.
But let's just say for, this is not, let's say according to my preferences, this is not
SPEAKER_00complete enough. So I can say, okay, this was incomplete. I'm just giving you an example. And you can keep doing that. You can go through these examples. Now, how many do you need to go through is always the question. And I say, start with 100, okay? Another question I get is, what happens if you don't have data like this? You're just starting out. And we can, let's come back to that. Let me make note of that. What if you don't have this data? Because there's approaches for that too. But okay, so you have this.
SPEAKER_00You have your notes. And now what you can do is you can actually analyze your notes. You can even use a large language model. And you can try to create some categories from your notes. What kind of failures did you see? And then try to have some rough categories that you pull out of that. And then you can compute something like this even. Or you can go back and categorize them by hand. Whatever. It doesn't matter. The idea is you want to get a sense of what is happening. Now there is another kind of thing I skipped over here,
which is these other columns.
SPEAKER_00So what the hell is that? So those are just dimensions or facets of your data so what the hell does that mean that just means like things that are important to your application that help that can help you segment the traces so that help you analyze them so here we have article types such as technical field semiconductor does it contain code source type company blog or github repo or
SPEAKER_02whatever
SPEAKER_00Yeah, there's like article type. Is it technical? Is it an opinion? Whatever. I can even put a filter thing on here to help us. But yeah, article is, hey, is it academic, business, education, legal? The field might be here. I have a field thing. Is it like, what field is it? Is it aerospace? Is it AI? Does it contain code? So these are arbitrary. These fields here, they're specific to your application. What dimensions matter to your application? How do you want to segment it?
SPEAKER_00And so... Yeah, so that's important because it'll help you analyze the data. And what if you don't know what that is? If you think about it, you can think about what that could be. And there might be different ways for you to get those dimensions into your data. You can pull them from your application depending on what generated the trace to begin with. Where did the user come from or what part of the application they're using? But sometimes you can just tell from the actual content itself,
SPEAKER_00like the input, like this article type, field, contains code, all of that. All of these are actually a function of the input. So you could use an LLM to compute these dimensions also. It's basically enriching your data so you can do analysis on it. And then basically like the idea is, okay, you can summarize it. So you can take your, you can take your error analysis and you might end up with something like this,
SPEAKER_00which is okay. Now what I'm, okay, let me just go through this carefully.
SPEAKER_02And wait a second, Wade Hamill, is this some sort of pivot table?
SPEAKER_00Yeah. So this is a pivot table. Pivot table is basically like a way to aggregate data very quickly. So you can do this in Excel. This is like a very low tech way, like very accessible to people. But basically, yeah, you could just press a button to get a pivot table. I'm not going to go through that because it takes two or three minutes to set up. We can come back to it if you want to go through the steps.
SPEAKER_02But clearly part of the point is that pivot tables are easier to just do automatically in Excel or a spreadsheet, G sheets, whatever, than it is with Pandas code, right? it can be yeah my point is use the lowest tech shit that you can think of for your problem if it makes sense it's okay in this case i have the kind of there's one dimension here okay so like in this case i'm doing article type and this is just a
SPEAKER_00count so this is a count of the different kinds of errors which are on the top. So if I do some analysis on this, I'm like, okay, for whatever reason, I have a lot of off-topic stuff and verbose stuff in opinion articles. So that's interesting. Or you can say, okay, like stuff with code. So there's a lot of incomplete articles that happen to have code. This is just a teaching example again, but this gives you an idea. Oh, okay.
SPEAKER_00The news outlet stuff, a lot of that is off topic. And you'll find stuff like this. Often you don't even need to do it at this level. You might just find, hey, there's a single error that is happening most of the time. You just go focus on that. The reason I like pivot tables is you can like quickly look at the example. So you're like, oh, okay, if you're here, you can say, okay, I want to see this incomplete documentation related articles. Let me just click on that. And then you can go directly to those rows that make up that
aggregation by just
SPEAKER_00double clicking on it. And you can go back and forth. It's very powerful. And then you can you can change this pivot table. So it's very easy to just like quickly say, OK, you know what? The things without failures only want to look at failure. So let me filter that out. Boom. Done. I don't have to. I can just quickly do it. I don't have to. In this one, I got a little bit fancier. I put percentages on the top and then counts on the bottom. That's just because whatever. I just want to illustrate the point. Again, by doing this,
SPEAKER_00you can get a clear idea of, okay, what are the top things that I want to check for? Like what kind of, yeah, what kind of errors? should I concentrate on? And where? And where should I look next? That's the basic idea of error analysis. It's like, OK. It just tells you where to focus. OK, if it's off topic, you have a bunch of off topic stuff. You probably want to look at, okay, where it's wrong most of the time.
SPEAKER_00Like you have a lot of news outlet stuff that's off topic. Okay, you might want to look at that and see if there's something wrong in your data pipeline or something, whatever. It's just very basic. There's nothing, like I said, nothing really aha about this. It's just basic looking at your data. Okay, do you have any questions about this so far?
SPEAKER_02Yeah, so one thing I just wanted to point out is that harking back to the Andrew example of a cat image detection algorithm, the table we showed, which had rows of dog, big cat, Instagram filter, errors, confusion matrix stuff, is also this type of pivot table. So I just wanted to make that clear as well. You have rows of his columns and vice versa, but it's pretty much the same then. So my point is that it is actually a very simple approach, but it does give me an aha moment to recognize that A lot of people haven't really thought about it in this way,
SPEAKER_02and then so it will be aha for a lot of them. Umar has a question in the chat, which is, any tips on intelligently updating the prompt based on failure modes? And I do want to move to something like that to think about model iteration, but I think a broader question is... First, once you identify these failure modes, what do you do? And how does it relate to testing and evaluation? And there are a lot of questions in there. So just feel free to pick ones that you think are most relevant for the next stage of this conversation. So I've done a similar analysis recently where there was a date
parsing error. Like it was for a apartment leasing assistant where you can book appointments.
SPEAKER_00And the person trying to lease the apartment is saying, hey, I want to make an appointment for viewing. And there'll always be like something wrong with the date and the scheduling because of the date understanding. Like it's always pulling the wrong date. And doing an error analysis like this, we would see, okay, like a scheduling issue is always the problem. So then what we can do is we can then write some tests, that stress test of that date issue. I'll actually show you some, let me just get it.
SPEAKER_00Let me pull it up. Let me make it more concrete. by showing you an example, if I can get it. And I'm not going into evaluations in this talk, because that's a whole separate topic. But let me give you an idea. I'm not going to tell you exactly what is going on, because that would take too long. But let me give you an idea. So this is yet another eval tool called BrainTrust. This happens to be the thing that we did this particular test in. But you can see, OK,
uh this is like a very this is not even an automated test this is just give you an idea of how we iterated on one this specific issue so we have in here we have a prompt i don't know if you can see this and you zoom in more yeah zoom in a bit yeah you have a prompt you are a leasing member blah blah a team a leasing team member you're engaged with the customer you're it gives you all these instructions
SPEAKER_00you're a leasing agent okay There's even some prompting around dates. And basically what we have is a data set of different test cases. So let me open one example is, okay, we have the input, which is, hey, you're a user, you're looking for a three-bedroom unit available February 28th. expected output is this output exactly. We expect a function call with this kind of whatever. And then this is some metadata that's also used in this situation.
SPEAKER_00And so like we were testing a bunch of different cases here. This is just us getting started. You can see, okay, we are, we have basically creating tests for this situation. Oh, I need a two bedroom starting the first of next month. That's another variation where we might confuse the language model. So on and so forth. This is another one. Is there a one bedroom available for move in on New Year's Day? So there's all these different ways that we're trying to confuse the model. And this particular platform,
SPEAKER_00we even have, or this is like complicated, but basically it's, we have a scoring function. Okay. I'm not going to go into the way this works. I don't even know if you should try to replicate this is a little bit, It's a lot of code and maybe you don't need to do it this way. You can, in this case, be able to see, okay, what is our success rate? At first, it was like very low, just even in these 12 examples. Now you can move from here into more automated tests. You could scale out this test case a little bit.
But the whole idea is we focused on this because we saw this was a very big failure mode.
SPEAKER_00Does that make sense? So we like went into this. And, okay, so in this case, okay, so I'm going to jump around a little bit here while we're on the topic of this leasing assistant. So you might be wondering, okay, this leasing assistant is actually a text message system. You can text this AI and it'll continue chatting with it about the apartment you want. That would become unwieldy because the conversations can get very long, right? You have a AI,
SPEAKER_00you have a system message, you have a user, AI response, user, it can go back and forth. And some of these conversations are threads with like 50 messages. And you want something a little bit more ergonomic than a spreadsheet. In this case, for this company, they use Langsmith. And I'm showing you a lot of different tools, and we can talk about tools later. That's a different topic. Langsmith has a really good data viewer thing,
SPEAKER_00which I like, that makes it easy to annotate data very fast. Here, this is the same thing almost. Hey, you're an AI assistant working as a leasing team member. But then you have the human saying, I would like to schedule a tour, blah, blah, get tour availability. And then you have all the back and forth. Okay. This is synthetic data, by the way. I'm not sure I have permission to show you this. So you can see this is like a back and forth conversation. It's very ergonomic. I like this because you can use hotkeys to step through this very fast.
SPEAKER_00And then you can write your notes. So I can say, okay, this failed because... of xyz okay and this is what this is actually doing this in real life i'm not showing you this is not a toy thing except for this one example i'm showing on the screen we're actually using this to do the error analysis we're running the notes and then we're aggregating that up The result of this, we're going to step through this data set. There's 75 in this particular data set and we have three of them.
SPEAKER_00So that's like another way to look at data. Yet another way to look at data is Argyla. Argyla has some little bit rough edges, but basically you can upload your data set. Now this is that same Hacker News stuff I showed you, but it's similar. You're a helpful assistant that creates accurate, concise summaries. I don't know why it's truncating it with dot, dot, dot. And there's something to look into. But again, you can step through. You can see I'm stepping through hacker news articles. And then you can sit here. You can like write feedback.
And then you can like here, just for illustration purposes, put those different failure modes.
SPEAKER_00You can mark as if you want. So there's different. And then so I honestly, I always build my own. So we talked about this before, Hugo. A lot of times I build my own data viewer because it's so important. I think I have maybe some blog post. Yeah, this one. Your AI product needs evals. I think there's a screenshot. But if you look at this. Yeah, this is a screenshot for another company. Is that the ReChat one? Yeah, this is the ReChat one. It's the real estate CRM. But yeah, this is another thing that built this.
SPEAKER_00You can build something like this really easily. You can use Streamlit. You can use Shiny. You can use Gradio, whatever the hell you want. And you can very quickly in a day just get something where you can look at data really fast i gotta say with shiny and gradio in particular stringlet has a lot of affordances as well and i love for slightly beefier stuff but shiny and gradio allow me to and i'm not a front-end dude allow me to create something so quickly man so yeah and you can use fast html shout out to fast html
whatever it is you use whatever you want but just create it fast and look at data another thing is you can
SPEAKER_00use notebooks Use a Jupyter notebook. I honestly don't care. Use what works for you. Use a spreadsheet. That's why I showed a spreadsheet. That's why I showed a pivot table. Whatever you need to do. Actually, in this article, I actually show myself using a pivot table. This is another. This one was Honeycomb. And this is not exactly error analysis, it's related, but the model inputs and outputs are very succinct and compact. It fit in a spreadsheet quite nicely.
SPEAKER_00And yeah, we used a spreadsheet to review the model and say, hey, is the model outcome good or bad? And then we wrote a critique. I had the reviewer, which was not me, which was another person, his name is Philip, He wrote a critique of, oh, okay, like, why is this good or bad?
SPEAKER_02Could you actually just step back a bit? I love this example so much and talk us through the example, like from the fact that it's not multi-turn, it's code generation, it doesn't generate natural language, and these types of things as well.
SPEAKER_00Yeah. Okay, so you have this. Okay, so this particular example is the Honeycomb. It's a natural language. Let me see if I can just pull that up. Honeycomb is a observability platform. And they have a query language, like a honeycomb query language. A lot of people, you don't want to learn that query language to use their tool. It would be nice if we could just use natural language. And that's exactly what they've implemented. And the idea is you type in your natural language query,
SPEAKER_00and then it translates that into the honeycomb query language for you. So in order to test that, we did error analysis. We did something. This is not strictly error analysis. We went beyond that because there's different levels of sophistication of error analysis. We can talk about that. So what you see here is this first column is a response of the language model. Then the model, what is in the model's chain of thought? Or, sorry, we have the response of the LLM.
SPEAKER_00It is not chain of thought. This is, we have an LLM as a judge. And we have, what does the judge think of this? And then what does the judge say? Is this good or bad? Is this model response good or bad? There's, it's not on the screen, but there's also the query somewhere. It's just not in the screenshot. It's in a different, it's like column A or B. And then you have, what does Philip think? Philip's critique, is it good or bad? And then how would Philip rewrite the query?
SPEAKER_00In this case, is there agreement? Yeah. So this is for LM as a judge. This is for aligning LM as a judge with human. And he was doing this several times a week or something like that, like jumping into it. Yeah, yeah. Several times a week.
SPEAKER_02And then he was looking through traces with him as well. Yeah.
SPEAKER_00Yeah. So this is separate. This is now we're getting into evals because LM as a judge. But I just want to say we use Excel for this. You can use Excel for looking at data too. We were looking at data. This is not error analysis. This is coming up with an eval. which is an LLM as a judge that we make sure that agrees with Philip. But before you get to this is looking at data, right? In the process of making this LM as a judge, you have to look at data. So you're doing all of this at the same time.
SPEAKER_00This is a very scoped problem. So in this case, we could build this LM as a judge and do error analysis all at the same time, if that makes sense.
SPEAKER_02That makes perfect sense. And I do, firstly, I know we're not here to talk about evaluation so much, but seeing that agreement through those iterations go from 68 to 94, I'm like, wow. And I'm like, is that right? Because that's incredible.
SPEAKER_00Yeah. Yeah, that's exactly what happened.
SPEAKER_02Amazing.
SPEAKER_00Because this is pretty rigorous, right? We're teasing out what does Philip actually want? And we're able to get, you can try as hard as you want to like write down everything you want your language model to do. But it's often only until you look at things and respond to it. that it solidifies your understanding and solidifies your requirements, right? So like the first iteration, I was like, oh, we should be doing XYZ and ABC, but we never told the language model that.
SPEAKER_00And okay, we're able to make this LLM as a judge better, and then also make the underlying system better too, because we're able to reuse some of that in the system itself. Yeah.
SPEAKER_02Yeah, what I found surprising is you could iterate on the prompt that quickly to get that lift in the alignment or agreement percentage. But I suppose, and once again, we're not here to talk about evals, but one common way I approach these types of prompts is to tell it what I'd tell a human who may not know a lot about the topic as well, right? Where you give it a bunch of positive examples, negative examples, leverage some in context learning of some sort, and heuristics, and also explain your reasoning within these prompts as well. Is that what you found effective?
SPEAKER_00Yeah, there's another blog post, which is like LM as a judge, where I go more deeply into this topic of LM as a judge because I only touch the surface of it on that blog post. And this is a much longer blog post. Again, yeah, I like to show this. Don't do this. A lot of people do this. They're like, oh, let me compute a whole bunch of scores. So you've got helpfulness, truthfulness, personalization, conciseness, tone, accuracy. This was part of my point when talking about summarization because you can have
SPEAKER_02relevance, coherence, accuracy, lack of hallucinations. Is it concise? All of these things. And you actually want to give a good or bad, right? You want to project.
SPEAKER_00Not even this. What the hell does this mean to you? This might not even be a problem. And it may not align with anything that you care about. And also, whatever it says is helpful may not be helpful. Whatever it says is truthful may not. This is a bad idea. You're doing this. You're wasting your time. Very bad idea. Don't ever do shit like this. You need to start with error analysis. Figure out what is wrong and measure that.
SPEAKER_00in variants of that. Start there. It's okay to use some of this as a diagnostic maybe, but I'm not saying don't, but don't just jump straight into this and just track this and call it a day. There's not going to happen. Totally.
SPEAKER_02And we've seen in your office hours, people have come in with dashboards like this, not quite that one, but we've got a comment in the chat, which is so beautiful. It's Jonathan Silverman, who's in the course straight out of Brooklyn, New York saying, I feel like I would make a mistake like that, building that type of dashboard. That That's made my day, actually, knowing that someone has seen something which will help them avoid mistakes here.
SPEAKER_00Yeah. To answer your question, and actually this blog post was in a response to a client of mine making this mistake. So when they made this mistake, I said, okay, I had enough. I need to write it down because I've seen this too many times. So there's something called critique shadowing that I had to come up with some name for it. we'll feel free to come up with a different name but that's there's the andrew eng thing in here again but it's basically okay for lm as a judge yo also just quickly i just want to make so clear and sorry to cut you off but the
fact that in this other blog post on lm as a judge you have a section on error analysis really speaks once again to how fundamental this process is in this way of thinking right
SPEAKER_00Definitely. Yeah. Yeah. So here in this article, basically, I show, hey, you want to have your LMS judge write, sometimes write critiques because it can help. And I give it, you can give it example critiques to help ground its thought process. And those critiques can be sourced from actual critiques that you write. And yeah, this is answering a question about, oh, can you use the critiques to make your LMS judge better? That's, yeah, I go into that in detail in this blog post, like how to do that. But it really all starts with error analysis.
SPEAKER_00Error analysis will let you know, okay, like where to begin. And this is different for different people. You need telemetry. It's good to have telemetry. Use something. Use a SQLite database if you have to. I don't care. If you want something that renders your traces nicely, I really like Phoenix. It's open source. It's written in Python. The developers are great. if you're looking for something like that to get started. And you can annotate. You can do some annotations. They have an annotate thing.
SPEAKER_00You can annotate. It's not as, at this moment, it's not like as seamless as the other thing I showed in terms of going back and forth. But yeah, I use this all the time and I like it. Basically, just try different things. I don't want to prescribe like tools because honestly, they're all changing. And I just wanted to show you different ones, different things. There's no like... One that I'll say is my favorite, let's say, because they all have different strengths and weaknesses and whatever.
SPEAKER_00But I just want to say, OK, this is one thing where it is helpful. Sometimes you have tools. And once you start to write evals, all of these different platforms that I showed today, like they'll help you actually track those. And we're not going to get into that because it's a whole different subject.
SPEAKER_02We do have a question in the chat, which is about evaluation, but I do want to see if we can bring it back to error analysis. Katsi Chaz, great name, says, how do you evaluate metaprompts that call dynamic workflows, e.g. React? Is testing common use cases enough, or is there a more general way to observe the LLM's reasoning and behavior?
SPEAKER_00Am I sure I absorbed the entire question? So if we have... Oh, wait, let me read it. I can read it. I have the chat open. Okay, that question, like, how do you evaluate XYZ? That's complex. Should you test common use cases? Okay, one, I want to come back to the ideas. You want to do error analysis. So you want to look at traces and categorize them. But what if... Okay, and you want to prioritize things that are actually going wrong and test those. Test that thing. It's usually...
when you do proper error analysis you'll find like some failure modes float to the top and those are the things you should focus on one question is like what happens if you don't have data what if no one is using your application you don't have these traces to do error analysis what do you do then so the answer to that
SPEAKER_00question is you can generate synthetic data And let me see if, I think I talk about it in this blog post somewhere. Let me see if, yeah, generating synthetic data. So basically you can use an LLM to- It could be a user simulator. Yeah, basically generate, think about all the different ways that you might. So let me like step back a second. So up here, this is a section on generating data. Let me go to this highlighting, it's confusing me.
SPEAKER_00So you want to cover different scenarios and you want to have... So for example, you might have some ideas of failure modes because maybe you have done some error analysis. And so in this case, this is just helping you get the idea or learn the idea. But in this case, I have these dimensions like feature, scenario, persona. And okay, for this feature, order tracking... invalid data provided is a scenario and I have like frustrated customer.
And my prompt for my LLM is generate a user input from someone who is clearly irritated and impatient using short terse language to demand information about the
SPEAKER_00order status for order number, blah, include hints of previous naive experiences. And this is just my notes, this order number doesn't exist. We're fulfilling this invalid data provided. And that you feed this to LLM to generate the data. And basically, these are just some examples. And even to give you more examples, it's not less hypothetical. I actually use this all the time. Let me go back to this post. Something really high level here at the top,
which is, yeah, this is for the ReChat case.
SPEAKER_00This is the real estate agent, a real estate assistant. Write 50 different instructions that a real estate agent can give to their assistant to create contacts on the CRM. Contact details can include name, phone, email, partner name, blah, blah. The results should be a JSON block with only one string instruction like the following. And then we generate these test cases. So you can get quite sophisticated with synthetic data generation, but just know that you can use an LLM to help generate inputs. And that is a reasonable way to try to bootstrap some data or
some input.
SPEAKER_00It's not perfect. What else are you going to do if you don't have users and you want to really test the system? This is beyond vibe checks. It is important to do that vibe check stuff. As a first order, you should just use your own thing and see if it works. But beyond that, if you really want to know, OK, what might happen in these plausible scenarios, then you can generate that.
SPEAKER_02Exactly. And I think this also speaks to something... that you and I have chatted about a lot, but our mutual friend, Trash Anchor, has written about, and I'll link to her post, about just building essentially data flywheels for generative applications, right?
SPEAKER_00Yeah, yeah. The data flywheel is really interesting because when you do this error analysis and then you start writing evals, you have, especially when you do evals, you start having very strong filters that you can use. to curate data sets. And you can use those data sets for things like fine-tuning to really dial in the performance of your AI system. So if you know all the different examples where your AI is failing,
SPEAKER_00and you also know what the correct output should be, and you'll get to that if you're doing this eval process correctly, then those are really powerful examples for fine tuning. Without a doubt. It creates a flywheel.
SPEAKER_02Yeah. And also, I'm just thinking through all the stages in what we do, and the error analysis not only informs evals and LM as a judge and all of this, but it informs the tests you write as well, right? So thinking about... One challenge is test coverage, right? Do our tests cover the types of cases we actually have? The way to know that, once again, is to look at your data and do error analysis, right?
SPEAKER_00Yeah, let's do it. Error analysis, some people, a lot of people watching this are not going to do error analysis. They're going to be like, it seems like very tedious and I don't know what's going to be the result of it. Will I actually know? If I have that pivot table, what do I do next? And it's always the case, when you look at 100 examples, you almost don't need to analyze anything. What's wrong?
SPEAKER_00And you learn so much.
SPEAKER_02I think part of the hesitation is also tooling, right? Like Jonathan mentioned in the chat that when I said, I think spreadsheets are easier for pivot tables, he said, I think Pandas is easier. And I'm like, great, use Pandas. Like whatever feels good, but I want to use a tool that I'm excited to jump into because I do like looking at data, but I don't like writing Pandas pivot code, to be honest, right?
SPEAKER_00Yeah, so let's dive into that a little bit more. So where is my share screen? Okay, let me see. And just quickly, we do have a question in the chat from Jeffrey, which I really love.
SPEAKER_02What's the difference between a log and a trace, OLAD and a span? There are like all these terms floating around, right?
SPEAKER_00Yeah, I always mess up span versus trace. I believe span is a group of traces, if I'm not mistaken, but I always get it wrong.
SPEAKER_02It might be the other way around.
SPEAKER_00Yeah, I always mix it up. But it's basically like some, it's a concept that's been around for a long time in distributed systems where you have let's say, it's not even distributed system per se, it's like web stuff even. Let's say you have a user that logs into your website, then looks at some pages, then ends up in a shopping cart. There's a sequence of events. And so it's like a group logically... logical group of logs that describe a sequence of events.
SPEAKER_00That's what it is. Yep. And you just want to view it in a way that makes sense. In a lot of cases with LLMs, you just want to capture that in a way that makes sense. And that's all we're doing. Right. Someone says span is a segment of a trace. Yeah. We had it backwards.
SPEAKER_02I think that's Stefan from Hamilton and Byrne.
SPEAKER_00That works fine. Yeah. I always get it mixed up in my mind, but whatever. yeah yeah pivot the thing is you don't have to use pivot tables but it's just whatever has the least amount of friction okay if i'm gonna do this data analysis if i want to continuously fiddle with it so let's just take this you know over here okay and let's let me actually get rid of this part and just do count for example it's just sometimes it's a little easier to just play with your data like this if i don't know what i want this is like a lot faster it can be fast
like much faster
SPEAKER_00It doesn't have to be, but yeah, it can be. I think it is in a lot of cases. I'm not a maximalist, but just use whatever makes sense to you. Sometimes pandas can be faster, but a lot of times I don't want to just continuously tweak my code. It actually stops me from exploring it as much. I want to just look at stuff. And sometimes pivot table is really nice because you could just kind of look at it.
SPEAKER_02This may sound out there, and I know I wouldn't do this for version control and that type of stuff. I like highlighting my code and putting stuff in bold occasionally. Sorry, my rows and columns in spreadsheets and that type of stuff. I want to be able to visually see what's happening. And that isn't something I'd want to necessarily, as I said, version, but being able to highlight a row and say, come back to this later and stuff like that is actually incredibly important to me.
SPEAKER_00Yeah, so look, I want to see, okay, does it contain code or not? Okay, great. And I just want to do different types of splits and different columns, different rows, whatever. I don't know. I don't know. I just have some intuitions. I want to follow them. Whatever. You always have that when you become familiar with your data. And this can be a lot faster, something like a pivot table. There's also another aspect. Do you want to have some physical connection to your data? Do you want to, I don't know, something about spreadsheets... I know what it is.
It's the low latency access to your data that you can see very quickly what rows
SPEAKER_00make up an aggregation and you can flip through it. But also those other interfaces where I showed where you can quickly change the page and annotate your data. Remember I showed you Argila, I showed you like that Langsmith annotation queue. All of those gives me a tactile feeling of the data because there's no latency in between me and the data. There's not too much of a barrier. I can see it and flip through it really fast, almost like if I'm holding some piece of paper with the data on it. Totally. And speaking of that kind of tactility, you can share it with Philip.
SPEAKER_02Now, Philip is a highly technical person, right? But even when you're sharing stuff with technical people, being able to share a spreadsheet as opposed to a version notebook that's connected to some SQLite database or whatever it is, can be incredibly useful for him to annotate stuff, then send it back to you, then jump on a quick call, shout about it.
SPEAKER_00Yeah, you don't want to give your domain expert. If you're not the domain expert as a developer, you don't want to give them pandas code. It's not going to work. You need to figure out how to share stuff in a way that other people can access it. Because you're not going to do all the labeling.
SPEAKER_02Totally. Brad has a great question. Do either of you avoid spending too much time on certain areas of error analysis or evals because you think the foundation model improvements will solve the errors? I have one answer to that. The short answer is no, but I've seen situations where OpenAI has gone down and someone falls back to Claude or I've fallen back to Claude and all different errors emerge and you have to redo your error analysis because the model has changed slightly. You could imagine that
SPEAKER_02OpenAI significantly improves chat GPT or GPT-4 or whatever it is. But for my use case, it doesn't actually do the same. But I'm interested in your thoughts on that, Hamill.
SPEAKER_00Yeah, that question doesn't make sense to me. And I'll tell you why. It's because, okay, if you're building any AI application, you need to trust it. How do you trust something? You have to check it. There is no other way. And it takes time to build trust as well. There's no other way. There's no other way to trust something other than checking it. You might check it less frequently if you build trust over time, but you need to check it to have trust in something.
SPEAKER_00Otherwise, that's ultimately your job is to make sure that this product reflects your tastes in your judgment. I suppose to...
SPEAKER_02A reorientation of what Brad may be getting at as well is, let's say OpenAI claims they're moving towards lowering hallucinations to 10 to the minus 3%, or whatever it is. Then perhaps a lot of error analysis you've done previously... maybe won't be worthwhile. But I think to your point, I'm not going to trust an OpenAI marketing statement and their own benchmarks. I need to verify it for myself. And the only way to do that is error analysis.
SPEAKER_00Yeah, exactly. And if the models get better... you're not gonna, the error analysis is going to show that you shouldn't be, you're not gonna find that error in the error analysis to begin with. So you won't be focusing on that thing.
SPEAKER_02Yeah. And maybe that's a lovely way to think about it. Error analysis, If there aren't many errors, you start it and it takes a couple of minutes. You're like, okay, aren't there many errors? So I'm going to focus on this thing to improve the product experience or whatever it is.
SPEAKER_00Exactly, yeah. And there's different ways of navigating. You can be like, okay, do you just look at... So there's a lot of questions. Do you look at stuff randomly? Yes. Like always, okay, you can start with looking at things randomly when you first start out because you don't know what's going on. But you'll develop an intuition over time. Like where is it failing? What dimensions is it failing in? And then you might start looking into, just like I showed you that pivot table, right? Hey, the errors are like stacked and clumped in these certain areas.
SPEAKER_00Maybe you look more in those. The heuristic is keep looking until you feel like you're not learning anything new.
SPEAKER_02The other thing, and actually someone in the course, William Horton, who works on ML systems and AI systems that included health in the US, he's giving a talk in our course tomorrow. And let me actually get the title of the course that he proposed because I love it so much. But essentially, part of his point, something they've discovered is you don't even really know how to evaluate things until you've shipped it somewhat, right? Like you don't even know what metrics are most important. You know your high-level business metrics, but the title of William's talk will be,
SPEAKER_02The Perfect Metric Doesn't Exist, How I Learned to Stop Worrying and Love the Launch, which I really dig. And once you launch, even to a small cohort, then you can really start digging into what's most important to you in the product.
SPEAKER_00Yeah, definitely.
SPEAKER_02Yeah. I am interested... We get, and you get a lot of questions around multi-turn conversations and agentic systems. And I love how, and I might get this wrong, but you use a term like LLM with automated stuff or something that can automate things, which I really, as opposed to agentic systems. But when you're consulting on error analysis and debugging stuff, like multi-turn conversations and systems that have a lot of tool calls and may in
SPEAKER_02fact, you may not specify what they do. And so they do themselves based on your prompt and statistical patterns in the training data and the training process. Are there things that make debugging and error analysis on multi-turn conversations and these types of systems particularly challenging or is it just the same?
SPEAKER_00Yeah, when it's really complex and traces are really large, then you need to think about rendering those traces. And you probably can't do it in a spreadsheet. You want to use either one of the tools that I showed or create your own, but you still need to look at that data. I will say that most people, when they come to me, they always have some complexity. It's not a summarize your article thing.
SPEAKER_00It's, hey, we have something that has tool calls. It's interacting with real users. It's doing a rag. It's almost always doing rag and function calling. And maybe some kind of also complex, more agentic, quote, agentic behavior, more automated behavior. Whatever it is, people tend to focus on, oh, is my architecture correct? Am I using the right tools? Can you review my architecture? And I'll almost always find that, I'm like, okay, where are your errors?
SPEAKER_00And they're like, what do you mean? I don't know what you're talking about. Okay, let's do error analysis because I don't know. You shouldn't even ask that question. You should say, okay, where is your error analysis? And is your error analysis prompting you to ask that question? Is there something wrong with your retrieval that you've noticed after you've done some root cause analysis, after you've done error analysis? Hey, you have a certain kind of failure mode and it seems like you're not getting the documents you want. Okay, now we can have a discussion about... are using the right RAG database. Or now we can have a discussion on are using the right
orchestration thing or
SPEAKER_00whatever the hell it is. But it's usually people who haven't done that yet. People are not doing error analysis.
SPEAKER_02So we've been discussing error analysis at a micro LLM call level. And of course, sometimes people are building products to meet business metrics as well. As you and I know, sometimes the business metric is we need to use AI. So we need our AI strategy, which we see a lot. But when, let's say... It's, we can choose any example, but I'll choose like a customer service agent and the metric is time to solution of issue and customer happy or something like that,
SPEAKER_02right? Whatever it is. How do you tie these like high level business metrics down to individual LLM call? Cause if we optimize for every call metric, we really need to tie it. We need to think about the whole system, right? And the business value delivered. So how do you tie the micro to the macro in error analysis?
SPEAKER_00Yeah, you need to make sure there's a strong correlation between these metrics and your business metrics. Or you have some principled story behind why they're connected. That's really the answer to it.
SPEAKER_02Is it always obvious? Are there examples where you've seen where it's actually quite challenging to do this?
SPEAKER_00It's very challenging to do it in many cases. In most cases even, I would say. So this has been a problem in classic machine learning for a long time. And the cases where it was most clear-cut in classical machine learning was marketing. It's okay if you can rank these results better, then it's going to result in more ad revenue. So the closer that your thing is to the money, then it becomes easier.
SPEAKER_00The more remote it is from the money, then... It's just, it's going to be hard. Catchy Shows has another great question, which once again, I want to generalize in some ways.
SPEAKER_02The question is, if you're shifting model families, for example, Deep Seek to Llama, why not the other way today? I'm half joking. Do you find yourself having to build more error analysis tests? I do want to frame it more generally as we're shifting models differently. constantly via prompt engineering, perhaps fine tuning, integrating new things. So I suppose whenever you change your model, do you find yourself having to build more error analysis tests?
SPEAKER_00No. You should be doing error analysis at a consistent sort of pace. You're making large changes in your system. Hopefully you have some evals that will help you, but you also probably want to do error analysis and big huge changes. You want to do some error analysis. Just you want to check, okay, this is something completely off that you don't have evals for. But evals is one supposed to help you like catch massive regressions,
SPEAKER_00at least like known failures that you might have. There's different kinds of evals. And you can do all kinds of other statistical tests. But yeah, if you're shifting models, hopefully you have evals in place, which we didn't talk about. we touched we touched on them i and we've definitely talked about them before i am interested so mutaza who's actually a product marketer these days at galileo doing interesting stuff there who's in in the course has asked how many rows should we think about labeling and you mentioned 100 i replied 20 okay 50
better 100 good what one thing i want to add to that i'm interested in your thoughts hamel once
SPEAKER_02again we want some sort of coverage of what the system actually does. And in one of your office hours, Maggie actually came in where she had her spreadsheet or data table or data frame where she'd actually clustered the traces with respect to topic. And if you're doing that, perhaps the answer isn't, the heuristic isn't a 20, 50 or a hundred. The heuristic is make sure you've got all your topics covered.
SPEAKER_00Yeah. Yeah. Yeah, you have to see if, and we didn't cover clustering. So there's different ways of prioritizing what you look at in their analysis. The reason I didn't cover all these different ways of exploring data and stuff like that, because I just want to make sure people focus on just look at it to begin with. Because people aren't doing that. But yeah, you can cluster your data, you can do semantic search, you can do all these different things to try to figure out where the highest signal is in terms of,
SPEAKER_00okay, where there could be interesting things to look at. But yeah, like you need to keep looking at data until you're not learning anymore. And usually like the reason why we keep saying 20, 50, 100, we're just making that number up. We just want people to start because once you start, it's likely that you will keep going because you will find value in it.
SPEAKER_02Totally. And I will tell you that most of the time, six won't be enough. And I, the reason I picked six is because I worked in biology for so long and N equals six is the famous number in biology where most of biology, it will not high throughput genomics and bioinformatics and that stuff. Huge amount of biology has been done on N is equal to six and N is equal to three. Um, which is pretty wild for someone who's very interested in reproducibility more generally. Alona has a wonderful comment saying regarding apps,
SPEAKER_02your tip about error analysis is always true, not only for Gen AI systems. I will go even further. I love that. I'll go even further and say error analysis is fundamental to so many things. And think about car manufacturing. If you've got a bunch of cars that... a crashing in the street for a variety of reasons. Error analysis is incredibly important for all the reasons, right? So in business in general, and business people have known this for centuries, I think, not necessarily doing pivot tables and that type of stuff,
SPEAKER_02although, but error analysis is fundamental to a lot of business, right?
SPEAKER_00Yeah. For the longest time, I never even said error analysis. I just said, look at your data because I couldn't understand why people wouldn't do it. I'm trying something new, which is telling people about this error analysis thing, because that's how it was framed in the machine learning, classic machine learning, and maybe that resonates.
SPEAKER_02Absolutely. And more generally, and Alona in the chat has spoken to failure mode and effect analysis, which is what it affects analysis what it's called in other fields right but i do think root causing failure modes or thinking about failure modes is another way to put it which may be more attractive to people as well because their analysis sounds a bit scientific and academic perhaps although it isn't really but yeah i think one thing is people get overwhelmed they're like oh like i have so much data like there's no way i can ever make like why would i start look what do you
mean i'm gonna look at
SPEAKER_00it it's like Picking up one grain of sand on a beach, how is that ever going to be helpful? That's how people feel. But really, you can gain a lot of information by looking manually at these examples. If you do it correctly, then yeah, you can actually get quite a lot of signal out of it.
SPEAKER_02Totally. We're going to wrap up soon. So I'd welcome any more chess in the chat. I am wondering if you could talk a bit about, and the answer, maybe it doesn't at all, but how error analysis changes through the, I suppose, entire life cycle of an LM powered application.
SPEAKER_00Yeah. So like in the very beginning, like you might not even know what you're looking for. You just want to Do the error analysis without too many expectations. You don't know what the dimensions or the facets are. You might not have that perfect. That's okay. You might not have categories of errors. That's okay. All you're doing is like looking through stuff and writing notes. You're just letting it, just observing, letting it happen. You're not being even that intentional about it in a way.
You're being intentional that you're paying attention, but you're not trying to optimize it.
SPEAKER_00The process of error analysis, you're just doing it. After you do it several times and you iterate on this, then you can start to become more sophisticated with your error analysis. You can say, okay, I want to find topics in my error analysis, so I'm going to do clustering. I want to add different facets so I can do more interesting data analysis. And you'll learn from like the prior steps and be like,
oh, you know what?
SPEAKER_00I need these like different facets.
SPEAKER_02And by facets, you essentially mean grouping with respect to dimensions,
SPEAKER_00whatever the hell you want to call it. Actually like facet. Yeah. There's many different words for this. I think the example you had before where it was blog things from blog posts and
SPEAKER_02GitHub repositories being summarized. You can pass it with respect to blog and with respect to GitHub repo. So you can see what's happening for each of those. Right.
SPEAKER_00Yeah. So, okay, this is something, this is like a blog post from Anthropic. We don't have to get into it. But like, this is one word they use, like they have all these conversations and they might have a conversation about how to tie shoes, information about whatever, some syndrome, help with CSS, accessibility. And they might say, it's okay, let's cluster it. But basically the idea is like you want to categorize, you're thinking create clusters. There's many different ways of creating clusters. We're going to have to get into that.
SPEAKER_00It can be quite sophisticated. So there's like clusters. There's also this idea like if you notice a failure mode when you're looking at a trace. So let's, oh, okay, this is about hardware. Let me find, you noticed an error while you're looking at it. I want to find other articles that are about hardware, about electronics. want to look at it i want to make sure like next 10 things to look at about electronics because i've noticed something really funny here or
the example that i showed you here about whatever this is about scheduling right so okay you know what i want to see there's something funny going on with scheduling like i can tell there's an error i want to only see traces that have to do with scheduling now
SPEAKER_00You might arrive at that by many different ways. Maybe you can filter by that programmatically, but maybe you have to do a semantic search. Maybe you have to cluster your data. There's a lot of different considerations, but to answer your further question is like, when you progress doing this error analysis, you can get more and more sophisticated in terms of like how you navigate your data, how you prioritize what to look at. But I almost think that's going to come naturally once you start to some extent.
SPEAKER_00You may need help, but it's important to start. I think it'll be somewhat intuitive on how you can make it better once you start doing it.
SPEAKER_02Without a doubt. And I just want to say, we've got a comment from Alona Brinkmeyer, who, firstly, thank you for tuning in, Alona. Alona's in Germany, I think in Hamburg maybe, but she's definitely in Germany. So she's tuning in at 3 a.m. her time. She's so excited for this. But she wrote, I thought, starting with error analysis about data, of applications is a common way. They do it all the time. Never thought that this is not the case. And I actually, Hamill and I have been surprised recently. And I think part of the reason is, part of the wonderful reason is we actually have a,
SPEAKER_02with generative AI, we now have, a whole bunch of people who haven't been building data-powered applications being able to now, essentially. We have software engineers, we have product managers, we have UX designers, we have all types of people now entering the space. So perhaps this is the reason why it's been like breathing for us, Hamill, but it may not be for everyone building now. Is that?
SPEAKER_00Yeah, I think so. Yeah. Like I didn't, I just kept saying, look at data and I couldn't understand why people didn't understand why, what I was saying, but I think it's second nature to like machine learning people or data scientists. So if you're a machine learning person or data scientists, what we're saying today, probably not that interesting because you probably know it. As you referenced earlier, I was doing office hours. I actually stopped. So I did eight of them. I started documenting them, these open office hours.
SPEAKER_00So people came to me with their LM problems. And you can see some of them here. Even I took notes and I have recorded them and everything. But I stopped because all of them failed because of some aspect of error analysis. like not doing it.
SPEAKER_02I got to say people should watch those or at least a couple of them. Cause if you're not doing error analysis or using these types of methodologies to improve your applications, you're going to save yourself so much time. And in the end, maybe make yourself a lot more money. If you watch Apple's office hours to be perfectly frank, but that's one of the reasons we wanted to do this. as well. So we're going to wrap up in a couple of minutes, but Hamill, I'm just wondering for those interested in learning more, of course, following you on the social, subscribing to your newsletter, checking out your blog, wonderful ideas,
SPEAKER_02but anything else you'd like to see people do.
SPEAKER_00Yeah, following me is a good place to start. I'll put my newsletter in the chat. It's basically a feed of my blog posts, like whenever I post something new. I'll probably do a course at some point that focuses on evals. There's a lot of service area there. I'm going to be doing it with Shrey Ashankar. Incredible. I'm putting it together. I'll announce it on my newsletter. Great. And I did link to one of Shreya's posts to building data flywheels for LLM
SPEAKER_02applications, but everyone should read all of Shreya's posts as well, as I would suggest with Eugene and Hamill and a few other of our colleagues and friends as well.
SPEAKER_00Yeah, this is our website.
SPEAKER_02Yeah, put in the chat, man.
SPEAKER_00Yeah, there's like some interesting stuff here. I would recommend checking out Doc ETL. It's actually pretty cool. And what was the product she demoed at your course again? Remember? It was, I think it was maybe this one. Synthesizing Data Quality Assertions. Yep. But it's just really interesting because she does a lot of research on like human-computer interaction and the intersection of that and evaluations.
SPEAKER_02Exactly.
SPEAKER_00So... It gives you a good idea of the kinds of workflows that you might want to strive for when you build your evaluation workflows. I am incredibly excited to attend a course taught by you and Shreya as well. So take my money now and I'll definitely promote your course when it's live as well.
SPEAKER_02I'm also linked to the course that we're doing on Maven. As I said, our first cohort is nearly over, but feel free to subscribe for updates when we announce another one. Thank you everyone for joining. We've had nearly 200 people join throughout, which is super exciting. So appreciate you all for your time and wonderful questions. Most of all, Hamill, thank you for your time and wisdom and also for just going out there and having all these chats and figuring out what's up and bringing it back to everyone. I think that it's incredible work and we all appreciate you, man.
SPEAKER_00Yeah, thank you.
SPEAKER_02Totally. All right. Thanks everyone. And we'll see you in the next live stream and back in the course. Thanks for tuning in, everybody. And thanks for sticking around to the end of the episode. I would honestly love to hear from you about what resonates with you in the show, what doesn't, and anybody you'd like to hear me speak with, along with topics you'd like to hear more about. The best way to let me know currently is on Twitter. At Vanishing Data is the podcast handle, and I'm at Hugo Bowne. See you in the next episode.
Hilary Mason, CEO of Hidden Door, works with agents across software development and creative projects. Drawing on Richard Hamming’s distinction between science and engineering, she describes agents as “bringing the...
Agents can write the code, run the analysis, and produce a convincing explanation. How do you check that they’ve answered the right question, used the data appropriately, and reached a conclusion you can act on? I...
“It’s an LLM, a loop, and enough tokens.” - Nicolay Gerold, Amp Code So why does a coding agent forget your instructions, keep reading tiny pieces of a file, or struggle with an edit another model handles easily?...
“If you feel that a product is hard to eval, or you feel like, ‘I don’t even know how to eval this,’ it’s a strong smell that your product isn’t good.” - Hamel Husain, on AI product design An AI data agent tells you...
“It would be sad if local models were not an option and there were only proprietary models. It’s good to have alternatives. Competition is good for business.” - Sebastian Raschka, on open-weight AI Kimi K3’s weights...