1
00:00:00,000 --> 00:00:00,000
Hello guys.

2
00:00:00,000 --> 00:00:03,000
So we are going to continue the discussion with respect to Lang Chain.

3
00:00:03,000 --> 00:00:09,000
And in this video and in the upcoming series of video, we are going to discuss about Vector Store DB

4
00:00:10,000 --> 00:00:15,000
uh, again, uh, I have listed down some of the vector stores that I will be showing you with respect

5
00:00:15,000 --> 00:00:16,000
to practicals.

6
00:00:16,000 --> 00:00:19,000
One is uh, files, another one is chroma DB.

7
00:00:20,000 --> 00:00:24,000
And after doing both of them I will be also showing you more couple of examples.

8
00:00:24,000 --> 00:00:28,000
There is also a vector store db which is called as Astra db.

9
00:00:28,000 --> 00:00:33,000
This I will show you, uh, with the help of some end to end projects.

10
00:00:33,000 --> 00:00:37,000
Uh, because, uh, we will be using this Astra DB from cloud.

11
00:00:37,000 --> 00:00:40,000
Specifically, it uses Cassandra DB itself.

12
00:00:40,000 --> 00:00:40,000
Right.

13
00:00:40,000 --> 00:00:46,000
So, uh, later on I will be showing you the specific example, but right now we'll focus on this two,

14
00:00:46,000 --> 00:00:52,000
uh uh, vector store and you'll be seeing, uh, each and everything, like how you can actually work

15
00:00:52,000 --> 00:00:53,000
with this.

16
00:00:53,000 --> 00:00:54,000
What is this entire vector store?

17
00:00:54,000 --> 00:00:55,000
And many more things.

18
00:00:55,000 --> 00:01:02,000
Okay, so let's quickly go ahead and open my file.

19
00:01:02,000 --> 00:01:07,000
Uh, so here I will just go ahead and open my file.

20
00:01:07,000 --> 00:01:10,000
So here is my files dot Ipynb file okay.

21
00:01:11,000 --> 00:01:16,000
Now you need to understand first of all what exactly is this particular vector store okay.

22
00:01:16,000 --> 00:01:20,000
So files is nothing, but it is Facebook AI similarity search.

23
00:01:21,000 --> 00:01:25,000
Uh, it is a library for efficient similarity search and clustering of dense vectors.

24
00:01:25,000 --> 00:01:33,000
It contains algorithms that search in set of vectors of any size, up to ones that possibly do not fit

25
00:01:33,000 --> 00:01:33,000
in the Ram.

26
00:01:33,000 --> 00:01:37,000
It also contains supporting code for evaluation and parameter tuning.

27
00:01:37,000 --> 00:01:38,000
Okay.

28
00:01:38,000 --> 00:01:44,000
So uh, let's see some of the example and I'll just show you one very good example with considering

29
00:01:44,000 --> 00:01:51,000
uh txt file will try to read that particular data from that will convert whatever things we have learned

30
00:01:51,000 --> 00:01:56,000
till now right from data ingestion till embeddings, and then finally storing it into a vector store

31
00:01:56,000 --> 00:01:56,000
DB.

32
00:01:56,000 --> 00:01:59,000
Everything will be doing okay so far.

33
00:01:59,000 --> 00:01:59,000
Initially.

34
00:01:59,000 --> 00:02:00,000
We will go ahead.

35
00:02:00,000 --> 00:02:03,000
And first of all let me go ahead and select the kernel.

36
00:02:04,000 --> 00:02:06,000
Uh, so I will go ahead and select the kernel over here.

37
00:02:07,000 --> 00:02:14,000
So here you can see first of all I will go ahead and import from long chain underscore community.

38
00:02:14,000 --> 00:02:16,000
First of all we are going to go ahead with document loaders.

39
00:02:17,000 --> 00:02:18,000
Okay.

40
00:02:18,000 --> 00:02:20,000
Here we are going to import text loader.

41
00:02:21,000 --> 00:02:30,000
Then uh we are going to go ahead with long chain long chain underscore community dot vector store.

