In this lesson we are going to talk about rack optimization.
If you remember, in previous, uh, lessons, we have been talking about a rag a lot, and we said
that there is a basic approach, like a basic.
Range of techniques in order to apply the rack technique in your prototype or initial demo, and then
you will have a many other advanced techniques in order to optimize your rack application for a professional
a for a professional stage.
So we have already been talking about some of the optimization techniques you need to consider.
In this lesson.
We are going to focus our attention in a couple of areas where you are going to see a probably when
you study this, a this, this topic, uh, further, you are going to find a different terminologies,
uh, uh, new names, new ways of doing things.
And we are not going to, uh, explain all of them here in detail.
We just want to give you a quick idea of the things you are going to find and the things that can be
interesting for you to study in a more advanced stage when you are, uh, optimizing your application
or when you are preparing the launch of your or your of your professional LM application.
So one of the areas that we wanted to, uh, explore a little bit more with you is the area of the alternative
techniques to index and store vectors.
So remember that this is refer to how we a how we, uh, save and how we search data in vector databases,
which, as you know, is an important part of the rack technique.
So in this particular step, storing and indexing vectors, you may see a different terminology like
hierarchy here hierarchical navigable small small world difficult time I repeat hierarchical navigable
small world.
Sometimes you will.
You will see just the the NSW letters.
This is one of the techniques for storing and indexing vectors.
You may find as the advanced technique you would like to explore.
You have another one like Locally Sensitive hashing or LSH.
You have product quantization or PQ.
And finally you have filtering pre and post filtering and random projections.
All these some different advanced techniques for storing and indexing vectors.
So and they are not all the the the ones you have available for you.
These are the most popular.
So these are the kind of techniques you will have to explore study and practice.
And in many cases just just try and see, you know, the results of each of these techniques in your,
uh, professional application in order to see how each of them impacts the performance of the application.
In many cases, it's just a a case of trial and error.
Try and compare, you know, the different techniques and see the impact in your application.
The second area where you will probably explore different alternatives is the area, uh, when you are
measuring the vector similarity or the search similarity, semantic similarity.
So remember that the semantic similarity is the main technique to search data in vector databases.
So for a for this purpose we have different ways of doing things.
So we have different ways of doing semantic similarity.
The most common the most popular.
The ones that you will probably try first are cosine similarity and the second one Euclidean distance.
So they are both popular in the math world.
The cosine similarity measures the angle between vectors and the Euclidean distance measures.
You know the straight line between items, between vectors as well.
But don't worry about about, uh, math right now.
This is this is something that you may find in the literature, you know, in the articles or the courses
or advanced videos you may find about that.
The important thing right now is for you to understand that when you are working with a Rag application,
which is going to be very frequent when you are, uh, working in the professional world, you have
two main stages the basic development stage of the Rag technique and then the advanced one, where you
are going to try different approaches in order to optimize the results that the basic approach, uh,
initially, initially gave you.
Okay.
So this is just a quick review of two areas where you probably would like to, uh, explore and different
alternatives.
In the next lesson, we are going to talk about a very important a question regarding LLM applications,
which is the speed.
And in some cases this is known as latency.
We will see the relationship between speed and latency in the next lesson.