1
00:00:00,000 --> 00:00:00,000
Hello guys.

2
00:00:00,000 --> 00:00:04,000
So we are going to continue our luncheon series.

3
00:00:04,000 --> 00:00:08,000
And in this video and in the upcoming series of video, we are going to develop this amazing end to

4
00:00:08,000 --> 00:00:11,000
end project which is chat with SQL DB.

5
00:00:11,000 --> 00:00:17,000
So first of all, I will go ahead and show you the entire demo what we are going to basically do.

6
00:00:17,000 --> 00:00:21,000
Uh, over here you will be able to see that you'll be able to connect with SQLite three database.

7
00:00:21,000 --> 00:00:26,000
Uh, and this particular database is basically created in my local system if you really want to connect

8
00:00:26,000 --> 00:00:28,000
to your SQL database.

9
00:00:28,000 --> 00:00:29,000
Also you can go ahead and connect it.

10
00:00:29,000 --> 00:00:30,000
Okay.

11
00:00:30,000 --> 00:00:33,000
I will also show you how you can actually go ahead and connect this.

12
00:00:33,000 --> 00:00:37,000
I will be using grok API key over here so that you will be able to use open source models like llama

13
00:00:37,000 --> 00:00:41,000
three, gamma two, or any other models that are available or supported by grok API.

14
00:00:41,000 --> 00:00:44,000
Okay, so let me quickly go ahead and show you the demo.

15
00:00:44,000 --> 00:00:49,000
So first of all, I will go ahead and show you with SQLite three database student dot DB.

16
00:00:49,000 --> 00:00:51,000
This is basically created in my local machine.

17
00:00:51,000 --> 00:00:55,000
So first of all I will be requiring my grok API so quickly.

18
00:00:55,000 --> 00:00:57,000
Let me go ahead and paste it over here.

19
00:00:57,000 --> 00:01:01,000
Once I press enter here you can see how can I help you.

20
00:01:01,000 --> 00:01:09,000
It is basically saying, so let's let me just go ahead and ask, uh, display all the records in the

21
00:01:09,000 --> 00:01:10,000
student table.

22
00:01:10,000 --> 00:01:11,000
Okay.

23
00:01:12,000 --> 00:01:17,000
So once I press enter you'll be able to see that, you know, the list of records.

24
00:01:17,000 --> 00:01:19,000
It starts interacting with it.

25
00:01:19,000 --> 00:01:21,000
It is going to automatically create the query.

26
00:01:21,000 --> 00:01:24,000
And finally I'll be able to get the entire response.

27
00:01:24,000 --> 00:01:24,000
Okay.

28
00:01:24,000 --> 00:01:29,000
So here you can see Krish John Mukesh Jacobs to the page.

29
00:01:29,000 --> 00:01:30,000
Everybody is over here.

30
00:01:30,000 --> 00:01:33,000
And the records is basically been retrieved.

31
00:01:33,000 --> 00:01:33,000
Right.

32
00:01:33,000 --> 00:01:39,000
And if you see over here it is first of all going to see like which all tables are present over here

33
00:01:39,000 --> 00:01:39,000
then.

34
00:01:39,000 --> 00:01:42,000
And this is all are exactly done by the agents.

35
00:01:42,000 --> 00:01:48,000
And, uh, in long chain it is uh, there is a sequel toolkit that is provided by Langton itself.

36
00:01:48,000 --> 00:01:49,000
Uh, we will also be using that.

37
00:01:49,000 --> 00:01:52,000
So here you'll be able to see all the information.

38
00:01:52,000 --> 00:01:56,000
Finally your query will be SQL select star from student.

39
00:01:56,000 --> 00:01:57,000
This is the action.

40
00:01:57,000 --> 00:01:58,000
This is the action input.

41
00:01:58,000 --> 00:01:59,000
And this is the output right.

42
00:01:59,000 --> 00:02:01,000
And finally we are able to get the output.

43
00:02:01,000 --> 00:02:03,000
So this is through one way.

44
00:02:03,000 --> 00:02:07,000
The other way is that you can also connect to your own SQL database.

45
00:02:07,000 --> 00:02:10,000
And here you have to provide your SQL database connection.

46
00:02:10,000 --> 00:02:12,000
So let me just go ahead and write it over here.

47
00:02:12,000 --> 00:02:15,000
So let's say if I go ahead and write my SQL.

48
00:02:15,000 --> 00:02:22,000
So this is uh my host, let's say the sequel is installed in my host itself.

49
00:02:22,000 --> 00:02:22,000
Right.

50
00:02:22,000 --> 00:02:26,000
So here I will be going and hitting this I will remove this I don't require this.

51
00:02:26,000 --> 00:02:28,000
So this will be my sequel host.

