So by the time you're watching this, hopefully you have played yourself with vectors.
You've created your own chunks, you've put them in a data store, and you have looked at them in 2D
and 3D and made up your mind which of those you prefer?
Well, that introduces you to chroma.
Very easy to use.
You can also try using other data stores.
Vice is one that's very easy to use using the same kind of code.
It's a Facebook AI similarity search, and it's an in-memory vector data store that is even it's not
even easy to the same amount of difficulty.
It just involves changing 1 or 2 lines of what we already wrote.
So that could be another exercise for you.
Repeat this in office and you'll find it's it's trivial to do, and you will get, of course, consistent
results if you're using OpenAI embeddings.
Uh, so, uh, it's worth pointing out that what we've just experienced is the very best of long chain
in that we were able to accomplish a lot in literally just two lines of code.
There was the line when we said embeddings equals OpenAI embeddings, and that was immediately giving
us access to OpenAI's API to use for calculating embedding vectors.
Um, and then there was just that single line where we created our chroma database.
We said chroma dot from documents.
And you remember we passed in three things, documents, which in our case were in fact chunks of documents.
Embeddings, which are the OpenAI embeddings and the database name is the directory that it used.
And we could have put in any name we wanted.
And I chose vector DB, but you can put in whatever name you wish.
The.
It's worth pointing out that we created these vectors for each chunk from our original, uh, text that
we read in.
We could equally well have put in documents there.
We could have instead created vectors for entire documents instead of for chunks.
And you can try that.
Try replacing the word chunks with documents and see what you get.
Of course, there'll be fewer of them, and you can see whether they are as separated out in the same
way I'm guessing that they will be.
So with that, we are finally ready to bring this together and build our Rag pipeline.
Our Rag solution.
And at this point, I'm hoping all of the concepts are very clear in your mind.
Next time we're going to again see the power of Lang Chain to be able to stitch together a full solution
just with a few lines of code, including a conversation chain and memory, which are some of the things
that Lang Chain handles very nicely.
And we'll be able to have question and answer session demonstrating expert knowledge of the space.
So that's a big milestone for us.
It's rag coming together and it's happening in the next session.