Okay, so ready to dive into some AI evaluation today.
It's one thing to build cool algorithm,
but it's something else entirely to know if it works.
Totally, and you know what?
It's like anyone who's worked on a real AI project knows
evaluation can be kind of a pain, right?
It's like something people just tack on at the end,
but these posts we're looking at by Hamilton who's saying,
they really say like,
nope, gotta bake that in from the start.
It's gotta be part of the process.
Yeah, from day one.
Exactly, and he doesn't just like
to talk about it generally.
He uses this case study, this AI assistant, Lucy.
Yeah, Lucy, she was built
for this real estate company, ReChat,
and they used her to help agents automate some tasks.
Things were going great,
but then Lucy kind of plateaued.
Her performance wasn't getting any better.
But you hit a wall.
Yeah, and that's when they realized,
okay, we need a system,
like a real way to figure out
what's holding Lucy back and how to improve.
How to make her better.
Exactly, and what I thought was really interesting
is how he breaks this whole evaluation process
down into like three levels.
It's like you're leveling up in a game.
I like that.
Yeah.
So like what's the first level?
What's the first step on this ladder?
So the first level is all about these things
called unit tests.
So this is where you're really
in the nitty gritty of the code, right?
Making sure all the little pieces work on their own
like they should.
Okay, so this is like, if I'm writing an essay,
I'm checking for typos,
I'm checking for all that before I submit.
Yeah, it's good analogy.
He's saying he gives this example
of how ReChat uses unit tests
to make sure Lucy doesn't accidentally,
give away sensitive info,
like those unique ID codes, UOBDs.
So they wanna make sure Lucy's not blabbing
about confidential stuff.
Right, keep it all under wraps.
Exactly, gonna protect those secrets.
Makes sense.
So level two, what's that about?
Okay, so level two,
this is where it gets really interesting.
This is where you start bringing in humans,
human judgment.
You're actually looking at how the AI is doing
and having humans say like, yep, good job,
or nope, not so much.
So it's like having a teacher grade my essay now, right?
Yeah.
They're giving me feedback on my writing and stuff.
You got it.
And Hussein, he really emphasizes how important it is
to make this process, you know,
smooth, easy for these humans.
Yeah.
He even suggests building custom tools
just to help people quickly review the AI's work
and give feedback.
You don't want them to get bogged down
by a bunch of technical stuff.
Right, you want them to focus on what matters
as the AI doing a good job or not.
Exactly.
And what's cool, he talks about using,
get this, LLMs to automate part of this human evaluation.
Like an AI is helping grade the essays.
Wait, that's kind of meta, isn't it?
An AI evaluating another AI?
It is, it is, but if you're already working with AI,
might as well make it work for you, right?
Yeah, I guess so.
Streaming the whole thing.
Now the third level,
this is what Hussein calls like the gold standard.
Okay.
AB testing.
Oh yeah, AB testing effort of that.
So that's where you're putting it out there
in the real world.
Yes.
You're releasing different versions to actual users
and seeing how they react.
So you're seeing what works, what doesn't work.
Exactly, you're getting real world data,
which at the end of the day is what really matters.
Your AI could pass all the tests,
get great feedback from humans,
but if the users don't like it.
Right, if it doesn't actually help them.
Right, it's a flop.
AB testing helps you catch those little things
that might not show up in a lab setting
because the real world is messy.
Yeah, totally.
So we've got our three levels.
Unit tests, human and model evil, and AB testing.
Okay, but before we even get to those stages,
Hussein mentions this thing called critique shadowing.
What is that?
Okay, so critique shadowing,
this is a really cool way to build
what he calls an LLM judge.
So you have your expert, right?
They're making those pass field judgments
like we talked about in level two.
Okay, sounds familiar.
But here's the twist.
They don't just give a thumbs up or down,
they also gotta explain why.
Ah, so it's like not just yes or no,
but yes because or no because.
You got it, what did they like,
what didn't they like, all the details.
So you're capturing their thinking,
not just the final decision.
And then you take all these critiques
and use them to train your LLM judge.
So the LLM is learning from the expert,
trying to see the world through their eyes.
That's pretty cool.
It is, and it helps you uncover all these things
that we just assume when we interact with AI,
things we don't even realize we're expecting.
Like hidden rules.
Yeah, exactly.
Like an apprentice learning from a master craftsman.
But in this case, the craft is judging AI.
I like that analogy.
So the benefits of this LLM judge,
they go beyond just grading the AI.
You can use it to make the AI better, right?
Absolutely, it's not just about giving a score,
it's about giving feedback that helps the AI
learn and improve, like a personal tutor.
Nice.
And the best part, he says,
a lot of the work you do for this whole evaluation process,
you can use it again later for fixing bugs
and improving the model.
Yeah, super efficient.
It's like you're getting double the bang for your book.
That's awesome.
Now you mentioned that this approach
forces you to define what good actually means for your AI.
What does that mean?
Yeah, you can't just be like,
oh, I'll know it when I see it.
You gotta actually say, okay,
this is what success looks like.
What are the specific things that make this AI good?
So you're not just building an AI that works.
You're building one that works well
and you're defining what well means.
Right, right.
And that process of figuring out what well means,
it can actually help you build a better product.
Because you're really thinking about what's important,
what the users care about.
So evaluation isn't just a chore,
it can actually make your AI better.
Totally.
It's all about finding those hidden gems
that make your AI really shine.
That makes a lot of sense.
Okay, so we've talked about
like the foundations of AI evaluation.
Yeah, the basics.
But where does this fit in the bigger picture?
What's the end goal here?
Now this is where your LLM judge really starts to pay off.
You mean like putting it to work.
Exactly, you can use it to evaluate
all those user interactions,
the real ones and those synthetic ones we talked about.
So now you can see the big picture.
How's the AI actually doing out in the wild?
Totally.
It's not just about individual judgments anymore.
It's like looking for patterns, trends
across your entire dataset.
Hussein, he recommends breaking down your analysis,
looking at things like different user types,
different situations, different features.
So like you might discover, for example,
your AI struggles with new users who are,
I don't know, getting multiple matches
compared to expert users who are getting no matches.
Exactly.
That kind of detail helps you pinpoint
where your AI needs work.
It's like a heat map showing you the hotspots
where things are going wrong.
Okay, I'm seeing how this gets really useful.
So once you know where those errors are, what's next?
Time to put on your detective hat.
Do some error analysis.
Hussein says look at examples of each type of error,
classify them by hand.
Okay.
He even uses a spreadsheet to keep track of everything.
So it's like categorizing clues to figure out,
you know, why the crime happened.
Exactly.
You might find a lot of errors are happening
because I don't know, the AI is missing some context
about the user.
Or maybe it's not giving clear error messages,
things like that.
It's all about those little details, right?
That can make or break the user experience.
Right, and as you're classifying those errors,
you'll start to see patterns.
Like maybe 40% are because users need more guidance,
30% are tied to login issues.
That's great.
So now you know where to focus your energy
to make the biggest improvements.
And the best part, Hussein says you can get a lot done
in just 15 minutes of, you know, focused error analysis.
Okay.
Of course it might take longer
to have a ton of data, but even a quick analysis
can be really helpful.
It's good to know.
I was picturing like hours and hours
staring at a spreadsheet.
So once you've analyzed your errors,
figured out the root causes, now you can fix them.
So it's like another round of edits
on that important paper, polishing it up, making it shine.
Exactly.
And remember those unit tests.
This is where you add new ones
to make sure those errors don't come back.
Like patching up the leaks in your boat
so you can sail smoothly.
Now what if you find certain types of errors
that are just like really tricky
for your general LLM judge to catch?
Hmm.
I guess you need a specialist.
Precisely.
You can create specialized judges
that are, you know, experts in specific areas.
It's like having a team of specialists,
a cardiologist, neurologist, and so on.
But I'm guessing you don't want
to jump straight to specialists.
Right.
Hussein's big on starting with that general purpose judge,
doing that thorough error analysis.
That way you know where those specialists are needed most.
Makes sense.
Don't want to bring in the whole team
if only one doctor is needed.
Exactly.
And one thing I really like about his approach
is how iterative it is, you know?
It's this cycle of evaluation, analysis, refinement.
It's not about getting it perfect on the first try.
It's about learning and improving as you go.
It's like training for a marathon.
You don't run 26 miles on day one.
Right. You build up slowly.
And what really stood out to me
was how much he emphasized actually looking at your data.
Not just building fancy models,
but really understanding what the data is telling you.
He even said the real value
comes from that close analysis of your data.
The LLM judge is just a tool to get you there.
Right.
He's basically saying,
don't get so caught up in the tools
that you forget the fundamentals.
So it's about that data-driven mindset.
Let the data be your guide.
Exactly.
And for anyone feeling a bit overwhelmed by all this,
Hussein has some great advice.
Start simple.
Use the tools you already have.
Don't get bogged down in fancy frameworks.
And remember, there's no shame in asking for help.
There's tons of resources out there,
and the AI community is super helpful.
Like he's saying, just dive in, start experimenting.
You don't need to be an expert to get started.
Exactly.
Now we've covered a lot,
but there's one more piece of the puzzle
we need to talk about.
Okay, so we've talked about all the technical stuff
of AI evaluation.
Yeah, the nuts and bolts.
But where does it all fit?
What's the big picture here?
What are we really aiming for?
That's a great question.
And Hussein, he doesn't just give us a toolbox
and say, good luck.
He wants us to think about how all of this connects
to the bigger goals we have for AI.
So it's not just about making AI a little bit better,
it's about something bigger.
Yeah, exactly.
Imagine if AI products had to meet a much higher standard.
Not just how well they work,
but also how they impact people,
how they impact society.
So we're talking about going beyond just like,
accuracy and efficiency.
Right, it's about things like transparency and fairness
and whether people can trust these systems.
And that's where those detailed critiques
from experts become so important.
Because they give you that human feedback
that shapes how the AI behaves.
So it's like you're building a conscience
into the whole process.
Yeah, you're not just creating intelligent machines,
you're creating responsible machines.
I like that.
To combine that human element with the power of LLMs
to learn and adapt,
you start to see the potential for AI
that is not just smarter, but also more ethical.
Okay, that's a really exciting idea,
but it also feels like a huge responsibility.
It is a big responsibility.
So how do we actually make this happen?
Well, Hussein, he leaves us with this really powerful question.
He asks, how can we use all these evaluation techniques,
not just to improve performance,
but to make sure that AI is developed and used responsibly?
So it's a call to action for everyone who's working in AI?
Exactly, a reminder that we're not just building cool tech,
we're shaping the future.
And we have a responsibility to get it right
to make sure the future is good for everyone.
Can't have said it better myself.
So for all of you listening out there
who are both excited about AI
and a little bit worried about the risks
this deep dive has given you a roadmap.
Build those evaluation systems,
get your hands dirty with the data,
and never stop asking the tough questions.
Let's build the future of AI together responsibly.
Absolutely.
And that's a wrap for today's deep dive.
Thanks for joining us.