52
00:02:28,000 --> 00:02:29,000
And this is where my sequel is.

53
00:02:29,000 --> 00:02:30,000
There.

54
00:02:30,000 --> 00:02:32,000
I've installed in my local machine.

55
00:02:32,000 --> 00:02:35,000
I will show you how you can probably take out this host information and all.

56
00:02:35,000 --> 00:02:37,000
My sequel user is root.

57
00:02:37,000 --> 00:02:40,000
I will go ahead and give my password as 12345.

58
00:02:40,000 --> 00:02:45,000
Let's say my sequel databases student okay, I will go ahead and hit it over here.

59
00:02:45,000 --> 00:02:48,000
And finally I will just go ahead and press enter.

60
00:02:48,000 --> 00:02:49,000
Okay.

61
00:02:49,000 --> 00:02:54,000
So once I press enter here, you will be able to see that, uh, if I go ahead and ask the same question,

62
00:02:54,000 --> 00:02:58,000
display all the records in the student table, I will be able to get the answer.

63
00:02:58,000 --> 00:02:59,000
Let me ask some other question.

64
00:02:59,000 --> 00:03:06,000
Uh, display the record where the student name is.

65
00:03:06,000 --> 00:03:06,000
Krish.

66
00:03:06,000 --> 00:03:07,000
Okay.

67
00:03:07,000 --> 00:03:09,000
I'm just going to type like this.

68
00:03:09,000 --> 00:03:11,000
Let's see whether it will be able to retrieve or not.

69
00:03:11,000 --> 00:03:15,000
Now it is basically hitting my, uh, SQL database over here.

70
00:03:15,000 --> 00:03:20,000
So here you'll be able to see that, uh, the entire record has been displaced.

71
00:03:20,000 --> 00:03:23,000
Uh, I mean, it has been displayed over here.

72
00:03:23,000 --> 00:03:28,000
And what all things it basically used, it used SQL DB list tables to get the list of table in a database,

73
00:03:28,000 --> 00:03:31,000
which was three databases that actually created.

74
00:03:31,000 --> 00:03:34,000
If you see over here, there are three databases inside my table.

75
00:03:34,000 --> 00:03:38,000
Um, one, let me just refresh this quickly.

76
00:03:38,000 --> 00:03:39,000
Um mhm.

77
00:03:39,000 --> 00:03:42,000
So here is search info, student and student info.

78
00:03:42,000 --> 00:03:44,000
It was able to capture that.

79
00:03:44,000 --> 00:03:46,000
Then it went and see saw the student table.

80
00:03:46,000 --> 00:03:48,000
It contains the column name name.

81
00:03:48,000 --> 00:03:55,000
And then uh it is using this uh SQL db query checker internally which is available in long chain and

82
00:03:55,000 --> 00:03:56,000
found the original query was correct.

83
00:03:56,000 --> 00:03:59,000
And here you can see all my responses over here.

84
00:03:59,000 --> 00:03:59,000
Right.

85
00:03:59,000 --> 00:04:03,000
So overall, uh, an amazing project to work with.

86
00:04:03,000 --> 00:04:08,000
Uh, here, the most thing, most beautiful thing will be that we will be using Lang Chain Toolkit,

87
00:04:08,000 --> 00:04:09,000
right?

88
00:04:09,000 --> 00:04:12,000
So if you go ahead and write Sequel Toolkit, right.

89
00:04:12,000 --> 00:04:20,000
So we will also be using this write SQL agent toolkit again, which is a uh agent type will be using

90
00:04:20,000 --> 00:04:20,000
this.

91
00:04:20,000 --> 00:04:24,000
I will be showing you how we can actually go ahead and set up for our entire project.

92
00:04:24,000 --> 00:04:24,000
Right.

93
00:04:24,000 --> 00:04:29,000
So I hope everybody understood about the problem statement, what we are trying to solve.

94
00:04:30,000 --> 00:04:32,000
Um, step by step, we'll try to solve this.

95
00:04:32,000 --> 00:04:38,000
And as shown in the previous video, like how the interaction happens, uh, with respect to each and

96
00:04:38,000 --> 00:04:42,000
every agent and conversation basically happens with the help of toolkit.

97
00:04:42,000 --> 00:04:43,000
Everything will be happening over here.

98
00:04:43,000 --> 00:04:47,000
And this is how we'll be able to get the final answer along with the explanation.

99
00:04:47,000 --> 00:04:48,000
Right.

100
00:04:48,000 --> 00:04:52,000
So yes, uh, let us go ahead and start this particular project in the next video.

101
00:04:52,000 --> 00:04:54,000
I hope you all are excited.

102
00:04:54,000 --> 00:04:55,000
So I'll see you all in the next video.

103
00:04:55,000 --> 00:04:56,000
Thank you.

