Hello guys.
So we are going to continue our luncheon series.
And in this video and in the upcoming series of video, we are going to develop this amazing end to
end project which is chat with SQL DB.
So first of all, I will go ahead and show you the entire demo what we are going to basically do.
Uh, over here you will be able to see that you'll be able to connect with SQLite three database.
Uh, and this particular database is basically created in my local system if you really want to connect
to your SQL database.
Also you can go ahead and connect it.
Okay.
I will also show you how you can actually go ahead and connect this.
I will be using grok API key over here so that you will be able to use open source models like llama
three, gamma two, or any other models that are available or supported by grok API.
Okay, so let me quickly go ahead and show you the demo.
So first of all, I will go ahead and show you with SQLite three database student dot DB.
This is basically created in my local machine.
So first of all I will be requiring my grok API so quickly.
Let me go ahead and paste it over here.
Once I press enter here you can see how can I help you.
It is basically saying, so let's let me just go ahead and ask, uh, display all the records in the
student table.
Okay.
So once I press enter you'll be able to see that, you know, the list of records.
It starts interacting with it.
It is going to automatically create the query.
And finally I'll be able to get the entire response.
Okay.
So here you can see Krish John Mukesh Jacobs to the page.
Everybody is over here.
And the records is basically been retrieved.
Right.
And if you see over here it is first of all going to see like which all tables are present over here
then.
And this is all are exactly done by the agents.
And, uh, in long chain it is uh, there is a sequel toolkit that is provided by Langton itself.
Uh, we will also be using that.
So here you'll be able to see all the information.
Finally your query will be SQL select star from student.
This is the action.
This is the action input.
And this is the output right.
And finally we are able to get the output.
So this is through one way.
The other way is that you can also connect to your own SQL database.
And here you have to provide your SQL database connection.
So let me just go ahead and write it over here.
So let's say if I go ahead and write my SQL.
So this is uh my host, let's say the sequel is installed in my host itself.
Right.
So here I will be going and hitting this I will remove this I don't require this.
So this will be my sequel host.
And this is where my sequel is.
There.
I've installed in my local machine.
I will show you how you can probably take out this host information and all.
My sequel user is root.
I will go ahead and give my password as 12345.
Let's say my sequel databases student okay, I will go ahead and hit it over here.
And finally I will just go ahead and press enter.
Okay.
So once I press enter here, you will be able to see that, uh, if I go ahead and ask the same question,
display all the records in the student table, I will be able to get the answer.
Let me ask some other question.
Uh, display the record where the student name is.
Krish.
Okay.
I'm just going to type like this.
Let's see whether it will be able to retrieve or not.
Now it is basically hitting my, uh, SQL database over here.
So here you'll be able to see that, uh, the entire record has been displaced.
Uh, I mean, it has been displayed over here.
And what all things it basically used, it used SQL DB list tables to get the list of table in a database,
which was three databases that actually created.
If you see over here, there are three databases inside my table.
Um, one, let me just refresh this quickly.
Um mhm.
So here is search info, student and student info.
It was able to capture that.
Then it went and see saw the student table.
It contains the column name name.
And then uh it is using this uh SQL db query checker internally which is available in long chain and
found the original query was correct.
And here you can see all my responses over here.
Right.
So overall, uh, an amazing project to work with.
Uh, here, the most thing, most beautiful thing will be that we will be using Lang Chain Toolkit,
right?
So if you go ahead and write Sequel Toolkit, right.
So we will also be using this write SQL agent toolkit again, which is a uh agent type will be using
this.
I will be showing you how we can actually go ahead and set up for our entire project.
Right.
So I hope everybody understood about the problem statement, what we are trying to solve.
Um, step by step, we'll try to solve this.
And as shown in the previous video, like how the interaction happens, uh, with respect to each and
every agent and conversation basically happens with the help of toolkit.
Everything will be happening over here.
And this is how we'll be able to get the final answer along with the explanation.
Right.
So yes, uh, let us go ahead and start this particular project in the next video.
I hope you all are excited.
So I'll see you all in the next video.
Thank you.