42
00:02:30,000 --> 00:02:34,000
Since I'm going to use this particular vector store which is nothing but files.

43
00:02:34,000 --> 00:02:35,000
Okay.

44
00:02:35,000 --> 00:02:36,000
I'm going to go with this.

45
00:02:36,000 --> 00:02:37,000
Okay.

46
00:02:37,000 --> 00:02:43,000
Please remember one thing that you need to have installed the files vector store.

47
00:02:43,000 --> 00:02:48,000
So here what I will do I'll go over here I'll go ahead and write files and let me use the CPU version.

48
00:02:48,000 --> 00:02:51,000
Because right now I'm doing it in my local machine.

49
00:02:51,000 --> 00:02:54,000
Later on when we take this into cloud you can actually also use GPU.

50
00:02:54,000 --> 00:02:55,000
Okay.

51
00:02:55,000 --> 00:02:58,000
So quickly let's go ahead and install this.

52
00:02:58,000 --> 00:03:01,000
So I will go ahead and add pip install r requirements.txt.

53
00:03:01,000 --> 00:03:06,000
Here you can see requirements will already be satisfied because I have already done the installation.

54
00:03:06,000 --> 00:03:06,000
Okay.

55
00:03:07,000 --> 00:03:13,000
Now uh, the next step will be that after importing files I will not use OpenAI embedding, but I'll

56
00:03:13,000 --> 00:03:15,000
use an open source embedding which is llama embedding.

57
00:03:15,000 --> 00:03:21,000
So here I'm going to go ahead and write for long chain underscore community dot embeddings.

58
00:03:22,000 --> 00:03:26,000
Okay I'm going to import over llama embeddings.

59
00:03:26,000 --> 00:03:27,000
Perfect.

60
00:03:27,000 --> 00:03:30,000
Then again from long chain underscore text.

61
00:03:30,000 --> 00:03:35,000
Uh so let's go ahead and use a text splitter.

62
00:03:35,000 --> 00:03:37,000
So I'm going to use long chain underscore text splitter.

63
00:03:37,000 --> 00:03:43,000
And let me go ahead and use uh some character text splitter which we have already seen.

64
00:03:43,000 --> 00:03:51,000
Okay, now I'll take my loader, I will use this text loader and then I will go ahead and upload one

65
00:03:52,000 --> 00:03:54,000
txt file which is called a speech dot txt.

66
00:03:55,000 --> 00:03:59,000
And if you go ahead and see over here in here I have the speech dot txt file.

67
00:03:59,000 --> 00:04:02,000
Okay since I'm working in this vector store folder.

68
00:04:02,000 --> 00:04:05,000
Okay I put it already then.

69
00:04:05,000 --> 00:04:10,000
Uh, uh, from this particular, uh, txt file, I'm just going to load all the documents.

70
00:04:10,000 --> 00:04:13,000
So I'll be using loader dot load this.

71
00:04:13,000 --> 00:04:18,000
We have already discussed uh in the data ingestion by using document loaders.

72
00:04:18,000 --> 00:04:24,000
Then after this this will be my next, uh, important step is that text splitter.

73
00:04:24,000 --> 00:04:27,000
And here I'm going to use my character text splitter.

74
00:04:27,000 --> 00:04:28,000
Okay.

75
00:04:28,000 --> 00:04:32,000
Let's consider the chunk size.

76
00:04:32,000 --> 00:04:39,000
Chunk underscore size will be 200 and my chunk overlap.

77
00:04:40,000 --> 00:04:45,000
Let's say that I don't want any chunk overlap, so I'll just go ahead and make it as zero okay.

78
00:04:45,000 --> 00:04:50,000
Um, otherwise I'll just make it as 30 okay.

79
00:04:50,000 --> 00:04:51,000
This is smaller number.

80
00:04:51,000 --> 00:04:57,000
Now uh, we will go ahead and use this particular text splitter and we'll split all the documents.

81
00:04:57,000 --> 00:05:04,000
So here I'm just going to, uh, go ahead and write split underscore O.

