1
00:00:00,000 --> 00:00:01,000
Hello guys.

2
00:00:01,000 --> 00:00:07,000
So we are going to continue the discussion of creating end to end generative AI projects with the help

3
00:00:07,000 --> 00:00:08,000
of Lang Shen.

4
00:00:08,000 --> 00:00:13,000
And in this video and in the upcoming series of video, we are going to develop an end to end search

5
00:00:13,000 --> 00:00:18,000
engine AI app with the help of tools and agent.

6
00:00:18,000 --> 00:00:21,000
Now this words that you will be seeing tools and agents.

7
00:00:21,000 --> 00:00:23,000
These are very important words.

8
00:00:23,000 --> 00:00:29,000
You may be thinking that this may be a simple search engine project, wherein you just ask a query to

9
00:00:29,000 --> 00:00:32,000
the LLM models and you may probably get the response.

10
00:00:32,000 --> 00:00:33,000
It is nothing like that.

11
00:00:33,000 --> 00:00:36,000
You know, what is the main intention of doing this?

12
00:00:36,000 --> 00:00:37,000
Specific projects and why?

13
00:00:37,000 --> 00:00:45,000
I really want to integrate tools and agents over here, because right now, uh, if I just consider

14
00:00:45,000 --> 00:00:51,000
the functionalities with respect to tools and agents, it's it makes your generative AI application

15
00:00:51,000 --> 00:00:55,000
amazing with respect to solving more complex problems.

16
00:00:55,000 --> 00:00:59,000
Okay, now what exactly we are going to do in this particular project.

17
00:00:59,000 --> 00:01:06,000
Let's say if a user asks any queries okay, now first of all you really need to understand what exactly

18
00:01:06,000 --> 00:01:09,000
is tools and what exactly is agents.

19
00:01:09,000 --> 00:01:11,000
Okay, first of all we'll try to understand this.

20
00:01:11,000 --> 00:01:18,000
So in order to understand this I have opened this documentation page of Langton itself.

21
00:01:18,000 --> 00:01:18,000
Right.

22
00:01:18,000 --> 00:01:26,000
So here you can see it says that tools are interfaces that acts that an agent chain or LM can use to

23
00:01:26,000 --> 00:01:28,000
interact with the world.

24
00:01:28,000 --> 00:01:32,000
They combine a few things like name of a tool, description of what the tool is.

25
00:01:32,000 --> 00:01:38,000
And all right, so what I will do, I'll just take this sentence and let me copy it over there okay.

26
00:01:39,000 --> 00:01:41,000
In my sheet okay.

27
00:01:41,000 --> 00:01:43,000
So here I have this okay.

28
00:01:43,000 --> 00:01:44,000
What are tools.

29
00:01:44,000 --> 00:01:49,000
So if you really want to see this definition you can go ahead I'll keep this, uh, notebook something

30
00:01:49,000 --> 00:01:51,000
like this where you'll be able to see it okay.

31
00:01:51,000 --> 00:01:58,000
So tools are interfaces that an agent chain or LM can use to interact with the world.

32
00:01:58,000 --> 00:02:01,000
Let's say one specific example.

33
00:02:01,000 --> 00:02:01,000
Okay.

34
00:02:01,000 --> 00:02:05,000
Let's say uh, I have an open AI, lm model.

35
00:02:05,000 --> 00:02:06,000
Right.

36
00:02:06,000 --> 00:02:14,000
So if I just consider OpenAI LLM models okay, it can be multi model also.

37
00:02:14,000 --> 00:02:20,000
So if I just consider one example of the multi model right now it is nothing but GPT four.

38
00:02:20,000 --> 00:02:21,000
Oh okay.

39
00:02:21,000 --> 00:02:26,000
Now this model if you probably go ahead and see the documentation of OpenAI.

40
00:02:26,000 --> 00:02:31,000
This model is trained till December 2023.

41
00:02:31,000 --> 00:02:32,000
Data Okay.

42
00:02:34,000 --> 00:02:35,000
Till this data.

43
00:02:35,000 --> 00:02:40,000
So whatever question you specifically ask with respect to the data that is available till December 2023,

44
00:02:40,000 --> 00:02:43,000
you will be able to get the response very much easily.

45
00:02:44,000 --> 00:02:46,000
But right now we are in this particular world.

46
00:02:46,000 --> 00:02:48,000
We also require current information.

47
00:02:48,000 --> 00:02:52,000
And there are lot of changes that are specifically happening right now.

48
00:02:52,000 --> 00:02:52,000
Right.

49
00:02:52,000 --> 00:02:56,000
With respect to the extent of, uh, let's say current news are there.

50
00:02:56,000 --> 00:02:57,000
I want the current weather.

51
00:02:57,000 --> 00:03:00,000
I may probably require new information.

