Why AI evals are the hottest new skill for product builders | Hamel Husain & Shreya Shankar

0:00

To build great AI products, you need to be really good at building evals.

0:01

It's the highest ROI activity you can engage in.

0:05

This process is a lot of fun.

0:07

Everyone that does this immediately gets addicted to it when you're building an AI application. You just learn a lot.

0:12

What's cool about this is you don't need to do this many, many times.

0:14

For most products, you do this process once and then you build on it.

0:18

>> The goal is not to do evals perfectly.

0:20

It's to actionably improve your product.

0:23

>> I did not realize how much controversy and drama there is around eval.

0:25

There's a lot of people with very strong opinions.

0:27

People have been burned by evals in the past.

0:29

People have done evals badly, then they didn't trust it anymore and then they're like, "Oh, I'm anti- evals."

0:36

>> What are a couple of the most common misconceptions people have with EVEL?

0:39

The top one is we live in the age of AI.

0:41

Can't the AI just eval it? But it doesn't work.

0:44

A term that you used in your post that I love is this idea of a benevolent dictator.

0:48

When you're doing this open coding, a lot of teams get bogged down in having a committee do this.

0:54

For a lot of situations, that's wholly unnecessary.

0:56

You don't want to make this process so expensive that you can't do it.

0:59

You can appoint one person whose taste that you trust.

1:01

It should be the person with domain expertise.

1:05

Oftentimes it is the product manager.

1:09

Today my guests are Hamill Hussein and Shrea Shankar.

1:12

One of the most trending topics on this podcast over the past year has been the rise of evals.

1:16

Both the chief product officers of Anthropic and OpenAI shared that eval are becoming the most important new skill for product builders.

1:26

And since then, this has been a recurring theme across many of the top AI builders I've had on.

1:30

2 years ago, I had never heard the term evals.

1:33

Now, it's coming up constantly.

1:34

When was the last time that a new skill emerged that product builders had to get good at to be successful?

1:40

Hamill and Shrea have played a major role in shifting evals from being an obscure mysterious subject to one of the most necessary skills for AI product builders.

1:49

They teach the definitive online course on evals, which happens to be the number one course on Maven.

1:55

They've now taught over 2,000 PMs and engineers across 500 companies, including large swats of the open AI and anthropic teams along with every other major AI lab.

2:06

In this conversation, we do a lot of show versus tell.

2:08

We walk through the process of developing an effective eval, explain what the heck evals are and what they look like, address many of the major misconceptions with eval, give you the first few steps you can take to start building evals for your product, and also share just a ton of best practices that Hamill and Trey have developed over the past few years.

2:28

This episode is the deepest yet most understandable primer you will find on the world of evals and honestly got me excited to write evals.

2:36

Even though I have nothing to write eels for, I think you'll feel the same way as you watch this.

2:41

If this conversation gets you excited, definitely check out Hamill and Shreas's course on Maven.

2:44

We'll link to it in the show notes.

2:46

If you use the code Lenny's List when you purchase the course, you'll get 35% off the price of the course.

2:52

With that, I bring you Hamill Hussein and Shrea Shankar.

2:54

This episode is brought to you by Finn, the number one AI agent for customer service.

3:02

If your customer support tickets are piling up, then you need Finn.

3:05

Finn is the highest performing AI agent on the market with a 65% average resolution rate.

3:10

Finn resolves even the most complex customer queries.

3:13

No other AI agent performs better.

3:15

In head-to-head bake offs with competitors, Finn wins every time.

3:18

Yes, switching to a new tool can be scary, but Finn works on any help desk with no migration needed, which means you don't have to overhaul your current system or deal with delays in service for your customers.

3:30

And Finn is trusted by over 5,000 customer service leaders and top AI companies like Anthropic and Synthesia.

3:37

And because Finn is powered by the Finn AI engine, which is a continuously improving system that allows you to analyze, train, test, and deploy with ease.

3:44

Finn can continuously improve your results, too.

3:46

So, if you're ready to transform your customer service and scale your support, give Finn a try for only 99 cents per resolution.

3:52

Plus, Finn comes with a 90-day money back guarantee.

3:57

Find out how Finn can work for your team at f. ai. ai/lenny. That's finn. ai/lenny.

4:05

This episode is brought to you by Doutt.

4:08

Design teams today are expected to move fast, but also to get it right.

4:10

That's where Dout comes in.

4:13

Dcout is the all-in-one research platform built for modern product and design teams.

4:17

Whether you're running usability tests, interviews, surveys, or in the wild fieldwork, Dout makes it easy to connect with real users and get real insights fast.

4:27

You can even test your Figma prototypes directly inside the platform.

4:32

No juggling tools, no chasing ghost participants.

4:34

And with the industry's most trusted panel, plus AI powered analysis, your team gets clarity and confidence to build better without slowing down.

4:43

So if you're ready to streamline your research, speed of decisions, and design with impact, head to dscout. com to learn more. That's dscout. com.

4:54

The answers you need to move confidently.

5:00

Hammel and Shrea, thank you so much for being here and welcome to the podcast. Thank you for having us. >> Yeah, super excited.

5:07

>> I'm even more excited.

5:07

Okay, so a couple years ago, I had never heard the term evals.

5:12

Now it's one of the most trending topics on my podcast essentially that to build great AI products, you need to be really good at building evals.

5:19

Uh, also turns out some of the fastest growing companies in the world are basically building and selling and creating evals for AI labs.

5:28

I just had the CF Merkore on the podcast.

5:30

So, there's something really big happening here.

5:32

Uh, I want to use this conversation to basically help people understand the space deeply.

5:36

But let's start with the basics.

5:40

Just what what the heck are EVALs?

5:41

For folks that have no idea what we're talking about, give us just a quick understanding of what an eval is.

5:46

And let's start with with Haml. Sure.

5:48

Evals is a way to systematically measure and improve an AI application.

5:54

And it really doesn't have to be scary or unapproachable at all.

5:56

It really is at its core data analytics on your LLM application in a systematic way of looking at that data and where necessary creating metrics around things so you can measure what's happening and then so you can iterate and do experiments and improve.

6:20

So that's a that's a really good broad way of thinking about it.

6:23

If you go one level deeper just to give people a very even more concrete way of imagining and visualizing what we're talking about even if you have a example to show it would be even better.

6:31

What's a what's an even deeper way of understanding what an eval is?

6:35

Let's say you have a real estate assistant you know application and it's it's not working the way you want.

6:44

working the way you want. it's not writing emails to customers the way you want or it's not uh you know calling the right tools or any number of errors and before evals you would be left with guessing you would maybe fix a prompt and hope that you're not breaking

7:05

anything else with that prompt and you might rely on vibe checks which is totally fine and vibe checks are good and you should do vibe checks initially, but it can become very unmanageable very fast because as your application grows, it's really hard to rely on vibe checks. You just feel lost. You just feel lost.

7:26

And so eval help you create metrics that you can use to measure how your application is doing and kind of give you a way to improve your your application with confidence that you have a feedback signal in which to iterate against.

7:43

So just to make it very real.

7:46

So imagining this uh real estate agent maybe they're helping you book a listing or go see an open house.

7:50

The idea here is you have this agent talking to people.

7:54

It's answering questions, pointing them to things.

7:55

As a builder of that agent, how do you know if it's giving them good advice, good answers?

8:01

Is it telling them things that are completely wrong?

8:03

So, the idea of eval essentially is to build a set of tests that tell you is how often are is this agent doing something wrong that you don't want it to do?

8:11

And there's a bunch of ways wrong you could define wrong.

8:12

It could be uh just making up stuff.

8:14

It could be uh just answering in a really strange way.

8:19

Uh the way I think about eval and tell me if this is wrong just simply is like unit tests for for code and then you're smiling.

8:26

You're like no you idiot.

8:29

>> Oh that's not what I was thinking. >> Okay. Okay.

8:31

Tell me tell me how does that feel as a metaphor?

8:35

>> So okay I like what you said first which is we had a very broad definition.

8:38

Evals is a big spectrum of ways to measure application quality.

8:43

Now unit tests are one way of doing this.

8:45

Maybe there are some non-negotiable functionalities that you want your AI assistant to have and unit tests are going to be able to check that.

8:55

that. Now maybe you also because these AI assistants are doing such open-ended tasks, you kind of also want to measure how good are they at very vague or ambiguous things like responding to new types of user requests or you know figuring out if there's new

9:11

distributions of data like new users are coming and using your real estate agent that you didn't even know would use your product and then all of a sudden you think like oh there's a different way you want to kind of accommodate this new group of people. So eval could also be

9:23

So eval could also be you know a way of looking at your data regularly to find these new cohorts of people.

9:30

Evals could also be like metrics that you know you just want to track over time like you want to track people saying yes thumbs up I liked your message.

9:41

Um you want to very very basic things that are not necessarily AI related but can go back into this flywheel of improving your product.

9:47

So I would say on the end on overall right unit tests are a very small part of that very big puzzle. >> Awesome.

9:56

You guys actually brought an example of inval just to show us exactly what the hell we're talking about.

10:00

We're talking in these big ideas.

10:01

So how about let's pull one up and show people here's here's what an eval is. >> Yeah.

10:06

Let me just set the stage for it a little bit.

10:08

So to echo what Shrea said, it's really important that we don't think of evals as just tests.

10:14

It's a common trap that a lot of people fall into because they jump straight to the test like let me write some tests and usually that's not what you want to do.

10:26

You should start with some kind of data analysis to ground what you should even test.

10:31

And that's a little bit different than software engineering where you have a lot more expectations of how the system is going to work.

10:40

With LLMs, it's a lot more surface area. It's very stochastic.

10:42

So, we kind of have a different flavor here.

10:47

And so, the example I'm going to show you today, it's actually a real estate example.

10:52

It's a different kind of real estate example.

10:53

It's uh from a company called Nurture Boss.

10:55

I can share my screen to show you their website just to help you understand this uh use case a little bit.

11:03

So, let me share my screen.

11:05

So, this is a company that I worked with.

11:07

It's called Nurture Boss and it is a AI assistant for property managers who are managing apartments.

11:12

And it helps with various tasks such as inbound leads, customer service, booking appointments, so on and so forth, like all the different sort of operations you might be doing as a property manager. It helps you with that.

11:28

And so, you know, you can see kind of what they do.

11:31

It's a very good example because it has a lot of the complexities of a modern AI application.

11:39

So there's lots of different channels that you can interact through the AI with like chat, text, voice, but also there's tool calls, lots of tool calls for like booking appointments, getting uh information about availability, so on and so forth.

11:57

There's also rag retrieval, getting information about customers and properties and things like that.

12:03

So it's pretty fullyfledged in terms of an AI application and so they have been really generous with me and uh allowing me to use their data as a teaching example and so we have anonymized it but what I'm going to walk through today is okay let's create let's do the first part of how we would start to build evals for nurture boss like why Would we even want to do that?

12:34

So let's go through the very beginning stage what we call error analysis which is let's look at the data of their application and first start with what's going wrong.

12:51

So I'm going to jump to that next and I'm going to open an observability tool and you can use whatever you want here.

13:00

I just happen to have this data loaded in a tool called brain trust but you can load it in anything you know it's not we don't have a favorite tool or anything in the blog post that we wrote with you uh we had the same example but in Phoenix Arise um and I think Aman on your blog post use Phoenix Arise as well and there's also Langmith so these are kind of like different tools that you can use so what you see here on the screen.

13:28

This is logs from the application and let me just show you how it looks.

13:39

So what you see here is and let me make it full screen.

