1
00:00:03,870 --> 00:00:12,450
What is the indexing API and why it is important to, uh, be aware of it and make use of it.

2
00:00:12,510 --> 00:00:21,240
So, uh, we want to modify the content, the contents of a vector database without having to recreate

3
00:00:21,240 --> 00:00:22,890
it all over again.

4
00:00:23,040 --> 00:00:30,090
This is the problem that we are going to solve using the indexing API of long chain.

5
00:00:30,090 --> 00:00:40,380
Because until now, whenever we have experiment with a Rag application, usually we haven't played around

6
00:00:40,380 --> 00:00:44,190
with changing the contents of the vector database.

7
00:00:44,190 --> 00:00:53,040
And in many cases, uh, when you do that, you need to recreate the whole vector database.

8
00:00:53,040 --> 00:00:55,770
You want to make any change in the in the data.

9
00:00:55,770 --> 00:01:00,960
That is not a problem if you are having, you know, a demo application.

10
00:01:00,960 --> 00:01:09,090
But once you have a lot of data in your application that can be very costly in terms of time and also

11
00:01:09,090 --> 00:01:10,890
computational resources.

12
00:01:10,890 --> 00:01:18,660
So the indexing API is a very good solution because instead of recreating the whole vector database,

13
00:01:18,660 --> 00:01:22,980
it is just going to change the part that has been updated.

14
00:01:23,130 --> 00:01:24,120
So.

15
00:01:25,020 --> 00:01:25,470
In.

16
00:01:25,470 --> 00:01:33,210
In the right side of the screen, you have a basic example of a drag application just to remind you,

17
00:01:33,210 --> 00:01:35,790
you know, the code associated with that.

18
00:01:35,790 --> 00:01:45,990
And in the final part, we have included a code using the indexing API of long chain.

19
00:01:45,990 --> 00:01:50,490
So basically this is the part that you need to pay attention to.

20
00:01:50,490 --> 00:01:54,570
We are using the indexes library of long chain.

21
00:01:54,570 --> 00:02:01,410
And in this case this is an example that works with an SQL uh database.

22
00:02:01,680 --> 00:02:02,100
A.

23
00:02:02,100 --> 00:02:13,110
And the important things for you is to remember that this is the document and this is the vector database.

24
00:02:13,110 --> 00:02:23,220
So the the the the process with the indexing API in a very simple form is that you initially execute

25
00:02:23,220 --> 00:02:31,710
a index, then you make the changes, you can create a update content, you can delete content, you

26
00:02:31,710 --> 00:02:33,510
can add new content.

27
00:02:33,510 --> 00:02:36,720
And then you execute index again.

28
00:02:36,720 --> 00:02:45,510
And the database vector store in this case is going to be updated just in the areas that you have modified.

29
00:02:45,510 --> 00:02:52,320
So this is not relevant for a small application for a for a demo application.

30
00:02:52,320 --> 00:02:56,160
But it can be very important for a production application.

31
00:02:56,160 --> 00:03:05,490
So this is something you need to be uh, aware and, and to master whenever you start thinking about,

32
00:03:05,490 --> 00:03:13,860
uh, having your app application in a production environment, remember that you have a more information

33
00:03:13,860 --> 00:03:16,560
about this in the long chain documentation.

34
00:03:17,360 --> 00:03:27,440
And that a our advice is for you to experiment and play around with the code you find here, and also

35
00:03:27,530 --> 00:03:33,140
a the particular code to respond your particular use cases.

