What is the indexing API and why it is important to, uh, be aware of it and make use of it.
So, uh, we want to modify the content, the contents of a vector database without having to recreate
it all over again.
This is the problem that we are going to solve using the indexing API of long chain.
Because until now, whenever we have experiment with a Rag application, usually we haven't played around
with changing the contents of the vector database.
And in many cases, uh, when you do that, you need to recreate the whole vector database.
You want to make any change in the in the data.
That is not a problem if you are having, you know, a demo application.
But once you have a lot of data in your application that can be very costly in terms of time and also
computational resources.
So the indexing API is a very good solution because instead of recreating the whole vector database,
it is just going to change the part that has been updated.
So.
In.
In the right side of the screen, you have a basic example of a drag application just to remind you,
you know, the code associated with that.
And in the final part, we have included a code using the indexing API of long chain.
So basically this is the part that you need to pay attention to.
We are using the indexes library of long chain.
And in this case this is an example that works with an SQL uh database.
A.
And the important things for you is to remember that this is the document and this is the vector database.
So the the the the process with the indexing API in a very simple form is that you initially execute
a index, then you make the changes, you can create a update content, you can delete content, you
can add new content.
And then you execute index again.
And the database vector store in this case is going to be updated just in the areas that you have modified.
So this is not relevant for a small application for a for a demo application.
But it can be very important for a production application.
So this is something you need to be uh, aware and, and to master whenever you start thinking about,
uh, having your app application in a production environment, remember that you have a more information
about this in the long chain documentation.
And that a our advice is for you to experiment and play around with the code you find here, and also
a the particular code to respond your particular use cases.