13:45

So this is one particular interaction that a customer had with the nurture boss application.

13:53

And what it is, it's a detailed log of everything that happened.

13:56

So it's it's a it's called a trace and it's just an engineering term for logs of a sequence of events.

14:03

It's been a the concept of a trace has been around for a really long time but it's especially really important when it comes to AI applications.

14:10

So we have all the different components and pieces and information that the AI needs to do its job and we are logged all of it and we're looking at a view of that and so you see here a system prompt.

14:23

The assistant prompt says you are an AI assistant working as a leasing team member at retreat at Acme Apartments.

14:33

Remember I said this is anonymized.

14:33

So that's why the name is Acme Apartments.

14:38

Your primary role is to respond to text messages from both residents and perspective uh both current residents and prospective residents.

14:44

Your goal is to provide accurate helpful information yada yada yada.

14:48

And then there's a lot of detail around guidelines of how we want this thing to behave.

14:56

>> Is this their actual system prompt by the way for this company? >> It is. Yes.

14:58

It's a real system prompt.

15:01

>> That's amazing because that's really it's rare you see actual company products system prompt.

15:03

That's like their crown jewels a lot of times.

15:04

So this is actually very cool on its own. >> Yeah. Yeah. It's really cool.

15:08

And you know you see all these different sort of features that they want to or different use cases.

15:16

So things about tour scheduling, handling applications, guidance on how to talk to different personas, so on and so forth.

15:24

And you can see the user just kind of jumps in here.

15:29

It says asks, okay, do you have a one-bedroom with study available?

15:33

I saw it on virtual tours.

15:35

And then you can see that the LM calls some tools.

15:40

It calls this get individual's information tool and it pulls back that person's information and then it gets the community's availability.

15:54

So it's, you know, it's querying a database with the availability for that apartment complex.

15:59

And then finally, the AI responds, hey, we we have several one-bedroom apartments available, but none specifically listed with a study. Here are a few options.

16:12

Uh, and then it says, "Can you let me know when one with a study is available?"

16:16

And then it says, "I currently don't have specific information on the availability of a one-bedroom apartment." User says, "Thank you."

16:23

And the AI says, "You're welcome.

16:26

If you have any more questions, feel free to reach out."

16:28

Now, this is an example of a trace, and this is we're looking at one specific data point.

16:42

And so one thing that's really important to do when you're doing data analysis of your LLM application is to look at data.

16:51

Now you might wonder there's a lot of these logs. It's kind of messy.

16:56

There's a lot of things going on here.

16:58

How in the hell are you supposed to look at this data?

17:02

Do you want to just drown in this data?

17:05

How do you even analyze this data?

17:05

So it turns out there is a way to do it that is completely manageable and it's not something that we invented.

17:14

It's been around in machine learning and data science for a really long time and it's called error analysis.

17:18

And what you do is the first step in conquering data like this is just to write notes. Okay?

17:29

So, you got to put your product hat on, which is why we're talking to you because product people have to be in the room.

17:36

Um, and they have to be involved in sort of doing this.

17:39

You know, usually a developer is not suited to do this, especially if it's not a coding application.

17:46

>> And I'm just to mirror back why I think you're saying that is because this is the user experience of your product.

17:51

People talking to this agent is the entire product essentially.

17:53

And so it makes sense for the product person to be involved, super involved in this. Yeah.

17:59

So let's let's reflect on this conversation. Okay.

18:03

A user asked about availability.

18:08

The AI said, "Oh, we don't really have that. Have a nice day."

18:14

Now, for a product that is helping you with lead management, is that good?

18:23

Like, do you feel like this is the way we want it to to go? >> Not ideal. Yes. Not ideal.

18:32

And I'm glad you said that.

18:34

A lot of people would say, "Oh, it's great.

18:36

Like the AI did the right thing.

18:38

It said we don't it looked it said we didn't have available and it's not available."

18:42

But with your product hat on, you know, that's not correct.

18:46

And so what you would do is you would just write a quick note here.

18:48

You would say okay um you know you might pop in here let me just and you can write a note so every observability application has ability to write notes and you wouldn't try to figure out if something is wrong in this applica you know in this case it's kind of not doing the right thing.

19:08

right thing. Um but you just write a quick note um should you know should have handed off to a human >> and as we watch this happening it's like you mentioned this and you'll explain more you're doing this this feels very ma manual and unscalable but uh as you

19:26

said this is just one step of the process and there's a system to this and it's just the first part >> and you don't have to do it for all of your data you can you sample your data and just take a look and it's surprising amazing how much you learn when you do this. Everyone that does this

19:41

Everyone that does this immediately gets addicted to it and they say, "This is the greatest thing that you can do when you're building an AI application." You just learn a lot.

19:51

You're like, "Hm, this is not how I want it to to work." Okay.

19:53

And so, um, that's just an example.

19:57

So, you write this note and then we can go on to the next trace.

20:02

So, this is the next trace.

20:02

I just pushed a hot key on my keyboard.

20:04

Let me go back to uh looking at it.

20:09

>> And these tools make it easy to go through a bunch and add these notes quickly. >> Yes.

20:13

And so this is another one. Similar system prompt.

20:16

We don't need to go through all of it.

20:18

Again, we'll just jump right into the user question. Okay.

20:22

I've been texting you all day. Maybe it's is funny.

20:24

it's is funny. Um um and uh the user says please okay yeah this one is you this one is just like an error in the application where you know um this is a text message application and so you know it's a tech the sorry the channel through which the customer is communicating is through text message and it's just getting like really

20:54

garbled And you can see here that it kind of doesn't make sense, you know, like the words are being cut off like in the meantime and then the system doesn't know how to respond because you know how people text message, they like write short phrases, they you know split split their sentence across four or five different turns. So

21:12

So in this case >> you do with something like that. >> Yeah.

21:16

So this is a this is a different kind of error.

21:19

>> This is more of hey we're not handling this interaction correctly.

21:22

This is more of a technical problem.

21:26

um rather than hey the AI is not doing exactly what we want.

21:28

So we would write down too like it's amazing you're catching that too here otherwise you'd have no idea this was happening.

21:35

>> Yeah you might not know this is happening right and so you would just say okay um you would write a note like oh conversation flow is janky because of text message and I like yeah I like that I like that you're using the word janky.

21:53

shows you just how informal this can be at this stage.

21:54

Yeah, it's supposed to be chill like just don't overthink it.

21:58

And there's some there's a way to do this.

22:01

So the question always comes up, how do you do this?

22:06

Do you look at do you try to find all the different problems in this trace?

22:10

What what do you write a note about?

22:13

And the answer is just write down the first thing that you see that's wrong, the most upstream error.

22:18

Don't worry about all the errors.

22:20

just capture the most the first thing that you see that's wrong and stop and move on.

22:28

And you can get really good at this.

22:28

The first two or three can be very painful, but you know, it doesn't we can, you know, do a bunch of them really fast. So, here's another one.

22:38

And um let's skip the system prompt again.

22:42

And the user asks, "Hey, I'm looking for a two to threebedroom with either one or two bats.

22:48

Do you provide virtual tours?

22:52

and a bunch of tools are called and it says, "Hi Sarah, currently we have three bedroomedroom, two and a half bathroom apartment available for $2,175.

23:04

Um, unfortunately we don't have any two-bedroom options at the moment.

23:05

We do offer virtual tool tours.

23:07

You can schedule a tour blah blah blah.

23:08

It just so happens that there is no virtual tour, >> right?

23:15

So um you know it is hallucinating something that doesn't exist and you would you kind of have to bring your context as an engineer or even your product content and say hey this is kind of weird like you know we shouldn't be telling person about virtual tour when it's not offered.

23:31

So you would say okay uh you know offered virtual tour and you just you know you just write the note.

23:43

So you can see there's a diversity of different kinds of errors that we're seeing and we're actually learning a lot about your application um in a very short amount of time.

23:54

>> One common question that we get from people at this stage is okay I understand what's going on.

23:59

Can I ask an LLM to do this process for me? >> Great question.

24:04

>> Great question. And I loved Hammel's most recent example because what we usually find when we try to ask an LLM to do this error analysis is it just says the trace looks good because it doesn't have the context needed to understand whether something might be you know bad product smell or you know

24:23

not for example the hallucination about scheduling the tour right I can guarantee you I would bet money on this if I put that into chat GBT and asked is there an error it would say no did a great But Hamill had the context of knowing, oh, we don't actually have this virtual tour functionality, right? So, I think

24:38

So, I think in these cases, it's so important to make sure you are manually doing this yourself.

24:44

Um, and we'll talk a we can talk a little bit more about when to use LLMs in the process later, but like number one pitfall right here is people are like, let me automate this with an LLM.

24:55

>> Do you think they'll we'll get to a place where where an agent can do this? >> Oh, no, no, no. Sorry.

24:58

There are parts of error analysis that an LLM is suited for which we can talk about later in this podcast >> but right now in this stage of free form note takingaking is not the >> place for an LLM.

25:12

>> And this is something you call open coding this. >> Yes, absolutely.

25:16

>> Uh another uh term that you used in your post that I love and that's fits into this step is this idea of a benevolent dictator.

25:23

Maybe just talk about what that is and maybe Sha cover that. >> Yeah.

25:27

So Hamill actually came up with this term.

25:29

>> Okay, maybe Ham will cover the answer. >> No problem.

25:33

And we'll actually show the LM automation in this example because we're going to take this example.

25:38

We're going to go all the way through. >> Amazing.

25:41

>> And so and so um benevolent dictator is just a catchy term for the fact that when you're doing this open coding, a lot of teams get bogged down in having a committee do this.

25:54

And for a lot of situations that's wholly unnecessary like you know people get really uncomfortable with okay you know we want everybody on board we want everybody involved so on and so forth.

26:09

You need to cut through the noise.

26:11

Um in a lot of organizations if you look really deeply especially small mediumsiz companies there's really like you can appoint one person whose taste that you trust.

26:21

Um, and you can you can do this with a small number of people and often one person.

26:26

And that's it's really important to make this tractable.

26:31

You don't want to make this process so expensive that you can't do it.

26:35

You're going to lose out.

26:35

So that's the idea behind benevolent dictator is, hey, you need to simplify this across as many dimensions as you can.

26:45

Another thing that we'll talk about later is when you goes to building an LLM as a judge, you need a binary score.

26:51

You don't want to think about is this like a one, two, three, four, five, like assign a score to it. You can't.

26:56

That's going to slow it down.

26:58

Just to make sure this benevolent dictator point is is really clear.

27:01

Basically, this is the person that does this note-taking and ideally they're the expert on the stuff.

27:07

So, if it's law stuff, maybe there's like a legal person that owns this.

27:09

It could be a product manager.

27:11

Give us advice on who this person should be.

27:16

>> Yeah, it should be the person with domain expertise.

27:17

So in this case you know it would be the person who understands the business of leasing apartment leasing and has context to understand if this makes sense.

27:28

It's it's always the domain expert like you said okay for legal it would be a law person for mental health it would be the mental health expert whether that's like a psychiatrist or you know someone else. >> Cool.

27:41

>> Um oftentimes it is the product manager. >> Cool.

27:44

So the advice here, pick that person.

27:45

May not feel so super fair that they're the one in charge and they're the dictator, but they're benevolent.

27:51

It's going to go be okay.

27:52

>> Yeah, it's going to be okay.

27:52

You're just trying to It's not perfection.

27:54

You're just trying to make progress and in get signal quickly so you have an idea of what to work on because it can become infinitely expensive if you're not careful. >> Yeah. Okay, cool.