52
00:03:00,000 --> 00:03:04,000
Let's say the documentation of entire OpenAI has been changed recently.

53
00:03:04,000 --> 00:03:04,000
Right.

54
00:03:04,000 --> 00:03:11,000
And I really want to or if I just consider the documentation recently an ancient documentation has completely

55
00:03:11,000 --> 00:03:11,000
changed.

56
00:03:11,000 --> 00:03:14,000
The it has come up with version one and version two.

57
00:03:14,000 --> 00:03:19,000
Right now we need to refer version two right now if I want that specific information from my generative

58
00:03:19,000 --> 00:03:23,000
AI application or from my multi-model, How can I specifically do that?

59
00:03:24,000 --> 00:03:30,000
So what we basically do over here is that here we will try to create a generative AI app in such a way

60
00:03:30,000 --> 00:03:36,000
that I will try to integrate this generative AI with multiple tools.

61
00:03:36,000 --> 00:03:38,000
Now what are these tools?

62
00:03:38,000 --> 00:03:41,000
If we just consider it, you'll be able to see this.

63
00:03:41,000 --> 00:03:47,000
These tools are interfaces that acts as an that an agent chain or LLM can use to interact with the world.

64
00:03:47,000 --> 00:03:53,000
Now, let's say one of the tool that I that Langshan actually provides, you know, so I hope everybody

65
00:03:53,000 --> 00:03:57,000
knows about this website, which is called as RCF.

66
00:03:57,000 --> 00:03:57,000
Okay.

67
00:03:58,000 --> 00:04:04,000
Now this website, whether you want any information regarding any research paper, you can specifically

68
00:04:04,000 --> 00:04:05,000
use this tool.

69
00:04:05,000 --> 00:04:07,000
And you can have a interaction.

70
00:04:07,000 --> 00:04:08,000
You can get the information.

71
00:04:08,000 --> 00:04:08,000
Okay.

72
00:04:08,000 --> 00:04:15,000
One more tool if I probably consider Wikipedia right now, you know that Wikipedia has a lot of information,

73
00:04:15,000 --> 00:04:17,000
a lot of content right now.

74
00:04:17,000 --> 00:04:21,000
I can also use Wikipedia for this particular purpose, right?

75
00:04:21,000 --> 00:04:27,000
I can probably do any kind of search with respect to Wikipedia right now.

76
00:04:27,000 --> 00:04:30,000
These are some of the tools that are already provided.

77
00:04:30,000 --> 00:04:34,000
Uh, this can be with respect to any new content, any new research that is basically happening.

78
00:04:34,000 --> 00:04:36,000
I want some information.

79
00:04:36,000 --> 00:04:38,000
Now these are two tools, right.

80
00:04:38,000 --> 00:04:41,000
And these two tools are by default provided by Liang Chen.

81
00:04:41,000 --> 00:04:45,000
You may also want to probably go ahead and create your own custom tool.

82
00:04:45,000 --> 00:04:46,000
Right.

83
00:04:46,000 --> 00:04:47,000
Own custom tool.

84
00:04:47,000 --> 00:04:52,000
Let's say, uh, one of the tool that you have actually created is one document Q&A.

85
00:04:53,000 --> 00:04:53,000
Right?

86
00:04:54,000 --> 00:04:58,000
Now here what you have is that you have a lot of documents, and you want to probably explore the content

87
00:04:58,000 --> 00:04:59,000
from this, right?

88
00:04:59,000 --> 00:05:02,000
You want to ask any question from this, you can go ahead and ask this.

89
00:05:02,000 --> 00:05:03,000
So like this.

90
00:05:03,000 --> 00:05:08,000
What we are going to do in this, that whenever we create this search engine here, we are just not

91
00:05:08,000 --> 00:05:11,000
dependent on only LM model.

92
00:05:11,000 --> 00:05:18,000
Instead, let's say if I search for anything from the LM model, I may not have that particular information

93
00:05:18,000 --> 00:05:19,000
from the LM model.

94
00:05:19,000 --> 00:05:20,000
I may not get the response from here.

95
00:05:20,000 --> 00:05:25,000
So what LM model should do is that it should go ahead and interact with these tools.

96
00:05:25,000 --> 00:05:30,000
And based on the content that I am actually trying to search, it should redirect to that specific tool

97
00:05:30,000 --> 00:05:30,000
itself.

98
00:05:30,000 --> 00:05:30,000
Right.

99
00:05:30,000 --> 00:05:33,000
So that we will be able to get the response.

100
00:05:33,000 --> 00:05:36,000
Now, if I really want to use all these tools and execute it.

101
00:05:36,000 --> 00:05:43,000
So for this we will be requiring another important component which is called as agents okay.

102
00:05:43,000 --> 00:05:45,000
Which is called as agents.

103
00:05:45,000 --> 00:05:49,000
So as I said in this module, first of all we will talk about tools.