82
00:05:04,000 --> 00:05:09,000
So text splitter underscore split underscore documents okay.

83
00:05:10,000 --> 00:05:13,000
And here I'm just going to use my documents.

84
00:05:14,000 --> 00:05:15,000
So let's execute this.

85
00:05:15,000 --> 00:05:20,000
So here you can see uh created a chunk of 470.

86
00:05:20,000 --> 00:05:21,000
Everything is shown over here.

87
00:05:21,000 --> 00:05:24,000
But let me make this as 1000.

88
00:05:24,000 --> 00:05:25,000
So sorry.

89
00:05:25,000 --> 00:05:27,000
Let's make me this as 1000.

90
00:05:27,000 --> 00:05:28,000
Okay.

91
00:05:28,000 --> 00:05:31,000
So now let's go ahead and see my docs.

92
00:05:31,000 --> 00:05:31,000
This is my docs.

93
00:05:31,000 --> 00:05:34,000
And this is the splitting that has already occurred.

94
00:05:34,000 --> 00:05:34,000
Okay.

95
00:05:34,000 --> 00:05:35,000
Perfect.

96
00:05:35,000 --> 00:05:37,000
Till here all the splitting has been done.

97
00:05:37,000 --> 00:05:41,000
Now the next thing that we do is create our embeddings.

98
00:05:41,000 --> 00:05:45,000
So for this I'm going to use my llama embedding uh, by default.

99
00:05:45,000 --> 00:05:49,000
I've also shown you that llama embedding uses which kind of embeddings itself.

100
00:05:49,000 --> 00:05:56,000
So db will be nothing but fires dot from underscore documents.

101
00:05:56,000 --> 00:05:58,000
So I'm going to use this fire.

102
00:05:58,000 --> 00:06:05,000
So um vector store and I'll probably convert all these documents with the help of this particular embedding.

103
00:06:05,000 --> 00:06:10,000
So in order to do that the first parameter after fast dot from underscore documents have to give all

104
00:06:10,000 --> 00:06:11,000
my documents.

105
00:06:11,000 --> 00:06:14,000
And then I will just go ahead and use my embeddings okay.

106
00:06:15,000 --> 00:06:20,000
So once I do that uh, this basically becomes my vector store DB right.

107
00:06:20,000 --> 00:06:24,000
So this if I go ahead and execute it, it will take up all this particular characters.

108
00:06:24,000 --> 00:06:26,000
Then it will perform all these all my embeddings.

109
00:06:26,000 --> 00:06:32,000
It is going to take some amount of time because this embedding is running in my local machine.

110
00:06:32,000 --> 00:06:37,000
Okay, since it is running in my local machine, so it is going to take some amount of time for your

111
00:06:37,000 --> 00:06:37,000
system.

112
00:06:37,000 --> 00:06:41,000
Also, if you are doing it in a local with the help of Allama, it is going to take some time.

113
00:06:42,000 --> 00:06:48,000
Okay, because we are going to use this five CPU to convert all the documents into vectors, right?

114
00:06:48,000 --> 00:06:52,000
So here you have this Langston underscore community dot this at this specific memory location.

115
00:06:52,000 --> 00:06:53,000
This is perfect till here.

116
00:06:54,000 --> 00:06:55,000
Now what I'm actually going to do.

117
00:06:55,000 --> 00:06:59,000
I will take this particular vector database and start querying it okay.

118
00:06:59,000 --> 00:07:02,000
So in order to do the query I'll go ahead and create a query.

119
00:07:02,000 --> 00:07:09,000
Let's say my query from that particular speech text is that I will just go ahead and show you this.

120
00:07:09,000 --> 00:07:10,000
Okay.

121
00:07:10,000 --> 00:07:14,000
So this is one of the question that I have in my speech text speech dot text.

122
00:07:14,000 --> 00:07:18,000
What does the speaker believe is the main reason United States should enter the war?

123
00:07:18,000 --> 00:07:21,000
Okay, so that is based on the speech text over here.

124
00:07:22,000 --> 00:07:25,000
Um, and I will be considering this example.