28:07

Let's go back to your examples. Yeah, no problem.

28:08

So this is another example where we have someone saying, "Okay, do you have any specials?"

28:21

And the assistant or the AI responds, "Hey, we have a 5% military discount."

28:28

User responds, "Can you," and it switches a subject, can you tell me how many floors there are?

28:31

Do you have any onebedrooms available or one bedrooms on the first floor?

28:36

And the AI responds, "Yeah, okay.

28:40

We have several one-bedroom apartments available."

28:41

And then the user wants to confirm any of those on the first floor.

28:45

And how much are the onebedrooms?

28:47

And then also is is a current resident.

28:51

So it's they're also asking, I need a maintenance request.

28:54

This is actually pretty like you could see the messiness of the real world in here.

28:58

And the assistant just calls a tool that says transfer call, >> but it doesn't say anything.

29:03

It just abruptly does transfer call.

29:09

>> So it's pretty jank I would say like it's just not you know another jank >> another kind of jank a different kind of jank.

29:16

So you don't want to when you write the open note you don't want to say jank because what we want to do is we want to understand what and when we look at the notes later on we want to understand like what happened.

29:23

So you just want to say um you know did not confirm call transfer with uh with user.

29:35

It doesn't have to be perfect.

29:35

You just have to have a general idea of what's going on. >> Cool. >> So okay.

29:39

So let's say we do and we Treya and I we recommend doing at least a hundred of these.

29:45

The question is always like how many of this do you do?

29:47

And so there's not a magic number.

29:50

we say 100 is because we know that as soon as you start doing this once you do 20 of these you will automatically find it so useful that you will continue doing it.

30:04

that you will continue doing it. So we just say 100 to mentally unblock you so it's not intimidating like don't worry you're only going to do 100 and there is a a term for that of so so the right answer is keep looking at

30:23

traces until you feel like you're not learning anything new should talk about >> yeah so there's actually a term in data analysis and quant qualitative analysis called theoretical saturation So what this means is when you do all of these processes of looking at your data when do you stop? It's when you are

30:42

It's when you are saturating or you're not uncovering any new types of notes, new types of concepts or nothing that will like materially change the next part of your process.

30:56

Um, and this kind of takes a little bit of intuition to develop.

30:59

So typically people don't really know when they've reached theoretical saturation yet. That's totally fine.

31:04

When you do two or three examples or rounds of this, like you will develop the intuition.

31:09

A lot of people realize like, oh, okay, like I only need to do 40. I only need to do 60.

31:16

Actually, I only need to do like 15. I don't know.

31:18

Like depends on the application and develops like how depends on how savvy you are with error analysis. For sure.

31:25

>> And your point about you probably want to you're going to want to do a bunch.

31:27

I imagine it's because you're just like, oh, I'm discovering all these problems.

31:31

I got to see what else is going on here. >> Exactly.

31:33

And I promise at some point you're like not going to discover new types of problems. >> Yeah. Awesome.

31:39

So let's say you did a 100 of these. What's the next step? >> Yeah. Okay. So you did 100 of these.

31:42

Now you have all these notes.

31:44

So this is where you can start using AI to help you.

31:50

Um you So the part where you looked at this data is important.

31:53

Like we discussed, you don't want to automate this part too much.

31:57

Humans will still have jobs. This is a takeaway here. That's great. >> Yes. Just reviewing traces.

32:02

At least there's one job left for now. >> Yeah. So, yeah, exactly.

32:05

Um, and so, okay, you have all these notes.

32:12

Now, to turn this into something useful, you can do basic counting.

32:17

So, basic counting is the most powerful analytical technique in data science uh because it's so simple and it's kind of undervalued um in many cases.

32:29

And so, it's very approachable for people.

32:31

And so the first thing you want you want to do is take these notes and you can categorize them with an LLM.

32:38

And so there's a lot of different ways to do that.

32:39

Right before this podcast, I took three different uh coding agents or you know uh AI tools and had it categorize these notes.

32:51

So one is okay, I uploaded into a cloud project.

32:57

I uploaded a CSV of these notes and I just exported them directly from this interface.

33:03

Um, there's a lot of different ways to do this, but I'm I'm showing you the simple stupid way, the most basic way of doing things.

33:13

And so I dumped the CSV in here and I said, "Please analyze the following CSV file.

33:19

There's and I told it there's a metadata field that has a note in it."

33:24

But what I said is I used the word open codes.

33:26

I said, "Hey, I have different open codes and that's a term of art.

33:31

That's um LMS know what open codes are and they know what axial codes are because it is a it is a concept that's been around for a really long time.

33:41

So those words help me shortcut like what I'm trying to do." >> That's awesome.

33:46

And the end of the end of the prompt is telling it to create axial codes.

33:50

>> Yes, creating a codes.

33:50

>> Yes, creating a codes. So what it does is >> so maybe it's worth talking about what are axial codes or like what's the point here right you have a mess of open codes right and you don't have 100 distinct problems actually mo many of them are

34:05

repeats but because you phrased them differently right and in that you shouldn't have tried to create your taxonomy of failures as you're open coding you just want to get down what's wrong and then organize okay what's the most common failure mode so the purpose axial code basically is just a failure mode. It's like the label or category.

34:23

It's like the label or category.

34:25

And what our goal is is to get to this clusters of failure modes and figure out what is the most prevalent.

34:30

So then you can go and run and attack that problem.

34:36

>> That is really helpful.

34:36

Basically, you're just synthesizing all these categories and themes. >> Super cool.

34:40

And we'll uh include this prompt in our show notes for folks so they don't have to like sit there and screenshot it and try to type it out themselves. >> Yeah, great idea.

34:51

Um, and so Claude, you know, went ahead and analyzed the CSV file, decided how to parse it, blah, blah, blah.

34:56

We don't need to worry about all that stuff.

34:58

But it came up with a bunch of axial codes.

35:02

Basically, axial codes are categories like Shrea said.

35:04

So one is okay capability limitations, misrepresentation, pro processing, protocol violations, human handoff issues, communication quality.

35:16

It created these categories.

35:16

Now, do I like all the categories? Not really. I like some of them.

35:22

It's a good first like stab at it.

35:24

I would probably rename it a little bit because some of them are a bit too generic.

35:28

Like what is capability limitations?

35:30

That's a little bit too broad. That's not actionable.

35:32

I want to get like a little bit more actionable with it so that if I do decide it's a problem, I know what to do with it.

35:39

But we'll discuss that in a little bit.

35:41

Um, so you can do this like with anything.

35:43

And this is the dumbest way to do it, but dumb sometimes is a good way to get started.

35:48

So, >> and and this is what LM are really good at, taking a bunch of information and synthesizing. >> Absolutely.

35:53

Synthesizing for us to make sense of, right?

35:54

Note that, you know, it's not telling us, it's not automatically proposing fixes or anything. That's our job.

36:01

>> But, you know, now we can wade through this mess of open codes a lot easier.

36:05

Another thing that's interesting here in this prompt to generate the axial codes is you can be very detailed if you want, right?

36:11

You can say I want each axial code to actually be you know some actionable failure mode and maybe the LLM will understand that and propose it or I want you to group these open codes by you know what stage of the user story that it's in.

36:29

So this is where you can you know be creative or do what's best for you as a product manager or engineer working on this and that will help you do the improvement later. >> Okay.

36:39

So there's no definitive prompt of here's the one way to do it.

36:41

You're saying there's you can iterate, see what works for you. >> Absolutely.

36:46

>> It's interesting the tools don't want to do this or or do they try and they just don't do a great job?

36:50

>> No, I don't think they do it.

36:50

We've been screaming from the rooftops, please, please do this.

36:53

I do think it's a little bit hard, right?

36:55

Like part of this whole um experience with the EVOS course Hamill and I are teaching are like a lot of people don't actually know this.

37:03

>> So maybe it's that people don't know this and they don't know how to build tools for it.

37:06

Um, and hopefully we can demystify some of this magic.

37:13

>> And just to double click on this point, like this is not a thing everyone does or knows.

37:17

This is something you two developed based on your experience doing data analysis and data science at at other companies.

37:23

>> Well, I want to caveat.

37:23

We didn't invent error analysis.

37:26

We don't actually want to invent things.

37:27

That's a bad that's bad signal.

37:30

If somebody is coming to you with a way to do something that's like entirely new and not grounded in hundreds of years of theory and literature then you should I don't know be a little bit wary of that.

37:40

But what we tried to do was distill okay what are the new tools and techniques that you need to know make sense of the LLM error analysis and then we created a curriculum or structured way of doing this.

37:54

So this is all very tailored to LLMs, but you know the terms open coding, axial coding are grounded in um social science. >> Amazing. Okay.

38:04

Like what's funny about you guys doing this is I just want to go do this somewhere.

38:08

I don't have I don't have an AI product to do this on, but it's just like oh this would be so fun.

38:12

Just sit there and find all the problems I'm running into and categorize them and then try to fix them. Delightful. >> I love that.

38:19

>> Haml pulled up a video.

38:19

What do you got going on here? >> Yeah.

38:21

So I pulled up a video just to drive home Shrea's point like we are not inventing anything.

38:26

So what you see on the screen here is Andrew Ang one of the famous machine learning uh researchers in the world who have taught a lot of people frankly machine learning and um you can see this is a 8-year-old video.

38:42

So and he's talking about error analysis and so this is a technique that's been used to analyze stochastic systems for ages.

38:50

Um, and it's some it's something that you're just using the same machine learning ideas and principles is bringing them in into here because again, these are stochcastic systems. >> Awesome.

39:00

Well, one thing we're working on getting Andrew in the podcast. We're chatting.

39:04

So, that'll be really fun.

39:04

Uh, two, I love that my other my podcast episode just came out today is in your feed there, and it's standing out really well in that feed.

39:10

So, I'm really happy about that thumbnail. >> Very nice.

39:13

Yeah, the recommendation algorithm is >> Yes. Here we go.

39:15

I hope you click on that.

39:17

Don't don't screw my algorithm. Okay, cool.

39:21

So, we've done some synthesis.

39:22

What's I know we're not going to go through the entire step.

39:24

This is like you have a whole course that takes many days to learn this whole process.

39:29

What else do you want to share about how to go about this process?

39:31

>> Okay, so you can you can do this through anything and you know I've used the same thing works just fine in chat GPT. The same exact prompt.

39:37

You can see it it made axial codes.

39:39

I really like using Julius AI.

39:41

Um it's one of my favorite tools.

39:44

Julius is a is a kind of his third party tool but uses notebooks.

39:47

third party tool but uses notebooks. I personally like Jupyter notebooks a lot and so it's more of a data science thing but a lot of product managers are kind of learning notebooks nowadays and it's kind of cool it's like a fun playground

40:01

where you can like write code and look at data but we don't have to go deeply into that just wanted to mention you can use a lot you know AI is really good at this so let's go to the fun part here we go so now we have all the a we have

40:16

these axial codes so the first thing I like to do I have these open codes right and I have the axial codes that let's say you know the like that we assigned from the cloud project or the chat GPT and so what I do is I collect them first and I

40:37

take a look like does these axial codes make sense and I look at the correspondence between the different axial codes and the open codes and I and I go through an exercise and I say hm do I like these these codes like can I make them better? Can I refine them? Can I Can I refine them?

40:50

Can I make them more specific?

40:52

Um you know instead of like being generic I make them very specific in actionable.

40:57

So you see the ones that I came up with here are tour scheduling rescheduling issues human handoff or transfer issue formatting error with an output conversational flow.