104
00:05:49,000 --> 00:05:53,000
We will talk about agents, how to create your custom tools, how to work with the tools.

105
00:05:53,000 --> 00:06:00,000
And later on in this series of video, we will try to create an amazing end to end project, which will

106
00:06:00,000 --> 00:06:06,000
be nothing but a search engine which will have all this functionalities right?

107
00:06:07,000 --> 00:06:11,000
I hope you are quite excited and trust me, it is lovely to use this.

108
00:06:11,000 --> 00:06:17,000
And for this I'm using lang chain Chin because Lang Chin provides that entire ecosystem.

109
00:06:17,000 --> 00:06:24,000
There are also some other uh uh, libraries like, uh, I'll be showing you as we go ahead, which is

110
00:06:24,000 --> 00:06:26,000
called as Q I right here.

111
00:06:26,000 --> 00:06:28,000
Also, we'll be using multiple tools and agents.

112
00:06:28,000 --> 00:06:34,000
And the best thing about is that I'm just not going to just use this tool and execute it, but I'm also

113
00:06:34,000 --> 00:06:41,000
going to make the interaction happen between all these tools with the help of these agents.

114
00:06:41,000 --> 00:06:42,000
Right.

115
00:06:42,000 --> 00:06:46,000
I'll make sure that all the interaction should happen, and you will be able to see all this information

116
00:06:46,000 --> 00:06:48,000
that how the interaction is basically happening.

117
00:06:48,000 --> 00:06:49,000
Right.

118
00:06:49,000 --> 00:06:53,000
And this is what I'm actually going to develop in this specific project.

119
00:06:53,000 --> 00:06:54,000
Okay.

120
00:06:54,000 --> 00:06:56,000
Now let me just go back to the documentation.

121
00:06:56,000 --> 00:06:57,000
If you want to see the agents.

122
00:06:57,000 --> 00:06:58,000
What exactly is agent?

123
00:06:58,000 --> 00:07:04,000
The core idea of agent is to use a language model to choose a sequence of action to take place right

124
00:07:04,000 --> 00:07:05,000
and change.

125
00:07:05,000 --> 00:07:06,000
The sequence of action is hard coded.

126
00:07:06,000 --> 00:07:07,000
So here what we will do.

127
00:07:07,000 --> 00:07:13,000
First LM, then probably go to R save, then probably go to um, you know, uh, Wikipedia like that,

128
00:07:13,000 --> 00:07:21,000
we can actually implement it just to talk about what are the tools that are provided by, um, you know,

129
00:07:21,000 --> 00:07:22,000
Lang Chain.

130
00:07:22,000 --> 00:07:25,000
So if I just go ahead and search for this, this many tools are there, right?

131
00:07:25,000 --> 00:07:29,000
Some are paid, some are, some definitely requires an API.

132
00:07:29,000 --> 00:07:31,000
Some are completely free.

133
00:07:31,000 --> 00:07:33,000
You know, even weather map tools is also there.

134
00:07:33,000 --> 00:07:35,000
Wikipedia is there, Yahoo finance news is there.

135
00:07:35,000 --> 00:07:38,000
You can probably go and use any of this like YouTube is also there, right?

136
00:07:38,000 --> 00:07:41,000
Whatever things you specifically want, you can actually use it.

137
00:07:41,000 --> 00:07:41,000
Okay.

138
00:07:41,000 --> 00:07:44,000
And similarly if I talk about agents.

139
00:07:44,000 --> 00:07:47,000
So here you can see how we can actually create an agent type.

140
00:07:47,000 --> 00:07:48,000
Everything is given.

141
00:07:48,000 --> 00:07:51,000
And this is what we are going to do as we go ahead in the series of video.

142
00:07:51,000 --> 00:07:52,000
Right.

143
00:07:52,000 --> 00:07:52,000
right?

144
00:07:52,000 --> 00:07:58,000
Uh, but I think, uh, you got the idea with respect to the definition of tools and agents and how

145
00:07:58,000 --> 00:07:59,000
exactly it works.

146
00:07:59,000 --> 00:07:59,000
Right?

147
00:07:59,000 --> 00:08:04,000
So in my next video, I'm going to probably, first of all, go with some practical implementation with

148
00:08:04,000 --> 00:08:07,000
respect to tools, how to probably go ahead and create your tools with the help of Lang Chen.

149
00:08:07,000 --> 00:08:09,000
And then we'll also be discussing about agents.

150
00:08:09,000 --> 00:08:13,000
And finally we'll create an end to end project with respect to search engine.

151
00:08:13,000 --> 00:08:14,000
So yes, this was it for my side.

152
00:08:14,000 --> 00:08:16,000
I hope you like this particular video.

153
00:08:16,000 --> 00:08:17,000
I will see you all in the next video.

154
00:08:17,000 --> 00:08:18,000
Thank you.

