Hello guys.
So we are going to continue the discussion of creating end to end generative AI projects with the help
of Lang Shen.
And in this video and in the upcoming series of video, we are going to develop an end to end search
engine AI app with the help of tools and agent.
Now this words that you will be seeing tools and agents.
These are very important words.
You may be thinking that this may be a simple search engine project, wherein you just ask a query to
the LLM models and you may probably get the response.
It is nothing like that.
You know, what is the main intention of doing this?
Specific projects and why?
I really want to integrate tools and agents over here, because right now, uh, if I just consider
the functionalities with respect to tools and agents, it's it makes your generative AI application
amazing with respect to solving more complex problems.
Okay, now what exactly we are going to do in this particular project.
Let's say if a user asks any queries okay, now first of all you really need to understand what exactly
is tools and what exactly is agents.
Okay, first of all we'll try to understand this.
So in order to understand this I have opened this documentation page of Langton itself.
Right.
So here you can see it says that tools are interfaces that acts that an agent chain or LM can use to
interact with the world.
They combine a few things like name of a tool, description of what the tool is.
And all right, so what I will do, I'll just take this sentence and let me copy it over there okay.
In my sheet okay.
So here I have this okay.
What are tools.
So if you really want to see this definition you can go ahead I'll keep this, uh, notebook something
like this where you'll be able to see it okay.
So tools are interfaces that an agent chain or LM can use to interact with the world.
Let's say one specific example.
Okay.
Let's say uh, I have an open AI, lm model.
Right.
So if I just consider OpenAI LLM models okay, it can be multi model also.
So if I just consider one example of the multi model right now it is nothing but GPT four.
Oh okay.
Now this model if you probably go ahead and see the documentation of OpenAI.
This model is trained till December 2023.
Data Okay.
Till this data.
So whatever question you specifically ask with respect to the data that is available till December 2023,
you will be able to get the response very much easily.
But right now we are in this particular world.
We also require current information.
And there are lot of changes that are specifically happening right now.
Right.
With respect to the extent of, uh, let's say current news are there.
I want the current weather.
I may probably require new information.
Let's say the documentation of entire OpenAI has been changed recently.
Right.
And I really want to or if I just consider the documentation recently an ancient documentation has completely
changed.
The it has come up with version one and version two.
Right now we need to refer version two right now if I want that specific information from my generative
AI application or from my multi-model, How can I specifically do that?
So what we basically do over here is that here we will try to create a generative AI app in such a way
that I will try to integrate this generative AI with multiple tools.
Now what are these tools?
If we just consider it, you'll be able to see this.
These tools are interfaces that acts as an that an agent chain or LLM can use to interact with the world.
Now, let's say one of the tool that I that Langshan actually provides, you know, so I hope everybody
knows about this website, which is called as RCF.
Okay.
Now this website, whether you want any information regarding any research paper, you can specifically
use this tool.
And you can have a interaction.
You can get the information.
Okay.
One more tool if I probably consider Wikipedia right now, you know that Wikipedia has a lot of information,
a lot of content right now.
I can also use Wikipedia for this particular purpose, right?
I can probably do any kind of search with respect to Wikipedia right now.
These are some of the tools that are already provided.
Uh, this can be with respect to any new content, any new research that is basically happening.
I want some information.
Now these are two tools, right.
And these two tools are by default provided by Liang Chen.
You may also want to probably go ahead and create your own custom tool.
Right.
Own custom tool.
Let's say, uh, one of the tool that you have actually created is one document Q&A.
Right?
Now here what you have is that you have a lot of documents, and you want to probably explore the content
from this, right?
You want to ask any question from this, you can go ahead and ask this.
So like this.
What we are going to do in this, that whenever we create this search engine here, we are just not
dependent on only LM model.
Instead, let's say if I search for anything from the LM model, I may not have that particular information
from the LM model.
I may not get the response from here.
So what LM model should do is that it should go ahead and interact with these tools.
And based on the content that I am actually trying to search, it should redirect to that specific tool
itself.
Right.
So that we will be able to get the response.
Now, if I really want to use all these tools and execute it.
So for this we will be requiring another important component which is called as agents okay.
Which is called as agents.
So as I said in this module, first of all we will talk about tools.
We will talk about agents, how to create your custom tools, how to work with the tools.
And later on in this series of video, we will try to create an amazing end to end project, which will
be nothing but a search engine which will have all this functionalities right?
I hope you are quite excited and trust me, it is lovely to use this.
And for this I'm using lang chain Chin because Lang Chin provides that entire ecosystem.
There are also some other uh uh, libraries like, uh, I'll be showing you as we go ahead, which is
called as Q I right here.
Also, we'll be using multiple tools and agents.
And the best thing about is that I'm just not going to just use this tool and execute it, but I'm also
going to make the interaction happen between all these tools with the help of these agents.
Right.
I'll make sure that all the interaction should happen, and you will be able to see all this information
that how the interaction is basically happening.
Right.
And this is what I'm actually going to develop in this specific project.
Okay.
Now let me just go back to the documentation.
If you want to see the agents.
What exactly is agent?
The core idea of agent is to use a language model to choose a sequence of action to take place right
and change.
The sequence of action is hard coded.
So here what we will do.
First LM, then probably go to R save, then probably go to um, you know, uh, Wikipedia like that,
we can actually implement it just to talk about what are the tools that are provided by, um, you know,
Lang Chain.
So if I just go ahead and search for this, this many tools are there, right?
Some are paid, some are, some definitely requires an API.
Some are completely free.
You know, even weather map tools is also there.
Wikipedia is there, Yahoo finance news is there.
You can probably go and use any of this like YouTube is also there, right?
Whatever things you specifically want, you can actually use it.
Okay.
And similarly if I talk about agents.
So here you can see how we can actually create an agent type.
Everything is given.
And this is what we are going to do as we go ahead in the series of video.
Right.
right?
Uh, but I think, uh, you got the idea with respect to the definition of tools and agents and how
exactly it works.
Right?
So in my next video, I'm going to probably, first of all, go with some practical implementation with
respect to tools, how to probably go ahead and create your tools with the help of Lang Chen.
And then we'll also be discussing about agents.
And finally we'll create an end to end project with respect to search engine.
So yes, this was it for my side.
I hope you like this particular video.
I will see you all in the next video.
Thank you.