41:09

We saw the conversational flow issue with the text messages.

41:14

uh making follow-up promises not kept and and so basically what I can do what you can do now is like you have these axial codes and um so I just collect them into a list.

41:28

So this is an Excel formula just collect these codes into a list.

41:31

So now we have a commaepparated list of these codes.

41:35

And then what you can simply do is you could take your notes that you have those open codes and you can tell an AI and this is using Gemini and AI just for simplicity.

41:45

This is like the you know again we're trying to keep it simple categorize uh the following note into one of the following categories.

41:54

That's way this for folks watching there's like I like all these different prompts and formulas you're showing.

42:00

This is like the Google Sheets AI AI prompt. >> Yeah.

42:07

>> And so basically what you can do is you can then have you can categorize your faces into one of the buckets and that's what we have here.

42:15

We have categorized all those problems that we encountered into one of these things.

42:22

>> And this is automatic which is very exciting.

42:23

I mean the AI is doing it.

42:23

So this also drives home the point that your open codes have to be detailed, right?

42:30

You can't just say janky because if the AI is reading janky, it's not going to be able to categorize it.

42:35

Even a human wouldn't, right?

42:37

It would have to go and remember why you said janky.

42:41

>> So it's important to be, you know, somewhat detailed in your open code. >> Okay.

42:45

So avoid the word janky is a good rule of thumb >> or other words. >> Okay. >> I was being funny. >> Yeah. Okay.

42:52

What are some of those other words just to that come that people often use that you think are not good?

42:57

>> I don't think it's specific words.

42:57

I think it's just people are not detailed enough in the open code.

43:00

So it's hard to do the categorization. >> Great.

43:04

And by the way, the reason you have to map them back is because say clott JPT gave you suggestions and you changed them and iterated on them.

43:10

So it doesn't you can't just go back and say cool what are in each bucket. >> Yeah. Yeah. >> Great.

43:17

That's a really good question actually.

43:18

It's good to iterate and think on about it a little bit like do I like these open codes?

43:23

Do these actually make sense to me?

43:25

Just like anything that AI does, it's really good to kind of put yourself in the middle >> just in the loop. Still space. >> Yes. Great. >> Yeah.

43:34

>> One of the things that I like to do in this step if I'm trying to use AI to do this labeling is also have a new category called none of the above.

43:40

So an AI can actually say none of the above in the axial code and that informs me, okay, my axial codes are not complete.

43:52

Like let's go look at those open codes.

43:54

Let's figure out what some new categories are or figure out how to reword my other axial codes. >> Awesome.

44:00

And what's cool about this is you don't need to do this many many times.

44:03

Like no, >> for most products, you do this process once and then you build on it, I imagine, and you just tweak it over time. >> Absolutely. And it gets so fast.

44:09

Like people people do this like once a week and you can do all of this in like 30 minutes and like suddenly your product is like so much better than if you were never aware of any of these problems. >> Yeah.

44:22

It's absurd to feel like you don't you wouldn't know this is happening like watching this happening.

44:26

I'm like how could you not do this to your product?

44:29

>> A lot of people have no idea. >> Most people Yeah. >> Yeah.

44:32

We we'll talk about that.

44:32

There's a whole debate around this stuff that we want to talk about. Uh okay cool.

44:35

So you have this you have the sheet. What comes next? >> Okay.

44:40

So here's the big unveil.

44:42

>> This is the magic moment right now.

44:45

>> So we have all these codes we that you know we applied the ones that we like on our traces. Now you can do the tada. You can count them.

44:55

So here's a pivot table and we just can do pivot table on those and we can count how many times those different things occurred. So what do we find?

45:05

found on this on these like traces that we categorized, we found 17 conversational flow issues.

45:11

And I really like pivot tables because you can do cool things.

45:15

You can like double click on these. You can say, "Oh, okay.

45:17

Let me let me take a look at those."

45:18

But that's going into an aside about pivot tables, how cool they are.

45:24

But um um you know now we have just a nice rough cut of what are our problems and now we have gone from chaos to some kind of thinking around oh you know what these are my biggest problems I need to fix conversational issues you know maybe these human handoff issues it's not necessarily the count is the most important thing you know that might be something that's just really bad and you want to fix that.

45:55

But okay, now you have some way of looking at your problem and now you can think about whether you need evals uh for for some of these.

46:04

So you know with the you know there might be some of these things that might be just dumb engineering errors that you don't need to write an eval for because it's very obvious on how to fix them.

46:23

um maybe the formatting error with output.

46:24

Maybe you just forgot to tell the LLM how you want it to be formatted and like you didn't even say that in the prompt.

46:31

So like just go ahead and fix the prompt maybe, you know, and we can decide like okay, do you want an uh do you want to write an email for that?

46:39

You might be you might still want to write an email for that because you might be able to test that with just code.

46:44

You could just test the string.

46:46

Does it have the right formatting potentially without running an LLM?

46:51

So, there's a costbenefit trade-off to eval.

46:54

You don't want to get carried away with it.

46:56

Um, but you want to start, you want to usually ground yourself in your actual errors.

47:04

You don't want to skip this step.

47:08

And so, the reason I'm kind of spending so much time on this is like this is where people get lost.

47:12

they go straight into eval like let me let me just write some tests and that is where things go off the rails.

47:19

Um so let's let's okay so let's say we want to tackle one of these things.

47:28

So for example uh let's say we want to tackle this human handoff issue and we're like hm I'm not really sure how to fix this.

47:37

like that's a kind of subjective sort of judgment call on, you know, should we be handing off to a human and I don't know immediately how to fix it.

47:49

It's not super obvious, per se.

47:51

Yeah, I can like change my prompt, but I'm not like sure. I'm not 100% sure.

47:55

Well, that might be sort of an interesting um thing for an LLM as a judge, for example.

48:03

So, there's different kinds of evals.

48:05

One is codebased which you should try to do if you can because they're cheaper.

48:11

You don't have to, you know, LM as a judge is something it's like a meta eval.

48:16

You have to eval that eval to make sure the LM that's judging is doing the right thing, which we'll talk about in a second.

48:25

So, okay, LM as a judge, that's one thing.

48:29

Okay, how do you build an LM as a judge?

48:30

Before we get into that actually just to make sure people know exactly what you're describing there these two types of evals.

48:36

One is you said it's code based one is LLM as judge.

48:38

Maybe Shrea just help us understand what that what a codebased eval even is.

48:42

It's just like it's like essentially a unit test.

48:45

Is that a simple way to think about it?

48:46

>> Maybe eval is not the right term here but think like automated evaluator.

48:48

So when we find these failure modes, one of the things we want is like, okay, can we now like go check the prevalence of that failure mode in an automated way without me manually labeling and doing all the coding and the grouping and I want to run it on thousands and thousands of traces.

49:04

I want to run it every week. That is okay.

49:07

You should probably build an an automated evaluator to check for that failure mode.

49:11

Now when we're saying codebased versus llm based, we're saying okay so maybe I could write like a python function or a piece of code to check whether that failure mode is present in a trace or not.

49:22

And that's possible to do for certain things like you know checking the output is JSON um or you know checking that it's markdown or checking that it's short like these are all things you can capture in code or you can approximately capture in code.

49:37

uh when we're talking about LLM judge here, we're saying that this is a complex failure mode and we don't know how to evaluate in an automated way.

49:43

So maybe we will try to use an LLM to evaluate this very very narrow specific failure mode of handoffs.

49:56

>> So just to try to mirror back how you're describing, you want to test what your say agent or AI product is doing.

50:00

You ask it a question, it gets back with something.

50:04

One way to test if it's giving you the right answer is if it's consistently doing the same thing that you could write a code to te to tell you this is true or false.

50:13

For example, will it ever say there's a virtual tour?

50:15

So you could ask it >> is do you provide virtual tours?

50:20

>> It says yes or no and then you could write code to tell you if it's correct based on that specific answer.

50:25

But if you're asking about something more complicated and it's not binary, you almost need like in a in a one world you need a human to tell you this is correct.

50:34

The solution to avoid humans having to review all this every time automatically is LLM's replacing human judgment and you call it LLM as judge.

50:44

The LM is being the judge if this is correct or not. >> Absolutely. You nailed it.

50:47

Um, so people always think like, oh, like this is at least as hard as my problem of creating the original agent >> and it's not because you're asking the judge to do one thing, evaluate one failure mode.

51:01

So the scope of the problem is very small and the output of this LLM judge is like pass or fail.

51:08

So it is a very very tightly scoped thing that LLM judges are very capable of doing very reliably >> and the goal here is just to have a suite of tests that run before you ship to production that tell you things are going the way you want them to the way your agent is interacting.

51:26

your agent is interacting. Beautiful thing about LLM judge is you can use them in unit test or CI sure but you could also use it online for monitoring right like I can sample like thousand traces every day run my LLM judge real

51:42

production traces and see what the failure rate is there this is not a unit test right but still now we get like an extremely specific measure of application quality >> cool that's a really great point because a lot of people disse for being this like not real life thing. It's a thing

51:56

It's a thing that you test before it's actually in the real world and >> what's actually happening in the real world.

52:01

You're saying you could actually you should actually do exactly that.

52:04

Test your real thing running in production and it's like a daily hourly sort of thing you could be running. >> Totally. >> Awesome. Okay.

52:10

Uh Hamill's got a a example of an actual LM is Judge Eval here. So let's take a look.

52:16

>> I love how Shrea really teed it up um for me. So thank you so much.

52:20

So what we have is a LM as a judge prompt for this one specific failure.

52:25

Like Shrea said, you would want to do one specific failure and you want to make it binary because we want to simplify things.

52:33

We don't want hey like score this on a rating of one to five like how good is it?

52:39

That's just mostly in most cases that's a weasel way of like not making a decision.

52:44

Like no, you need to make a decision.

52:47

Is this good enough or not? Yes or no?

52:48

can be painful to think about what that is, but you should absolutely do it.

52:54

Otherwise, this thing becomes very untractable.

52:56

And then when you report these metrics, no one knows what 3. 2 versus 3. 7 means.

53:02

>> This is Yeah, we see this all the time also.

53:04

And even with like expert curated content on the internet where it's like, oh, here's your LLM judge evaluator prompt.

53:11

Here's a one to seven scale.

53:11

And I always think I always text Hamill like, "Oh no, like now we have to fight the misinformation again because we know somebody's going to try it out and then come back to us and say, oh, I have 4. 2 average."

53:26

And we're going to be like, "Okay, it's wild how much drama there is in Eval's space.

53:32

We're going to get to that." Oh man.

53:34

This episode is brought to you by Mercury.

53:38

I've been banking with Mercury for years and honestly I can't imagine banking any other way at this point.

53:44

I switched from Chase and holy moly what a difference.

53:46

Sending wires, tracking spend, giving people on my team access to move money around so freaking easy.

53:54

Where most traditional banking websites and apps are clunky and hard to use, Mercury is meticulously designed to be an intuitive and simple experience.

54:03

And Mercury brings all the ways that you use money into a single product, including credit cards, invoicing, bill pay, reimbursements for your teammates, and capital.

54:11

Whether you're a funded tech startup looking for ways to pay contractors and earn yield on your idle cash, or an agency that needs to invoice customers and keep them current, or an e-commerce brand that needs to stay on top of cash flow and excess capital, Mercury can be tailored to help your business perform at its highest level.

54:28

See what over 200,000 entrepreneurs love about Mercury. Visit mercury.

54:34

com to apply online in 10 minutes.

54:36

Mercury is a fintech, not a bank.