125
00:07:25,000 --> 00:07:30,000
Or what you can do is that you can just go ahead and open the speech dot txt, okay.

126
00:07:30,000 --> 00:07:34,000
And you can search for any of the questions that you really want.

127
00:07:34,000 --> 00:07:34,000
Okay.

128
00:07:34,000 --> 00:07:36,000
It is up to you.

129
00:07:36,000 --> 00:07:38,000
Uh, whatever things you specifically want okay.

130
00:07:39,000 --> 00:07:43,000
Uh, so let's let's take one more question Okay.

131
00:07:46,000 --> 00:07:48,000
So I have actually searched for one of the question.

132
00:07:48,000 --> 00:07:51,000
So I will just go ahead and paste it over here.

133
00:07:52,000 --> 00:07:52,000
Okay.

134
00:07:53,000 --> 00:08:00,000
How does the speaker, uh, basically talk about this, you know, describe the, uh, describe the

135
00:08:00,000 --> 00:08:01,000
desired outcome of the war.

136
00:08:01,000 --> 00:08:02,000
Okay.

137
00:08:02,000 --> 00:08:08,000
And here, uh, now we will take up this query, and here we're just going to go ahead and write docs

138
00:08:08,000 --> 00:08:12,000
is equal to DB dot similarity search.

139
00:08:13,000 --> 00:08:14,000
We'll use this.

140
00:08:14,000 --> 00:08:16,000
And here I'm just going to give my query okay.

141
00:08:16,000 --> 00:08:23,000
So finally you'll be able to see if I go ahead and print my docs as soon as I do the similarity search

142
00:08:23,000 --> 00:08:24,000
with respect to the query.

143
00:08:24,000 --> 00:08:29,000
This is the entire response that I get with respect to the context.

144
00:08:29,000 --> 00:08:33,000
Whatever things are basically matching, we get every of these things right.

145
00:08:33,000 --> 00:08:38,000
What I will do, I will just go ahead and display the first one, which is nothing but this one, right?

146
00:08:38,000 --> 00:08:39,000
Page content.

147
00:08:41,000 --> 00:08:46,000
So if I go ahead and execute it here, you will be able to see, hey, it is a distressing and oppressive

148
00:08:46,000 --> 00:08:47,000
duty.

149
00:08:47,000 --> 00:08:52,000
And gentlemen of the Congress which I have performed so so, so so information is basically there.

150
00:08:52,000 --> 00:08:53,000
Okay.

151
00:08:54,000 --> 00:08:56,000
Now this is one way how you can do the query.

152
00:08:56,000 --> 00:09:02,000
Uh, but as I said, uh, after this, you know, I'm also going to show you with respect to retriever.

153
00:09:02,000 --> 00:09:06,000
So let's go ahead and see uh, example with respect to retriever.

154
00:09:06,000 --> 00:09:08,000
And I'll just give you an example.

155
00:09:08,000 --> 00:09:11,000
What does, uh, the retriever actually do.

156
00:09:11,000 --> 00:09:11,000
Right.

157
00:09:11,000 --> 00:09:13,000
So I'm just going to put a comment over here.

158
00:09:14,000 --> 00:09:17,000
So here you can see we can also convert the vector stored into a retriever.

159
00:09:17,000 --> 00:09:22,000
Cause this allows us to easily use it in other methods which largely works with retrieval.

160
00:09:22,000 --> 00:09:28,000
In order to just give you a brief idea, uh, we will be discussing about this retrieval in a separate

161
00:09:28,000 --> 00:09:29,000
module.

162
00:09:29,000 --> 00:09:34,000
But just to give you an idea, this retrievers are like an interface, which actually, whenever we

163
00:09:34,000 --> 00:09:39,000
put any kind of query, it it it is just like connected to the vector store DB.

164
00:09:39,000 --> 00:09:41,000
It can be connected to the vector store DB.

165
00:09:41,000 --> 00:09:45,000
Um, only when we convert this vector store db into retriever class.

166
00:09:45,000 --> 00:09:50,000
So it lacks acts like an interface which will be able to retrieve the details from the vector store

