Well.
Hi there.
So you've made it to day two of week eight, and I am super grateful that you've been hanging on, and
that you're now at the point where there are four more days to go.
And let me tell you something this day, this is probably the toughest day of the lot of the entire
course.
So if you survive through this day and you're on top of it and you're getting it and you're running
the code and it's all making sense, then you you're already basically mastering LM engineering.
This is what it's about.
Today is going to be tough.
Be prepared.
But as it happens it's going to be really interesting.
And we're going to get some great achievements done.
So four days to go of the eight week journey to LM mastery.
We're in the home stretch.
You can already, of course generate text and code with frontier models, with open source, with hugging
face back to front, you can follow a strategy to solve problems with curating data sets, which is
hard making baseline models and fine tuning frontier models, and then carrying out a full end to end
process to fine tune open source LMS.
And finally, what we did last time is taking our fine tuned LMS and deploying it to production.
We use modal.
There are many others, but modal is great, and we use it in such a way that you can just write a simple
piece of Python code that can run locally.
Apparently it looks like it's running locally, but it in fact it is calling out to your model running
on the cloud in modal.
Paying only for what you use.
So today we take a side step to look at more pricing models as we build our final final pricing model.
That will be what's called an ensemble, a combination of multiple models.
We're going to go back to Rag, and we're going to use Rag to build a frontier model solution that will
operate against a massive Chrome data store.
And to make things different to last time, we're not going to use Lang chain.
We're just going to directly look up in the vector store and use that to build our prompt ourselves,
which is good.
Good to understand exactly how it works under the covers.
We're going to then build this ensemble model with a high level of expertise and be able to deliver
production ready code, calling a number of models.
And I think perhaps the most important thing to say here is that whilst a lot of what we'll be doing
is something of a repeat of things we've done before, just in a bit more of an industrial strength
way, this is about solidifying what you've learned.
This is about going from the point of being fairly confident with different aspects of LM engineering
into being advanced, and so do take the time to go through the code and take this as an opportunity
to practice, practice, practice, and get to the point of feeling like you've built true expertise.
All right.
So quick, a reminder on what is the project we're working on here.
Project called The Price is Right building this autonomous Agentic framework agent workflows that will
watch for when deals get published online, estimate their prices and send a push notification if it
looks like this is a bargain and we are going to have these different agents collaborating to solve
the problem, including our frontier busting model, our fine tuned model that significantly outperformed
GPT four and Claude.
All right, so you may remember last time I showed you this diagram that showed our agent workflows,
the user interface on the left, the framework that we'll be using, planning agents to coordinate activities.
And then the three the scanning agent looking for promising deals, ensemble estimating prices and a
messaging agent that will send us push notifications.
So I wanted to mention that this was a bit of a simplification, because the ensemble agent itself will
be calling out to three different models.
It's going to be calling a frontier agent, which is going to be a Rag workflow to price products based
on an inventory of lots of existing products that it can look up.
It's a perfect use case for rag.
Of course, you may have already thought of it as I say, so you may have already been wondering why
we didn't even try this.
Well, we're going to.
Today, the ensemble agent will use the specialist agent that we already have and built and have like
a specialist agent class to represent, and it's going to use a random forest agent, which will be
an agent using a random forest traditional machine learning approach.
Except there's going to be a twist.
It's going to be using vector embeddings that will use a transformer architecture.
So it is a sort of modern take on traditional ML.
So basically today we are going to be working on all of the icons there in red.
We're going to be working on the ensemble agent.
We've already built the specialist agent.
So the other two will be part of our conquest today.
And we will end today with an ensemble agent that is able to calculate prices, drawing on multiple
other estimators.
That's the challenge.
Let's get over to JupyterLab.