54:39

Banking services provided through Mercury's FDIC insured partner banks.

54:43

For more details, check out the show notes.

54:44

Okay, so this is your judge prompt.

54:47

There's no one way to do it.

54:50

It's okay to use an LLM to help you create it, but again, put yourself in the loop.

54:54

Don't just blindly accept what the LLM does.

54:55

And in all of these cases, that's what we did.

54:58

Like with the axial codes, we kind of iterated on this.

54:59

You can use an LLM to like help you create this prompt, but make sure you read it.

55:06

Make sure you edit it, whatever.

55:06

This is not necessarily the perfect prompt.

55:10

This is just the stupid like very keeping it very simple just to show you the idea is like, okay, for this handoff failure, um, you know, I said, okay, I want you to output true or false is binary. It's a binary judge.

55:24

That's what we recommend.

55:25

And then we then I just go through and say, okay, like when should you be doing a handoff?

55:29

And I just list them out like, okay, explicit human request ignored or looped.

55:36

>> Uh some policy mandated transfer, sensitive resident issues, tool data unavailability, same day walk-in or tour requests, you know, you need to talk to a human for that.

55:48

So on and so forth, right?

55:48

And so the idea is like now that I know that this is a failure from my data, I'm interested in iterating on it because I know this is actually happening all the time.

55:58

And like Sha said, like it would be nice to have a way not only to evaluate this on like the data I have, but also on production data just to get a sense of like well what scale is this happening? Let me find more traces.

56:13

Let me have a you know a way to iterate on this.

56:15

And so we can take this prompt and I'm going to use a spreadsheet again.

56:22

So the first step is okay when I'm doing this judge I wrote the prompt.

56:27

Now a lot of people stop there and they say okay I have my judge prompt we're done good like let's just let's just ship it and let's uh the prompt says if the judge says it's wrong it's wrong.

56:36

They just like accept it as the gospel be like okay the LM says it's wrong it's it must be wrong.

56:43

Don't do that because that's the fastest way that you can have evals that don't match what's going on.

56:48

And when people lose trust in your evals, they'll lose trust in you.

56:53

So, it's really important that you don't do that.

56:58

And so, one before you release your LM as a judge, you want to make sure it's aligned to the human.

57:01

So how do you do that is you actually you have those axial codes and you want to like measure your judge against the axial code and say like hey did does it agree with me?

57:14

Does my own judge does it agree with me? Just measure it.

57:16

And so what we have here is okay I say assess this LLM trace.

57:21

Again I'm using just spreadsheets here.

57:24

Assess this LLM trace according to these rules.

57:27

And and the rules are just the prompt that I just showed you.

57:33

and I ask it okay is there a handoff error true or false.

57:40

So then this column let me just zoom in a bit.

57:42

Column H I have okay did this error occur in column G is whether I thought the error occurred or not.

57:52

You can see >> you're going through it manually. You do that. >> Yeah. Yeah.

57:55

And which we already did.

57:55

We we already went through it manually.

57:56

So we don't it's not like we have to do it again because we kind of have that cheat code from the axial coding. We already did it.

58:04

>> Um you might have to go through it again if you need more data and there's a lot of details to this on like how to do this correctly.

58:10

Um you want to split your data and do all these things so that you're not cheating but I just want to show you the concept and basically um what you can do is measure the agreement.

58:21

Now, >> one thing you should know as a product manager is a lot of people go straight to this like agreement.

58:30

They say, "Okay, my judge agrees with the human at some percentage of the time."

58:40

Now, that sounds appealing, but it's a very dangerous metric to use because a lot of times errors have um you know, they only happen on the on the long tail and they don't happen as frequently.

58:54

So, like if you only have the error 10% of the time, then you can easily have 90% agreement by just having a judge say, uh, it passes all the time. Does that make sense?

59:10

So like 90% agreement might look good on paper but it might be misleading >> and that's rare. It's a rare. >> Yeah.

59:17

>> So you know as a product manager or someone even if you're not doing this calculation yourself if someone ever reports to you agreement you should immediately ask okay tell me more like you need you know you know need to look into it to give you more intuition.

59:30

Here is like a matrix okay of this specific judge in the Google sheet.

59:37

judge in the Google sheet. And this is again a pivot table just keeping it dumb and simple is okay on on the uh rows I have what did the human think what did I think did it have an error true or false and then did my judge have an error true or false >> the intuition here is exactly what Hamill said right you need to look at each type of error so when the human said false but the judge said true or vice versa so those non-green diagonal

1:00:09

here and if they're too large then go iterate on your prompt make it more clear to the LLM judge so that you can reduce that misalignment you want to get to a point where most you're going to have some misalignment that's okay we

1:00:24

talk about in our course also how to code correct that misalignment but in this stage if you're a product manager and the person who's building the LLM judge eval has not done this they're saying like oh it agrees these 75% of the time we're good. They don't like

1:00:40

They don't like have this matrix and they haven't iterated to make sure that these two types of errors have gone down to zero, then it's a bad smell.

1:00:48

Go and ask them to go fix that. >> Awesome.

1:00:52

That's a really good tip is is what to look for when someone's doing this wrong. >> Yeah.

1:00:56

>> Actually, could you take us back to the LLM as judge prompt?

1:00:58

I just want to highlight something really interesting here.

1:01:03

I've had some guests on the podcast recently who've been saying eval are the new PRDS.

1:01:06

And if you look at this, this is exactly what this is.

1:01:08

Like product managers, product teams, right?

1:01:14

Here's what the product should be.

1:01:15

Here's all the requirements.

1:01:15

Here's like the how it should work. They built the thing.

1:01:18

And then they test it manually often.

1:01:19

What's cool about this is this is exactly that same thing.

1:01:22

And it's running constantly.

1:01:24

It's telling you here's how this agent should respond in very specific ways.

1:01:27

If it's this, this, this is, do that.

1:01:29

If it's this, this is that, do that.

1:01:30

And so it's exactly what I've been hearing again and again.

1:01:32

You could see right here.

1:01:34

This is like the purest sense of what a product requirements document should be is this eval judge that's telling you exactly what it should be and it's automatic and running constantly. >> Yeah, absolutely.

1:01:45

And it's kind of derived from our own data.

1:01:47

So of course it's a product manager's expectations.

1:01:51

What I find a lot of people miss is they just put in what their expectations are before looking at their data.

1:01:55

But as we look at our data, we uncover more expectations that we couldn't have dreamed up in the first place.

1:02:01

And that ends up going into this prompt. So that is interesting.

1:02:05

So it's not so your advice is not skip straight to evals and LLM as judge prompts before you build the product.

1:02:13

Still write traditional one pagers P prds to tell your team what we're doing, why we're doing it, what success looks like, but then at the end you could probably pull from that and even improve that original PRD if you're evolving the product uh using this process.

1:02:27

>> I would go even further to say you're going to improve. It's going to change.

1:02:31

You're never going to know what the failure modes are going to be upfront and you're always going to uncover new, you know, vibes that you think that your product should have, right?

1:02:42

You don't really know what you want until you see it with these LLMs.

1:02:45

So, you've got, you got to be kind of flexible, have to look at your data, have to PRDs are a great abstraction for thinking about this, but it's not the end all be all. It's going to change. >> I love that.

1:02:58

And Haml's pulling up some cool research report. What's this about?

1:03:03

>> Oh, this is one of the coolest research reports you can possibly read if you want to know about evals.

1:03:07

So, it was authored by someone named Shrea Shankar. >> Oh my god.

1:03:15

>> And her collaborators and so it's called who validates the validator.

1:03:19

>> That is the best name for a research I've ever heard. That's so good. >> Thank you.

1:03:23

>> So I I should let Treya talk about this.

1:03:26

I think the one of the most important things to pay attention in this paper are the criteria drift. >> Yeah. >> And what she found.

1:03:34

>> So we did this super fun study when we were kind of doing user studies with people who were trying to write LLM judges or just validate their own LLM outputs.

1:03:47

And we were this was I think this was before evals was like extremely popular I feel like on the internet.

1:03:55

This was we did this project like late 2023 was when we started it.

1:03:57

But then the thing that really was burning in my mind as a researcher is like why is this problem so hard?

1:04:03

We've been having machine learning and AI for so long. It's not new.

1:04:08

But suddenly this time around everything is really difficult.

1:04:13

So we just did this user study with a bunch of developers and we realized okay what's new here is that you can't figure out your rubrics up front.

1:04:21

People's opinions of good and bad change as they review more outputs.

1:04:27

They think of failure modes only after seeing 10 outputs they would never have dreamed of in the first place.

1:04:33

And these are experts, right?

1:04:34

These are people who have built many LLM pipelines and now agents before and just you can't ever dream up everything in the first place.

1:04:44

Um, and I think that's so key in today's world of AI development.

1:04:50

>> Okay, that is a really good point.

1:04:50

It's very much reinforcing what we were just talking about and that's why H will pull this up is just okay >> behind it. >> Yeah. Okay, great.

1:04:58

You still got to do product the same way, but now you have this really powerful tool that make helps you make sure what you've built is correct.

1:05:05

Uh it's not going to replace the PR process. >> Cool.

1:05:09

>> How many evals of these?

1:05:09

>> How many evals of these? How many say I don't know Lanas judge prompts do you end up with usually say I don't know like I know obviously depends complexity of the product but what's like a number in your experience >> for me like between four and seven >> oh that's it >> it's not that many because a lot of the

1:05:24

failure modes as Haml said earlier can be fixed by just fixing your prompt you just didn't think to put it in your prompts and now you put it in your you shouldn't do an eval like this for everything just the the pesky ones that um you've described your ideal behavior in your agent prompt, but it's still failing. >> Got it. So, say you found a problem, you >> Got it.

1:05:43

So, say you found a problem, you fixed it.

1:05:44

In traditional software development, you'd write a unit test to make sure it doesn't happen again.

1:05:48

Is your insight here is don't even bother writing an eval around that if it's just gone.

1:05:54

>> I think you can if you want to, but the whole game here is about prioritizing.

1:05:59

You have finite resources and finite time.

1:06:01

You can't write an eval for everything.

1:06:03

everything. So prioritize the ones that are the more pesky areas >> and probably the ones that are most risky to your business if they say something like Mecca Hitler Grock and >> cool okay so that's that's very uh relieving that this because this is this

1:06:18

prompt is like a lot of work to really think through all these details >> but it's a lot of one-time cost right now forever you can run this on your application >> right and I want to say okay data analysis is super powerful is going to drive lots of improvements very quickly to your application. We showed the most basic

1:06:37

We showed the most basic kind of data analysis which is counting which is accessible to everyone.

1:06:41

You can get you know more sophisticated with the data analysis.

1:06:48

There's lots of different ways to sample look at data.

1:06:52

We kind of made it look easy in a sense, but there's a lot of skills here to do to it well.

1:06:58

Um, you know, building an intuition and a nose for how to sort through this data.

1:07:04

For example, let's say I find conversational issues, this like conversational flow issues.

1:07:12

Maybe if I was trying to chase down this problem further, I would think about ways to find other conversational flows flow issues that I didn't code.

1:07:21

You know, I would maybe dig through the data in several ways.

1:07:25

Um, and there's, you know, different ways to go about this.

1:07:31

It kind of it's very similar, if not almost exactly similar as kind of traditional analytics techniques that you would do on any product.

1:07:39

give us just a quick sense of what comes next and then let's talk about the debate around eval.

1:07:47

>> So what comes next after you've built your LLM judge?

1:07:50

Well, we find that people just try to use that everywhere they can.