167
00:09:50,000 --> 00:09:51,000
and provide you the response.

168
00:09:51,000 --> 00:09:52,000
Okay.

169
00:09:52,000 --> 00:09:58,000
So here, uh, what I will do in order to convert my vector database as a retriever, I will just go

170
00:09:58,000 --> 00:10:01,000
ahead and use DB dot as retriever.

171
00:10:01,000 --> 00:10:03,000
And I'm just going to use this particular variable.

172
00:10:03,000 --> 00:10:06,000
So here I will go ahead and write retriever okay.

173
00:10:06,000 --> 00:10:11,000
Then let's go ahead and use this retrieval dot invoke okay.

174
00:10:11,000 --> 00:10:14,000
And I will just go ahead and give my query.

175
00:10:14,000 --> 00:10:19,000
So once I do that uh you'll also be able to see that I will also be able to get the same answer like

176
00:10:19,000 --> 00:10:21,000
how I used to get it over here.

177
00:10:21,000 --> 00:10:27,000
But the reason of using this is that later on when we work with different, different LLM models, right

178
00:10:27,000 --> 00:10:31,000
at that point of time, I cannot directly use vector store DB, but initially I need to convert this

179
00:10:31,000 --> 00:10:35,000
db into a vector store db okay, and then finally use it.

180
00:10:35,000 --> 00:10:35,000
Okay.

181
00:10:36,000 --> 00:10:40,000
Uh, sorry, I need to convert this particular vector store DB into a retriever, and then I will be

182
00:10:40,000 --> 00:10:42,000
able to use with any LLM models.

183
00:10:42,000 --> 00:10:42,000
Right.

184
00:10:42,000 --> 00:10:46,000
So uh, that is the importance of using retriever.

185
00:10:46,000 --> 00:10:48,000
So that is the reason I have written over here.

186
00:10:48,000 --> 00:10:53,000
This allows you to easily work with another other Lang chain methods which largely works with retriever.

187
00:10:53,000 --> 00:10:54,000
Right.

188
00:10:54,000 --> 00:10:56,000
So this basically becomes my docs.

189
00:10:56,000 --> 00:11:02,000
So here you have docs of zero dot page underscore content.

190
00:11:02,000 --> 00:11:02,000
Okay.

191
00:11:02,000 --> 00:11:06,000
So I have this entire information over here right now.

192
00:11:06,000 --> 00:11:09,000
Uh, in uh in in files.

193
00:11:09,000 --> 00:11:10,000
Right.

194
00:11:10,000 --> 00:11:17,000
You also have one beautiful mechanism which is basically called as similarity search with score.

195
00:11:17,000 --> 00:11:19,000
There are some five specific methods.

196
00:11:19,000 --> 00:11:24,000
One of them is similarity score search with score, which allows you to return not only documents,

197
00:11:24,000 --> 00:11:26,000
but also the distance score of the query to them.

198
00:11:26,000 --> 00:11:26,000
Right.

199
00:11:26,000 --> 00:11:31,000
The return distance score is L2 distance, which is also called as Manhattan distance.

200
00:11:31,000 --> 00:11:33,000
Therefore lower score is better.

201
00:11:33,000 --> 00:11:33,000
Okay.

202
00:11:33,000 --> 00:11:36,000
So this is important to understand.

203
00:11:36,000 --> 00:11:38,000
Uh, we can also use similarity search score.

204
00:11:38,000 --> 00:11:40,000
Uh search with score okay.

205
00:11:40,000 --> 00:11:45,000
So here I will just go ahead and write docs underscore and underscore score.

206
00:11:45,000 --> 00:11:53,000
And here I'm just going to go ahead and write dim sum db dot similarity search similarity search with

207
00:11:53,000 --> 00:11:53,000
score.

208
00:11:54,000 --> 00:11:58,000
And here I will just give him my query whatever query I'm actually writing.

209
00:11:58,000 --> 00:12:01,000
And let's go ahead and print this particular DB score.

210
00:12:01,000 --> 00:12:04,000
Okay docs and score.

