So at the end of each week, it's customary for me to give you a challenge, an assignment to do on
your own.
And there's been some interesting assignments I hope you agree that we've had so far, but let me just
put it out there this week.
The assignment is by far the most interesting so far, and I really, really hope you take this one
seriously and give it a good crack, because I'm going to do it myself too.
And I challenge you to it because I want to do this as quickly as I can.
I think it's going to make an amazing blog post.
I think it's going to be something that's that's really cool and really fun.
So here's the challenge.
Take exactly what we've just built and use it to build your own knowledge worker on your own information
as a way to boost your own personal productivity.
So, for example, you could assemble all of your files that you've got in one place, and maybe you
already have that on your hard drive, I certainly do.
And so then that is effectively your own personal knowledge base with a folder structure.
You can then vectorize everything in chroma, which will then become your own personal vector data store,
and you can then build a conversational AI on top of it and ask questions about your information.
And when I think about the amount of information I have about projects I've worked on, about things
that I've done, there's no way I've got that in my mind.
Like, I spend so much of my time digging things up, and the idea that I'd be able to have a a chatbot
that is optimized for my own personal background, perhaps bringing together both the my work and personal
stuff so that I could really connect the dots.
Think about someone that might be able to help me with a particular problem from across all of my contacts,
current job, previous jobs, and so on.
It's just an amazingly powerful idea.
And so I'm very excited to do this myself.
There's a couple of things that you could do to take it even further if you want to go really insane.
And again, that's what I'm planning to do.
So I use a Gmail, as does most of the internet, and it's reasonably easy to write some code so that
you can authenticate against the Google API and then have access to your own inbox to be able to read
your emails, uh, through Google's API.
I say it's easy.
It's sort of medium easy.
Like the the code that they have to authenticate is a bit of a bore, but so many people have done it
that you can quite easily Google it and see step by step instructions for how to do it.
So one could connect to one's email box and bring in emails and also vectorize them in Chrome.
So you would have your email history there too.
Uh, obviously it's it's completely unrealistic to provide all of this context in some massive, uh,
context window to to to frontier model.
You can hopefully imagine that all of your material would be bigger than the million tokens that even
Gemini 1.5 flash can take.
But using Rag, it would be entirely possible to pluck out the 25 closest documents in your vector database
to a particular question and then be able to provide them.
And so you could imagine you could do that for your email inbox.
You could also do it for if you have Microsoft Office files.
There are simple Python libraries that will read office files and bring out the text versions of them.
And if you use Google Drive, then Google has an API to be able to read your documents in Google Drive.
Again, not super easy.
There's a bit of hokey stuff to authenticate, but it's completely doable, and I really think that
the reward would make it worth it.
One final tiny point to this you might have a concern about calling things like OpenAI embeddings to
be vectorizing all of your data, because there's always a sense of, okay, so how confident are we
that these calls we're making with our private data isn't getting kept anywhere?
Um, and so as a final part to this challenge, if that is something that's a concern for you, then
you can actually use an open source model like Bert to run it yourself.
You can do the vectorization yourself.
And again, there's a couple of ways of doing it.
The way that you know about is you could just bring up a Google Colab, you could have your Google Drive
mapped to that colab, and you can simply use that in Colab to be vectorizing all of your documents
that way.
So that's one way to do it.
That would be very effective.
Another way that's perhaps slightly more advanced is that you could use something called llama CP llama
dot CP, which is a library that you can run on your computer locally, and it has optimized C plus
plus code to run some of these models in inference mode locally on your box without ever leaving your
own box.
Um, and so that can be a final approach you could use if you wish to be able to vectorize all of your
documents without having to go to the cloud.
Um, but all in all, the challenge for you is make a personal, private knowledge worker for yourself
to prove that you can do this.
And if that's too much of an endeavor for you, then at the very least, take a few text documents that
you've got and drop them in the same folder to do a mini version of it.
At least do that.
That is the minimum threshold.
I at least ask for that.
Some text documents in that folder structure, so that you can see how this might work for your own
stuff.
But I'm hoping someone does this whole project for real and I race you.
I'm going to do it too, and write a blog post about it, and I can't wait.
And that wraps up our week of Rag.
And at that point, it brings you to 62.5% of your way along this journey.
And I hope you feel that sense of upskilling.
I hope you now feel so many things are coming together As long as you're doing these exercises and as
long as you are learning by doing at this point, you've got a great intuition for how rag works and
why it works and why it's effective.
You understand about vector embedding and vector data stores, and all of that is in addition to everything
else we've worked on in the past working with frontier models, AI assistants, using tools, using
hugging face for open source models, for pipelines tokenizers models, and also choosing the right
LLM using the various leaderboards like the open LLM leaderboard from Hugging Face.
So it's a big moment.
It's very exciting.
Uh, but next week we start on something completely new.
We're going to introduce a new commercial project.
We're going to download a dataset from Hugging Face, and we're going to be curating our data to take
on something new and exciting.
That involves moving from the world of inference to the world of training, which is a very big step
indeed.
I can't wait, and I'll see you then.