1:07:54

So they will put the LLM judge in unit tests as you and they will know like oh here are some example traces where we saw that failure because we labeled it.

1:08:02

Now we're going to make those part of unit tests and make sure that every time we push a change to our code these tests are going to pass.

1:08:07

They also use it for online monitoring.

1:08:12

People are making dashboards on this and I think that's incredible.

1:08:14

I think like the products that are doing this, right, they have a very sharp sense of how well their application is performing.

1:08:20

Um, and people don't talk about it because this is their moat, right?

1:08:25

So people are not going to go and share all of these things because makes sense, right?

1:08:29

If you are an email writing assistant and you're doing this and you're doing it well, you don't want somebody else to go and build an email writing assistant and then kind of get you out of business.

1:08:40

So, I really want to stress the point that it's like try to use these artifacts that you're building wherever possible online repeatedly.

1:08:46

Um, use them to drive improvements to your product.

1:08:51

Often times Haml and I will kind of will tell people how to do this up to this very point and it clicks for people and then they like never come back again.

1:08:59

So either they have I don't know quit their jobs, they're not doing AI development anymore or they know what to do from here on out.

1:09:09

Um I think it's the latter but um I think it's very powerful.

1:09:13

Like just watching you do this really opened my eyes to what this is and how systematic the process is.

1:09:20

I always imagine you just sit on a computer, okay, what are the things I need to make sure work correctly.

1:09:25

And what you're showing us here is here's it's a very simple step by step >> based on real things that are happening in your product.

1:09:32

How to catch them, identify them, prioritize them, and then >> absolutely >> catch them if they happen again and fix them.

1:09:38

>> Yeah, it's it's not magic. Like anyone can do this.

1:09:40

you're going to have to practice the skill like any new skill you have to practice but you can do it.

1:09:47

Um and I think what's very empowering now is that product managers are doing this and can do this and can really build very very profitable products with this skill set.

1:09:57

>> Okay, great segue to a debate that we kind of got pulled into that was happening on on X the other day.

1:10:01

Uh I did not realize how much controversy and drama there is around eval.

1:10:06

There's a lot of people with very strong opinions.

1:10:10

uh Sabat Shrea give us just a sense of the two sides of the debate around the importance and value of Ebells and then give us your perspective. >> Yeah.

1:10:19

So all right I'll be a little bit placating and I say I think everyone is on the same side.

1:10:25

I think the misconception is that people have very rigid definitions of what eval is.

1:10:29

For example, they might think that eval is just unit tests or they might think that eval is just the data analysis part and no online monitoring or any no monitoring of product specific metrics like actually number of chats engaged in or whatnot.

1:10:49

Um so I think everyone has a different mindset of evals going in.

1:10:51

And the other thing I will say is that people have been burned by evals in the past.

1:10:57

So I think people have done evals badly.

1:10:59

One concrete example of this is they've tried to do an LLM judge, but it has not aligned with their expectations.

1:11:07

They only uncovered this later on and then they didn't trust it anymore.

1:11:09

And then they're like, "Oh, I'm anti-EVOS."

1:11:14

And I 100% empathize with that because, you know, you should be anti- liker scale LLM judge.

1:11:19

I absolutely agree with you.

1:11:22

We are anti- that as well.

1:11:22

So, a lot of the misconception stems from two things, right?

1:11:26

things, right? like people having a narrow definition of evals and then people not doing it well and then getting burned and then wanting to avoid other people making that mistake and then unfortunately X or Twitter is like a medium where you know people are misinterpreting what everybody is saying all the time and you just get all these strong opinions of like don't do eval it's bad we tried it it doesn't work

1:11:51

we're clawed code or you know whatever other famous product and we don't do evals and there's just so much nuance behind all of it because because a lot of these applications are standing on the shoulders of evals coding agents is a great example of that claude code right they are standing on the shoulders of claude base model not base but the the fine-tuned claude models have been

1:12:16

evaluated on many coding benchmarks can't can't argue against that >> and just to double just to make clear exactly what you're talking about where one of the heads I think maybe the head engineer of cloud code went on a podcast and he's like oh we don't do evals we just vibe we just look at vibes and vibes meaning they just use it and feel if it's right or wrong >> and I think that kind of works so

1:12:39

there's two things to that right one is they're standing on the shoulders of the evals that their colleagues are doing for coding >> of the cloud foundational model >> absolutely right we know that they report those numbers because we see the benchmarks we know who's doing well on those other thing is they are actually probably very systematic about the error analysis to some extent. I bet you that

1:12:57

I bet you that they are monitoring who is using Claude, how many people are using Claude, how many chats are being created, how long these chats are.

1:13:07

They're also probably monitoring in their internal team. They're dog fooding.

1:13:11

Anytime something is off, they maybe have a queue or they send it to the person developing claude code and this person is implicitly doing some form of hair error analysis that Hamill talked about.

1:13:22

Hamill talked about. All of this is eval right there's no world in which they are just being like I made cloud code I'm never looking at anything um and unfortunately right when you don't think about that or talk about that I think that the community most of the community is beginners right or people who don't

1:13:41

know about evals and want to learn about it um and it sends the wrong message there now I don't know what cloud code is doing obviously um but I would be willing to bet money that they're doing something in the form of evals >> we'll also say that coding agents are fundamentally very different than other AI products because the developer is the domain expert. So you can short circuit

1:14:03

So you can short circuit a lot of things and also the developer is using it all day long.

1:14:09

So there's a type of dog fooding and type of do domain expertise that is you know you can collapse the activities.

1:14:18

You don't need as much data.

1:14:18

you don't need as much feedback or exploration because you know so your eval process you know should look different >> because you're seeing the code like you see the code it's generating you can tell this is great this is terrible >> yeah yeah and so and so I think a lot of people had generalized coding agents because coding agents are the first AI product released into the wild and I think it's a mistake to try to generalize that at charge.

1:14:51

>> The other thing is yeah, engineers have a dog fooding personality.

1:14:54

There are plenty of applications where people are trying to build AI in certain domains and and they don't have a dog fooding for like doctors for example are not out there trying to get all the most incorrect advice from AI and be tolerant and receptive to that.

1:15:12

So it's very important to keep I think these nuance things in mind.

1:15:13

So what I'm hearing from you Shre is interestingly is that if you if humans on the team are doing very close uh data analysis, error analysis, dog fooding you like crazy and essentially they are the human evals and you're describing that as that's within the umbrella of eval.

1:15:32

So you could do it that way if you're very if you have time and motivation to do that or you could set these things up to be automatic. >> Absolutely.

1:15:40

And it's also about the skills, right?

1:15:43

people who work at Anthropic are very very highly skilled.

1:15:48

Um they've been trained in data analysis or software engineering or AI and whatnot, right?

1:15:55

>> And you know, you can get there.

1:15:55

Anyone can get there of course by like learning the concepts, but >> most people don't have that skill right now.

1:16:03

>> Do fooding is is a dangerous one only because a lot of people will say they're dog fooding.

1:16:08

They're like, "Yeah, we dog fooded." But are they really?

1:16:10

And a lot of people aren't really dog fooding it at that visceral level that you would need to to have to close that feedback loop.

1:16:22

So that's the only caveat I would add.

1:16:24

There's also this kind of feels like straw man argument of eval versus AB tests.

1:16:29

>> Talk about your thoughts there because that feels like a big part of this debate people are having like do you need eval if you have AB tests that are testing production level metrics.

1:16:35

testing production level metrics. So AB tests are again another form of eval I imagine right like when you're doing an AB test right you have two different experimental conditions and then you have a metric that quantifies the

1:16:48

success of something and you're comparing the metric and again right an eval in our mind is systematic measurement of quality some metric um you can't really do an AV test without the eval to compare um >> so maybe maybe we just have a different weird take on it Yeah. Okay. So, what Okay.

1:17:05

So, what I'm hearing is like you consider AB test as part of the suite of evals that you do.

1:17:11

I think when people think AB test, it's like we're changing something in the product.

1:17:14

We're going to see if this improves some metric we care about. Is that is that enough?

1:17:19

Why do we need to test every little feature?

1:17:21

Like if it's impacting a metric we care about as a business, we have a bunch of AB tests that are just constantly running.

1:17:27

>> This is now a great point.

1:17:27

Um, so I think a lot of people prematurely do AB tests because you know they've never done any error analysis in the first place.

1:17:37

They just have hypothetically come up with their product requirements and they like believe that you know we should test these things.

1:17:44

Um, but it turns out right when you get into the data as Haml showed that like the errors that you're seeing are like not what you thought the errors might be.

1:17:51

They were these like weird handoff issues or like I don't know like the text message thing was strange.

1:17:57

Um, so I would say that like if you're going to do AB tests and they are powered by actual error analysis as we've shown today, then that's great. Go do it.

1:18:06

Um, but if you're just going to do them, which we find that people try to do, just want to do them based on like what you hypothetically think is why is important, then I would encourage people to go and like rethink that and kind of ground your hypothesis.

1:18:23

>> Do you have thoughts on what stats sig going to do at OpenAI?

1:18:25

Is there anything there that's interesting?

1:18:26

there that's interesting? I'm just like that was a big deal a huge acquisition AB test company people are like oh AB test the future uh thoughts you know just to add to the previous question a little bit is why is there this debate AB testing versus evals I think fundamentally eval

1:18:47

is people are trying to wrap their head around what how to improve their applications and fundamentally um you need to do data science you data science is useful in products like looking at data doing data analytics there's many different suite of tools and um you don't need to invent anything new sure you don't need like

1:19:08

necessarily the whole breath of data science and it looks slightly different just slightly with LLMs um you know you might your tactics might be different and so really what it is is like using analytic tools uh to understand your product Now people say the word eval is trying to kind of like carve out this new thing and saying oh

1:19:31

eval and in AB testing but if you zoom out it's it's the same data science as before and I think that's what's causing the confusion is hey we need data science thinking and AI product just you know is helpful to have that thinking in AI products like it is in any product uh is my take on that. So yeah, that's a

1:19:48

So yeah, that's a really good take.

1:19:50

Like I think just the word eval triggers people now.

1:19:53

>> And if you just call it we're just doing air analysis using doing data science to understand where our problem break our product breaks and just setting up tests to make sure we know >> that's boring. It sounds boring. >> No, no, no.

1:20:03

We need a mysterious term like evals to to really get the momentum going.

1:20:08

Your question about stats.

1:20:08

Um I think it's very exciting to be honest.

1:20:11

I don't know much about it because, you know, I just imagine that they're this company that many there's a tool that many people use and maybe it just so happened that OpenAI acquired them.

1:20:21

I'm sure they've been using them in the past.

1:20:25

Um, I'm sure OpenAI's competitors >> are using Stat Sig as well.

1:20:30

>> So maybe there is something strategic in that acquisition. I have no idea.

1:20:32

I don't know anything there.

1:20:34

But I think those are really the bigger questions for me than you know is this fundamentally changing AV testing or making evals more of a priority.

1:20:41

I I think they've always been a priority.

1:20:43

I think Open AAI has always been doing some form of them and OpenAI has gone so far like historically speaking as to like go and look at all the Twitter sentiment and try to do some sort of retrospective on that and then tie that back to their products.

1:21:01

Like they're certainly they're doing some amount of evals before they ship their new foundation models, but they're going so much beyond and being like, "Okay, let's find all the tweets that are complaining about it, all the Reddit threads that are complaining about it that go try to like figure out what's going on."

1:21:13

So, it goes to show that like eval are very, very important.

1:21:17

No one has really figured it out yet.