211
00:12:04,000 --> 00:12:09,000
So once I execute it here you will be able to see that here.

212
00:12:09,000 --> 00:12:15,000
Uh, it is a distressing and with respect to every information that I get right, there will be a score

213
00:12:15,000 --> 00:12:15,000
that will be attached.

214
00:12:15,000 --> 00:12:19,000
And this is nothing but your L2 score, which is also called as Manhattan score.

215
00:12:19,000 --> 00:12:21,000
Uh, Manhattan distance.

216
00:12:21,000 --> 00:12:21,000
Okay.

217
00:12:21,000 --> 00:12:26,000
So based on that particular information, whichever is the nearest that we will be getting as the first

218
00:12:26,000 --> 00:12:27,000
context from that particular text file.

219
00:12:27,000 --> 00:12:28,000
Right.

220
00:12:28,000 --> 00:12:33,000
So here one more additional thing that you are actually getting is with respect to the square.

221
00:12:33,000 --> 00:12:33,000
Okay.

222
00:12:34,000 --> 00:12:39,000
Now you may be also thinking, Krish, can we not directly pass vectors instead of sentences?

223
00:12:39,000 --> 00:12:39,000
Yes.

224
00:12:39,000 --> 00:12:42,000
We can actually also do that or instead of any documents.

225
00:12:42,000 --> 00:12:45,000
So for that we I have to probably go ahead and make my vector.

226
00:12:45,000 --> 00:12:48,000
So I will go ahead and write embedding underscore vector.

227
00:12:48,000 --> 00:12:54,000
And then here you will be able to see embeddings dot embed underscore query.

228
00:12:55,000 --> 00:12:56,000
And here I can give my query.

229
00:12:56,000 --> 00:12:58,000
So once I give this.

230
00:12:58,000 --> 00:13:01,000
So this basically becomes my embedding vector okay.

231
00:13:01,000 --> 00:13:04,000
Based on my embedding that I have actually used.

232
00:13:04,000 --> 00:13:10,000
Once I have this particular vector then what I can do I can just go ahead and write db dot similarity

233
00:13:10,000 --> 00:13:12,000
search by vector okay.

234
00:13:12,000 --> 00:13:16,000
And here I can actually go ahead and give my embedding vectors right.

235
00:13:16,000 --> 00:13:17,000
And once I do this.

236
00:13:17,000 --> 00:13:22,000
So here also I will be able to get the docs and score.

237
00:13:23,000 --> 00:13:24,000
Okay.

238
00:13:25,000 --> 00:13:25,000
Score.

239
00:13:25,000 --> 00:13:33,000
So finally, if you go ahead and see this docs and score, sorry docs underscore score, you will be

240
00:13:33,000 --> 00:13:36,000
able to get the same information how we used to get it right.

241
00:13:36,000 --> 00:13:43,000
So here, uh, the query that has been done is with respect to your, uh, embedding vectors.

242
00:13:43,000 --> 00:13:43,000
Okay.

243
00:13:44,000 --> 00:13:47,000
Now, finally, uh, you should also know this.

244
00:13:47,000 --> 00:13:51,000
How I can probably save this vector DB vector store db in my local.

245
00:13:51,000 --> 00:13:52,000
Right.

246
00:13:52,000 --> 00:13:56,000
So here I will just go ahead and create some cells.

247
00:13:56,000 --> 00:13:57,000
Okay.

248
00:13:58,000 --> 00:14:02,000
Let me copy this and write some comments over here.

249
00:14:02,000 --> 00:14:10,000
Here we are going to basically do the saving and loading Saving and loading.

250
00:14:10,000 --> 00:14:14,000
So here let me just go ahead and write db dot save underscore local.

251
00:14:14,000 --> 00:14:17,000
So there will be a function which is called as save underscore local.

252
00:14:17,000 --> 00:14:21,000
And here I can actually use one index name okay.

253
00:14:21,000 --> 00:14:22,000
It'll be five index.

254
00:14:22,000 --> 00:14:28,000
So once I execute this you'll be able to see that uh here the file will get saved.