1:21:19

People are using all the available sources signal that they can to improve their products.

1:21:24

What I will say is I'm really hopeful that it might shift the our creative focus within OpenAI.

1:21:33

Hopefully up until now a lot of the big labs understandably focused on general benchmarks like MMLU score, human eval which are very important for foundation models and you know those not very related to product specific evals like the ones we talked about today but like handoff and stuff like that like those you know they tend not to correlate.

1:22:00

>> Yeah, they don't correlate with math problem solving. Sorry to say. Exactly.

1:22:05

And so um you know if you look at the eval products let's say the ones up until recently that some of the big labs have they don't have error analysis.

1:22:17

They have gener a suite of generic tools cosign similarity hallucination score whatever and that doesn't work.

1:22:25

It's a good first stab at it. It's okay.

1:22:27

you know, at least you're doing something getting people maybe it's like getting people to look at data, but uh eventually what we hope to see is okay some a bit more data science thinking in this like eval process.

1:22:43

Hopefully the tools we'll get to >> Haml and I should not be the only two people on the planet that are promoting like a structured way of thinking about application specific evals.

1:22:51

>> It's like mindboggling to me.

1:22:51

Why are we the only two people doing this?

1:22:53

The whole world, what's wrong?

1:22:57

Um, so I hope that, you know, we're not the only people and that more people catch on.

1:23:03

>> Well, the fact that your course on Maven is the number one highest grossing course on Maven, clearly there's demand and interest and there's more people I think on your side.

1:23:11

Interestingly, uh, just an example you've been sharing on Twitter that was I think is informative.

1:23:17

Everyone's been saying how Cloud Code doesn't care about eval.

1:23:19

They're all about vibes and everyone's like what and they're the best coding agent out there.

1:23:25

So clearly this is right.

1:23:25

More recently, there's all this talk about codecs, open AI codecs being better and everyone's switching and they're so pro eels. >> I know. >> What? Yeah.

1:23:34

So, >> gets me every time.

1:23:36

The internet's so inconsistent.

1:23:40

My favorite thing was um like yesterday, I believe like a couple of lab mates and I were out getting like dessert or something and somebody said like, "Oh, um do you like Codex or Claude better or whatever?"

1:23:52

And the other person said, "Oh, I like Claude."

1:23:54

And then someone else said, "But the new version of Codeex is better."

1:23:58

And then the first person said, "Oh, but the last I checked was two days ago, so maybe my the thoughts maybe I'm not up to date."

1:24:05

And I was like, "Oh my god, >> so true.

1:24:10

>> This is the world we live in." Oh my god. >> Okay.

1:24:13

So, I want to ask about just top misconceptions people have with Evals and top tips and tricks for being successful.

1:24:19

So, maybe just share one or two each of each.

1:24:21

So let me just start with misconceptions and maybe I'll go to the Hamill first.

1:24:26

Just what are a couple of the most common misconceptions people have with Eval still.

1:24:29

The top one is hey I can just buy a tool plug it in and it'll do the eval for you.

1:24:36

Why do I have to worry about this?

1:24:38

We live in the age of AI.

1:24:41

Can't the AI just eval it?

1:24:41

That's the most common misconception.

1:24:45

And people want that so much that people do sell it, but it doesn't work. So that's the first one.

1:24:54

Shoot, we need humans still. Great.

1:24:56

I think that's great news.

1:25:00

>> The second one that you know I see a lot is hey um just not looking at the data you know.

1:25:09

So in my consulting people come to me with problems all the time and the first thing I'll say is let's go look at your traces and you can see the kind of their eyes pop open like what do you mean like yeah let's look at it right now and they're surprised that I am going I'm going to go look at individual traces um and we always it always 100% of the time learn a lot and figure out what the problem is.

1:25:40

And so, um, I think people just don't know how powerful looking at the data is like we showed on this podcast.

1:25:48

>> I would agree with that.

1:25:50

>> Those are the top two. Okay.

1:25:50

Is there anything else or those are those are the ones like solve those problems?

1:25:54

>> Oh, those are definitely And then I guess the one I would add is there's no one correct way to do evals.

1:25:59

There are many incorrect ways of doing evals, but there are also many correct ways of doing it.

1:26:08

And you got to think about where you are at with your product, how many how much resources you have, um, and figure out the plan that works best for you.

1:26:18

It'll always involve some form of error analysis as we showed today, but how you operationalize those metrics is going to change based on where you're at. >> Amazing. Okay.

1:26:28

What are a couple just tips and tricks you want to leave people with as they start on their eval journey or just try to get better at something they're already doing?

1:26:37

>> So tip number one is just don't be alarmed or don't you know be scared of looking at your data.

1:26:45

The process we try to make it as structured as possible.

1:26:49

There are inevitably you know questions that are going to come up. That's totally fine.

1:26:53

You might feel like you're not doing it perfectly. That's also fine.

1:26:58

The goal is not to do eval perfectly.

1:27:01

It's to actionably improve your product.

1:27:03

And we guarantee you no matter what you do, you're doing parts of these process.

1:27:07

You're going to find ways of actionable improvement.

1:27:09

And then you're going to iterate on your own process from there.

1:27:12

The other tip that I would say is we're very pro- AI.

1:27:14

Use LLM to help you organize any thoughts that you have throughout this entire process.

1:27:24

So this could be everything ranging from like initial product requirements, right?

1:27:28

Figure out how to organize them uh for yourself, figure out how to improve on that product requirements doc based on the open codes that you've created, right?

1:27:37

Like don't be afraid to use AI in ways that you know present information better for you. >> Sweet. So don't be scared.

1:27:44

Uh use LMS as much as you can throughout the process, >> but not to replace yourself. >> Right. Okay. Great. Still jobs. Great. Hello.

1:27:55

>> Yeah, let me actually share my screen.

1:27:57

So, when I show something, >> so to piggyback off what Treya said is if you heard any phrase in this podcast, you've probably heard look at your data more than anything else.

1:28:08

And so, it's so important that we teach that you should create your own tools to make it as easy as possible.

1:28:17

So, I showed you some tools when we're going through the live example of like how to annotate data.

1:28:22

Most of the people I work with, they realize how important this is and they vibe code their own tools or they we shouldn't say vibe code.

1:28:32

We they just they make their own tools and it's it's cheaper than ever before because you have AI that can help you and AI is really good at creating simple web applications that can show you data that have, you know, that can write to a database. It's very simple.

1:28:47

And so for the nurture boss use case, we wanted to remove all the friction of looking at data.

1:28:56

And so what you see here is just some screenshots of uh what the application that they created looks like. It's just okay.

1:29:04

They have the different channels, voice, email, text.

1:29:08

Um they have the different threads.

1:29:10

They hid the system prompt by default.

1:29:13

Little quality of life improvements.

1:29:15

And then they al actually had this axial coding part here where you can see okay in red the count of different errors.

1:29:22

They automated that part in a nice way and they just they created this within a few hours.

1:29:27

Um and so it's really hard to have a one-sizefits-all thing for looking at your data.

1:29:35

You don't have to go here immediately, but something to think about is make it as easy as possible because again, it's the most powerful activity that you can engage in.

1:29:46

It's the highest ROI activity you can engage in.

1:29:49

And so, um, you know, with AI, yeah, just remove all the friction. That's amazing.

1:29:55

And again, I think the ROI piece is so important.

1:29:57

We haven't even touched on this enough.

1:29:59

The goal here is to make your product better, which will make your business more successful.

1:30:05

Like this isn't just a little exercise to catch bugs and things like that.

1:30:08

Like this is the way to make AI products better because the experience is how users interact with your AI. Absolutely.

1:30:14

If any, you know, we teach our students, hey, when you're doing these evals, if you see something that's wrong, just go fix it.

1:30:21

that's wrong, just go fix it. Like the whole point is not to have eval suite where you can point at edit it and say oh look at my evals no just fix your application make it better do you know if it's obvious do it so totally agree with you amazing how long a question I ask but this is I think something people are thinking about how long do you spend

1:30:42

on this like how long does it usually take to do the first time >> I can answer for myself for applications that I work with usually I'll spend three to four days really working with whoever to do initial rounds of error analysis, like a lot of labeling, feel like we're in a good place to create the spreadsheet that Hamill had and everyone's kind of on board and convinced and even like a few LLM judge evaluators. Um, but this is a onetime

1:31:04

Um, but this is a onetime cost.

1:31:06

Once I figured out how to integrate that in unit tests or I have like a script that automatically runs it on samples and I will create a cron job to just do this every week.

1:31:14

I would say it's like I don't know I find myself probably spending more time looking at data because I'm just data hungry like that. I'm so curious.

1:31:22

I'm like I've gained so much from this process and it's like put me above and beyond in any of my you know collaborations with folks.

1:31:32

So, I want to keep doing it, but I don't have to.

1:31:35

I would say like maybe 30 minutes a week after that.

1:31:41

>> So, it's a week essentially, a week essentially up front and then like 30 minutes to keep improving and adding to your suite.

1:31:47

>> Yeah, it's really not that much time.

1:31:47

I think people just get overwhelmed by how much time they spend up front and then thinking that they have to keep doing this all the time. >> Amazing.

1:31:56

Is there anything else that you wanted to share or leave listeners with?

1:32:00

Anything else you want to kind of double down on as a point before we get to our very exciting lightning round?

1:32:04

So I would say this process is a lot of fun actually.

1:32:09

So it can it's like okay you're looking at data.

1:32:12

Oh it sounds like you're annotating things.

1:32:14

Okay actually like so I was just looking at a client's data yesterday. The same exact process.

1:32:21

It's a application that sends emails recruiting emails to try to get candidates to apply for a job.

1:32:28

and we decided to start looking at traces. Jump right into it.

1:32:34

Hey, let's look at your traces.

1:32:35

The we looked at a trace.

1:32:39

The first thing I saw was this like email that is worded like given your background blah blah blah blah blah.

1:32:47

So I asked the person right away and this is where putting your product hat on and just being critical and this is where the fun part is.

1:32:54

I said, you know what, I hate this email.

1:32:57

like do you like the email given your background when and when when I receive a message given your background I just delete that.

1:33:03

delete that. So I'm like what is this given your background with machine learning and blah blah I'm like this is a generic thing like so I asked the person like hey you know can we do better than this like this is kind of like a this is like a sounds like generic recruiting and they're like oh

1:33:21

yeah maybe yeah like it's the AI because they were like they were proud of it like the AI is doing the right thing is sending this email with the right information with the right link with the right name everything and so that's where the fun part is is like put your product hat on and get into like is this really good? Something I want to make

1:33:37

Something I want to make sure we cover before we get to a very exciting light round is this is just scratching the surface of all the things you need to know to do this well.

1:33:44

Uh I think this is the best primer I've ever seen on how to do this well. Nice.

1:33:51

>> But you I think we did it.

1:33:51

But you guys teach a course that goes much much deeper for people that really want to get good at this and take this really seriously.

1:33:59

share what else you teach in the course that we didn't cover and what else you get as a student being part of the the course you teach at Maven.

1:34:07

>> Yeah, I can talk about the syllabus a little bit and then Haml can talk about all the perks.

1:34:09

Um, so we go through a life cycle of error analysis, then automated evaluators, then how to improve your application, like how do you create that flywheel for yourself.

1:34:21

We also have a few special topics that we find like pretty much no one has ever heard of or taught before, which is exciting.

1:34:27

One is how do you build your own interfaces for error analysis.

1:34:29

So we kind of go through actual interfaces that we've built and we also live code them on the spot for new data.