255
00:14:28,000 --> 00:14:30,000
It will be saved in the form of pickle.

256
00:14:30,000 --> 00:14:34,000
And here you also have something called as index dot file, some of the configuration information.

257
00:14:34,000 --> 00:14:35,000
Right.

258
00:14:35,000 --> 00:14:37,000
So this is your files underscore index folder.

259
00:14:37,000 --> 00:14:40,000
Now what you can do is that you can load this particular folder also very much easily.

260
00:14:41,000 --> 00:14:44,000
Now in order to load this folder you will go ahead and write new underscore DB.

261
00:14:44,000 --> 00:14:47,000
Let's say here I'm just going to use this files.

262
00:14:47,000 --> 00:14:51,000
And there will be a function like load local.

263
00:14:51,000 --> 00:14:56,000
I will give my uh index name that is fast index.

264
00:14:56,000 --> 00:15:00,000
And, uh, here, along with that, you know what all embeddings also we need to use.

265
00:15:00,000 --> 00:15:00,000
Right.

266
00:15:00,000 --> 00:15:03,000
So embeddings, uh, I've already defined all of my embedding.

267
00:15:03,000 --> 00:15:05,000
You can directly initialize over here.

268
00:15:05,000 --> 00:15:09,000
Now, once I execute this you'll be able to see, hey, uh, we are getting an error.

269
00:15:09,000 --> 00:15:12,000
The deserialization relies loading a pickle file.

270
00:15:12,000 --> 00:15:15,000
Pickle files can be modified to delivered a malicious payload.

271
00:15:15,000 --> 00:15:20,000
So during this point of time, you know, it is just saying, hey, something is fishy is happening

272
00:15:20,000 --> 00:15:22,000
because the reason is very simple.

273
00:15:22,000 --> 00:15:22,000
Simple.

274
00:15:22,000 --> 00:15:26,000
I'm trying to load a pickle file over there whenever you get this kind of issue.

275
00:15:26,000 --> 00:15:30,000
Before we used to not get it, but right now in the recent version of files we are able to get this.

276
00:15:30,000 --> 00:15:36,000
So what you do is that you just go ahead and use one parameter, which is called as allow dangerous

277
00:15:36,000 --> 00:15:36,000
serialization.

278
00:15:36,000 --> 00:15:37,000
Okay.

279
00:15:37,000 --> 00:15:41,000
Because you are just saying that, hey, I trust this particular file, right?

280
00:15:41,000 --> 00:15:46,000
So allow the dangerous Deserialization is equal to true and just use this.

281
00:15:46,000 --> 00:15:46,000
Okay.

282
00:15:46,000 --> 00:15:54,000
Now if I go ahead and use this docs is equal to and I will just go ahead and use my why I have written

283
00:15:54,000 --> 00:15:58,000
new underscore df file read and write new underscore DB right.

284
00:15:58,000 --> 00:16:00,000
You just go ahead and use this similarity search.

285
00:16:00,000 --> 00:16:03,000
I think it should be able to work okay.

286
00:16:03,000 --> 00:16:06,000
Again you can also do similarity search by vector or whatever things you want.

287
00:16:06,000 --> 00:16:11,000
So once you set this allowed dangerous serialization, you will be able to see the answer.

288
00:16:11,000 --> 00:16:12,000
Okay.

289
00:16:12,000 --> 00:16:15,000
So, uh, this was uh, more about Feis.

290
00:16:15,000 --> 00:16:21,000
I think we have discussed each and every thing, you know, working with Feis, how you can actually

291
00:16:21,000 --> 00:16:25,000
go ahead and see with respect to vectors, how you can do the similarity search by vectors.

292
00:16:25,000 --> 00:16:27,000
Each and every thing is discussed.

293
00:16:27,000 --> 00:16:30,000
I hope you were able to understand the specific video.

294
00:16:31,000 --> 00:16:32,000
Um, yeah, this was it.

295
00:16:32,000 --> 00:16:33,000
I will see you all in the next video.

296
00:16:33,000 --> 00:16:34,000
Thank you.