1:34:38

Um and we show kind of how we use cloud code cursor or whatever we're feeling in the moment that day to build these interfaces.

1:34:47

Um and we also talk about kind of broadly cost optimization as well.

1:34:52

So, we a couple of people that I've worked with um they got to a point where their evals are very good, their product is very good, but it's all very expensive because they're using like state-of-the-art models.

1:35:02

So, how can we kind of replace certain uses of the most expensive GPT5 models with, you know, 5 nano, 4 mini, whatnot, and save a lot of money but still maintain the same quality.

1:35:16

So, we also give some tips for that.

1:35:18

Um, Haml, you want We also have many perks. >> Yeah. Talk about the perks. >> Okay. The perks.

1:35:26

>> So, my favorite perk is there's a60page book that's meticulously written that we've created that walks through the entire process in detail of how to do evalu.

1:35:39

So, you don't have to sit there and take all these notes.

1:35:42

We've done all the hard work for you and we've like documented it in detail.

1:35:49

um you know and organize things.

1:35:49

So that is really useful.

1:35:53

Another really interesting thing and something that I got the idea from you Lenny is okay this is an AI course.

1:36:03

Education shouldn't be this thing where you you're only watching lectures and doing homework assignments.

1:36:08

So students should have access to an AI that also helps them.

1:36:13

So what we've done is we've uh you know just like there's the Lennybot that you have >> yeah lennybot.

1:36:20

com uh we have made the same thing with the same software that you're using and we have put everything we've ever said about eval into that.

1:36:29

So, every single lesson, every office hours, every Discord chat, any blogs, papers, anything that we've ever said publicly and within our course, we've put it in there and we've tested it with um a bunch of students and they've said it's helpful.

1:36:48

Um so, we're giving all students 10 months free unlimited access to that alongside the course. >> Amazing.

1:36:56

And then you'll charge for that later down the road is the idea.

1:36:58

I just take one month at a time.

1:37:01

I don't know what we're doing.

1:37:03

>> Eight months and then we'll have to figure it out.

1:37:04

I was thinking we should have this whole interview should have just been our bots talking to each other. >> That's amazing.

1:37:09

I I would watch that only for like 10 minutes then I don't know what they're talking about.

1:37:14

>> Yeah, maybe maybe 30 seconds.

1:37:14

Did you guys train it on the voice mode by the way?

1:37:17

That's my favorite feature of this of Deli's product.

1:37:19

If not, you should do that.

1:37:22

>> Oh, >> I think I'm I can't remember.

1:37:22

Um I should I should look at it. Definitely sure.

1:37:27

Now that we have this podcast episode, you could use this uh content to train it. It's 11 laps powered. It's so good. Uh okay.

1:37:31

So that's how do they get to I guess that's okay.

1:37:34

They get to that once they become a uh they enter your course.

1:37:37

So there's no >> sign up for the course and then you'll get a bunch of emails.

1:37:40

Everything will be clear hopefully. >> Amazing. Okay.

1:37:43

We also have a discord >> of all the students who have ever taken the class and that discord is so active >> I I can't go on vacation without getting notified on the plane or >> bitter sweet bittersweet. Incredible. Okay.

1:37:57

Uh with that we've reached our very exciting lightning round.

1:38:00

I've got five questions for you. Are you ready? >> Yes. Let's go. >> Let's do it. Okay.

1:38:05

So, I'm going to bounce between you two.

1:38:06

Share something if you want.

1:38:08

You can pass if you want. First question. Shrea.

1:38:10

What are two or three books that you find yourself recommending most to other people?

1:38:17

>> So I like to recommend a fiction book because life is about more than eval.

1:38:19

So recently I read Pachenko by uh Ninjan Lee uh really great book and then I also am currently reading Apple in China which the name of the author is slipping my mind but this is kind of more of an exposition written by a journalist on how Apple did a lot of manufacturing processes in Asia over the last um couple several decades. Very eye opening. >> Amazing. Haml.

1:38:51

>> Yeah, I have them right here.

1:38:51

Uh, so the so I'm a nerd.

1:38:54

Okay, so I'm not as cool as RA is.

1:38:57

So I actually have like textbooks which are like my favorite.

1:38:59

So this one is very classic one.

1:39:01

Machine learning by Mitchell.

1:39:04

Now, it's kind of theoretical, but the thing I like about it is it um really drives home the fact that AAM's razor is prevalent not only in like science but also in machine learning and AI.

1:39:20

So, a lot of times the simplest and also engineering.

1:39:22

So like a lot of times the simpler approach generalizes better.

1:39:27

And so that's the thing I kind of internalized deeply from that book.

1:39:31

And um also really like this one. So another textbook. I told you I'm a nerd.

1:39:35

This is like also an very old one. >> Wow.

1:39:39

>> Um, and this is like, you know, nor algorithms and it's just like I really like it because it's just human ingenuity and it's very like lots of clever useful things.

1:39:49

>> They're down the street. >> Computing. >> I'm at Berkeley.

1:39:53

>> The people that did that research. >> Yeah. >> Yeah. Textbook authors. >> Super cool. Oh, man. Nerds. I love it. Okay, next question.

1:40:01

Favorite recent movie or TV show? I'll jump to Haml first. Okay.

1:40:06

So, I'm a dad of two parents. I have two parents.

1:40:09

>> I don't get to Oh, sorry. Uh, two kids.

1:40:12

So, yeah, I'm a dad of two kids >> and I don't really get the time to watch any TV or movies.

1:40:18

So, I watch whatever my kids are watching.

1:40:21

So, I've watched Frozen like three times in the last week. >> Only three? Oh, okay. In the last week. Okay. Yeah. So, that's >> great. That's my Frozen. I love it. Okay. Sure. Yeah. >> Yeah.

1:40:32

I don't have kids so I can give all these amazing answers actually.

1:40:34

So my husband and I have been watching The Wire recently.

1:40:38

We never actually saw it growing up.

1:40:41

So we started watching it and it's great.

1:40:46

>> I feel like everyone goes through that eventually in their life.

1:40:47

They decide I will watch The Wire. >> I know.

1:40:50

So we are in that >> year of your life. I It's great.

1:40:51

I It's such a great show. Oh man.

1:40:54

And but it's so many episodes and everyone's an hour long. >> I know.

1:40:58

We get through like two or three a week.

1:41:01

So, >> so we're very slow. >> Worth it. Okay, next question.

1:41:03

Do you have a favorite product you've recently discovered that you really love?

1:41:07

And we'll start with Shrea.

1:41:10

>> Yeah, I really like using cursor.

1:41:12

Honestly, now Cloud Code. Um, I'll I'll say why.

1:41:16

So, I think as a I'm a researcher more so than anything else.

1:41:18

I write papers, I write code, I build systems, everything.

1:41:22

And I I find that like a tool I'm so bullish on AI assisted coding because like I have to wear a lot of hats all the time.

1:41:29

Um and now I can be more ambitious with the things that I build um and write papers about.

1:41:36

So I'm super excited about those.

1:41:39

Cursor was my entry point into this.

1:41:39

Uh but I'm starting to find myself trying always trying to keep up with all these AI assisted coding tools. >> Haml.

1:41:48

Yeah, I really like cloud code and I like it because I feel like the UX is outstanding.

1:41:53

Um, there's a lot of love that went into that.

1:41:56

Um, it's just it's just really impressive as a terminal application that is that nice.

1:42:04

>> Ironic that you two both love cloud code when it's just built on vibes. >> I think it's false.

1:42:09

It's not just built on vibes. >> There we go.

1:42:12

Okay, two more questions.

1:42:15

Uh Hamill, do you have a favorite life motto that you find yourself using and coming back to in work or in life?

1:42:21

>> Keep learning and think like a beginner. >> Beautiful. Shria, >> I like that.

1:42:27

Uh for me, it's to always try to think about the other side's argument.

1:42:32

I find myself sometimes just encountering arguments on the internet like this recent eval debates and like really think okay put myself in their shoes.

1:42:42

There's probably a generous take, generous interpretation, and I think we're all much stronger together than if we start picking fights.

1:42:49

My vision for Evals is not that Hamel and I become billionaires.

1:42:53

It is that everyone can build AI products and we're all on the same page.

1:42:59

>> Slash Everyone becomes billionaires. >> Yes. >> Yes. >> Amazing. Final question.

1:43:04

When I have two guests on, I always like to ask this question and I'll start with Hamill.

1:43:10

What's something about Shrea that you like most?

1:43:12

What do you like most about Shrea?

1:43:14

And I'm going to ask her the same question in reverse.

1:43:16

Yeah, Shrea is one of the wisest people that I know, >> especially for being so young relative to me.

1:43:25

I feel like she's like much wiser than I am, honestly. Seriously.

1:43:27

Um, she's very grounded and has like a very even perspective on things.

1:43:36

And so I'm just really impressed by that all the time. >> Sure. Yeah. >> Yeah.

1:43:42

My favorite thing about Hamill is his energy.

1:43:45

I don't know anybody who consistently maintains momentum and energy like Hamill does.

1:43:49

Um I often think that like I would start caring much less about Evals if not for Hamill.

1:44:00

And uh everyone needs a Haml in their life for sure. M.

1:44:03

Oh, well, we all have a Haml in our life now. Uh, this was incredible.

1:44:09

This was everything I'd hoped it'd be.

1:44:11

I feel like this is the most interesting, in-depth uh, consumable uh, primer on emails that I've ever seen.

1:44:18

I'm really thankful YouTube made time for this. Uh, two final questions.

1:44:22

Where can folks find you?

1:44:23

Where can they find the course?

1:44:23

And how can listeners be useful to you?

1:44:25

Uh, I'll start with Shrea. >> Yeah.

1:44:29

Uh, you can reach me via email. It's on my website.

1:44:31

If you Google my name, that is the easiest way to get to my website. You can find the course.

1:44:35

If you Google AI evals for engineers and product managers or just AI evals course, you'll find it.

1:44:42

Um, we'll send some links hopefully after this so it's easy. And how to be helpful.

1:44:47

Two things always for me.

1:44:50

One is ask me questions when you have them.

1:44:52

I will try to get to them.

1:44:56

R respond as soon as I can.

1:44:56

The other one is tell us your successes.

1:44:58

One of the things that keeps us going is somebody tells us like what they implemented or what they did a real case study and Haml and I get so excited from these um and it really keeps us going. So please share. >> Yeah.

1:45:16

Uh it's pretty easy to find me.

1:45:18

I'm my website is hamill. dev.

1:45:22

I'll give you the the link.

1:45:22

Um you can find me on social media, LinkedIn, Twitter.

1:45:28

Um thing that's most helpful is to echo what Shrea said, we would be delighted if we're not the only people teaching evals.

1:45:36

We would love other people to teach evals.

1:45:38

And so any kind of blog posts, writing especially that as you go through this and learn this that you want to share, we would be delighted to help reshare that or amplify that. Amazing. Very generous.

1:45:54

Thank you so much for being here.

1:45:57

Uh, I really appreciate it and you guys have a lot going on. So, so thank you.

1:46:01

>> Thanks Lenny for having us and for all the compliments. >> My pleasure. Bye everyone.

1:46:08

>> Thank you so much for listening.

1:46:08

If you found this valuable, you can subscribe to the show on Apple Podcasts, Spotify, or your favorite podcast app.

1:46:13

Also, please consider giving us a rating or leaving a review as that really helps other listeners find the podcast.

1:46:20

You can find all past episodes or learn more about the show at lennispodcast. com.

1:46:27

See you in the next episode.