Full Transcript

·YouTLDR

Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More

30:18:04EnglishBy freeCodeCamp.orgTranscribed Jul 27, 2026
Analyze another video with Pro30-day money-back guarantee
0:00

this massive course about foundational

0:01

generative AI was originally recorded

0:04

live we've put it all together into this

0:06

one video this course offers insights

0:09

into generative models and different

0:12

Frameworks investigating the production

0:14

of text and visual material produced by

0:18

AI the course is taught by three

0:20

experienced instructors okay I think uh

0:23

we can start with the session so hello

0:25

everyone good afternoon to all uh this

0:27

is the very first session for the uh

0:29

generative AI uh from today onwards we

0:32

are going to start with a community

0:34

session of generative AI so uh yes in

0:38

today's session we'll be talking about

0:40

that what all thing we are going to

0:41

discuss uh throughout the sessions and

0:44

uh this session actually it will be

0:46

happening for uh upcoming two weeks and

0:50

uh it will be on the same time I'm going

0:52

to take the session from uh 3:00 p.m.

0:54

onwards uh maybe 3: to 5 so here in this

0:58

uh committee session we'll try to to

1:00

discuss many more thing regarding the

1:02

generative AI so we'll start from very

1:05

basic and we'll go to the advanc there

1:07

we'll try to develop different different

1:10

type of applications as well uh first of

1:12

all I will start with the theory uh so

1:15

there I will uh discuss about the

1:17

theoretical uh uh like stuff and all

1:19

that what is generative AI what is a llm

1:22

and after that I will uh like go with

1:24

the open a Lang and don't worry each and

1:27

everything I will discuss in a very

1:28

detailed way and and uh I will show you

1:31

the dashboard as well where all the

1:33

lectures and all will be uploaded and

1:35

apart from that I will uh show you the

1:38

uh like uh where you can find out all

1:40

the videos quizzes and uh assignments

1:43

and all because along with the session I

1:45

will give you the different different

1:46

assignment different different quizzes

1:48

so at least you can practice with the

1:50

concepts got it guys yes or no so are

1:53

you excited please do let me know in the

1:55

chat if you are excited

1:58

then

2:11

great so I think we going to start and

2:14

uh so first of all guys what I will uh

2:16

do I will give you the uh the detail

2:19

introduction of the course that what all

2:21

think we are going to discuss in this

2:23

committee session and uh here basically

2:26

this is our dashboard so let me share

2:29

this link with all of you so uh don't

2:31

worry my team will share the link of

2:33

this dashboard in the chat so from there

2:36

what you can do you can enroll it is

2:38

completely free you no need to pay

2:40

anything for this uh committee session

2:42

and all the lectures and all the

2:44

assignment and quizzes will be uploaded

2:46

over here don't worry I will come to the

2:48

curriculum also so here first of all let

2:51

me show you the homepage uh this is the

2:53

homepage guys uh this is the homepage of

2:55

this dashboard and there uh uh like you

2:59

can enroll in this particular dashboard

3:01

and don't worry uh each and every video

3:03

you will find out over the Inon YouTube

3:06

channel as well so all the recorded

3:08

video and all it will be available

3:10

inside the Inon YouTube channel uh

3:12

definitely this video is going to be

3:13

record after the session so this video

3:16

will be available inside the I YouTube

3:18

channel as well as uh over the dashboard

3:21

so here guys this is the dashboard I

3:22

think you got a link of the dashboard so

3:26

there you can enroll and then uh like

3:29

you can start your journey of the

3:31

generative AI so here guys uh me and buy

3:35

both are going to take this particular

3:37

session so there we are going to discuss

3:40

in depth uh about the generative AI

3:43

about the llm we'll try to discuss about

3:45

a various application various recent

3:48

model llm models and all uh we have so

3:50

many things uh to discuss about the

3:52

generative AI we have planned for the

3:54

two weeks but uh maybe uh more than 2

3:57

weeks uh we'll try to uh take if we are

4:00

not able to cover and like all the

4:02

curriculum whatever we have defined

4:04

whatever we have thought uh so

4:06

definitely we'll be extending the date

4:08

as well but yeah we will make sure that

4:10

within 2 week whatever curriculum we

4:12

have defined we'll try to complete it so

4:14

here guys are me and uh buy so if you

4:17

don't know about me guys so my name is

4:19

Sun my name is s Savita I'm working in

4:22

Aon from past three year and I have I'm

4:25

having an expertise in data science uh I

4:28

have explored U every aspect of the data

4:31

science like machine learning deep

4:33

learning and advanced deep learning like

4:36

computer vision NLP I have worked with

4:38

the mlops as well uh there I have

4:40

designed a various applications and all

4:43

got it so yeah uh you can search me

4:45

about more over the LinkedIn uh there

4:47

you will get uh you will you will get

4:49

got my profile and you will uh like uh

4:52

get each and everything in a detailed

4:54

way so here guys uh what you need to do

4:56

so first of all you need to enroll to

4:58

this particular dashboard uh you no need

5:00

to pay anything over here and if you are

5:03

going to login after login what you need

5:05

to do uh so uh you will be redirect

5:08

redirecting to this uh particular

5:10

dashboard and uh so let me show you the

5:14

dashboard first of all this is the

5:15

dashboard guys as of now there is no

5:17

such videos and all uh definitely after

5:19

the session we'll uh upload the videos

5:22

and assignment and quizzes so definitely

5:24

along with the sessions and all you can

5:27

practice so this thing is clear to all

5:29

of you yes or no have you enroll uh

5:32

through this dashboard did you get this

5:34

Dashboard please do confirm in the chat

5:36

I'm waiting for your reply please do it

5:57

guys great so I can see uh uh many

6:00

people are saying yes so definitely now

6:03

uh we can discuss about the curriculums

6:05

and all so whatever thing we are going

6:06

to discuss throughout this committee

6:08

session first of all I will give you the

6:10

detail uh like uh detail introduction of

6:13

the uh syllabus uh what all topics we

6:16

have uh we'll try to more focus on the

6:19

re recent Trends I'm not going into the

6:21

uh classical uh machine learning and the

6:23

Deep learning basically so I will focus

6:26

more Focus basically on the open Ai

6:27

langen and all so don't worry

6:29

I will give you the detail introduction

6:31

of the syllabus uh that whatever thing

6:33

we are going to discuss inside this

6:35

committee session so the first thing

6:37

what you need to do guys you need to

6:38

enroll inside this dashboard and uh

6:42

whatever like videos and all you will

6:43

get uh you will like go through and

6:46

basically you can watch it over here

6:48

itself directly now let's discuss about

6:50

the curriculum and all that what all

6:52

thing we are going to discuss and uh for

6:55

that basically I have created one PPT so

6:57

let me show you that particular p PPT uh

7:00

just a

7:10

second so here is a PPT guys can you see

7:13

this PPT yes or no please do confirm in

7:15

the chat if it is visible to all of

7:28

you

7:39

great I think uh this uh PP is visible

7:42

to all of you now guys uh we can discuss

7:45

uh that uh what will be our uh like

7:47

topics and all uh that what all thing

7:49

basically we have to discuss throughout

7:50

this committee session so here uh first

7:53

of all I will start from the generative

7:55

AI so there I will give you the detail

7:57

overview of the generative AI that what

7:59

is a generative AI uh why uh we should

8:02

use a generative AI uh what all type of

8:04

like application we can create and uh

8:07

each and everything each and every every

8:09

theoretical stuff we try to discuss

8:11

regarding the generative Ai and after

8:13

that after the generative AI I will come

8:15

to this uh large language model so just

8:18

a second let me open my uh pen as well

8:22

so I can write it down um each and

8:28

everything

8:31

yeah so here guys uh we can uh I can

8:34

write it down as well now so here the

8:36

first thing basically first I'm going to

8:38

start from the generative AI there uh

8:41

definitely I'll will be talking about

8:42

each and everything each and every

8:43

aspect of the generative AI then after

8:45

that I will come to this large language

8:48

model there I will try to discuss this

8:50

llms large language model in a very

8:52

detailed way we'll try to see the

8:54

complete history of the large language

8:56

model that what is a large language

8:58

model what types of model we have what

9:00

was the classical model and uh what is a

9:03

recent model okay so each and everything

9:05

we'll try to discuss regarding this llms

9:08

and after that after completing this uh

9:10

theoretical part theoretical of this uh

9:13

stuff and all regarding the generative

9:14

AI regarding this llms I will come to

9:17

this open AI open Ai and this lenen so

9:21

there uh we'll try to discuss in a very

9:23

detailed way that what is the open AI

9:25

what is the open AI API and inside the

9:28

open AI API we have a different

9:30

different them right so in OPI openi

9:33

itself you will find out a various model

9:35

that like openi open has created a

9:38

various model uh that different

9:40

different version of the gpts okay so it

9:42

is having some uh like a old model as

9:45

well some legacies and all and some

9:47

upcoming models so each and every model

9:49

will try to discuss I will give you the

9:50

walk through regarding those particular

9:52

model and I will discuss about the

9:54

python API python uh API uh that uh how

9:58

you can uh use utilize those particular

10:00

model by using the python getting my

10:02

point and apart from that apart from the

10:05

python API and all will try to discuss

10:07

that uh like if we are going to be uh if

10:10

we are going to use the Lenin right so

10:12

how it is different from the open AI so

10:14

at the first place I will give you the

10:16

uh detailed differences between this

10:18

open Ai and this lenen that how it is

10:20

different to each other that why this

10:22

Lenin is required then I will come to

10:24

the Lenin and then again we'll try to

10:26

create uh again basically we'll try to

10:29

Define the lenen and all uh by using the

10:31

python we'll try to uh use the lenen or

10:33

different different like a component of

10:35

the Lenin like memory chain agents and

10:38

all and yes after that I will try to

10:41

create one

10:42

application okay so here uh basically

10:45

we'll try to create one application and

10:48

with that uh definitely we'll be able to

10:50

justify the knowledge whatever actually

10:52

uh we are going to learn regarding this

10:54

llm open lenion by using uh that by

10:57

creating that particular project

10:59

and after that I will uh come to the

11:02

advanced part Advanced part like uh

11:04

Vector databases uh we'll try to discuss

11:06

about a different different Vector

11:08

databases and first of all we'll try to

11:10

discuss the need of the vector database

11:14

that why it is required what is the

11:15

meaning of the embedding uh how we can

11:18

uh like uh save the embedding how we can

11:21

retrieve that and how this a vector

11:23

database this a vector database plays an

11:26

important role whenever we are going to

11:28

create any application related to this

11:31

llms okay so there we'll try to discuss

11:34

about the vector databases and then I

11:36

will come to the some open source model

11:39

so uh first of all I will come to this

11:41

uh llama uh and I will discuss about the

11:44

Llama indexes what is the Llama index

11:46

and we have a like couple of Open Source

11:48

model which is a very very famous so

11:50

we'll try to talk about those model as

11:52

well like we have a llama to itself we

11:55

have a falcon we have a bloom there are

11:57

various model and we'll show You by

11:59

using those model how you can create uh

12:03

like a how you can create your end to

12:04

and application uh you can solve any

12:07

sort of a task just take a name don't

12:08

worry I will give you the detail

12:10

overview about the NLP and all that what

12:12

all task does exist what all task

12:14

basically we have what all task we can

12:16

solve by using this llm each and

12:18

everything we'll talk about and then

12:20

finally we'll create one more end to

12:22

endend project there we'll try to uh use

12:25

the entire knowledge uh whatever we are

12:27

going to be learn uh like this Vector

12:30

databases different different open

12:32

source model and a length CH open a

12:35

llama indexes and finally we'll try to

12:37

deploy that model by using the amops

12:40

concept so did you uh like this syllabus

12:44

yes or no please do let me know guys

12:47

please do let me know in the chat if you

12:49

like the syllabus yes or

12:54

no the agenda is clear to all of you if

12:58

you can write it down the chat I think

12:59

uh that would be

13:20

great great so I can see many yes in the

13:24

chat and many people are saying yes they

13:27

are

13:29

able to get yes don't worry we'll give

13:32

you the PPT and all each and everything

13:33

will be there in a uh resource section

13:36

so from there you can download this PP

13:38

you can download this entire thing

13:40

whatever I'm uh like I will be using

13:42

throughout the

13:43

session yes uh so fine I got a

13:46

confirmation now uh the first thing uh

13:49

many people are asking the prerequisite

13:51

what will be the prerequisite if you are

13:52

starting with this committee session so

13:55

prerequisite wise uh if you have a basic

13:58

knowledge of the Python if you have a

14:01

basic knowledge of the Python if you

14:02

know about the core python uh in a core

14:05

python actually we have uh uh like a

14:09

ifls for Loop and uh different different

14:11

type of data structure and the knowledge

14:15

of the database exception handling if

14:17

you are uh if you know about the basic

14:20

python the basics of python then

14:21

definitely you can proceed with this go

14:24

along with that if you have a like some

14:26

basic knowledge about machine learning

14:28

and deep learning so you will understand

14:31

uh the concept basically whatever uh

14:34

like we are going to teach you in a

14:36

better manner in a better way because

14:38

here I'm not going to talk about the

14:39

classical uh ml or the basics of the

14:42

deep learning like uh artificial NE

14:45

Network CNN and all definitely I will

14:47

give you the overview about the transfer

14:48

learning fine tuning and all but here uh

14:51

uh I won't talk about the neural network

14:54

and this recurr neural network lstms and

14:56

all so uh if you have a basic

14:59

understanding of machine learning and uh

15:02

deep learning so definitely you will

15:04

understand the concept in a very well

15:05

manner otherwise basic python knowledge

15:08

is fine for creating application basic

15:10

python knowledge is uh like fine okay so

15:14

you no need to worry about it uh

15:16

whatever thing actually I need to

15:17

explain you definitely I will do that uh

15:19

in the class itself and uh we'll do the

15:22

live implementation I'm not going to

15:24

show you any uh pre-written code and all

15:26

uh definitely I will write it down each

15:28

and everything in front of you only got

15:30

it so prerequisite is clear so

15:33

prerequisite nothing just a python or uh

15:35

I can write it down over here basic

15:37

knowledge basic knowledge of ML and DL

15:41

if you know this much then definitely uh

15:44

like uh you will be able to understand

15:46

each and everything in a well

15:50

manner great so yes we'll talk about the

15:53

RG approaches and all each and

15:54

everything diffusion model is there

15:56

there are some recent model in l each

15:59

and everything will talk about and you

16:00

will be capable so uh let's say if you

16:03

are working in your company or maybe you

16:05

are trying to switch into the generative

16:06

AI or maybe you are fresher in every uh

16:10

case right so this community course will

16:12

help you definitely if you if you are

16:14

going to attend every session if you are

16:16

going to learn along with me definitely

16:18

you can build anything after learning

16:21

all sort of a thing got it great so I

16:25

think uh this uh introduction is clear

16:27

to all of you now I already discussed

16:29

about uh about the dashboard and all so

16:32

uh I given you the walk through of the

16:34

dashboard so link you can find it out

16:36

inside the chat inside the chat and from

16:39

there itself you can enroll now the

16:41

syllabus is clear dashboard is clear

16:44

each and everything is fine so I think

16:47

we can start with the introduction of

16:49

generative AI generative Ai and llm

16:52

because from today's on uh from

16:54

tomorrow's onwards I I will be like move

16:56

to the Practical part and there I will

16:58

be talking about the open a how to

17:00

generate a open key how to use the open

17:03

API and uh we'll try to understand the

17:06

chat completion API functional API and

17:09

uh we'll try to understand the concept

17:11

of the token also that what is a token

17:14

uh like how many token should I use

17:17

whenever we are giving any sort of a

17:19

prompt what is a different different

17:20

prompt template and all there are lots

17:22

of thing which we need to understand so

17:23

today's session actually it will be uh

17:26

like completely introduction session and

17:29

in this particular session uh we'll talk

17:31

about the generative Ai and the history

17:33

of the large language model so guys uh

17:35

are you ready can I uh get a quick yes

17:37

in the chat if you are ready

17:45

then yeah definitely we'll talk about

17:47

the uh like use cases of the generative

17:50

and all u in today's session itself I

17:52

will like give you that uh particular

17:54

idea that where you can uh utilize this

17:57

generative AI in a real time

18:01

yes definitely this course content and

18:03

all whatever you are seeing over here

18:05

this one definitely it will be available

18:07

over the dashboard as well so this is

18:08

our dashboard we'll update it over here

18:11

inside the course syllabus section so

18:13

each and everything uh like uh we'll try

18:15

to update in the dashboard

18:18

itself here is a class timing and all

18:20

and uh I will make sure that the uh the

18:23

link also okay so uh we are not going to

18:26

uh we are directly streaming over the

18:28

YouTube so directly you can uh join

18:29

through the YouTube so for that you just

18:31

need to subscribe the channel and you

18:33

will get a notification in that

18:36

case great so people are saying yes sir

18:38

we are ready ready ready

18:52

great yeah definitely Wy we'll try to

18:54

discuss the applications and all and uh

18:57

I will explain you all the thing and

18:59

that uh specific way only don't

19:06

worry we are going to build AI

19:08

application by using the AI

19:10

tools AI based

19:18

application great so I got uh many yes

19:22

in the chat now I think uh we can start

19:25

with

19:26

a uh with the introduction of generative

19:29

Ai and the LM so guys uh first of all

19:32

tell me that how many of you you are uh

19:35

you have started with the generative Ai

19:36

and all already means uh you have

19:38

learned something at least you have

19:40

learned the basics in all uh so if you

19:42

can write down the chat so that would be

19:45

great means you are starting from very U

19:48

like a scratch or you have some sort of

19:57

idea

20:16

great so many people are saying uh so

20:20

some people are saying they know about

20:21

the basics and some people are saying uh

20:24

they're starting from the scratch don't

20:26

worry so uh basically I will start from

20:28

the scratch only now here guys uh you

20:31

can see I have created One PP for all of

20:33

you so let me uh first of all let me go

20:35

through with this particular PP and

20:37

later on what I will do I will again I

20:39

will give you the revision by using this

20:40

PP only and in between I will use my

20:43

Blackboard also for explaining you some

20:45

uh Concepts and all so here is my

20:47

Blackboard so here I will be writing

20:49

down uh the whatever basically thing I

20:53

need to explain you and in between I

20:55

will be using the ppds and all so first

20:57

of all let me go through this particular

20:59

PP and here you can see so uh I have

21:02

written some sort of a name uh so in the

21:05

generative AI whenever we are talking

21:06

about the generative AI or a large

21:08

language model so couple of name are

21:11

very famous nowadays and in in those

21:14

name actually this chat GPT is a uh like

21:16

very very famous so here I have written

21:18

this chat GPT it's a product of the open

21:21

AI as we know about this Chad GPT

21:24

everyone knows about the chat GPT yes or

21:26

no I think yes now if we talking about

21:28

this Google bar so it's a product of the

21:30

Google and we talking about this meta

21:33

llm 2 so this meta llm 2 it's a product

21:37

of the Facebook got it guys yes or no so

21:41

yes uh nowadays actually everyone using

21:44

this chat GPT Google B meta lm2 is it

21:47

it's also a platform similar to this

21:49

chat GPT uh where you can uh chat or

21:52

where you can ask a specific question

21:54

which you uh which you do in a chat GPD

21:56

itself So Meta lm2 it's a a model from

21:59

the Facebook site now here guys if we

22:02

are talking about the generative AI or

22:04

we are talking about the large language

22:06

model so in our mind the first image

22:08

which comes into the picture that is a

22:10

chat GPT Google B and meta llm 2 yes or

22:13

no tell me guys yes because of that only

22:17

uh because of this chat GPT Google B and

22:20

like the other the different like

22:22

whatever application you are seeing

22:24

nowadays right so mid journey is one of

22:26

the application or maybe Delhi uh or

22:29

different different application because

22:30

of that only I think you are learning

22:31

this uh particular uh thing this

22:34

particular course this generative AI

22:35

course yes or

22:40

no yes so but guys this generative AI is

22:44

having their own Roots it's not all

22:46

about the chat jpt Google B and some

22:48

other uh application which you are

22:50

seeing chat jpt is just a application of

22:53

this generative AI chat GPT or this

22:55

Google B is just a application of this

22:58

uh like llm large language model

23:00

basically we are using this large

23:02

language model in a back end U like

23:04

whatever application you are seeing like

23:05

chat GPT and all in the back end but

23:08

apart from this this generative Ai and

23:10

this llm is having their own Roots so

23:13

first of all what I will do I will

23:15

explain you the concept of the uh like

23:17

first of all I will uh start from the

23:20

deep learning itself means I need to

23:22

explain you few uh terms and terminology

23:24

regarding this deep learning so let me

23:26

uh back to the Blackboard so there I

23:29

will be talking about the basics of the

23:31

deep learning So within uh 5 to 10

23:33

minutes I will be discussing the types

23:34

of the neural network and all and then I

23:36

will directly move to the uh like LMS

23:40

and this uh genem so here guys uh you

23:44

can see uh what I can do I can uh draw

23:47

one box over here so this is the uh you

23:51

can think this is what this is the

23:53

neural uh uh basically if we are talking

23:55

about the okay so first of all let me

23:57

start from the deep learning itself so

24:00

uh if we talking about a deep learning

24:01

so uh we can uh divide this deep

24:05

learning into three major segments so

24:07

let me write it down over here this a

24:10

deep

24:16

learning so guys this deep learning

24:18

actually we can divide into three major

24:20

topic so the first topic actually which

24:22

is called artificial neural

24:25

network artificial neural network netork

24:28

the second topic is called convolution

24:31

neural network

24:33

CNN the third one basically which is

24:36

called recurrent neural network so we

24:39

have a three types of the neural network

24:42

and we can divide this a deep learning

24:44

into this three major section apart from

24:47

this you will find out other uh like

24:49

topics as well so let me write down

24:51

those uh thing over here so the fourth

24:53

one uh which I can write it down over

24:55

here that is a uh reinforcement learning

24:58

and uh the fifth one we generally talk

25:01

about it uh so that is what that is a

25:03

gain so this gain also it comes under

25:06

this generative AI I will talk about it

25:08

I will talk about this game I will like

25:10

give you the glimpse of this uh

25:12

generative advisal Network that what is

25:14

this and how the architectures look like

25:17

of this gains and why I'm saying that

25:19

this gains comes into the generative AI

25:22

so if we talking about thisn so let me

25:25

draw the box now so if we are talking

25:27

about this n so here guys see we have an

25:30

input layer inside this Ann actually

25:32

what we have we have a input layer and

25:35

uh you will find out the output layer

25:38

and in between actually in between this

25:40

input and output we have a hidden layers

25:42

so just a wait now over here guys see we

25:45

have a input layer and we have a output

25:48

layer now in between actually you will

25:50

find out a hidden layers various hidden

25:52

layer so let me write it down over here

25:54

input and here you'll find out the

25:56

output now here in between this input

25:59

and output you will find out of various

26:01

hidden layers so let me write it down

26:03

the hidden over here so this hidden

26:05

layer actually it is nothing it's a

26:06

hyper parameter so we can have as many

26:09

as hid layer we can have as many as node

26:11

inside the hidden layer we all know

26:13

about the artificial neural network I'm

26:15

assuming that thing now if we talking

26:18

about this uh CNN actually so the CNN is

26:21

nothing so in the CNN uh one more thing

26:23

you will find out in terms of this CNN

26:26

that is what that is a convolution we

26:28

always perform the convolution in terms

26:31

of this CNN so here if we are talking

26:33

about this enn so uh we are using the uh

26:36

like structure data where we have a like

26:39

different different features numeric

26:41

feature or categorical feature and uh we

26:43

try to solve the regression and

26:45

classification related problem but

26:47

whenever we are talking about this CNN

26:49

so here uh the CNN actually specifically

26:52

we use for the image uh related data

26:55

image or video related data you can say

26:57

that uh we use the CNN and all for the

26:59

grid type of data okay so we use the CNN

27:03

for the grid type of data and there uh

27:06

like you will find out one more

27:07

component that is what that is a

27:09

convolution so here uh let me write it

27:11

down so the component name is what

27:14

component name is a convolution so in

27:16

the convolution actually you will find

27:18

out a various step so uh we have a

27:20

various step in the convolution itself

27:22

so the very first step which we perform

27:24

what we do guys tell me we perform the

27:26

feature X section by using a different

27:29

different filter after that what we do

27:31

we perform the pooling and then we

27:34

flatten the layer so there are different

27:36

different like uh uh steps you will find

27:39

out inside the convolution itself and

27:41

after that what we do we apply the fully

27:43

connected layer so that is nothing that

27:45

is my Ann itself so over here I can

27:48

write it down we have this convolution

27:50

and we have a artificial neural network

27:52

so this is my first architecture which

27:54

is a like uh which is the Ann itself and

27:57

and this is my second one that is what

27:59

that is a CNN now if we talking about

28:01

the third one which is a very very

28:03

interesting that is called recurrent

28:05

neural network that is called recurrent

28:07

neural network so this enn we generally

28:10

use for the structured data where we

28:12

have a numerical column or categorical

28:15

column and in the Target column like it

28:18

will be a numeric or categorical one and

28:20

based on that basically we are going to

28:22

decide whether it will be a

28:24

classification problem or a regression

28:25

problem now if we talking about this CNN

28:27

so already I told you if you're talking

28:29

about this RNN so the name is what the

28:31

full form what the full form is the

28:33

recurrent neural network so this RNN

28:35

actually we are using for the sequence

28:38

related data so wherever we have a

28:39

sequence wherever we have a sequence so

28:42

this RNN we used for the sequence

28:44

related data now let me do one thing let

28:47

me draw the architecture of this RNN so

28:50

over here guys in the RNN what you will

28:51

find out so let's say this is my uh box

28:55

and here is what here is my input so

28:57

this is what guys tell me this is my

28:59

input now here is what here is my output

29:02

so let me draw the output one more time

29:05

this is what this is my output got it

29:07

now here guys see uh this is my input

29:10

this is my output and this is what this

29:13

is my hidden layer now in the hidden

29:15

layer actually you will find out one

29:17

thing one concept and the concept is

29:19

nothing the concept is called a feedback

29:21

loop okay so whatever output I'm getting

29:24

from the hidden layer actually again we

29:26

are passing that output to hidden layer

29:28

until the entire time stem so that thing

29:31

actually uh we learn or we learn in in

29:35

the RN itself actually this RNN is

29:37

nothing it's a special type of neural

29:39

network and there you will find out the

29:42

feedback loop feedback loop means what

29:44

so whatever output we are getting from

29:46

the hidden layer again we are passing

29:48

the same output to the hidden layer

29:50

until we are not going to complete the

29:52

entire time stem that is what that is

29:54

the RNN now uh you are uh we are talking

29:58

about the llm so why we are uh why I'm

30:01

discussing this RNN and all because this

30:04

llm actually somehow it is connected to

30:06

this RNN itself before starting with a

30:08

llm a large language model we'll have to

30:11

understand the concept of the RNN lstm

30:14

attention uh like encoder decoder and

30:17

then attention self attention and all so

30:19

here I'm not going to discuss in a very

30:20

detailed way I'm just giving you the

30:22

glimpse of that that what is a like RNN

30:26

what is the lstm what the Gru and then

30:28

what was the sequence to sequence

30:30

mapping and where this attention comes

30:32

into a picture then how they have

30:34

invented the self attention then how

30:36

they started the using this transfer

30:37

learning and this finetuning in terms of

30:41

this uh in terms of this large language

30:44

model why we are calling it is a large

30:45

language model why we are not calling it

30:47

a model okay so each and everything

30:49

we'll try to discuss now uh you all know

30:52

about this uh reinforcement learning and

30:54

all so in the reinforcement learning uh

30:57

you will find out one agent environment

30:59

regarding that particular agent you will

31:01

find out a different different state

31:03

getting my point and then you will find

31:05

out the feedback so that actually it

31:07

comes inside the reinforcement learning

31:09

and that is also part of the deep

31:11

learning only now if we are talking

31:13

about gain so gain is uh nothing

31:15

actually so in the gain again you will

31:17

find out a neural network uh which we

31:19

are using for generating a data and that

31:21

also comes in under inside the

31:23

generative Ai and we have a different

31:25

different types of game so first of all

31:28

tell me guys uh this uh uh like types of

31:31

the neural network this is clear to all

31:33

of you please do let me know in the chat

31:35

if uh this thing is clear then uh I will

31:37

proceed with the next

31:40

topic use cases wise I will come to the

31:43

use case and I will uh try to discuss a

31:45

different different use case I will come

31:46

to the use case then I will tell you the

31:48

applications of that and then I will

31:50

come to the domains as well then in what

31:52

all domains you can apply those use

31:54

cases so don't worry each and everything

31:56

we'll try to discuss over here

32:00

yes I will directly come to the

32:02

generative a itself but before that I

32:04

will give you the timeline don't worry

32:06

from Tomorrow onwards I'm going to be

32:07

start uh I'm going to start from the uh

32:10

like uh from the open ey itself uh like

32:13

complete practical and all so no need to

32:15

worry about it s Prasad I think you got

32:19

your

32:26

answer

32:28

I think uh this basic introduction is

32:31

clear

32:35

now yes coming to the generative only

32:37

don't

32:38

worry yeah it's going to end to end uh

32:41

we'll try to discuss end to end thing

32:42

don't worry about

32:53

it if you have any questions and all so

32:55

you can directly ping into the chat

32:57

uh so I will reply to you don't

33:21

worry okay so I think now we can proceed

33:25

so guys here uh in the uh PP itself I

33:28

was talking about the generative AI then

33:30

I given you the uh like uh uh the types

33:33

of the neural network and I just explain

33:35

you the uh like the regarding the

33:37

artificial neural network and the CNN

33:39

and this RNN so here in the generative

33:42

AI uh you'll find out that I have like

33:44

included a few slides and all so let's

33:47

try to understand a few uh thing from

33:49

here and then again we'll go back to the

33:52

uh the Blackboard and then I will try to

33:54

discuss few more concept so over here uh

33:57

we have seen the chat GPT like I was

34:00

talking about the different different

34:01

application like chat GPT Google B and

34:03

metm and all now let's talk about the

34:06

generative AI that what is a generative

34:08

AI now here you can see the definition

34:11

of the generative AI uh which I have

34:13

written over here uh that is what that a

34:15

generative AI generate new data based on

34:17

a training sample right so the name is

34:21

uh the name is self-explanatory right so

34:24

the name is explaining everything

34:25

generative AI the AI which is generating

34:28

something now what all thing we can

34:30

generate so here if we are talking about

34:31

the generative AI so you can generate

34:33

images you can generate text you can

34:35

generate audios you can generate videos

34:38

as a output you can generate anything uh

34:40

so uh this image text audio video it's

34:44

nothing it's a type of the unstructured

34:46

data and definitely it is possible by

34:48

using the generated AI we can uh

34:50

generate this type of data by using the

34:52

generative AI now if we are talking

34:55

about the generative AI so uh as I told

34:58

you that it is having their own Roots

35:01

okay so it is having their own roots and

35:03

if we are going to divide this

35:04

generative AI so we can divide into two

35:06

segment so the first segment is called

35:09

generative image model and the second

35:11

segment is called generative language

35:13

model and this llm actually it falls

35:16

into this particular segment into this

35:19

generative language

35:21

model are you getting my point yes or no

35:24

I think yes so if we talking about this

35:26

generative image model so I told you

35:28

when I I was talking about the Deep

35:30

learning uh like Ann RNN and CNN

35:33

reinforcement learning and there was a

35:35

gain so initially we were using the gain

35:38

for generating a data so let me show you

35:40

the architecture of the gain so the how

35:42

the architecture of the game looks like

35:45

so with that you will get some sort of

35:46

idea in the game we are using this uh

35:49

neural network only so let me show you

35:52

the architecture of the game so let me

35:54

search it over here over the Google game

35:57

architecture now uh here in the image uh

36:00

let me open the architecture of the game

36:04

so here guys uh just see so in the gain

36:07

actually we have two main components so

36:10

the first component is a generator this

36:12

is what this is a generator okay so uh I

36:15

think this is visible to all of you this

36:17

is what this is a generator and here you

36:19

will find out discriminator so this

36:21

generator and discriminator is nothing

36:23

it's a neural network so we are passing

36:26

this real data so here basically what we

36:28

are going to do we are going to pass a

36:30

real data and here we have a generator

36:33

which is generating some sort of a uh

36:34

like synthetic data and here we have a

36:36

discriminator based on that we are going

36:38

to discriminate between real data and

36:41

the synthetic data so this is the

36:43

architecture of the game and inside this

36:45

architecture you will find out we are

36:47

using two main thing we are using two

36:49

main component the first one is

36:51

generator and the second component is a

36:54

discriminator I think you're getting my

36:56

point and this generator and

36:57

discriminator is nothing it's a neural

37:00

network got it so this is also comes

37:03

under this generative AI so now let me

37:06

show you this generative AI now over

37:08

here I have written two points

37:09

generative image model and generative

37:11

language model so if you're talking

37:13

about generative image model so in our

37:15

previous days in our back back days

37:18

actually in our old days in 2019 18 so

37:21

this gain was very popular for

37:22

generating a data again uh this gain is

37:25

very uh like EXP uh like expensive in uh

37:28

terms of computation power and all so it

37:30

is very like very much expens uh like

37:33

expensive in terms of like uh

37:34

computation uh so over here you can see

37:37

so we were using this gain uh we were

37:40

using this gain for generating images

37:41

and all in our back days in 2018 and in

37:44

2019 and it was very very popular and we

37:47

have a different different uh variants

37:49

of the Gams if you'll find out the type

37:52

of the gain you will find out many types

37:54

now uh recently actually you will you

37:56

have find out the trend of the llm large

37:59

language model now guys here uh we are

38:03

uh we are talking about the game and

38:05

then uh this gain basically it was the

38:07

old concept it is a old concept

38:09

basically and there are different

38:10

different variants of the gain as well

38:13

now over here if we are talking about

38:14

this large language model so it become

38:16

very famous from the Transformer I will

38:18

come to the Transformer I will tell you

38:20

the complete history of the Transformer

38:21

as well now uh this image model and this

38:25

language model

38:27

but a recent days in a recent days what

38:29

I have seen in terms of this llm and all

38:32

even we can generate the images by using

38:34

this llm we got those llm basically

38:37

which is like that much powerful so by

38:39

using those particular llm we can

38:41

generate generat images as well okay so

38:45

we I will show you couple of models and

38:47

all uh regarding this uh like image

38:50

generation and definitely you will get

38:53

some sort of idea that how the uh those

38:56

part particular alms is working in terms

38:58

of image generation I can give you a

38:59

couple of example uh like Delhi so Delhi

39:02

is a example you can uh check over the

39:04

open a which is a model which is like a

39:07

uh like a famous for the image

39:09

generation now here uh if we are talking

39:11

about this image model so actually see

39:14

this image model basically it was

39:16

working for image to image Generation

39:18

image to image generation now this

39:21

generative model actually so if we are

39:23

talking about this generative model it

39:25

is working Tech uh it is working in

39:27

terms of text to image generation text

39:30

to image generation and text to text

39:32

generation so this two tasks definitely

39:35

we can perform by using this llm model

39:38

and this image to image generation

39:40

before we were doing it by using this

39:42

gain model in 2018 and in 2019 now uh as

39:47

I told you that we have those powerful

39:49

model in our recent Days by using those

39:51

particular model definitely we can

39:53

Implement image to image generation as

39:55

well that is also possible so uh

39:58

regarding that uh definitely I will show

40:00

you couple of model so we are having

40:03

four tasks here I have written it now

40:05

let me move to the next slide and let me

40:07

show you that what I have so here guys

40:09

you can see uh this cat is representing

40:12

a genitive model where you are giving a

40:14

prompt uh means where you are giving a

40:15

question and uh as a response U again as

40:19

a output basically you are getting a

40:20

response so in terms of uh see here we

40:23

are talking about generative model I'm

40:24

not talking about specifically this El M

40:27

okay so I told you this uh generative

40:30

model actually uh you can think it's a

40:32

super set this generative Ai and under

40:35

this generative AI you will find out

40:36

this llm and gang is also part of the

40:39

generative AI getting my point I think

40:42

this thing is getting clear so over here

40:44

we are talking about the generative

40:45

model so we are giving a input and we

40:47

are getting a like output now

40:50

specifically if I'm talking about

40:52

regarding this llm regarding this large

40:54

language model so this input actually

40:56

this is called input prompt and the

40:58

output actually it is called output

41:00

prompt so this cat you can imagine as a

41:03

generative model or as a llm model so

41:05

what we are passing as a input we are

41:07

passing input prompt and we are getting

41:09

as a output output prompt so this prompt

41:11

term is a very very important I think

41:14

you have heard about this uh prompt

41:16

engineering and all that uh uh like uh

41:19

prompt engineer is getting this much

41:21

that much and this prompt engineer plays

41:23

a very important role if uh we have to

41:25

design any sort of of a prompt now uh

41:27

different different types of prompt of

41:29

like zero short prompt few short prompt

41:31

few short learning and all we'll talk

41:33

about it as I will progress with the

41:35

like implementation and all in between I

41:37

will give you like idea regarding each

41:39

and everything now over here guys you

41:42

can see uh where this generative AI

41:44

exist so if you will look into the uh

41:46

look into through this particular slide

41:48

so here you will find out this

41:49

generative AI actually it lies inside

41:52

the Deep learning getting my point so

41:55

the generative AI actually it uh like

41:57

reside inside the Deep learning uh

41:59

initially only I have explained you that

42:01

uh we have a different different types

42:02

of neural network and it's a part of the

42:04

deep learning only now whether we are

42:06

going to generate an images by using the

42:08

llm or by using the gains or whether I'm

42:10

going to perform text to text generation

42:12

text to image generation or image to

42:14

text Generation by using the llm both

42:16

lies inside this generative Ai and this

42:18

generative AI is a part of the it's a

42:21

part of the tell me it's a part of the

42:23

deep learning now over here guys I have

42:26

written a couple of more slid so I will

42:29

try to explain you uh but first of all

42:31

let me give you the timeline of the llm

42:34

and then I specifically I will come to

42:36

the llm and all and I will be talking

42:38

about this discriminative Ai and the

42:40

generative AI as well so tell me guys uh

42:43

this part is clear are we going good are

42:46

you able to understand whatever I'm

42:48

explaining to all of you so if you are

42:51

getting it so please write down the chat

42:52

and you can ask me the questions as

42:55

well

43:15

if you have any uh type of Doubt or U

43:17

like if you're getting it or not getting

43:19

it whatever you can ask me in the chat

43:21

uh like chat section uh I will reply to

43:24

your questions

43:41

no reinforcement learning is not

43:42

required uh uh specifically we should

43:45

not go for the reinforcement learning

43:47

and

43:50

all yes this is a part of the uh like

43:53

this Genera way is a part of the deep

43:55

learning right

44:03

right yes llm model used in a generative

44:06

AI correct you got it uh

44:10

guys mathematical intuition so we will

44:13

talk about the mathematical intuition

44:15

and all but this uh more uh this course

44:18

this comp session is it is more focusing

44:20

on the applied side so I will create a

44:23

various application in between whatever

44:25

math iCal concept and all will be

44:27

required I will let you know that don't

44:42

worry great so I think uh people are

44:45

getting it and uh they are trying to

44:48

understand fine so whatever I have

44:49

explained you let me explain you the

44:51

like Blackboard uh and then again I will

44:54

come to this PP and we'll try to uh wrap

44:57

up the theoretical stuff and U then I

45:00

will explain you the applications and

45:01

all so over here guys see I was talking

45:04

about this Uhn CNN RNN RL and G now I

45:10

started from the generative AI itself so

45:14

I have started from the generative Ai

45:16

and I told you this generative AI is

45:18

nothing you can consider it as a super

45:21

set as a super set now inside this

45:26

generative AI you will find out many uh

45:29

like uh many uh concept many topics and

45:31

all so here uh regarding the generative

45:33

AI there is uh two main thing which you

45:35

will find out the first one is

45:38

gain gain that is a generative aders

45:42

Network the second is what

45:44

llms llms large language model now we

45:48

have a various task so here let me write

45:51

down the task as well so the task wise

45:53

so here I told you the different

45:54

different task basically so the first

45:56

task which I can write it down over here

45:58

that is a image to image Generation

46:02

image to image

46:05

generation now the second task was the

46:08

uh image to text uh text to text

46:12

generation text to text generation text

46:16

to text generation now the third task

46:19

was

46:21

the uh image to text

46:24

Generation image to text

46:28

generation and the fourth one was

46:32

the uh image to image generation sorry

46:36

uh text to text Generation image to text

46:37

and text to image generation so let me

46:39

write it down over here text to image

46:44

generation text to image

46:50

generation now if we are talking about

46:52

this image to image generation yes we

46:54

were able to do this particular thing by

46:56

using this

46:57

gain we have seen the gains now we are

47:00

talking about this text to text

47:02

generation yes it was possible by using

47:04

the lstm RNN and the uh different

47:07

different by using the different

47:08

different model as well but yeah this

47:10

text to text generation actually

47:12

nowadays you are seeing uh we are

47:14

preferring this large language model for

47:16

this text to text generation and you

47:18

this chat GPT is a biggest application

47:20

uh biggest like example for that the

47:22

chat GPD which we are seeing image to

47:24

text generation yes uh this is also

47:26

possible by using a different different

47:28

model like RNN lstm and Gru image

47:31

captioning if you have if you uh if you

47:33

have heard about this uh like image

47:35

capturing task so that is also possible

47:38

uh by using this uh like uh classical

47:40

model but yeah by using this llm also we

47:43

can perform it we can uh do it now if we

47:45

are talking about this uh text to image

47:48

generation so yes uh this type of task

47:51

nowadays it is possible by using the uh

47:54

llm so yes yes uh llm is able to do llm

47:59

is able to perform a various amount of

48:00

task uh whether it's a homogeneous or

48:03

it's a hetrogeneous now uh I was talking

48:06

about the uh llm uh sorry I was talking

48:08

about this generative AI so where it

48:10

exists so this generative AI actually it

48:12

exists uh in a u like a deep learning

48:15

itself so you can think that AI is a

48:17

superet machine learning is a subset

48:20

deep learning again is a subset of the

48:21

machine learning and this generative AI

48:23

is a subset of the deep learning because

48:25

as I already told you we have a

48:27

different different uh like other neural

48:29

network also in a uh like a deep

48:32

learning and this CNN is one of them

48:34

this a convolution neural network okay

48:37

so I think this part is clear to all of

48:39

you now let me draw the architecture uh

48:42

that where this uh generative AI exists

48:45

so you can think this is what this is my

48:47

AI this is one uh this is the like a

48:49

super set now here this is what this is

48:51

my machine learning this one now uh

48:54

inside that you will find out the uh

48:56

deep learning and inside the Deep

48:58

learning you will find out this

49:00

generative AI uh so let me take a

49:02

different color over here uh let me take

49:05

uh this color so here you will find out

49:08

the generative AI so this is what this

49:10

four circle is what this is the

49:11

generative AI got it now here uh you can

49:15

see why we are saying so why we are

49:17

saying this is a like a subset so I

49:20

think each and every explanation I have

49:21

given you over here uh you can uh prefer

49:24

this uh like a this particular slide

49:26

that why I'm saying this generative AI

49:28

is a subset of the deep learning so let

49:31

me write it down over here this is what

49:33

this is nothing this is a gen Ai and

49:35

it's a subset of the deep learning now

49:37

guys let me explain you the timeline of

49:39

the uh this llm so uh now you got it

49:42

that this uh llm is nothing it's a part

49:44

of the generative a itself this large

49:47

language model now let me talk about the

49:49

complete timeline of this large language

49:52

model so how it evaluate and uh uh I can

49:56

like talk about the complete history of

49:58

it and uh here guys you can see that

50:02

first I was talking about the RNN so as

50:05

you know that uh what is the RNN tell me

50:07

RNN is nothing it's a type of the neural

50:10

network it's a type of the neural

50:13

network so uh there basically we have a

50:15

feedback loop again we can pass the

50:17

information to our H layer now you will

50:19

find out a different different types of

50:21

RNN or some Advanced architecture in

50:24

terms of this RNN itself El the second

50:27

uh like thing which is a type of the RN

50:30

itself that is called lstm

50:33

lstm right so in the lstm actually uh if

50:37

we are talking about this lstm so here

50:39

you will find out the concept of the

50:41

cell state so in the RNN we just have a

50:43

Time stem and it is for the shortterm

50:46

memory it is for the shortterm

50:49

memory we cannot retain a longer

50:52

sentences by using this RNN it is not

50:55

not possible if our sentence is a very

50:57

very huge or it's a very very long so we

50:59

cannot retain that particular sentence

51:01

by using this RNN but if we are talking

51:04

about this lstm yes we can do it by

51:06

using this

51:08

lstm so in this lstm you will find out

51:10

the concept of the cell state so uh this

51:14

uh lstm is nothing it is for the

51:16

short-term dependency and it is for the

51:18

long-term dependency also it is for the

51:20

short like a memory short-term memory

51:23

and is for the long-term memory as well

51:25

if you look into the architecture of the

51:26

lstm so you will find out along with

51:28

this uh time stem so here we have the

51:31

time stem U like it's a hidden State

51:35

actually uh like on a different

51:38

different time stem along with that

51:40

you'll find out one cell state so it is

51:43

going to retain it is going to retain

51:45

the long-term dependency and in between

51:47

in this a time stamp in this short-term

51:50

memory and in this cell State you will

51:52

find out a connection the connection in

51:54

terms of gates so here you will find out

51:56

one connection uh like uh one gate

51:59

basically that is called forget gate so

52:02

here I can write down the forget gate

52:03

now here you will find out one more gate

52:05

actually so that is called input gate

52:08

here you are passing the input now here

52:10

you will find out one more gate over

52:13

here that is called output gate output

52:15

gate okay so we have three gates inside

52:18

the lstm for sustaining a long-term

52:21

dependency or for reminding a longterm

52:23

uh long sentences now uh you will find

52:26

out one more updated version of the lstm

52:29

so this RNN is a old thing this lstm is

52:31

also old thing now you will find out one

52:33

more updated version of the lstm that is

52:35

what that is a GRU so this Gru actually

52:38

they have invented in

52:40

2014 and they had they took the

52:42

inspiration from the lstm itself now

52:45

inside this Gru you won't find out the

52:47

concept of the cell State everything is

52:50

being done by the hidden State itself

52:53

and here basically in the gru we just

52:55

have two gate update gate sorry reset

52:59

gate and update gate and it's a uh Advan

53:02

or you can say it's a updation on top of

53:05

this lstm it's a updated version of the

53:07

uh like lstm itself now what is the full

53:09

form of the gru G and recurrent unit now

53:12

over here guys see this was the three

53:14

architecture which was very very famous

53:16

during 2018 and 19 in our old days now

53:20

here see uh one concept comes into the

53:23

picture if we are talking about this RNN

53:25

lstm and Gru so by using this particular

53:28

architecture what we are doing so by

53:30

using this particular architecture we

53:32

are going to process a sequence data yes

53:35

or no we are going to process a sequence

53:38

data now here one concept comes into a

53:41

picture sequence to sequence mapping and

53:44

for that only we are using this

53:46

particular architecture so we have a

53:48

different different type of uh like a

53:50

mapping technique so let me write it

53:51

down over here uh different different

53:53

type of mapping technique

56:09

uh now it is fine uh I think I'm audible

56:12

to everyone

56:15

now now I am audible guys please do

56:19

confirm in the chat I think there were

56:22

the issue from the mic side

56:29

now I'm audible so please do confirm in

56:31

the chat if I'm audible then and uh is

56:34

there any Eco or uh what

56:37

so guys are you facing any Eco in my

56:44

voice now it is

56:53

fine yeah it is perfect I

57:02

think great fine fine fine uh it's

57:23

clear great uh I think now I am audible

57:27

to everyone sorry I think there was a

57:30

issue from

57:40

the do let me know in the chat uh from

57:43

where I lost my

57:45

voice so this concept is clear this one

57:48

to many or one to one one to many many

57:51

to one many to

57:53

many

57:55

[Music]

58:10

yeah so I think uh I was there RNN lstm

58:14

and Gru now I think it is fine I'm

58:16

audible to everyone great so I was

58:18

talking about RNN lstm Gru and then U I

58:22

talked about the different different

58:23

mapping sequen

58:25

now uh this mapping sequences actually

58:28

we can Implement by using this uh RNN

58:32

lstm and

58:33

Gru so over here uh yes so 1 to 1 one to

58:38

many many to one many to many RN and LSM

58:41

and Gru this was the sequences actually

58:43

I was talking about now in 2014 actually

58:46

see this was the sequences by uh we can

58:49

Implement by using this different

58:50

different models getting my point now

58:53

over here uh if we talking about this

58:56

particular sequences definitely we can

58:58

uh like uh per we can uh create a

59:01

various uh application by using this

59:03

model but here basically we are having

59:07

some sort of a restriction uh as I told

59:09

you the different different application

59:11

like one to many many to one so many to

59:14

one means uh you can think that

59:16

sentiment analysis one to one to many

59:18

means what one to many you can say image

59:20

capturing many to many image uh sorry uh

59:23

language translation so there are

59:25

various application of the sequences now

59:27

see uh we are talking about the

59:30

sequences uh the sequence to sequence

59:32

mapping now uh we can definitely

59:34

implement it by using this particular

59:37

architecture so the problem we were

59:39

having the problem was actually uh we

59:43

cannot see let's say we are giving an

59:45

input in the input actually we have a

59:48

five words so whatever output we'll be

59:51

getting in the output also we should

59:53

have a five words

59:55

so it's a fixed length input and

59:57

output getting my point what I'm saying

1:00:00

so by using this particular mapping 1 to

1:00:03

one many to one or like many to many

1:00:06

specifically we are talking about many

1:00:07

to many so there was some problem there

1:00:09

was some issue the issue was fixed

1:00:12

length input and output so whatever

1:00:14

number of inputs we are passing in terms

1:00:17

of this many too many I'm talking about

1:00:19

okay so whatever number of inputs we are

1:00:22

passing so those many output on we can

1:00:25

get it over here in the output itself so

1:00:28

uh here actually one a research paper

1:00:31

came into the picture in 2014 you can

1:00:34

search about uh the research paper

1:00:36

sequence to sequence learning so inside

1:00:40

that uh paper they have introduced the

1:00:42

concept of the encoder and decoder in

1:00:44

the encoder and decoder actually the one

1:00:47

segment the one segment was the encoder

1:00:50

segment segment so let me uh draw it

1:00:52

over here so the one segment was the

1:00:54

encoder segment and the another segment

1:00:57

was the decoder segment this another

1:00:59

segment was the decoder segment and in

1:01:02

between actually in between we were

1:01:05

having in between actually we are having

1:01:08

the context Vector so here uh in between

1:01:12

this encoder so we are having the

1:01:14

encoder and we are having the decoder

1:01:19

decoder one part was the encoder and one

1:01:22

part was the decoder and in between we

1:01:24

having the context Vector means whatever

1:01:27

information was there whatever

1:01:29

information was there from encoder to

1:01:31

decoder we are passing through this

1:01:34

context Vector means we are wrapping all

1:01:36

the information in this context vector

1:01:38

and we are passing to the

1:01:40

decoder that actually the paper uh has

1:01:43

been published in 2014 you can search

1:01:45

about it you can search over the Google

1:01:47

sequence to sequence learning so let me

1:01:49

uh search in front of you only now over

1:01:52

here I can write it down sequence to to

1:01:55

sequence

1:01:58

learning research paper now uh over here

1:02:02

guys you will find out this uh

1:02:03

particular research paper now just try

1:02:05

to read this paper now here in this

1:02:08

particular paper they have clarify the

1:02:10

issue that what was the issue with the

1:02:12

classical mapping so that was restricted

1:02:15

to the input and output now over here

1:02:18

you if you will read this particular

1:02:19

research paper so easily you can find it

1:02:22

out the issue here itself in the

1:02:24

like introduction itself they have

1:02:26

mentioned they have mentioned this uh

1:02:28

despite their flexibility and power can

1:02:30

only be applied problem who inputs and

1:02:32

targets can be sensibly encoded with the

1:02:34

vector of fixed dimensionality it was

1:02:37

just for the fixed dimensionality and

1:02:39

basically there was we were having a

1:02:41

limitations so for solving that

1:02:43

particular limitation this a sequence to

1:02:45

sequence learning paper came into the

1:02:47

picture and there was three person Ilia

1:02:49

sasar and orol and this there was one

1:02:53

more person and this paper from the

1:02:55

Google side now here guys uh let me open

1:02:58

this uh Blackboard again so there was a

1:03:01

context Vector but this uh encoder and

1:03:03

decoder also was not able to uh perform

1:03:06

well for the long uh longer sentences so

1:03:10

here in the research basically they have

1:03:12

proved if my sentence is going uh is

1:03:15

going uh like above from 30 to 50 words

1:03:18

right if it is longer than 30 to 50

1:03:20

words so in that case it was not able to

1:03:23

sustain the context it was not able to

1:03:26

sustain the context if we are using this

1:03:29

encoder decoder architecture now you

1:03:31

will ask me sun what we were having

1:03:32

inside the encoder and decoder so we are

1:03:35

talking about the encoder so again here

1:03:36

we were using the either RNN lstm or uh

1:03:42

lstm and we were using this Gru and here

1:03:46

also in the decoder also we are using

1:03:48

this rnl we are using the lstm and we

1:03:51

were using this

1:03:53

Gru got

1:03:55

it I think you got the problem now and

1:03:58

you got to know about the encoder and

1:03:59

decoder so we have started from the RNN

1:04:02

then now we came to the lsdm Gru and

1:04:05

then we have a different different

1:04:06

mapping and for solving this particular

1:04:08

issue which is related to this many to

1:04:10

many uh like uh mapping many to many

1:04:13

sequence mapping and this uh uh this

1:04:16

language translation is one of the

1:04:17

example if you will search over the

1:04:19

Google translate uh just search over

1:04:22

there anything let's say in the in H you

1:04:24

are saying that or whatsoever so it will

1:04:28

generate output so this input word and

1:04:30

output word will would be a mismatch but

1:04:33

that was a restriction with this uh like

1:04:35

with the classical mapping so for using

1:04:38

this encoder and decoder architecture we

1:04:40

can solve that particular problem now

1:04:42

here also we are having the issue that

1:04:44

we cannot proceed a longer

1:04:47

sentences we cannot proceed a longer

1:04:50

sentences so here One More Concept comes

1:04:53

into a picture inside this context

1:04:55

itself and that was the

1:05:00

attention that was the attention so uh

1:05:04

here neural translation

1:05:10

with just a second let me search about

1:05:14

the neural trans TR a NS relation with

1:05:20

attention yes this was the paper and uh

1:05:24

this was the first paper let me search

1:05:27

about the research paper yeah now guys

1:05:31

uh this was the paper in this particular

1:05:33

paper they have introduced the concept

1:05:34

of the attention and just try to

1:05:37

download it you need to download this

1:05:39

particular paper and uh then you can see

1:05:44

there so just a second let me show you

1:05:47

this paper as well and this is the main

1:05:50

uh like main papers uh basically which

1:05:52

you will find out uh while you will be

1:05:54

learning this deep learning and all so

1:05:56

this paper actually this has been

1:05:58

introduced in

1:05:59

2015 I think in 2015 or 16 now here they

1:06:02

have introduced the concept of the uh

1:06:05

attention actually so just try to read

1:06:07

uh this particular paper at least try to

1:06:09

read the introduction of it uh there we

1:06:12

have uh there they have defined that uh

1:06:14

what was a problem with the encoder and

1:06:16

decoder and where this attention comes

1:06:18

into the picture and what is the actual

1:06:20

meaning of the attention they have

1:06:21

introduced each and everything over here

1:06:24

inside this particular paper inside this

1:06:26

particular paper they have introduced

1:06:28

each and everything regarding the

1:06:29

attention see this is the architecture

1:06:31

of the attention model and uh before

1:06:33

going through with any blog any website

1:06:35

or any tutorial try to uh go through

1:06:37

with the research paper and try to

1:06:39

understand the motive of that research

1:06:41

paper now see guys uh here I'm not going

1:06:44

into the detail of the attention because

1:06:47

this attention itself uh is a longer

1:06:49

topic but I can uh like give you the

1:06:51

glimpse of that that uh uh what what

1:06:54

they were doing in the attention so they

1:06:56

were mapping so let's say we have a five

1:06:58

words in the sentence so they were

1:06:59

trying to map each word whatever word we

1:07:02

have a input we were trying to match

1:07:04

each each input word with the output

1:07:06

word means this input and output this

1:07:10

encoder and decoder if we are talking

1:07:11

about this decoder actually so this is

1:07:13

having the uh information each and every

1:07:15

information of the Hidden State whatever

1:07:18

like in the encoder like you will find

1:07:19

out this RNN lstm or whether it's a GRU

1:07:23

so uh we have a hidden State actually

1:07:25

right so uh this decoder part is having

1:07:28

the information regarding those

1:07:30

particular hidden State all the hidden

1:07:32

State and because of that it was able to

1:07:35

uh it was able to predict so whatever

1:07:38

like sentence and whatever words or

1:07:40

longer sentences or like U like uh the

1:07:43

longer sentences and all which uh

1:07:46

whatever basically we were passing it

1:07:47

was able to predict okay so this word is

1:07:49

related to that particular sentence so

1:07:51

what I will do I will create a like a

1:07:53

one dedicated video on top of it there I

1:07:55

will try to discuss uh this attention

1:07:57

mechanism but yeah here I'm just giving

1:07:59

you the timeline U and with that um you

1:08:02

can clearly understand so uh here we

1:08:05

were having the attention mechanism now

1:08:07

guys by using this attention mechanism

1:08:10

by using this attention mechanism in

1:08:12

2018 Google again Google published one

1:08:16

research paper and the research paper

1:08:18

name was

1:08:22

attention about this encoder in the

1:08:25

encoder and this decoder we were using

1:08:29

what we were using guys tell me we were

1:08:30

using this LSM either we are using the

1:08:33

lstm RNN or maybe Gru now uh there also

1:08:39

we are having the lstm maybe RNN or

1:08:42

maybe you are having the Gru and uh if

1:08:45

we are talking about the attention so

1:08:46

whatever uh information we are passing

1:08:48

from here to here so you are having the

1:08:50

context Vector context Vector now on top

1:08:53

of that we are having the attention

1:08:55

layer attention layer and it was nothing

1:08:58

it was just a mapping from input words

1:09:01

to out output word now here actually

1:09:05

they have published one paper in 2018

1:09:08

and the paper name was attention all

1:09:11

your need attention all your need now

1:09:16

this paper actually it was a

1:09:17

breakthrough in the NLP history this

1:09:20

paper has been published in

1:09:22

2018 and here

1:09:27

actually

1:09:29

decoder but there is one uh there is one

1:09:32

thing basically in terms of this encod

1:09:34

and decoder you won't be able to find

1:09:36

out this lstm RNN and Gru they are not

1:09:38

using any RNN cell any lstm cell or any

1:09:41

Gru cell so here actually they were

1:09:44

using something else and here the what

1:09:47

is a uh name of the research paper so

1:09:49

they were saying that attention all your

1:09:51

need only attention is required for

1:09:54

generating us let's say we are passing

1:09:56

any sort of an input means any longer

1:09:58

input so from that particular input only

1:10:01

attention is required for generating

1:10:03

output now how let me show you

1:10:09

that this Transformer architecture or

1:10:12

let me show you the attention all your

1:10:14

need research paper so attention all

1:10:17

your need research paper so guys this is

1:10:22

a very uh prestigious paper in our NLP

1:10:24

history and uh this changed the complete

1:10:27

history of the NLP and whatever llm and

1:10:29

all whatever you are seeing like

1:10:31

nowadays so they have used this

1:10:35

Transformer architecture as a base model

1:10:37

I will come to that and there I will try

1:10:39

to uh discuss that uh what is the

1:10:41

encoder and decoder again I'm not going

1:10:43

into the depth of the mathematics but

1:10:45

yeah definitely I will try to give you

1:10:47

some sort of a glimpse so over here uh

1:10:49

let me zoom in first of all this paper

1:10:53

and and here guys the paper name was

1:10:55

attention is all your need so this was

1:10:58

the researcher asish Nome Nikki Jacob

1:11:01

you can uh search about these particular

1:11:03

people and here is the abstract uh you

1:11:06

can see and this is the introduction at

1:11:08

least try to read the introduction try

1:11:10

to read this particular background and

1:11:12

the model architecture so this was the

1:11:14

model architecture which has been

1:11:16

introduced by the uh by the Google

1:11:18

researcher and the architecture

1:11:20

basically which you will find out inside

1:11:22

this research paper I think everywhere

1:11:24

you will find out this uh this

1:11:26

particular architecture in uh whatever

1:11:28

NLP tutorial or if you are going to

1:11:30

understand the attention mechanism and

1:11:32

all so this is the architecture now in

1:11:34

this particular architecture let's try

1:11:36

to understand that what all things we

1:11:38

have so see first of all we have a

1:11:41

input okay try try to understand try to

1:11:44

focus over here so we have a input over

1:11:46

here then we have a input embedding so

1:11:48

this is my first thing input and this is

1:11:50

what this is the input embedding the

1:11:52

third thing which we have that is a

1:11:53

positional encoding getting my point and

1:11:56

then after that you will find out the

1:11:58

multi-headed attention then we have a

1:12:00

normal uh normalization and all and then

1:12:02

we have a feed forward Network now guys

1:12:06

just tell me this is what this is a

1:12:07

encoder part this is what this is a

1:12:09

encoder part and this is what guys this

1:12:11

is this is a decoder part this is the

1:12:14

decoder part got it getting my point so

1:12:17

here also we have a two segment first

1:12:19

was the encoder and the second was the

1:12:21

decoder but here we are not using any

1:12:23

RNN cell lstm cell or maybe Gru cell

1:12:27

here actually we are using something

1:12:28

else some other concept and the concept

1:12:31

actually I think this is not a new thing

1:12:32

for you this embedding and all uh this

1:12:35

embedding attention already I talked

1:12:37

about the attention that what it is

1:12:39

mathematically it is having a like uh

1:12:41

like a some different explanation but

1:12:43

yeah I think you got to know the idea

1:12:45

now here we have a feed forward neural

1:12:47

network you know like what is a like

1:12:49

artificial neural network what is a feed

1:12:51

forward neural network so it's not a

1:12:52

like a new thing for all of you and by

1:12:55

assembling all those thing they have

1:12:57

created one cell one architecture and

1:13:00

the name is called this uh Transformer

1:13:04

so this architecture itself is called a

1:13:06

Transformer what is this guys tell me

1:13:08

this is a Transformer now here guys just

1:13:10

see uh this uh Transformer if we are

1:13:13

talking about this Transformer and all

1:13:16

so let me uh tell you few things

1:13:18

regarding this Transformer uh so first

1:13:20

of all guys this is a uh fast compared

1:13:23

to the classical architecture if we are

1:13:25

talking about this RNN lstm and all so

1:13:28

there we are passing the input based on

1:13:30

a Time stem based on a Time stem but if

1:13:34

we are talking about this Transformer

1:13:35

guys so here what is the importance or

1:13:38

what is the like plus point which we

1:13:40

have inside the Transformer it is a

1:13:41

faster why because we can pass the input

1:13:44

in a parallel manner we can pass all the

1:13:47

inputs all the tokens in a parallel

1:13:49

manner in a parall actually we can pass

1:13:52

the input now over here see we have a

1:13:54

input embedding we are doing an

1:13:55

embedding over here and then we have a

1:13:57

positional encoding means we are

1:13:59

arranging a sequence sequence of the

1:14:01

sentence then we have a multi-headed

1:14:03

attention again we are trying to uh

1:14:05

figure out the uh meaning see let's say

1:14:08

uh the sentence is what I am Sunny now

1:14:12

uh here it is trying to find out the

1:14:14

relation I with M and sunny is trying to

1:14:16

find out the relation M with uh this I

1:14:19

and sunny it's time to find out a

1:14:21

relation this sunny uh and this m and

1:14:24

this I so it is trying to find out a

1:14:26

relation with each and every word so it

1:14:28

is doing the same thing inside the

1:14:29

multi-headed attention then you will

1:14:31

find out this feed forward Network

1:14:33

neural network actually and yes uh this

1:14:36

is what this is my encoder part as I

1:14:38

told you this is what this is my encoder

1:14:40

part now if you will look into the

1:14:42

decoder side so again we have a same

1:14:44

thing so here we have a outputed output

1:14:46

embedding means in uh uh like whatever

1:14:49

uh like a sequence uh in whatever like U

1:14:52

am format I want output so that is uh

1:14:56

this particular thing this output Ting

1:14:58

and then again we have a like

1:14:59

multi-headed attention and we are

1:15:01

passing this thing uh to the next one to

1:15:03

the next layer and again we have a feed

1:15:05

forward neural network over here on top

1:15:07

of this you will find out the soft Max

1:15:09

and finally we are getting a output

1:15:11

output probability so don't worry I will

1:15:13

try to discuss this Transformer

1:15:15

architecture mathematically in a

1:15:17

detailed way in some other video but as

1:15:19

of now I'm just giving you the GL

1:15:20

Glimpse because whatever llms we are

1:15:22

going to discuss

1:15:25

okay as a base architecture they are

1:15:27

using this

1:15:29

Transformer so guys until here

1:15:31

everything is fine everything is clear

1:15:33

please do let me know in the chat yes or

1:15:47

no yes you can uh let me know in the

1:15:49

chat uh then I will proceed with the pp

1:15:51

and all and uh we'll try to wrap up the

1:15:54

uh introduction of this llm and all and

1:15:57

in tomorrow's session we'll try to talk

1:15:58

about the open a and we'll discuss about

1:16:01

the open API and all and a different

1:16:03

different models of the

1:16:07

openi any doubt anything so if you have

1:16:09

any sort of a doubt please do let me

1:16:11

know guys please do let me know in the

1:16:12

chat uh I will try to clarify that uh

1:16:15

those doubt and

1:16:22

uh

1:16:24

so did you get a timeline timeline of

1:16:26

the llm I will come to the llm now the

1:16:28

specific word and

1:16:32

uh after deep learning an NLP what is

1:16:35

the topic uh for generative AI please

1:16:38

give up uh so after the Deep learning

1:16:42

and see after the Transformer actually

1:16:44

by using this particular Transformer

1:16:46

people has created a different different

1:16:47

llms and all large language model now I

1:16:49

will come to that by using the slide I

1:16:51

will try to show you that

1:16:53

I think this

1:16:57

is pry much clear now let me go back to

1:17:00

this uh uh notes and here you can see so

1:17:05

I started from the deep learning then

1:17:07

generative VI and all then you got to

1:17:09

know that where generative a lies then

1:17:11

Alm Gru different different mapping

1:17:13

encoder decoder attention and finally

1:17:16

attention all your need now let's try to

1:17:19

understand uh like rest of the thing by

1:17:20

using the slide so here guys uh one more

1:17:23

thing I think we were uh trying to

1:17:26

understand this particular part where

1:17:28

this generative AI exists and I hope you

1:17:30

got a clearcut idea now let me go back

1:17:33

to the uh let me like come to the next

1:17:35

slide so in this slide you can see uh

1:17:37

I'm talking about the generative versus

1:17:39

discriminative model so what is the

1:17:41

difference between this generative and

1:17:42

discriminative model so we are talking

1:17:44

about this discriminative model so

1:17:46

whatever you have learned so far in a

1:17:48

classical machine learning and deep

1:17:50

learning so uh let's say uh I'm I'm

1:17:53

talking about this uh any classification

1:17:55

based model let's say I'm talking about

1:17:57

this uh RNN so here actually see uh you

1:18:01

are training your model on a specific

1:18:02

data so this is your data this is your

1:18:04

input and here is your output what you

1:18:06

are doing guys tell me you are

1:18:07

performing a supervised learning you are

1:18:10

performing a supervised learning by

1:18:11

using this recurrent neural network

1:18:14

there is a classical model or we have

1:18:16

like other classical model and all you

1:18:18

can use any uh uh like a machine

1:18:20

learning based model as well like na

1:18:22

buers and uh different different

1:18:24

variants of the nap bias or maybe some

1:18:26

other model you can uh use that

1:18:28

particular model also uh so over here we

1:18:31

have a model and we are going to train

1:18:33

this model by using the supervis machine

1:18:35

learning there we are going to pass a

1:18:37

specific type of data to this particular

1:18:39

model and here we have a different

1:18:41

different output like a rock this music

1:18:44

is belong to the rock music classical

1:18:45

music or maybe ranting so here we are

1:18:49

passing this uh like music to my model

1:18:51

and finally it is going to predict

1:18:53

something like that this is a

1:18:54

descriptive model now if we are talking

1:18:56

about a generative model so this is a

1:18:59

little different compared to this

1:19:01

discriminative model how it is different

1:19:04

uh compared to this discriminative model

1:19:05

so here guys see we are training this

1:19:08

see first of all the if we are talking

1:19:11

about the generative model if we talking

1:19:13

about the generative model so the

1:19:14

training process is a little different

1:19:16

if we are talking about the large

1:19:18

language model if we are talking about

1:19:20

the llms so uh the proc of training this

1:19:24

llms is a little different compared to

1:19:27

this discriminative model now over here

1:19:29

we are talking this discri this

1:19:30

generative model basically so we are

1:19:32

passing the input to this generative

1:19:34

model and we are getting an output how

1:19:37

how so here basically we have a

1:19:39

different different step for Gen for

1:19:41

like training this generative models so

1:19:44

gain wise I already told you that what

1:19:45

is a like process if you want to like

1:19:47

train uh any gain model if we are

1:19:49

talking about llm large language model

1:19:52

so at the first first place there will

1:19:53

be unsupervised learning unsupervised

1:19:55

learning then at the second place we'll

1:19:57

be having a supervised fine-tuning and

1:20:00

at the third place uh basically we have

1:20:02

a reinforcement learning reinforcement

1:20:04

learning they have recently used inside

1:20:06

the chat uh in the GPD model itself uh

1:20:09

which we are using for the chat GPD but

1:20:11

before that whatever llm model they have

1:20:13

created they have created they have

1:20:15

trained on a large amount of data so for

1:20:17

that first they have performed the

1:20:19

unsupervised learning and then they have

1:20:20

performed the supervised fine tuning

1:20:23

so because of that that model were able

1:20:25

to understand each and every pattern

1:20:27

which was there inside the data and

1:20:29

because of that it was able to generate

1:20:31

the output so this generative model is

1:20:34

nothing in that basically we have a data

1:20:37

on top of that particular data we are

1:20:38

training a model and for that we have a

1:20:41

various step and uh basically then only

1:20:44

we are going to do a prediction so what

1:20:46

it is giving me as a prediction so

1:20:47

whatever input we are passing so that

1:20:49

input it is taking and finally it is

1:20:51

generating uh the output related to that

1:20:54

particular input means it is generating

1:20:56

a new

1:20:58

data getting my point I think this part

1:21:01

is clear to all of you how this

1:21:03

generative model is different from this

1:21:05

discriminative model discrimin model is

1:21:07

a classical model like supervised

1:21:08

learning uh we are performing The

1:21:09

supervis Learning now right so here we

1:21:12

are having the RNN and we are passing a

1:21:14

data and all and we are trying to train

1:21:15

it generative model various step we have

1:21:19

like for the training and all and it is

1:21:21

responsible for generating a new new

1:21:22

data that's it so I hope guys this uh

1:21:25

thing is clear to all of you now I have

1:21:27

kept couple of more slide regarding uh

1:21:30

this particular concept just try to note

1:21:32

down the uh the headings and all and try

1:21:34

to remind uh this particular thing this

1:21:37

discriminative versus generative model

1:21:38

and all now here uh the same thing

1:21:41

unsupervised supervised learning which

1:21:43

is related to this uh discr model got it

1:21:46

and here uh you can see uh this is the

1:21:49

generative like model so in the

1:21:51

generative model what we do first we

1:21:53

perform the unsupervised learning we are

1:21:54

doing a grouping and all and then we

1:21:56

discri we perform the supervised

1:21:58

finetuning supervised learning so that

1:22:00

is a like process for training a uh like

1:22:04

any sort of a llm model which comes

1:22:06

under inside the generative AI itself

1:22:08

and again wise I already talked about it

1:22:11

now here actually uh we're going to talk

1:22:13

about this uh llm so let me give you the

1:22:17

quick idea about this llm and all that

1:22:19

is what that is a large language model

1:22:21

so for that all Al I have created one

1:22:23

slide and there specifically I kept the

1:22:26

thing related to this uh llms only so

1:22:30

let me start from the very first slide

1:22:32

uh let me give you the overview and uh

1:22:35

from tomorrow uh actually in tomorrow

1:22:37

session I will give you the detail uh

1:22:39

like overview uh with respect to

1:22:41

different different models and all

1:22:42

whatever we have as of now just a quick

1:22:45

introduction now what is the llm so llm

1:22:48

is nothing it's a model it's a large

1:22:50

language model which is trained uh like

1:22:52

U it's a large deep uh it's a large

1:22:55

language model which has been trained or

1:22:57

a huge amount of data and it is behaving

1:23:00

like it is generating something right so

1:23:03

actually by using this uh llm we can

1:23:05

generate any uh like a sort of a data

1:23:08

like Text data or maybe image data and

1:23:11

that is a like uh that is a advantage or

1:23:14

that is a like uh uh one uh very uh like

1:23:18

a very famous uh thing regarding this

1:23:20

llm and all now if we are talking about

1:23:22

this why this is called llm why this is

1:23:24

called large language model so here guys

1:23:27

if we are talking about this large

1:23:29

language model so because of the size

1:23:31

and the complexity so here specifically

1:23:34

I have mentioned regarding this large

1:23:36

language model regarding this llm why

1:23:39

this is called this uh this large

1:23:40

language model so here because of the

1:23:42

size and because of the complexity of

1:23:45

the neural network uh neural network

1:23:49

neural network as well as the size of

1:23:50

the data set uh which has has been uh

1:23:53

which is trained on actually this is

1:23:55

trained on the huge amounts of data

1:23:57

because of that only actually it is

1:23:59

called a large language model so here uh

1:24:02

if we are talking about this uh L large

1:24:04

language model so uh actually before we

1:24:08

were not having the huge amount of data

1:24:11

so uh recently actually uh you know uh

1:24:13

this uh data generation and all uh Big

1:24:16

Data actually came into the picture and

1:24:18

this companies and all generated a huge

1:24:20

amount of data and this Google also

1:24:22

Google Facebook and the other companies

1:24:24

is having a huge amount of data so uh

1:24:27

they uh they are able to like find uh

1:24:30

means uh actually they have uh gathered

1:24:33

that particular data and on top of that

1:24:35

data they have uh like as I told you

1:24:37

they have performed the unsupervised

1:24:38

learning and all and they have

1:24:40

categorized a data and they have

1:24:41

provided to a different different model

1:24:43

which U like has been created like GPT B

1:24:45

and all and because of that uh like they

1:24:49

were able to predict the next next

1:24:51

sentence and that is a like a main thing

1:24:53

main advantage of this large language

1:24:55

model now over here you will find out so

1:24:58

in the next slide uh I have mentioned

1:25:00

that what is the what makes llm so

1:25:03

powerful so here by using one single

1:25:05

model by using one single llm actually

1:25:08

we can perform a different different

1:25:10

type of task like text generation

1:25:12

chatboard uh we can create a chatboard

1:25:14

also we can uh do the summarization

1:25:16

translation code Generation by using a

1:25:19

single LM we can do that particular

1:25:22

thing

1:25:22

now here uh if you will find out so

1:25:25

already I told you that what is the base

1:25:27

architecture of the llm so here this

1:25:30

Transformer is what it's a base

1:25:31

architecture behind this llm behind this

1:25:34

large language model and I have already

1:25:37

explained you the concept of the uh

1:25:39

Transformer that what we having inside

1:25:41

the Transformer now here guys uh this is

1:25:43

a few Milestone which we have in terms

1:25:46

of the llm like bird is there I think

1:25:49

you know about the bird if we are

1:25:51

talking about the uh we are talking

1:25:53

about the like a bad days right or old

1:25:55

days in 2018 19 or 20 when uh chat GPD

1:26:00

was not there just uh this uh GPT was

1:26:02

not there GPT 3.5 and all the recent

1:26:05

model which we are using inide of chat

1:26:07

GPT so there were few Milestone and we

1:26:09

were using this thing in our old days

1:26:11

like B was there GPT uh actually GPT is

1:26:14

having a different different variant it

1:26:15

is having a complete family GPD 1 2 3

1:26:18

and 3.5 and recently GPD 4 came into the

1:26:21

picture and other variants as well so

1:26:24

xlm is also there uh cross lingual

1:26:27

language model pre-training by uh this

1:26:30

particular guy now T5 was also there

1:26:32

this a text to text

1:26:34

transfer text to text transfer transform

1:26:37

Transformer and it was created by the

1:26:39

Google Now Megatron was also there so

1:26:41

Megatron actually it was created by the

1:26:43

Nvidia now M2M was there so it was the

1:26:46

part of the Facebook research so there

1:26:48

were many uh like uh there was the uh

1:26:51

like many model actually actually okay

1:26:53

and this was a milestone in uh this uh

1:26:56

in terms of this large language model

1:26:58

now over here guys see this bird GPT xlm

1:27:01

T5 they are using a base architecture as

1:27:04

a Transformer one only now if you will

1:27:06

see in the next slide so I have

1:27:08

categorize this thing so they are using

1:27:10

a base architecture as a Transformer one

1:27:12

only but in that you will find out some

1:27:14

of the model are using a encoder and

1:27:17

some of the model are using a decoder

1:27:20

and some of the model are using both

1:27:22

encoder and decoder now here I have

1:27:24

categorized this particular thing that

1:27:26

uh this is the model like B Roberta xlm

1:27:30

Albert Electra DTA so these are the

1:27:34

model they are just using the encoder

1:27:36

only and if we are talking about this

1:27:38

decoder uh if we are talking about the

1:27:40

GPT GPT uh 2 gpt3 GPT new or like the

1:27:44

entire family of the GPT so they are

1:27:46

using this decoder so we have a two

1:27:49

segment of the Transformer architecture

1:27:51

few of models they are using an encoder

1:27:53

side encoder part and few model

1:27:55

basically they are using a decoder and

1:27:57

uh here guys you will find out some

1:27:59

model which is which are using both

1:28:01

encoder as well as decoder so this T5

1:28:05

Bart M2 m00 Big B so these are the model

1:28:08

actually they are using both encoder and

1:28:10

decoder in the Transformer architecture

1:28:13

if you'll find out we have a two segment

1:28:15

so this is a this segment basically this

1:28:17

one is called an encoder segment and

1:28:19

this particular segment this is called a

1:28:21

decoder segment so here uh like I think

1:28:24

you got to know uh you got to know the

1:28:26

idea that uh this is what this is a like

1:28:29

uh transform this is the encoder segment

1:28:32

and this is what this is a decoder

1:28:33

segment and this model this T5 B M2M and

1:28:37

big but they are using both and we have

1:28:39

other models as well I just written this

1:28:41

uh couple of name over here now apart

1:28:44

from this you will find out some openi

1:28:46

based model open a based llm model so

1:28:48

GPD 4 is there GPD 3.5 is there GPD

1:28:51

based is there Delhi Biser iddings okay

1:28:55

so these are the different different

1:28:56

model which you will find out over the

1:28:58

open website itself and uh here uh

1:29:01

definitely GPT is uh one of the

1:29:03

prestigious model or this is one of the

1:29:05

very important model which uh people are

1:29:08

using uh nowadays for creating their

1:29:10

like applications and all and it is it

1:29:12

can perform any sort of a task related

1:29:15

to a generation okay now over here uh

1:29:19

this is the openi based model which I

1:29:21

have written now apart from this you

1:29:23

will find out other open source model so

1:29:26

this is the model from the openi side so

1:29:28

if you are going to hit this model so

1:29:29

definitely open is going to charge you

1:29:32

regarding the tokens regarding the uh

1:29:34

regarding like how many tokens and all

1:29:36

whatever you are using according to that

1:29:38

it is going to charge you but here we

1:29:40

have some couple couple of Open Source

1:29:42

model as well and I have written the

1:29:45

name like Bloom Lama 2 Palm Falcon Cloud

1:29:49

amp okay stable LM and so on we have a

1:29:52

various model various open source model

1:29:55

and uh yes but I I will show you that

1:29:58

how you can use this particular model if

1:30:00

you are going to create your application

1:30:02

so definitely I will let you know I will

1:30:04

show you that how you can utilize this

1:30:05

model as well I will show you the use of

1:30:07

the Falcon I will show you the use of

1:30:09

the Llama 2 if you don't want to use

1:30:11

this GPT uh GPT 3.5 GPT 3.5 turbo I will

1:30:15

show you the use of this llama and this

1:30:17

Falcon and some others open source model

1:30:19

as well I think you are getting my point

1:30:22

now here uh if we are talking about what

1:30:26

can llm be used for so if we are talking

1:30:28

about llm that what it can do so it can

1:30:32

uh we can use this llm for any sort of a

1:30:34

task like classification text generation

1:30:37

summarization chat board question

1:30:39

answering or maybe speech recognization

1:30:41

speeech identification spelling

1:30:42

character so this uh llm actually uh if

1:30:46

we are talking about this L LM so first

1:30:48

of all it's a model it's a large model U

1:30:51

it's a language anguage model and it's a

1:30:52

large model it's a large language model

1:30:55

and what is a like what we can do by

1:30:58

using this large language model we can

1:31:00

generate the data okay it can identify

1:31:03

the pattern of the data it is having

1:31:05

that cap cap uh that uh that much of

1:31:08

capacity so it can identify the pattern

1:31:10

from the data and by using those pattern

1:31:14

we are we can perform a various amount

1:31:16

of

1:31:17

task okay that's why this llm is too

1:31:20

much powerful

1:31:22

and here we can use this llm for any

1:31:24

sort of a task and yes uh we know about

1:31:28

this it and already I have uh like I

1:31:32

explain you this thing I hope this

1:31:34

introduction is clear to all of you now

1:31:36

coming to this uh prompt design so

1:31:38

prompt design and all uh definitely I

1:31:40

will talk about it uh once I will come

1:31:42

to this open a API there will try to hit

1:31:45

the uh different different models of the

1:31:47

open a and uh we have a different

1:31:50

different type of prompts so as as of

1:31:52

now you can think that the prompt is

1:31:53

nothing whatever input we are passing to

1:31:55

the model uh that is called input prompt

1:31:58

and whatever output we are getting from

1:31:59

the model itself that is called the

1:32:02

output prompt and here how cat GPD was

1:32:05

trained so generative of pre-training

1:32:08

supervise fine tuning and this

1:32:10

reinforcement learning there was three

1:32:12

step which I have mentioned so I will be

1:32:14

talking about this also and not in

1:32:17

today's session in the like next session

1:32:20

uh I'll be talking about this uh how CH

1:32:22

GPT and all it was stained uh okay now

1:32:26

what I can do so over here guys uh I

1:32:29

think uh we should uh conclude the

1:32:32

session so how was the session please uh

1:32:35

do let me know in the chat it was good

1:32:37

bad or what so did you uh understood

1:32:41

everything did you understand everything

1:32:43

whatever I have explained you uh

1:32:45

regarding this uh regarding this llm and

1:32:47

this generative AI the complete

1:32:49

introduction because uh I want that

1:32:52

before starting with any sort of a

1:32:54

practical the basics should be

1:33:04

clear everything did you

1:33:07

understand amazing

1:33:10

great to what is the

1:33:14

topic

1:33:17

yes fine uh if you have any doubt and

1:33:20

all so you can ask me I will try to

1:33:22

answer for that now before concluding

1:33:24

with uh like uh before concluding the

1:33:28

session let me show you few more things

1:33:30

over here so see uh here first of all

1:33:33

what you need to do uh first of all you

1:33:35

need to like uh go through with the open

1:33:37

a and you need to generate a open a API

1:33:40

and all so that uh basically don't worry

1:33:43

I will show you while I will be doing a

1:33:44

practical and all so you need to like at

1:33:47

least you need to create an account and

1:33:49

uh and you need to login it over here so

1:33:51

so once you will log in guys here you

1:33:53

will get two option first is chat GPT

1:33:55

and the second is API just go through

1:33:57

with this API and generate this API key

1:34:00

generate the API key from here don't

1:34:02

worry in the next session in the next

1:34:04

class again I will show you this thing

1:34:06

and here I see we have a different

1:34:08

different model so let me show you those

1:34:10

model and whatever open source model and

1:34:13

all is there so you will find out over

1:34:14

the hugging phase so let me show you the

1:34:17

hugging face models hugging face Hub and

1:34:21

uh here you will find out the model Hub

1:34:24

so guys uh here actually we have a model

1:34:27

Hub just a second yeah models now you

1:34:31

will find out a different different type

1:34:33

of model see these are the models which

1:34:36

is a open source and uh uh you'll find a

1:34:38

complete description let's say this uh

1:34:40

we are talking about this Orca 2 so this

1:34:43

updated 12 days ago and it's a recent uh

1:34:45

llm model uh which has been published uh

1:34:48

by the Microsoft now over here you can

1:34:52

see so it like you will find out the

1:34:54

complete description or complete detail

1:34:56

regarding this model and like uh how to

1:35:00

use it and uh each and everything

1:35:02

basically definitely we'll talk about it

1:35:04

now for what all task basically we can

1:35:06

use it okay so according to that also

1:35:09

you can uh like select the models so

1:35:11

just go through with the hugging phase

1:35:13

models and there you will find out many

1:35:15

uh like a different different models

1:35:18

okay and yes for sure openi is also

1:35:20

having uh different different llm model

1:35:22

so we'll talk about that we'll try to

1:35:24

understand the concept of this uh we'll

1:35:26

try to understand this uh assistant

1:35:28

actually and we'll try to talk we'll try

1:35:30

to understand the chat U actually so

1:35:33

what is this and how to use it how to

1:35:35

use this chat option and this assistant

1:35:37

option and here if you will go inside

1:35:39

the documentation so you will find out

1:35:41

of different different models over here

1:35:43

this GPT GPT 3.5 Del TTS whisper

1:35:47

embedding moderation GPT W gpt3 right

1:35:51

right different different models we have

1:35:53

and uh apart from that you can find out

1:35:55

the different different task according

1:35:57

to that also they have given you the

1:35:59

model so text generation so they have

1:36:00

given you the complete code and all so

1:36:02

just try to visit it just try to go

1:36:03

through it uh by yourself now uh we have

1:36:07

other uh platform as well so if you are

1:36:10

not going to use the uh maybe J uh if

1:36:14

you don't want to use this uh GPT and

1:36:16

all so here uh I can show you one more

1:36:19

uh like option so

1:36:23

AI 21 okay so AI 21 Labs AI 21 Labs so

1:36:27

this is the Recently I figured it out

1:36:29

actually this is the uh like alternative

1:36:32

of the GPT so we'll talk about this also

1:36:34

if you don't want to pay to this uh if

1:36:36

you don't want to pay for the GPT so you

1:36:38

can use this AI 21 lab uh and it will

1:36:42

give you the uh like a uh one model one

1:36:45

llm model so you can use it uh like

1:36:48

freely actually it gives you the $90

1:36:50

credit so so yes I will show you how you

1:36:53

can use this AI 21 lab uh so let me show

1:36:56

you the documentation and let me show

1:36:57

you the models as well so here you will

1:37:00

find out the uh model basically which is

1:37:03

there so Jurassic 2 is a model and it's

1:37:05

like a pretty amazing model and uh uh

1:37:09

yes definitely I'll be talking about it

1:37:11

and along with that uh the applications

1:37:13

of it which is very much required that

1:37:15

for what all task we can use it whether

1:37:17

if you are going to create a chat board

1:37:19

or maybe if you are going to do a

1:37:21

question answering or text generation or

1:37:24

like sentiment analysis for what type of

1:37:27

task we should use it and how to design

1:37:28

a prompt and all regarding the specific

1:37:31

task got it so we'll talk about this

1:37:34

also so uh yes many things is there and

1:37:37

definitely uh uh like from Tomorrow

1:37:40

onwards I'm going to start from the open

1:37:42

a lure and step by step I will come to

1:37:44

the uh different different models and

1:37:47

all so I hope guys this is uh clear

1:37:53

yes practical implementation will be

1:37:55

there don't

1:37:58

worry yes recording will be available

1:38:00

over the

1:38:05

YouTube yes all the uh all the topic

1:38:07

will be covered in the upcoming session

1:38:09

uh all the discussed topic and

1:38:15

all yes definitely this will be

1:38:18

available in the dashboard you can go

1:38:19

and check uh your dashboard this uh

1:38:21

video along with the video you will find

1:38:23

out the assignment you will find out the

1:38:25

quizzes and regarding the particular

1:38:42

topic fine I think uh we can conclude

1:38:45

the session

1:38:48

now is gener andm are also used in

1:38:51

computer vision based project so for

1:38:54

computer vision based project we have a

1:38:56

uh like others model we have a different

1:38:58

models uh because uh the task is

1:39:00

different over there so the task wise we

1:39:03

are talking about the computer vision

1:39:04

related task like object detection

1:39:06

object segmentation tracking OCR object

1:39:09

classification and for that we have a

1:39:11

different model and definitely we can

1:39:13

use a transfer learning of finding over

1:39:15

there now uh by using this L llm um like

1:39:20

this llm is for the like a different

1:39:22

task it is related to the language

1:39:23

related task it is not related to that

1:39:27

detection or a segmentation or tracking

1:39:30

it is not related to that particular

1:39:31

task it is related to the language

1:39:34

related task and uh here see let me show

1:39:37

you one uh one more paper one more

1:39:39

research paper so here I can show you

1:39:42

this uh ULM fit now see uh so just try

1:39:46

to go through with this particular paper

1:39:48

universal language model find tuning for

1:39:51

text classification now here in this

1:39:54

particular paper you will find out that

1:39:56

see uh this uh if you know the Deep

1:39:59

learning so in the Deep learning we have

1:40:01

uh two major concept so the one one

1:40:04

concept is uh called transfer learning

1:40:07

transfer learning the second concept is

1:40:09

called fine tuning F transfer learning

1:40:11

means what so you are transferring the

1:40:14

information from uh from one state to

1:40:17

another state okay or like you can I can

1:40:21

give you very simple example for that

1:40:22

let's say you know like how to how to

1:40:25

write the cycle so for you like for if

1:40:29

you know how to write the cycle

1:40:31

definitely you can use that information

1:40:33

and you can write the motorcycle also so

1:40:36

that is the same thing basically which

1:40:37

we uh do inside the transfer learning

1:40:40

let's say we have trained the model uh

1:40:42

like let's say we are talking about the

1:40:44

computer vision so inside that uh you'll

1:40:47

find out uh we have a various Tas like

1:40:49

detection classification tracking and

1:40:51

all so let's talk about the model let's

1:40:53

say YOLO so or we have other model also

1:40:56

like faster rcnn rcnn and all SSD SSD

1:40:59

and all like a different different model

1:41:02

related to a detection so the model

1:41:03

already has been trained on some sort of

1:41:05

a data some amount of data on some

1:41:07

Benchmark data so by using that

1:41:09

particular information we can uh like

1:41:11

perform the detection and all for our

1:41:13

specific task if we are not able to do

1:41:15

it then definitely I will fine-tune my

1:41:17

model but how we can use the same thing

1:41:21

in NLP because in NLP actually we have a

1:41:25

task uh the task is very specified we

1:41:27

have a specific task let's say we are

1:41:29

talking about um if we are talking about

1:41:33

a task let's say uh ner name entity

1:41:36

recognization or let's say we are

1:41:38

talking about the task let's say a

1:41:40

language gener language translation

1:41:43

language

1:41:44

translation language translation or

1:41:46

maybe sentiment analysis so these are

1:41:48

the specific task specific task ask

1:41:51

means regarding to the specific uh

1:41:53

regarding to the specific topic let's

1:41:55

say if I want to do a sentiment analysis

1:41:57

so not for the entire data whatever

1:42:00

there in the world for the specific uh

1:42:02

let's it for the Twitter data only means

1:42:04

whatever TW tweets and all we are

1:42:06

getting now if we are giving any other

1:42:08

data un any other like a task related

1:42:11

data so it won't be able to perform that

1:42:13

so actually in this particular paper you

1:42:15

will find out that how we can use this

1:42:18

uh language model language model

1:42:21

for uh like for the universal task and

1:42:24

there only this llm comes into a picture

1:42:26

L this llm actually it came from the

1:42:28

language model itself okay because we

1:42:31

are training this uh language model on a

1:42:33

huge amount of data that is why it is

1:42:35

called llm large language model because

1:42:37

we have we have trained this data on a

1:42:39

huge amount of we have trained this

1:42:40

model on a huge amount of data got it so

1:42:43

here in this particular paper they have

1:42:45

like shown you that how to use this

1:42:48

transfer learning because uh in before

1:42:51

2018 uh actually we were using this

1:42:53

transfer learning in the computer vision

1:42:55

only in the uh like in a different

1:42:58

different tasks of the computer like

1:42:59

object detection or segmentation you

1:43:01

will find out the image data so on top

1:43:05

of that data we have trade like a Ben

1:43:06

model and directly like like vgg rset

1:43:10

and all and directly we are using those

1:43:11

particular model for our like a other

1:43:14

task so here if we are talking about the

1:43:16

NLP so we are not able to do it before

1:43:19

this Transformer and all so actually see

1:43:21

we got a Transformer we got this

1:43:23

particular concept like how we can use

1:43:25

this transfer learning and all in the

1:43:27

like NLP field so this two concept came

1:43:30

together transfer learning and the

1:43:32

architecture like Transformer self

1:43:34

attention and all and from there itself

1:43:36

this uh llm came into the picture llm

1:43:38

means large language model which has

1:43:40

been train on a huge amount of data

1:43:42

which is able to perform the transfer

1:43:43

learning and we can do it uh we can find

1:43:46

T it also and the main uh like uh

1:43:51

the main cap or the main uh role of the

1:43:54

llm is what it is able to generate a

1:43:56

text text generation got it so fine I

1:44:00

think we are done with the session now

1:44:02

so rest of the thing we'll try to

1:44:05

discuss in the uh tomorrow session and

1:44:07

we'll try to more focus on the Practical

1:44:08

side so all the recordings and all it

1:44:11

will be updated on a dashboard and uh

1:44:14

yeah that is it yes so I think uh we can

1:44:17

start with the session now so yeah uh

1:44:20

welcome again again uh so you all are

1:44:22

welcome in this uh Community session

1:44:24

generative AI Community session uh

1:44:26

yesterday we have started this uh

1:44:28

generative AI Community session where we

1:44:30

have discussed about the generative AI

1:44:32

so there I have given you the

1:44:34

introduction related to the generative

1:44:35

Ai and large language models and here

1:44:39

you can find out the video so this is

1:44:40

the dashboard uh it's a free dashboard

1:44:43

actually uh which we have created for

1:44:45

all of you the same video actually it is

1:44:47

available over the Inon uh YouTube

1:44:49

channel as well if you we will go in a

1:44:51

live section so this uh same video you

1:44:53

can find it out over there as well now

1:44:56

uh let me show you uh that particular

1:44:59

video so here is my YouTube now let me

1:45:03

search over here I neon and here guys uh

1:45:07

go inside this uh live section and this

1:45:10

is the video so the same video same

1:45:13

lecture you will be able to find out

1:45:15

inside the live section apart from this

1:45:17

uh the same uh thing basically we are

1:45:20

uploading or the in neuron dashboard and

1:45:23

here along with the video you will find

1:45:24

out the resources so all the resources

1:45:27

basically whatever I'm using throughout

1:45:29

the session uh so whatever notes and all

1:45:32

which I'm writing and whatever PPS and

1:45:34

all or whatever code file I'm using

1:45:37

throughout the session you will find out

1:45:39

all the resources over here got it guys

1:45:42

yes or no so do you have this dashboard

1:45:45

do you have this dashboard tell me I

1:45:48

think uh many people are androll

1:45:51

yesterday uh for this free community

1:45:53

session and yes all the videos and all

1:45:57

basically we are going to upload over

1:45:58

here not even video and resources along

1:46:01

with the video and resources you will

1:46:03

find out the uh live uh you will find

1:46:06

out the quizzes and assignment as well

1:46:07

so already uh I have prepared the

1:46:10

quizzes and assignment so soon it will

1:46:12

be uploaded over here so in this

1:46:14

particular video you will find out one

1:46:16

more section so the section will be

1:46:18

quizzes and assignment so there you will

1:46:20

find out a uh like uh a video related or

1:46:24

a topic related quizzes and assignment

1:46:27

got it yes or no so please uh give me a

1:46:30

quick confirmation in the chat if this

1:46:32

uh dashboard related thing and this uh

1:46:34

video related thing is clear to all of

1:46:36

you I'm waiting for your reply in the

1:46:38

chat and if you have any sort of a doubt

1:46:41

then you can ask me in the like chat

1:46:43

section as well and don't worry my team

1:46:45

will give you the link of the dashboard

1:46:47

so if you haven't enrolled so far so uh

1:46:50

by using that particular link definitely

1:46:52

you can enroll it you can enroll U

1:46:55

inside the

1:46:57

dashboard great all clear all clear

1:47:12

great fine so here I got a confirmation

1:47:16

now uh so let's start with the session

1:47:19

let's start with the uh second day so in

1:47:22

the first day actually so what I

1:47:24

discussed I discussed about the

1:47:25

generative AI so where I have like told

1:47:28

you that what is a generative AI so this

1:47:30

is the slide basically which I was using

1:47:32

and here actually this was the agenda

1:47:35

the complete agenda which I going to

1:47:37

discuss this uh throughout this

1:47:38

committee session and uh today is the

1:47:41

second day where I will start from this

1:47:43

open AI so in the previous session I was

1:47:46

talking about this generative Ai and I

1:47:48

discussed each and everything related to

1:47:49

this generative a and I hope you got a

1:47:52

clear-cut idea that what is a generative

1:47:54

Ai and in the generative AI actually

1:47:57

what all things comes into the picture

1:47:59

where llms lies so if we are talking

1:48:02

about this large language model so

1:48:04

regarding the large language model also

1:48:05

I have clarify each and everything I

1:48:07

have given you the complete timeline of

1:48:09

this large language model where I have

1:48:11

discussed about the uh the complete

1:48:14

history of the large language model from

1:48:16

the RNN so first I have started from the

1:48:18

RNN then I came to the lstm then uh I

1:48:22

discussed about the uh different

1:48:23

different sequence to sequence mapping I

1:48:26

talked about the encoder and decoder and

1:48:28

after that I have explained you the me

1:48:30

uh the concept of the attention and then

1:48:32

I have discussed about the attention is

1:48:35

all your need uh the Transformer

1:48:37

architecture and I told you that

1:48:40

whatever llms which you are seeing

1:48:42

nowadays so those uh all the llms are

1:48:45

using Transformer as a base architecture

1:48:48

so I have explained you the

1:48:51

the like whatever thing was there inside

1:48:53

the Transformer architecture whatever

1:48:55

component whatever segment was there

1:48:57

each and everything I have discussed

1:48:58

over there and apart from this

1:49:01

generative AI I have talked about this

1:49:03

llm also so there I have talked about

1:49:05

that what is a llm why it is called

1:49:08

large language model and uh why it is so

1:49:12

powerful because this one uh because

1:49:15

this one llm is able to perform lots of

1:49:18

like task lots of uh one basically llm

1:49:22

we can use for the different different

1:49:24

type of application so here uh I have

1:49:27

written the couple of name like text

1:49:29

generation summarizer translation or

1:49:31

code generation and so on we all know

1:49:33

about the chat GPT uh chat GPT is are

1:49:36

application and uh chat GPT is using

1:49:38

gpt3 gpt3 is a a base model so GPD 3.5

1:49:43

actually it's a base model so how it is

1:49:46

how much it is powerful we all know

1:49:48

about it and that is a example of the

1:49:50

large language model which is capable to

1:49:53

do so many things why because uh it is

1:49:55

having a power so so that actually it

1:49:58

can generate a it can generate a data

1:50:01

based on a previous data it can

1:50:03

understand the pattern and because of

1:50:05

that only we are able to trans we are

1:50:07

able to use this Transformer as a or

1:50:09

whatever like Transformer based model we

1:50:11

have we are able to use those transforma

1:50:14

based model as a transfer learning I

1:50:17

have explained you the concept of the

1:50:18

transfer learning and the fine tuning as

1:50:21

well so here I was talking about this

1:50:23

llm and then I talked about the few

1:50:26

milestone in a large language model so

1:50:29

here I have written couple of name bird

1:50:31

GPT xlm T5 Megatron M2M so these are the

1:50:35

uh like a few milestone in a large

1:50:37

language model now this model has been

1:50:40

trained on a huge amount of data now

1:50:43

specifically we are talking about GPT so

1:50:45

in a GPT Family itself you will find out

1:50:47

of various model I will talk about it it

1:50:50

I will come to the open Ai and each and

1:50:52

everything I will keep in front of you

1:50:54

only and uh I will uh I will show you

1:50:56

that how much it is powerful so we are

1:50:59

talking about GPT so it's like really

1:51:01

powerful and it it has been trained on a

1:51:04

like huge amount of data and it is

1:51:06

having a billions of parameter so here

1:51:08

is few Milestone so in our back days in

1:51:11

our history basically we are using this

1:51:13

particular models now in a recent day we

1:51:15

got so many uh architectures so many uh

1:51:18

open source models and so I will talk

1:51:20

about uh regarding those model as well

1:51:23

so here in the next slide I have shown

1:51:25

you so what all encoder based

1:51:27

architecture we have what all decoder

1:51:29

based architecture we have if we are

1:51:31

talking about anod and decoder right so

1:51:34

in which architecture you will find out

1:51:36

both encoder and decoder if we are

1:51:38

talking about B xlm Electra DTA so these

1:51:42

all are these all the architecture

1:51:44

actually it is based on an encoder we're

1:51:46

talking about this GPT GPT family so

1:51:49

it's a based on a decoder itself and the

1:51:51

idea has been taken from the Transformer

1:51:53

itself now here you can see this T5 Bart

1:51:56

M2M big but so these are the model which

1:51:59

are which is using this encoder and

1:52:02

decoder both got it so now here uh then

1:52:07

I talked about the openi based llm model

1:52:09

so here uh the very first thing comes

1:52:12

into the picture that is a GPD itself

1:52:14

GPT 3.5 which is a like base model

1:52:17

behind this chat GP chat GPT just a

1:52:20

application it's not a model now here

1:52:22

you will find out this Delhi whisper DCI

1:52:25

there are many model I will be coming to

1:52:27

that particular model and I will show

1:52:29

you how you can get all the model from

1:52:32

the opena itself and uh yes we'll try to

1:52:35

use those model for our task for our

1:52:39

like a uh for the for our like a like a

1:52:42

requirements and all definitely will try

1:52:44

to use this particular model like GPT

1:52:47

GPT 3.5 I will show you how you can use

1:52:49

GP 3.5 turbo viso da in or other model

1:52:53

as well like aming and moderation so

1:52:55

apart from that this apart from this uh

1:52:58

like uh Milestone whatever Milestone I

1:53:00

shown you and this openi based model

1:53:03

here you will find out some other op

1:53:05

Source model like Bloom llama 2 Palm is

1:53:08

a model it's a very famous model from

1:53:10

the Google side nowadays like most of

1:53:13

the people are using this pal Falcon is

1:53:14

a model cloud is there MP 30 uh MP is

1:53:19

there uh this B actually it is showing a

1:53:21

parameter right and here we have a

1:53:23

stable Im so a stable LM so there are

1:53:26

like so many open source model so I will

1:53:29

come to that also and I will show you

1:53:31

how you can utilize those particular

1:53:33

model and apart from that I have like

1:53:35

kept some more slight over here inside

1:53:38

this particular PP so you can go through

1:53:40

with that and you can understand some

1:53:42

other uh like concept like how this chat

1:53:44

GPD has been trained and all so I hope

1:53:47

guys still here everything is fine

1:53:49

everything is clear

1:53:50

now we can move to the Practical part so

1:53:53

please do let me know in the chat if

1:53:55

everything is clear so far in terms of

1:53:57

theory guys I'm waiting for your

1:54:06

reply uh just a wait so let me give you

1:54:08

the link of the website and

1:54:18

uh

1:54:20

yes guys I'm waiting for your reply so

1:54:22

if you can confirm in the chat uh uh

1:54:24

like everything is fine or not so that I

1:54:27

can proceed with the Practical

1:54:30

stuff yeah definitely this uh PP is

1:54:32

already there so just try to enroll in

1:54:34

this course the dashboard Bic basically

1:54:37

which we have created this is our

1:54:38

dashboard which you will find out over

1:54:40

the Inon website so just try to log to

1:54:43

your Inon website first of all if see if

1:54:45

you are a new person so what you need to

1:54:47

do you need to sign up after sign up uh

1:54:50

you will login and after login you will

1:54:53

search uh regarding this dashboard so

1:54:55

here actually what is the name of the

1:54:57

dashboard so the name of the dashboard

1:54:58

is generative AI Community Edition so

1:55:01

just click on this dashboard and here

1:55:04

after clicking on this dashboard you it

1:55:05

will ask to you whether you want to

1:55:07

enroll or not so yes uh you will click

1:55:10

on the enroll and it is completely free

1:55:12

so it won't ask you any sort of a money

1:55:15

and after enrolling into this particular

1:55:17

course uh you can get the videos and you

1:55:20

can get the resources as well so all the

1:55:22

resources we have uploaded over here

1:55:24

inside this resource section got it

1:55:32

clear great so I think everything is

1:55:35

fine everything is clear now let's start

1:55:38

with the uh let's start with the

1:55:40

Practical implementation so first of all

1:55:43

guys uh let me clarify the agenda that

1:55:45

what all thing we are going to discuss

1:55:47

in today's session so for that what I'm

1:55:50

going to do I'm going to open my

1:55:51

Blackboard and here I will try to

1:55:53

explain you each and everything uh like

1:55:56

what what whatsoever we are going to

1:55:58

like cover in this particular session so

1:56:01

let's start uh let me write it down all

1:56:03

the thing step by step now first of all

1:56:06

I can write it down over here a day two

1:56:08

Community session and then I will begin

1:56:12

with the topic so here guys are day two

1:56:15

of the community session now uh

1:56:18

yesterday actually I I talked about the

1:56:20

introduction part I talked about the

1:56:21

introduction of the generative Ai and

1:56:23

the llm now today I will be more

1:56:26

focusing on the open a so here I will be

1:56:29

discussing about the open AI so first I

1:56:32

will give you the U like a complete walk

1:56:35

through of the openai website of the

1:56:37

openai documentation after that I will

1:56:40

come to the openai API that how you can

1:56:43

use this open API how you can use this

1:56:46

open API and this API we are going to

1:56:49

use by using this python so guys if you

1:56:53

you know python so definitely uh like uh

1:56:56

you will be able to write a code along

1:56:58

with me uh and don't worry I will show

1:57:00

you how to do the entire environment

1:57:02

setup and all each and everything I will

1:57:04

try to uh I will try to do in front of

1:57:06

you uh from very scratch so uh you all

1:57:09

can do along with me now over here I

1:57:12

will come to this openi API and there

1:57:14

I'm going to use Python and we have

1:57:16

couple of more option like nodejs on all

1:57:19

so if you are familiar with the

1:57:21

JavaScript or maybe some with other

1:57:23

language so in that case also you can

1:57:25

use this openi API after that I will uh

1:57:29

I will come to the openi playground so

1:57:31

here uh they have given you very

1:57:33

specific feature or very uh like uh very

1:57:37

interesting feature that is what that is

1:57:38

a openi playground so over here I will

1:57:41

explain you that uh how you can use a

1:57:44

different different model how you can uh

1:57:46

like pass a different different prompts

1:57:49

and how you can generate output how you

1:57:51

can set up your uh like a different

1:57:53

different uh sentiments and all

1:57:54

regarding the system that okay so my

1:57:57

system should behave like this or that

1:57:59

so each and everything I will explain

1:58:01

you over here and after that what I will

1:58:03

do I will show you the chat completion

1:58:05

API so I will use this chat completion

1:58:09

chat completion and by using this chat

1:58:11

completion actually uh we can call the

1:58:14

GPT model so whatever uh like uh we can

1:58:18

call the like openi API and uh with that

1:58:21

definitely we can use any sort of a

1:58:23

model like a GPT model or any other

1:58:25

model so first I will uh start with the

1:58:28

openi API we'll use we'll be using a

1:58:30

python over here and I will show you how

1:58:32

you can generate the openi key and after

1:58:35

that I will come to the playground and

1:58:37

assistant and then chat completion API

1:58:39

and then I will explain you the concept

1:58:41

of the function call function call now

1:58:46

this is the agenda for today's session

1:58:48

this is the agenda for today's Community

1:58:50

class now before starting with the openi

1:58:53

I will uh I will explain you that why

1:58:56

openi is this much important why not

1:58:58

other other like things or uh if we have

1:59:02

like a other competitor of the openi

1:59:04

that why we are not using that instead

1:59:06

of this open ey and if we are going to

1:59:08

use that then how we can do that okay

1:59:11

and one more thing I would like to

1:59:12

explain you over here so along with the

1:59:14

open a I will uh talk about the hugging

1:59:17

face so see over the hugging face

1:59:20

actually hugging face is has provided

1:59:22

you one uh hugging face hub for all the

1:59:25

models so there you will find out all

1:59:28

the open source model so directly you

1:59:30

can generate a hugging face API key and

1:59:32

you can utilize all sort of a model

1:59:34

whatever is there over the hugging face

1:59:36

Hub yesterday I have shown you that let

1:59:38

me show you again uh that particular Hub

1:59:41

so guys here once you will write it down

1:59:42

so over the Google so once you will

1:59:45

search uh once you will write it down

1:59:46

hugging face model Hub so there uh you

1:59:49

will get a link and you just need to

1:59:51

click on that so here you will uh and

1:59:53

then basically it will be redirecting to

1:59:55

you to this particular model Hub now

1:59:58

here you will find out all the open

2:00:00

source model from a different different

2:00:02

organization so yesterday I was talking

2:00:04

about this Ora 2 now here you will find

2:00:07

out other model as well like whisper

2:00:09

large V3 now from the Facebook side

2:00:12

there's a

2:00:13

seamless okay now here you will find out

2:00:16

other model as well so see from The Meta

2:00:18

side there's a lamba Lama 2 so I will

2:00:20

show you how you can utilize these

2:00:22

particular model for the different

2:00:24

different tasks according to your

2:00:26

requirement getting my point so we will

2:00:29

not restrict it uh we will not restrict

2:00:32

to ourself to the till the open ey

2:00:34

itself apart from that we'll try to

2:00:36

explore few other model few other open

2:00:38

source model and yesterday actually I

2:00:41

have shown you one more platform and

2:00:43

here's the platform AI 21 studio so it

2:00:46

it gives you one model this Jurassic

2:00:48

model so we can utilize that particular

2:00:51

model also and this all are called large

2:00:54

language

2:00:55

model this IDE this thing is clear to

2:00:57

all of you yes or no so uh what is the

2:01:00

difference between hugging face and open

2:01:02

AI so open AI is a different

2:01:04

organization hugging face is a different

2:01:05

organization and over the hugging face

2:01:07

Hub see uh if you have heard about this

2:01:10

Docker or this GitHub so first of all

2:01:12

let me show you this GitHub so if I'm

2:01:14

searching about this GitHub so here

2:01:16

actually over the GitHub you will find

2:01:18

out uh like see this is my GitHub and uh

2:01:22

you all have the GitHub ID right you all

2:01:25

have log to the GitHub and all and first

2:01:27

you sign up and then you log in and

2:01:28

whatever course and all you are having

2:01:30

and definitely you are going to upload

2:01:32

it over here uh in terms of repository

2:01:35

now let's see if I if I have to find out

2:01:36

something so what I will do here let's

2:01:38

say if I'm going to write it down GitHub

2:01:40

machine learning uh linear regression so

2:01:43

GitHub machine

2:01:46

learning machine learning linear

2:01:50

regression so here if I will search uh

2:01:53

like this then definitely I will get a

2:01:55

link and here you can see so it has

2:01:57

suggested me one repository and you will

2:02:00

find out uh this uh code and all

2:02:02

whatever code and all has been uh

2:02:04

uploaded by this particular person and

2:02:07

definitely you can download it and you

2:02:08

can use it similarly we have a Docker

2:02:10

Hub similarly we have a Docker Hub so

2:02:13

let me show you the docker Hub so the

2:02:15

docker Hub actually you will find out

2:02:17

all the images and all so let's say uh

2:02:19

like uh you downloaded Docker in your

2:02:21

system you did setup and all now uh you

2:02:24

don't want to install it from scratch

2:02:26

you want to run it by a Docker so yes

2:02:28

there is a Docker Hub and there you'll

2:02:30

find out different different images and

2:02:31

all so you can uh like uh you can pull

2:02:34

that image and definitely you can run it

2:02:36

inside your container so similarly we

2:02:38

have a hugging face Hub there uh like it

2:02:41

is uh it it is going to provide you a

2:02:43

different different model actually on a

2:02:45

single place so yes uh just uh you just

2:02:47

need to log in over there and after that

2:02:49

you need to generate a API key and

2:02:51

directly you can use those particular

2:02:54

model whatever is there like over the

2:02:56

hugging face Hub now similarly we have

2:02:59

openi it's other another organization so

2:03:01

yes by using the openi API we can access

2:03:04

the open a model as well so here uh okay

2:03:07

so if you will find out if you will see

2:03:09

to this open a this one this is the open

2:03:11

a right now I will show you what all

2:03:13

models this openi is having it is having

2:03:15

a different different model various

2:03:16

model I will come to that I will show

2:03:18

you from very scatch so till here

2:03:20

everything is fine guys everything is

2:03:22

clear so uh just give me a quick quick

2:03:25

confirmation so that I can show you the

2:03:27

entire setup related to this opena API

2:03:30

and we can run a couple of uh couple

2:03:33

couple of line of code as well so please

2:03:35

do let me know in the chat if uh

2:03:37

everything is clear so

2:03:44

far yes we'll talk about the fine tuning

2:03:47

and all so how we can uh do the fine

2:03:49

tuning regarding a different different

2:03:51

model uh it's not a like easy task it's

2:03:54

a a very expensive thing so we'll talk

2:03:58

about

2:03:59

it yes hugging pH model are

2:04:07

free yes correct for building a model uh

2:04:10

so for using uh if you want to use that

2:04:12

particular model so either I can use

2:04:14

open a so or else I can use hugging

2:04:16

phase see whatever model is there over

2:04:17

the hugging for definitely we can access

2:04:19

that but let's say open a is having

2:04:21

there uh like a uh it's a separate

2:04:23

platform right so whatever model is

2:04:25

there over the open a so we'll be able

2:04:26

to access those model only from the open

2:04:28

a not all the model which is there

2:04:30

inside the hugging face also but hugging

2:04:32

face actually is having all the models

2:04:35

open source and all whatever model is

2:04:36

there and some of the model from the

2:04:37

openi side as well but openi actually

2:04:40

it's a specific specific one specific

2:04:43

organization clear yes or no so please

2:04:46

do let me know if uh this thing is clear

2:04:48

to to all of you so that I can proceed

2:04:50

with the uh next part next

2:04:58

section great so people are saying sir

2:05:01

it is clear clear clear okay

2:05:10

great yeah the model is already created

2:05:12

over the hugging face and open ey they

2:05:14

already trained the

2:05:17

model

2:05:22

we don't have all the models in the ging

2:05:24

phase that's why we are learning this

2:05:31

open great so I think uh all the thing

2:05:35

uh like each and everything is clear to

2:05:37

all of you now let's start with the uh

2:05:39

like uh next part of this session so

2:05:42

here I have uh discussed about this open

2:05:44

Ai and this hugging phase and I clarify

2:05:46

the agenda that what all think we are

2:05:49

going to discuss but before starting

2:05:51

with the open AI so let me give you the

2:05:53

a brief introduction of the open AI that

2:05:56

why this open AI is too much important

2:05:58

so for that what I did I have created

2:06:00

one small PP so with that actually you

2:06:02

will get some U uh some basic idea uh

2:06:07

regarding this open AI so here uh let me

2:06:10

start uh let me start the slideshow so

2:06:13

over here guys you can see about the

2:06:14

open if we are talking about the openi

2:06:16

so what is the openi open a is leading

2:06:19

company in the field of AI it was

2:06:21

founded in 2015 as a nonprofit

2:06:24

organization by same Alman and Elon Musk

2:06:27

as we know about the uh founder of the

2:06:30

like open a so yes uh I think we are we

2:06:33

are aware about uh with this particular

2:06:35

names right same Alman and this Elon

2:06:37

Musk and it has founded in 2015 as a

2:06:41

nonprofit organization just for the

2:06:43

research purpose now here in the next

2:06:46

slide I have kept the name so he's a

2:06:48

like

2:06:49

he's a CEO of the open a Sam Alman and

2:06:54

uh yes I think you know about the Sam

2:06:56

Alman he was fired by the open board

2:06:58

we'll talk about that also what what

2:07:00

might be the reason behind that so we

2:07:03

will discuss about that uh as well now

2:07:06

over here you can see uh openi founded

2:07:08

in uh 2015 and the company founded with

2:07:11

the goal of developing and promoting

2:07:13

friendly AI in a responsible way that

2:07:16

was a logo of the open AI so with the

2:07:18

focus on transparency and open research

2:07:21

and he was the and they are the founder

2:07:23

member of the like open a so Elon mus

2:07:27

Sam Alman Greg Brockman okay this guy is

2:07:30

a like great researcher and vak and zon

2:07:34

so these are the founder founding member

2:07:36

of the open AI now over here are open

2:07:39

goals so there are some goals of the

2:07:40

open related to the AI and all now openi

2:07:43

Milestone so I was talking about that

2:07:45

why this openi is too much important why

2:07:48

not other does because if you will look

2:07:49

into the market there are other uh there

2:07:52

uh there are you will find out other

2:07:54

organization as well uh so we have a

2:07:57

Google and Google is having their

2:07:58

separate Department Google uh AI

2:08:01

research and all so Microsoft is also

2:08:03

having their own department for the AI

2:08:05

research even meta is having that even

2:08:08

IVM so all the like big big giant so

2:08:12

there they are having their own research

2:08:14

uh like Department related to this Ai

2:08:16

and all and they are working on that and

2:08:18

they were working on that actually but

2:08:21

why this openi is too much popular and

2:08:23

why we should start from the openi

2:08:25

itself so you know about the openi in

2:08:27

2020 actually they have launched the

2:08:30

Chad GPT and guys believe me it was the

2:08:33

Milestone and it was the major

2:08:35

breakthrough in the history of the AI

2:08:37

because before that also we are having

2:08:40

so many llm model and it was able to do

2:08:43

uh some sort of a thing but not like to

2:08:46

not similar like to this GPT this GPT

2:08:50

actually the GPT model which is a

2:08:52

backbone of this Chad GPT application uh

2:08:55

it was a a breakthrough in the history

2:08:57

of the NLP and because of this this open

2:09:00

AI came into the Limelight and uh apart

2:09:03

from the GPT then uh uh like they have

2:09:06

shown or they have released the other

2:09:08

different different research so here

2:09:10

here I have written couple of name

2:09:12

basically so generative model is one of

2:09:15

the Milestone of the open now apart from

2:09:18

that you will see that they are going to

2:09:20

uh they are going to participate in the

2:09:21

robotic research and all and here uh

2:09:24

like other uh like other few more thing

2:09:27

basically so solving uh robic Q with a

2:09:30

robot hand and here multimodel neurons

2:09:33

and artificial neural network you can

2:09:35

search about uh this particular things

2:09:37

and yes uh this open ey actually it

2:09:40

become uh very uh important uh basically

2:09:44

because of this uh like GPT and all

2:09:46

because of this uh chat GPT application

2:09:49

and yes they were using a different

2:09:51

technique for training this uh GPD model

2:09:54

which we are using for the chat GPT and

2:09:57

the idea from where they took the idea

2:09:59

uh for training this GPT model there we

2:10:02

have unsupervised learning we have a

2:10:03

supervised learning and we have this

2:10:05

reinforcement learning so they took from

2:10:08

the ULM fit research paper yesterday I

2:10:10

have shown you that which has been

2:10:11

published in 2018 and in 2019 in 2020

2:10:15

actually they have released this GPT GPT

2:10:19

got it now here you can see buildin with

2:10:22

open AI API so these are couple of name

2:10:24

getup copilot keeper Tex Bible dingo so

2:10:28

these are some application which is

2:10:29

using this openi API and apart from that

2:10:32

you will find out so what is the openi

2:10:34

vision so the vision is like uh promote

2:10:37

a friendly AI in a way that benefit all

2:10:40

the humanity and all so this is a vision

2:10:42

of the openi now feature so chat GPT

2:10:46

Delhi whisper alignment so so these are

2:10:48

the feature of the open AI Chad GPT is a

2:10:52

a milestone Delhi is also there Delhi 2

2:10:54

recently they have they have released

2:10:55

the Delhi 2 whisper is uh one of them

2:10:58

whisper actually it is a very good model

2:11:00

for generating a transcript and all so

2:11:02

whatever like text we are giving or

2:11:04

whatever like videos we are giving to

2:11:05

this particular model it is able to

2:11:07

generate a transcript from that and here

2:11:10

uh alignment is there startup fund so

2:11:12

these are some feature of the open AI

2:11:14

now guys uh before starting with the

2:11:16

open AI API I think got enough amount of

2:11:19

idea uh regarding this open AI yes or no

2:11:23

please do let me know in the chat if uh

2:11:25

this part is clear so I will proceed

2:11:27

with a uh open a API so how you can

2:11:31

generate a key and all and how you can

2:11:33

utilize

2:11:37

that

2:11:40

yes are you getting guys whatever I'm

2:11:43

explaining you over here uh if you have

2:11:46

any sort of a doubt anything so you you

2:11:48

can ask me in a chat section I will

2:11:50

reply to all of your

2:11:52

doubts so step by step we'll try to

2:11:54

proceed uh and uh so each and everything

2:11:57

will be

2:12:00

clarified great so

2:12:04

clear yes waiting for your reply uh if

2:12:07

you can write it on the chat so then I

2:12:10

will

2:12:16

proceed what is the learn tool what is

2:12:18

the aim to learn open AI so that I can

2:12:20

utilize the same capability same AI

2:12:22

capability in my

2:12:24

application whatever model has been

2:12:26

trained by the openi so that I can use

2:12:28

the same model in my application for a

2:12:30

different different

2:12:41

task great so I think I have uh

2:12:45

discussed each and everything related to

2:12:46

the open a now this is the website of

2:12:48

the openai so if you will search openai

2:12:51

definitely you will get a website of

2:12:52

that so in the website itself they have

2:12:54

mentioned everything so latest update

2:12:57

whatever uh latest update and all it is

2:12:59

there so they are mentioning over here

2:13:01

and Sam Alman return as a CEO of the

2:13:04

open a I think you know about this

2:13:06

controversy of the open a so let me uh

2:13:09

give you some sort of a glimpse of that

2:13:11

uh if you know about the open a so it

2:13:13

was founded as a nonprofit

2:13:16

organization but uh in 2019 actually

2:13:19

they have uh started with their uh

2:13:22

for-profit organization as well if you

2:13:24

will search about the four profit

2:13:26

organization

2:13:27

of for profit organization of this open

2:13:30

a so in 2019 actually they have started

2:13:33

this a for profit organization and uh it

2:13:36

was doing uh lots of work uh regarding

2:13:38

this Ai and all and they collected uh

2:13:40

like uh funds from different different

2:13:43

companies and all from a big big giants

2:13:45

and uh they were working on the G GPD

2:13:48

model itself okay now after that uh this

2:13:51

chat GPD has been released and in 2022

2:13:55

actually 2022 or 23 basically so uh they

2:13:59

started work on a uh like a different

2:14:01

type of project so the project name was

2:14:03

the

2:14:04

qar the uh basically the project name

2:14:07

was the qar and it was more specific to

2:14:11

it was more specific to towards this AGI

2:14:14

so may I know guys what is the full form

2:14:16

of the AGI

2:14:19

if if you know uh the full form of the

2:14:20

AGI so please write it down in the chat

2:14:22

what what do you uh understand with this

2:14:27

AGI so the full form of the AGI is

2:14:31

please write it down in the chat if you

2:14:32

know about the full form of the AGI

2:14:34

please do it yes artificial Journal

2:14:38

intelligence correct so the full form of

2:14:40

the AGI is artificial Journal

2:14:42

intelligence actually see we talking

2:14:44

about the chat GPD now this particular

2:14:46

application it's not it is not

2:14:48

representing a general artificial

2:14:51

intelligence it is a restricted one it's

2:14:53

a specific

2:14:55

one getting my point so let's say there

2:14:58

one side there is a Chad GPT and one

2:14:59

side there is a human so definitely this

2:15:02

Chad GPD can answer in a better way it

2:15:05

can generate answer in a better way

2:15:07

compared to this human but still it is

2:15:09

not like a human so still we are not on

2:15:12

that particular level where we can

2:15:14

achieve a artificial intelligence like a

2:15:17

human that is called artificial general

2:15:21

intelligence and the project name was

2:15:23

given by this openi the project name was

2:15:26

the

2:15:26

qar and that was happening in the

2:15:29

for-profit organization this is the

2:15:31

subsidiary of the open

2:15:33

itself getting my point now because of

2:15:36

that uh so there was a conflict in

2:15:38

between the board member and uh this uh

2:15:41

Sam Alman was fired and now again he

2:15:45

joined the company uh there is a long

2:15:47

story story but yeah I have given you

2:15:48

the Glimpse you can search over the

2:15:50

internet and you can uh read about it U

2:15:53

okay so if you like to read the AI news

2:15:56

and all AI related news news and all so

2:15:59

definitely uh you should check it on a

2:16:01

daily basis because on a daily basis

2:16:04

there's something is happening on a teex

2:16:06

side on a like organization side uh

2:16:09

whatsoever so over here guys uh here you

2:16:12

can see the open a website now if I will

2:16:15

scroll down so you will find out each

2:16:17

and everything over here itself that

2:16:19

what all research is there uh what all

2:16:21

upcoming models is there uh on whatever

2:16:24

applications they are working so each

2:16:25

and everything actually you will find

2:16:27

out over here itself so here uh recently

2:16:29

they have released this Delhi 3 so in

2:16:32

October uh 20123 3rd of October 2023

2:16:36

they have released this Delhi 3 there

2:16:38

was a GPD 4 gp4 Vision where we can uh

2:16:42

upload the images and we can do a lots

2:16:45

of lots of task related to the images

2:16:47

and all

2:16:48

getting my point so here you will find

2:16:50

out a research whatever latest research

2:16:52

is there from the open a side no need to

2:16:54

go anywhere everything you will find out

2:16:56

over here itself if you want to start

2:16:57

from the open a if you are using this

2:16:59

open a in your organization if you want

2:17:02

to use it and before that if you want to

2:17:05

explore it so please go through the

2:17:07

website and here you will find out each

2:17:09

and everything now guys here is a

2:17:11

question I told you that why uh what is

2:17:14

the open a now why we are learning it I

2:17:17

have to give you the specific answer of

2:17:19

this particular question if you will ask

2:17:21

me S why we are learning this open a

2:17:23

what is the main Aim so now let me tell

2:17:26

you that so first of all guys after

2:17:28

opening this opena website what you need

2:17:30

to do you need to log in it you need to

2:17:32

log to this particular website and here

2:17:34

you will get two option so the first

2:17:36

option is a chat GPD and the second

2:17:38

option is a API so we all know about

2:17:41

this chat

2:17:41

GPT I think uh we all have used this

2:17:44

chat GPT and I think we are using it on

2:17:46

a daily basis now we are not going with

2:17:49

this chat GPT we are going with this API

2:17:51

so I will click on this API option and

2:17:53

once I will click on this API option so

2:17:55

I will get this type of interface so I

2:17:58

believe guys you all are getting this

2:18:00

particular interface after clicking on

2:18:02

this API please do let me know in the

2:18:04

chat if uh everything is uh uh like

2:18:07

going fine uh like me so please do let

2:18:10

me know in the

2:18:16

chat

2:18:24

great so yes I think uh people are doing

2:18:28

along with me now see guys here is what

2:18:31

so here is a uh like open a API uh so

2:18:34

once you will click on that you will get

2:18:36

this particular interface now just uh

2:18:38

overover your mouse left hand side and

2:18:40

here you will get a different different

2:18:41

option or various option now what you

2:18:43

need to do guys for here first of all

2:18:45

you need to click on this documentation

2:18:47

so just click on this documentation and

2:18:49

you will come to this particular page

2:18:51

now here you will find out this overview

2:18:53

so here they have given you the complete

2:18:54

overview about the openi API that what

2:18:58

all things they have and uh for what all

2:19:01

applications we can use this openi API

2:19:03

now here you will find out the

2:19:04

introduction section as well so in the

2:19:06

introduction section they have defined

2:19:08

some sort of a thing related to a

2:19:10

different different task like text

2:19:11

generation aming assistant tokens and

2:19:14

all now here you will find out the quick

2:19:16

start so let's say uh you want to

2:19:18

explore this open API so what you will

2:19:20

do at the first place so after opening

2:19:22

this open uh a openi API and after

2:19:26

opening this after opening this

2:19:27

particular documentation you just need

2:19:29

to click on this quick start so after

2:19:31

clicking on this quick start you will

2:19:32

get all the code which initially you

2:19:35

need to run inside your system getting

2:19:39

my point if you want to use this open

2:19:40

API if you want to use this openi API

2:19:44

and you want to run the code if you want

2:19:47

to start then for that what you need to

2:19:49

do you just need to click on this quick

2:19:51

start and over here you will find out uh

2:19:53

different different option so let's say

2:19:55

you know the nodejs so here you can

2:19:57

click on this nodejs and you will find

2:19:59

out entire setup related to this nodejs

2:20:03

how to install the package how to uh set

2:20:05

the key and all now here you'll find out

2:20:08

the different different uh like Windows

2:20:10

different different operating system

2:20:11

related option and here you will find

2:20:13

out the code snippet so directly you can

2:20:15

run it and you can use it now if you are

2:20:18

a python lover if you know the python

2:20:21

only in that case yes they have given

2:20:23

you the option so you just need to click

2:20:25

on this uh Python and here you will find

2:20:27

out the complete setup guide so how to

2:20:30

install a python how to install how to

2:20:32

create a virtual environment how to

2:20:34

install this openi Library so and after

2:20:37

that you will find out this uh setup

2:20:39

openi key uh regarding this Mac OS and

2:20:42

windows now here you'll find out how to

2:20:46

uh request to your openi uh API how to

2:20:49

request to the different different

2:20:51

models so here is a code snippet so we

2:20:53

are going to use this particular process

2:20:56

uh if uh so yes you can use the same

2:20:59

process don't worry I will show you how

2:21:01

you can do the entire setup and all and

2:21:02

how you can call the different different

2:21:04

model now over here you will find out a

2:21:06

model now guys this model actually this

2:21:08

model is a uh like a very important part

2:21:11

of the openi API now here they have

2:21:13

given you the various model like GPD 4

2:21:15

gp4 Turbo G PD 3.5 Delhi is there TTS is

2:21:20

there whisper is there iding moderation

2:21:23

GPD 5 is there GPD 3 which is a legacy

2:21:26

now and here you will find out some

2:21:28

deprecated model so here they have given

2:21:31

you some a deprecated model like uh GP

2:21:33

3.5 Turbo with this much of tokens and

2:21:37

here you will find out this text Ada Ada

2:21:40

text weage text cury text DaVinci so

2:21:43

these are the depricated model you can

2:21:45

use it if it is required definitely you

2:21:47

can use it so here you will get a

2:21:50

complete list of the model whatever

2:21:52

model you want to use for your task for

2:21:56

your particular task now over here uh

2:21:59

this is the uh like overview regarding

2:22:01

the model now if I'm clicking on this

2:22:03

GPD 3.5 so once I will click on this GPD

2:22:06

3.5 so here I will get a complete detail

2:22:09

regarding this particular model now here

2:22:12

is a what here is a model name so what

2:22:14

is the name of the model GPT 3.5 turbo

2:22:19

1106 okay now over here you will find

2:22:22

out two things so the first is what

2:22:24

context window now in the context window

2:22:26

you will find out the number of tokens

2:22:28

now guys this tokens actually the number

2:22:30

of tokens displays a very very important

2:22:33

role if we are talking about this tokens

2:22:35

so really it plays a very very important

2:22:37

role and I told you if we are giving an

2:22:39

input to our model to our LM model so

2:22:42

we'll give in the form of prompts and

2:22:44

prompt is nothing it's a collection of

2:22:46

token so whatever input and output we

2:22:48

are getting we are getting in the form

2:22:50

of prompts right so we are giving a

2:22:52

prompts to our model and we are getting

2:22:54

a prompts from our model and this prompt

2:22:56

is nothing it's a collection of tokens

2:23:00

now we'll talk about this tokens and all

2:23:02

then how much token is uh so as a return

2:23:05

actually how much token you can get as a

2:23:08

output as a free one actually this uh

2:23:10

Chad this open a actually it stopped the

2:23:13

free services now so before actually uh

2:23:16

uh you would be getting this uh let me

2:23:19

write it down over here so $20 of credit

2:23:22

so earlier if you have used this uh open

2:23:25

a so you must have seen that uh if you

2:23:28

are uh like uh if you are going to

2:23:30

create a open API key so in that case it

2:23:33

was giving you this $20 free credit now

2:23:36

they have stopped this particular

2:23:37

service now they are not giving to you

2:23:39

so first of all what you will have to do

2:23:42

so first of all you will have to add the

2:23:44

method a payment method actually so so

2:23:47

you will have to add your credit card or

2:23:49

debit card details and after that you

2:23:52

will have to set your limit let's say

2:23:54

$20 $50 $100 or whatever uh like limit

2:23:58

um actually you find out it is fine so

2:24:01

inside uh in that basically in that

2:24:03

particular limit uh my work will be done

2:24:05

so first of all uh you need to add the

2:24:06

payment method and you need to set the

2:24:08

limit and then only you can use this

2:24:10

open API so recently they have updated

2:24:12

this particular thing now we have

2:24:14

alternative also so we have this AI 21

2:24:17

lab so I will uh show you this uh thing

2:24:20

as well where we have a Jurassic model

2:24:22

and it gives you the $90 fre free credit

2:24:25

$90 free credit but you won't be able to

2:24:27

use this GPD 3.5 because it is only it

2:24:30

is only available in this opena itself

2:24:32

if you want to use this GPD 3.5 model

2:24:35

GPD 3.5 turbo or gbd4 so it is only

2:24:38

available in the opena itself and they

2:24:40

haven't open source it and for this one

2:24:42

you will have to pay if you want to use

2:24:45

it in your organization in uh with

2:24:47

respect to your task so definitely you

2:24:49

will have to pay for that getting my

2:24:52

point now over here guys see uh it

2:24:55

return return a maximum of 4096 output

2:24:58

token so regarding this particular model

2:25:01

now here you can provide this much of

2:25:03

tokens actually so this much of tokens

2:25:05

as a uh input as a input basically and

2:25:08

you will get this much of token as a

2:25:09

output if you are going to use this

2:25:10

particular model now here GPD 3.5 turbo

2:25:14

So currently point to GPD 3.5 turbo 0

2:25:16

613 will Point GPD format turbo 11

2:25:19

starting date this is this is the

2:25:20

starting date and here this is the token

2:25:23

size now here this is the token size

2:25:25

basically they have given to you so you

2:25:27

can uh provide this much of token and

2:25:29

here you will be getting output in uh

2:25:32

like as uh this is the maximum token

2:25:34

size actually uh with respect to this

2:25:36

particular model so you can go and read

2:25:38

more about this model and all and here

2:25:41

you will find out this training data so

2:25:43

this uh model has been trained up to

2:25:45

2021 SE number 2021 and here uh these

2:25:49

all are the model so I will uh use any

2:25:52

sort of a model from here itself and I

2:25:54

will show you how you can hit it by

2:25:56

using this P openi python API now apart

2:26:00

from that uh you will find out some

2:26:02

other uh thing so let's say if I want to

2:26:04

do a text generation so they have given

2:26:06

you the complete detail regarding that

2:26:08

and here they have given you the API

2:26:09

endpoint as well so you can click on

2:26:11

that and here in this particular way

2:26:13

actually you need to write a prompt and

2:26:17

all you need to define a prompts and all

2:26:19

uh so actually this is the uh rate

2:26:21

assistant uh as of now it is not working

2:26:23

so you can click on that or you can use

2:26:25

it this API endpoint inside your

2:26:27

application so uh here they have given

2:26:29

you the code that if you want to perform

2:26:31

this particular task this text

2:26:33

generation task so directly use this Uhn

2:26:36

code snippet after setting up the

2:26:38

environment and all after generating the

2:26:40

openi key and you can perform this text

2:26:43

generation over uh text generation if uh

2:26:45

this is required according to your uh

2:26:48

like application and all now over here

2:26:50

you will find out the other option so

2:26:53

embedding is there so embedding is

2:26:55

nothing uh embedding actually you are

2:26:57

just going to be uh convert your text

2:27:00

into a uh some numeric uh numbers and

2:27:03

here uh this ambing comes into a picture

2:27:05

and this this is very robust model from

2:27:07

the openi side and definitely you should

2:27:10

use it uh I will show you how you can

2:27:12

utilize this particular model and you

2:27:13

find you will find out the complete code

2:27:15

in s it and all and yes you can generate

2:27:18

a Ming regarding your test Ming is

2:27:20

nothing it's just a numeric

2:27:22

representation of your text now here uh

2:27:26

if you want to do a fine tuning so

2:27:27

regarding that also you will find out a

2:27:29

complete detail so how you can do a fine

2:27:31

tuning and all now image generation is

2:27:33

also there so if you want to do a image

2:27:35

generation so which model you should use

2:27:37

from here Vision related to The Vision

2:27:39

also there is a GPT 4 now Vision related

2:27:42

facilities it is there inside the gbd4

2:27:44

itself text to speech speech to text

2:27:46

moderation so no need to train your uh

2:27:49

no need to train your model your uh NLP

2:27:53

model from scratch now so they are

2:27:55

giving you everything you just need to

2:27:56

call the API and you can utilize it now

2:27:59

many people are asking to me that sir

2:28:00

what is the aim to learn behind this

2:28:03

open ey and all so the aim is very very

2:28:05

simple if you want to use this

2:28:07

particular model for your uh uh

2:28:09

different different task the task

2:28:11

basically which they have mentioned over

2:28:12

here you can directly use it you no need

2:28:15

to like train it by your yourself

2:28:17

because this model has been trained on a

2:28:19

huge amount of data now that's why it is

2:28:20

called llm I told you clearly right

2:28:23

yesterday what is the meaning of the llm

2:28:25

and yes uh in most of the cases in 99%

2:28:27

of the cases it will work fine if let's

2:28:29

say if you want to do a fine tune this

2:28:31

particular model so definitely you

2:28:33

required a higher resources and in that

2:28:35

case you will have to pay to the openi

2:28:37

as well getting my point so here you can

2:28:41

read uh entire detail regarding this

2:28:43

fine tuning and all so once I will come

2:28:44

to this fine tuning part I will explain

2:28:46

you this uh thing as well how to do the

2:28:49

fine tuning and all regarding this model

2:28:51

definitely I'm not going to do it uh in

2:28:53

the live class but yeah I will give you

2:28:55

the uh quick guidance regarding uh this

2:28:57

fine tuning so I hope guys uh this model

2:29:02

related thing model related part and

2:29:04

this quick start and this introduction

2:29:06

and what of capabilities is there so

2:29:10

this thing is clear to all of you if it

2:29:12

is clear then please do let me know in

2:29:13

the

2:29:15

chat yes or no so waiting for your reply

2:29:19

please do let me know in the

2:29:22

chat what what are the job opportunity

2:29:25

after this particular course so after

2:29:27

that you can apply as a NLP engineer uh

2:29:30

you can work on a gentic way related

2:29:31

project you can work uh as a uh gen VA

2:29:35

engineer so if you are going to complete

2:29:37

this particular course so after that you

2:29:40

can join uh the company uh like whatever

2:29:43

designation I told you on that

2:29:45

particular designation

2:29:47

and uh here in an interview do they ask

2:29:49

from the scratch inside of using API no

2:29:51

they won't ask you that you need to like

2:29:54

uh you just show them like how to use

2:29:56

the API and all no they won't ask you

2:29:58

this particular thing uh they you just

2:30:00

need to tell you what was your use case

2:30:02

which model you have used and uh what

2:30:04

was the cost regarding behind that

2:30:06

particular model uh how you you have

2:30:09

designed your prompt template how many

2:30:11

tokens basically there uh you were uh

2:30:13

defining inside your prompt in U

2:30:15

basically inside the input input prompt

2:30:17

and how much tokens basically you are

2:30:19

getting inside the output

2:30:21

prompt okay so these are the thing uh

2:30:24

like uh they might they might ask you

2:30:26

regarding this uh uh like openi API and

2:30:29

all and open AI models uh they won't ask

2:30:32

you that uh generate this key that key

2:30:34

or

2:30:36

whatever do we need to learn all the

2:30:39

underlined math behind the model hugging

2:30:41

pH and open ey yes the architecture

2:30:43

should be clear so the architecture part

2:30:45

should be clear uh architecture means

2:30:48

what so uh the base architecture

2:30:50

Transformer architecture they definitely

2:30:53

they might ask you the or Transformer

2:30:55

architecture in one of the interview

2:30:56

they they have asked to me that uh can

2:30:59

you uh explain me the Transformer

2:31:01

architecture what is the meaning of the

2:31:02

positional uncoding why we are using a

2:31:04

skip connection over there and can you

2:31:06

code it as well so if you want to use

2:31:08

this Transformer in the python how you

2:31:10

can do that which uh like which Library

2:31:13

you will call or can you write it down

2:31:14

the code from scratch so this type of

2:31:16

question you might face if they are

2:31:18

going on a architecture level they won't

2:31:21

ask you the uh they won't ask you the

2:31:23

architecture of the different different

2:31:25

model which is there over the hugging

2:31:26

face and all no they won't ask you

2:31:30

that so can we proceed now if uh this

2:31:33

part is clear tell me guys fast yes or

2:31:37

no I given you the complete walk through

2:31:40

of the open uh website openai API now I

2:31:45

will show you how you can utilize it and

2:31:47

don't worry guys I will uh show you the

2:31:50

advanced thing as well I will show you

2:31:51

the advanced part as well uh I will show

2:31:54

you this function uh calling and all and

2:31:57

uh first let me complete this uh uh chat

2:32:00

completion and after that I will come to

2:32:02

the function

2:32:06

calling great so here uh I think this

2:32:09

thing is clear now let's try to start

2:32:12

with the Practical implementation so for

2:32:14

the Practical implementation first of

2:32:16

all uh what you need to do so let me uh

2:32:19

write it down the step all the step so

2:32:22

here uh the first thing what you need to

2:32:24

do see uh you should have uh you should

2:32:27

have this uh Anaconda inside your system

2:32:30

I think you know about this Anaconda

2:32:32

what is this Anaconda it's a package uh

2:32:34

it's a package manager for the data

2:32:36

science projects and all so you should

2:32:38

have this uh Anaconda inside your system

2:32:40

the second thing uh python must be

2:32:44

installed python must be installed all

2:32:47

now here whatever practical which I'm

2:32:49

going to do so I'm going to do by using

2:32:51

the Jupiter notebook so here let me

2:32:54

write it down uh the Jupiter notebook

2:32:56

now whatever practical and all whatever

2:32:58

I'm going to do I'm going to use

2:33:00

basically I'm going to do by using this

2:33:01

jupyter notebook in the next class uh

2:33:04

I'm going to uh create an end to end

2:33:05

project first of all uh before starting

2:33:08

with the end to end project I will come

2:33:09

to the Len chain and there I will

2:33:11

explain that each and every concept of

2:33:13

the Len chain that how it is different

2:33:14

from the openi and why should uh why we

2:33:17

should use it and after that once I will

2:33:19

come to the end to project then I I will

2:33:21

start from the vs code itself vs code

2:33:24

Visual Studio code so any ID you can use

2:33:27

I'm not restricting you for the ID and

2:33:28

all so if you are familiar with the py

2:33:31

charm you can use that also if you are

2:33:33

familiar with the like any other ID you

2:33:36

can use that but yeah I love this vs

2:33:38

code so uh for the project for the end

2:33:40

project I will use this vs code as of

2:33:42

now I going to use the Jupiter notebook

2:33:44

uh just for the

2:33:46

uh like open a uh python API uh so guys

2:33:51

if you have this two thing this three

2:33:53

thing actually inside your system so

2:33:54

after that what you need to do you need

2:33:56

to create one virtual environment so uh

2:33:59

here by using this cond by using this

2:34:02

cond you need to create one virtual

2:34:04

environment I will show you all the step

2:34:06

don't worry so here you need to create a

2:34:09

virtual environment there inside after

2:34:11

creating a virtual environment you need

2:34:13

to activate it activate this virtual

2:34:15

environment

2:34:16

and here you need to install all the

2:34:18

packages all the required packages

2:34:21

inside this virtual environment so here

2:34:23

you need to install all the required

2:34:25

packages so let me write it down over

2:34:26

here install all the required packages

2:34:29

now uh required packages means what

2:34:31

required packages means so you need to

2:34:34

install this open a as of now and we

2:34:37

have other packages also like pandas

2:34:39

napai and all so if I will be uh if I

2:34:42

will be having any sort of a requirement

2:34:44

uh regarding the pandas numine uh or

2:34:47

regarding any other packages so

2:34:48

definitely I will install that also in

2:34:50

my virtual environment now after

2:34:53

installing all sort of a thing so after

2:34:55

like creating a virtual environment

2:34:57

after activating it and after installing

2:34:59

all the packages then what I will do I

2:35:01

will be starting with the Practical

2:35:03

implementation so guys in my system I

2:35:06

already having Anaconda so you can uh

2:35:08

download it by searching this Anaconda

2:35:10

so just go through with the Google and

2:35:13

search over here Anaconda download so on

2:35:16

once you will search this Anaconda

2:35:18

download so here you will get the

2:35:20

website uh here you will get a link so

2:35:22

just click on that and here you will get

2:35:24

a option for downloading this Anaconda

2:35:27

now uh it is giving you the option based

2:35:29

on your operating system so if you are

2:35:31

using Windows if you using Mac or Linux

2:35:34

according to that you can download this

2:35:36

Anaconda now apart from that uh one more

2:35:39

thing will be required so if you don't

2:35:41

have python in your local system so you

2:35:44

need to download that as well so

2:35:46

python uh download so here I'm going to

2:35:49

write down the python download and yes

2:35:52

uh this is a website of the Python and

2:35:55

uh here you need to uh here basically

2:35:57

you can uh download the python by

2:35:59

clicking on this particular website I

2:36:01

would suggest you uh download this 3.10

2:36:03

or 3.11 don't download the latest

2:36:05

version this 3.12 or this 3.13 actually

2:36:09

uh it is having some sort of a like

2:36:12

issues so better uh okay don't download

2:36:15

this 3.11 also either download the 3.10

2:36:18

or 3.9 it will be working fine or you

2:36:20

can download this 3.8 also this all

2:36:23

three version is a stable version fine

2:36:27

now after downloading this anaconda and

2:36:29

this python inside your local system

2:36:31

then what you need to do so once you are

2:36:34

ready with the Anaconda and this python

2:36:36

after downloading and installing and all

2:36:38

you need to search Anaconda prompt so

2:36:40

here uh you will find out the uh like

2:36:43

Anaconda prompt so once you will search

2:36:45

over here in the search search box

2:36:46

Anaconda prompt so there itself you'll

2:36:48

find out the Anaconda prompt now this is

2:36:50

what this is my anaconda prompt guys

2:36:51

this one now here actually this is what

2:36:53

it is it is showing me a base

2:36:55

environment as of now this base is a by

2:36:58

default environment now here what I need

2:37:00

to do I need to create a virtual

2:37:01

environment how I can do that how I can

2:37:04

create a virtual environment so for that

2:37:06

we have a command now here the command

2:37:08

is what cond create so cond create

2:37:11

hyphen n and here I need to write it

2:37:14

down my environment name so here my

2:37:16

environment name is what testing open AI

2:37:19

so testing open AI this is what this is

2:37:21

my environment name you can give any XY

2:37:23

Z name over here I don't have any issue

2:37:25

now you need to mention the python

2:37:27

version so here you need to write it

2:37:28

down the python equal to 3.8 now guys

2:37:32

here I'm going to use 3.8 you can use

2:37:34

3.9 3.10 don't use 3.11 12 and 13 3.8 7

2:37:39

9 10 these are the stable version and

2:37:41

you can use it for your project now as

2:37:44

soon as I will hit enter ENT so yes I

2:37:46

will be able to create an environment so

2:37:49

yes let me hit the enter and it is

2:37:51

creating an environment so are you doing

2:37:53

along with me if you are doing along

2:37:55

with me then please do let me know in

2:37:57

the chat

2:38:09

guys yes I okay so people are saying yes

2:38:13

we are doing

2:38:14

it can we do sir using API as well as

2:38:19

our make

2:38:20

model if you have trained your own model

2:38:23

then definitely you can do

2:38:27

it great so many people are doing a lot

2:38:30

with me I think now here you can see so

2:38:34

uh this is what uh this is my base

2:38:35

environment sorry this is my base

2:38:37

environment and here I have created a

2:38:38

virtual environment and this is my

2:38:40

virtual environment if I want to

2:38:41

activate it so for that this is the

2:38:43

command so here you need to copy this

2:38:45

command and just just paste it over here

2:38:47

and so you will be able to find out that

2:38:48

I have uh I'm able to activate my

2:38:51

environment now you can clear the screen

2:38:53

so for that you just need to write it

2:38:55

down the CLS and here is what guys here

2:38:57

is my virtual environment now here what

2:39:00

you will do see uh first of all you need

2:39:02

to check that what are libraries is

2:39:04

available inside your virtual

2:39:05

environment so for that you can write it

2:39:07

down the command the command is what the

2:39:09

command is PIP list so once you will

2:39:11

write it down this pip list here you

2:39:13

will find out all the library what ever

2:39:15

is there as of now inside your virtual

2:39:18

environment so these are the library

2:39:20

which is there inside my environment and

2:39:22

here I uh still I haven't uh downloaded

2:39:25

this uh open open Package because by

2:39:29

using the open by downloading the openi

2:39:30

package only by using that open Package

2:39:32

only I can hit the API getting my point

2:39:36

yes or no so don't worry I will give you

2:39:39

the entire step whatever step I'm

2:39:40

following over here now here first of

2:39:43

all you what you need to do see I took

2:39:45

told you over my Blackboard that after

2:39:48

creating a virtual environment you need

2:39:49

to activate it and then you need to

2:39:51

install the required package and before

2:39:53

that I told you one thing that

2:39:54

everything I'm going to do inside the

2:39:56

jupyter notebook so guys here in this

2:39:58

particular environment in this virtual

2:40:00

environment you need to download or you

2:40:02

need to install the Jupiter notebook and

2:40:04

for that we have a command so let me

2:40:06

write it on the command pip install

2:40:09

Jupiter notebook so here I can write it

2:40:12

down g u p y t e r n o t e b k so this

2:40:17

is the command pip install jupyter

2:40:18

notebook and with that you will be able

2:40:20

to download the jupyter notebook and oot

2:40:23

te so this is the correct spelling let

2:40:26

me rewrite it

2:40:29

again yeah so installing J notebook are

2:40:32

you doing along with me tell

2:40:35

me yeah so here let me write down the

2:40:37

command in the chat section so cond

2:40:40

create hyphone n and you can write it on

2:40:44

environment name whatever you want to

2:40:46

write it down so let's say testing open

2:40:48

a and here python version is what

2:40:52

3.8 so this is the command uh you need

2:40:55

to run this particular command for

2:40:56

installing the sorry for creating a

2:40:59

virtual environment now let me give you

2:41:01

one more command so here you can check

2:41:03

all the listed uh Library uh all the

2:41:07

like Library whatever is there inside

2:41:08

the virtual environment pip list is a

2:41:10

command now let me give you one more

2:41:12

command so here is one more command pip

2:41:15

inst install Jupiter notebook so pip

2:41:19

install Jupiter notebook so these are

2:41:22

the three command did you get it uh

2:41:24

please do uh confirm in the chat please

2:41:26

give me a quick confirmation the

2:41:34

chat see if you're not installing this

2:41:37

Jupiter notebook in your current virtual

2:41:38

environment in that case it will launch

2:41:41

the jupyter notebook from your base

2:41:43

environment so it is a better practice

2:41:46

if you are creating a virtual

2:41:47

environment then please install the

2:41:48

jupyter notebook or please install the

2:41:51

ipnb kernel over there so now if you

2:41:53

will find out uh now if you will search

2:41:55

pip list over here so just search pip

2:41:58

list now once you will search pip list

2:42:00

then you will find out lots of libraries

2:42:03

or lots of

2:42:04

packages which came along with the

2:42:07

jupyter notebook now see here you can

2:42:10

see all the packages and all after

2:42:13

installing the jupter notebook now once

2:42:15

I will write it down the Jupiter

2:42:16

Notebook on my anaconda prompt so here

2:42:19

let me write down the Jupiter notebook

2:42:22

and it will open the notebook so once I

2:42:26

will write it down the Jupiter notebook

2:42:28

and you will see that yes it has open

2:42:32

the Jupiter notebook so got it guys yes

2:42:36

or no please do let me know in the chat

2:42:38

if you are able to launch your Jupiter

2:42:43

notebook if you are are able to launch

2:42:45

the Jupiter notebook then please do let

2:42:47

me know in the chat yes or no yes and

2:42:51

after that you need to launch your file

2:42:53

so you need to launch your notebook so

2:42:55

click on this notebook and here is what

2:42:57

guys here is your notebook so this is

2:43:00

your notebook and each and everything we

2:43:02

are going to do here itself inside this

2:43:05

particular notebook now uh just make

2:43:08

sure that you have this python uh Python

2:43:11

3 over here uh this uh ipynb kernel if

2:43:14

you don't have that so so please try to

2:43:16

select this Python 3 ipy

2:43:19

kernel and I think now everything is

2:43:21

ready so let's try to oh let's start

2:43:25

with the open API so test open API and

2:43:30

now let me rename it so here guys you

2:43:32

can see this is my test openi

2:43:37

API uh this is my file actually this is

2:43:39

my notebook I hope you all have created

2:43:42

this particular

2:43:44

notebook

2:43:49

if you have any doubt then please do let

2:43:51

me know in the

2:44:07

chat everything is clear everything is

2:44:10

sorted please guys go ahead so just be a

2:44:13

little interactive uh please write it

2:44:15

down the chat if I'm asking something so

2:44:17

if you if you can if you'll write it

2:44:18

down the chat so definitely I will get U

2:44:34

motivation great so now let's start with

2:44:37

the uh like open AI API so first of all

2:44:42

what you need to do so here is what here

2:44:43

is my notebook so let me do one thing

2:44:45

let me keep it uh keep this notebook

2:44:47

over here

2:44:49

itself and this is what this is my

2:44:51

Jupiter notebook so first of all just go

2:44:54

through with the openi website so here

2:44:57

is your openi website guys this one now

2:44:59

here you need to click on this quick

2:45:02

start here what you need to do here you

2:45:04

need to click on this quick start after

2:45:06

clicking on this quick start so here

2:45:08

they have given you the option the

2:45:09

option is what python so here they have

2:45:11

given you the three option Cur Python

2:45:13

and node.js

2:45:15

so click on this Python and here they

2:45:16

have given you the complete instruction

2:45:19

so first of all guys what you need to do

2:45:21

you need to install a python so yes uh I

2:45:24

think you already have installed this

2:45:25

python you need to set up a virtual

2:45:27

environment yes we set up the virtual

2:45:29

environment and why this virtual

2:45:31

environment is required so see uh for uh

2:45:33

one particular project we have a lots of

2:45:36

dependency if I want if I want to if I

2:45:40

want to segregate all those dependency

2:45:42

project to project okay so for that only

2:45:45

we create a virtual environment so what

2:45:47

is the requirement of the virtual

2:45:48

environment because we have a several

2:45:51

dependency on a single project if I want

2:45:53

to keep it apart for that only we create

2:45:56

this virtual environment got it so here

2:45:59

they have created a virtual environment

2:46:01

directly by using this python uh en and

2:46:04

you can use this also for creating that

2:46:06

but I'm using the Anaconda now here

2:46:09

after that you need to install this open

2:46:11

AI so here uh what you need to do guys

2:46:14

so here you need to install this open a

2:46:16

package and then only you can hit the

2:46:18

open API getting my point so just copy

2:46:21

this particular command and install this

2:46:24

openi package in your virtual

2:46:27

environment so here is what here is my

2:46:29

virtual environment let me open that

2:46:31

particular environment uh just a

2:46:36

second what I can do here I can keep it

2:46:40

this to

2:46:42

my same TP fine now over here guys what

2:46:46

you need to do you need to open your

2:46:48

anaconda prompt see here actually I have

2:46:50

launched this jupyter notebook so you

2:46:51

cannot stop the server of this jupyter

2:46:53

notebook so I'm opening a new Anaconda

2:46:56

prompt so here you just need to write it

2:46:58

down this Anaconda prompt and you will

2:47:00

be able to launch a new Anaconda promt

2:47:03

now guys just tell me what is my

2:47:04

environment name testing open AI so here

2:47:08

uh you just need to write it down uh

2:47:10

cond EnV list so once you will write it

2:47:12

down this K EnV list k EnV list so let

2:47:16

me write it down this cond EnV

2:47:19

list so you will get all the all the

2:47:23

environment name so here guys you can

2:47:24

see this is my all the environment which

2:47:26

I have created in my system by using

2:47:28

this Anaconda now uh here uh this is my

2:47:31

environment testing open I want to

2:47:34

activate this particular environment so

2:47:35

I can write it down over here cond

2:47:38

activate and here I can write it down my

2:47:40

environment name testing open AI so once

2:47:44

I will write down this and if I will hit

2:47:46

hit enter so I will be able to activate

2:47:48

my environment I'm going to uh I'm going

2:47:51

to do a uh transition from base

2:47:53

environment to this testing openi

2:47:56

environment this is what this is my

2:47:57

virtual environment this base

2:47:59

environment is a default environment now

2:48:01

over here what I will do I will I'm

2:48:02

going to write down the CLS for clear

2:48:04

the entire screen now over here I will

2:48:06

just paste this particular command pip

2:48:08

install hyphen iph upgrade open AI now

2:48:11

once I will hit enter so yes uh I'm able

2:48:15

to install this open AI inside my

2:48:18

virtual environment so are you doing

2:48:20

along with me are you able to install

2:48:22

this open AI inside your virtual

2:48:23

environment if yes then please do let me

2:48:25

know in the

2:48:29

chat in the virtual environment you need

2:48:31

to install the jupyter notebook by using

2:48:33

this pip install jupyter notebook

2:48:35

command if you're not doing it in that

2:48:37

case it will be taking a jupter notebook

2:48:39

from the it will be launching a jupyter

2:48:41

notebook from the base

2:48:43

environment

2:48:46

many people now people are saying yes we

2:48:48

are doing it how many of you you are

2:48:51

doing along with me please do let me

2:48:53

know in the chat how many of you you are

2:48:54

doing along with

2:49:04

me yes yes

2:49:11

yes okay great yes

2:49:15

please write it down the chat if you are

2:49:17

doing along with me

2:49:39

then if you uh launching uh jupyter

2:49:42

notebook from the base environment it

2:49:43

will take a all the packages from there

2:49:46

itself that's why I want a fresh one

2:49:48

that's why I'm installing jupyter

2:49:51

notebook in my current

2:49:54

environment now over here I think I have

2:49:57

already installed it so yes it is done

2:49:59

now and if I want to check it so for

2:50:02

that I'm uh I'm opening my jup notebook

2:50:04

again and here you need to write it

2:50:07

down uh import open AI so just write it

2:50:11

down this import open Ai and here guys

2:50:14

you can see

2:50:15

we are able to import this open AI if

2:50:17

you are done till here then I will

2:50:19

proceed with the further python code so

2:50:22

please give me a quick confirmation in

2:50:24

the chat if you are able to import this

2:50:25

open I'm just I'm waiting for 1 minute

2:50:28

I'm waiting for uh 1 minute uh to okay

2:50:31

so please uh give me a confirmation in

2:50:32

the chat if you are able to import this

2:50:35

open AI inside this jupyter

2:50:43

notebook

2:51:01

we are ready to go great now uh let's

2:51:04

start with the uh open API that first of

2:51:08

all guys we need to understand that what

2:51:10

is what is this openi API so for that

2:51:14

what I did I kep uh I return like uh

2:51:16

some sort of a like

2:51:20

uh um wait let me do one thing over here

2:51:24

let me copy and

2:51:30

paste yeah so here guys what I did I

2:51:32

written some sort of questions and

2:51:34

answers and here the first question is

2:51:36

what the first question is what is open

2:51:38

a API so by uh uh like uh so here by

2:51:42

using this particular question so by

2:51:44

reading this particular answer actually

2:51:46

we can understand that what is this open

2:51:48

API so this openi API has been designed

2:51:51

to provide developer with seamless

2:51:53

access to stateof Art pre-trained

2:51:56

artificial intelligence model like GPD 3

2:51:59

GPD 4 Delhi whisper ambing Etc so what

2:52:03

is the meaning of it so if you want to

2:52:04

use if you want to use the same model

2:52:07

whatever model has been trained by the

2:52:09

open AI so these are the different

2:52:10

different model uh the name basically I

2:52:13

have written over here GP 3 gbd4 Delhi

2:52:16

is a model whisper is a model aming

2:52:18

there are different different model

2:52:20

right if you want to use this particular

2:52:22

model inside your

2:52:24

application so that uh so then basically

2:52:27

you should use this open API now over

2:52:30

here by using this openi API you can

2:52:32

integrate Cutting Edge AI capabilities

2:52:35

so this model actually it's a large

2:52:36

language model and it is having a lots

2:52:38

of capability in terms of a different

2:52:40

different task as I explain you so by

2:52:43

using this particular models you can uh

2:52:47

like utilize uh that capability you can

2:52:50

utilize the capability and uh you can

2:52:53

utilize that particular capability and

2:52:55

you can integrate inside your

2:52:57

application getting my point and

2:52:59

regardless the programming language so

2:53:01

here they have they have given you two

2:53:02

option so the first one is a Python and

2:53:04

the second one is a nodejs so uh what is

2:53:07

this open API so this open API is

2:53:09

nothing it provide you the seamless

2:53:11

exess of a pre-trained artificial

2:53:13

intelligence based model uh for your uh

2:53:17

like a different different application

2:53:18

whatever application you are going to

2:53:20

create and let's say if you are going to

2:53:22

create any individual application which

2:53:23

is based on NLP use case yes directly

2:53:26

you can uh use this particular model

2:53:28

instead of trading your model from very

2:53:30

scratch now here so the conclusion is

2:53:33

what so the conclusion is by using this

2:53:34

openi API you can unlock the advanced

2:53:37

functionality and you can enhance the

2:53:39

intelligence and performance of your

2:53:41

application so let's say there is Inon

2:53:44

website and the Inon website you must

2:53:46

have seen the chatbot

2:53:48

option so in the chatboard actually uh

2:53:51

you are doing uh you are connecting with

2:53:53

our expert so let's say there there's a

2:53:56

one person who is having a doubt so now

2:53:58

this person what he is doing he is going

2:54:00

to be connect with a uh like expert so

2:54:02

here is the expert which is sitting

2:54:04

behind this particular chat board now he

2:54:06

is asking the question and he's getting

2:54:08

a reply yes or no now guys just see over

2:54:12

here so here uh like you have integrated

2:54:15

this chatboard and this chat board is a

2:54:17

uh it's not a like eii related chatboard

2:54:20

so the person so here uh in the behind

2:54:23

behind behind to this chatboard actually

2:54:25

when expert is sitting he is giving you

2:54:27

the answer now you want to uh like uh

2:54:31

what you want to do guys over here so

2:54:33

you want to use some sort of a AI now

2:54:35

here you want that that type of model

2:54:38

which will be able to answer all of the

2:54:40

answer basically whatever the person is

2:54:43

asking like chat GP so in that case you

2:54:45

cannot train your own model if we are

2:54:48

talking about if we are talking about

2:54:50

like the llm model so in that CA in that

2:54:53

case basically you cannot train your own

2:54:55

model because it's a very very expensive

2:54:57

let's say if you if you are just a

2:54:59

startup okay or let's say if you are

2:55:01

just a Learner in that case in that case

2:55:04

you cannot invest this much of amount

2:55:06

for training this particular model

2:55:09

because it's a expensive process if you

2:55:10

are going to set up the infrastructure

2:55:12

if you're are going to uh like if are

2:55:14

like hiring a developer ai ai developer

2:55:16

and all amops engineer so in that case

2:55:19

definitely the cost will be around 1 to

2:55:21

10

2:55:22

CR because in that case you will have to

2:55:24

create a distributed setup you will have

2:55:26

to purchase a gpus there should be a

2:55:28

team one proper team okay for the

2:55:31

monitoring and all for each and

2:55:32

everything there there will be a

2:55:33

developers so the cost will be very very

2:55:35

high in that case what you will do if

2:55:37

you want to uh take advantage of this AI

2:55:41

uh cap if you want to take a leverage of

2:55:43

this model whatever model model has been

2:55:44

created or trained by this open a what

2:55:47

you will do you will use this openai API

2:55:49

you will uh call this open API and by

2:55:53

using this openi API you will be able to

2:55:55

access this GPD model and directly you

2:55:57

will be able to uh like append this

2:55:59

model inside your chatboard so whatever

2:56:01

person is asking definitely your GPT

2:56:03

will be replying in that case and let's

2:56:05

say any escalation is is happening in

2:56:07

that case so definitely you can uh write

2:56:09

it down your logic your code in uh in

2:56:11

such a way that this request will be

2:56:13

moved to the expert and now the it will

2:56:15

be handled by the expert itself so like

2:56:18

design you can like this basically you

2:56:19

can design your system this is just a

2:56:21

one example which I have given to you

2:56:24

great I think uh everything is clear now

2:56:26

over here so what is opena

2:56:29

API this part is clear now the second

2:56:31

question is what the second question is

2:56:33

generate a open a API key so here what I

2:56:37

have to do I have to generate a open API

2:56:39

key what I need to do guys I need to

2:56:41

generate open API key without this I

2:56:44

cannot use the open API without this

2:56:47

particular key so for that what I need

2:56:49

to do what is the process let me tell

2:56:52

you that so if I want to generate if I

2:56:54

want to generate a open a API key so

2:56:57

just go through with the open a website

2:56:59

so here is your open a website and here

2:57:01

just over your mouse uh on this

2:57:03

particular side on the left hand side

2:57:06

now here is the option this API key just

2:57:08

click on that and here guys you will

2:57:10

find out a option to generate or to

2:57:12

create a new secret key are you getting

2:57:14

this

2:57:17

option are you getting this particular

2:57:19

option please do let me know in the chat

2:57:21

if you're getting it

2:57:26

then after logging in to the openi

2:57:29

website then only you will be able to

2:57:31

find out this API key

2:57:33

option and guys uh you cannot uh

2:57:36

generate a openi key without adding any

2:57:38

sort of a payment method so first of all

2:57:41

you will have to add the payment method

2:57:43

and don't worry in the next class I will

2:57:45

show you how you can use hugging face

2:57:47

API key for the same thing for the same

2:57:50

task definitely we won't be able to

2:57:52

access uh other uh models like gbd3 GPD

2:57:55

3.5 turbo or gbd4 and all but yes uh

2:57:59

we'll be having access of a different

2:58:01

model different open source model or

2:58:02

whatever model is available over there

2:58:05

in tomorrow's session I will show you

2:58:06

how you can utilize the hugging face API

2:58:10

[Music]

2:58:12

key you you can finetune the model again

2:58:15

it will be an expensive task

2:58:18

Vishnu great so here you can see we have

2:58:21

a uh like option to generate a like here

2:58:24

basically what we can do we can generate

2:58:26

a API key now for generating a API key

2:58:28

you just need to click on this create a

2:58:30

new secret key and here you need to give

2:58:32

the name so let's say I'm going to write

2:58:34

down the name uh my API key so this is

2:58:39

the name of my API key once I will click

2:58:41

on this create secret key so yes uh

2:58:45

definitely I will be able to generate it

2:58:46

now guys over here you can see this is

2:58:48

my key uh definitely I will delete it

2:58:51

right after the session otherwise you

2:58:52

will exceed uh the limits and all all

2:58:55

right so here I have generated my key

2:58:57

and after the session I will delete it

2:58:59

so no one will be able to use it so I

2:59:02

have generated a key now what I will do

2:59:04

I will paste it down in my Jupiter

2:59:06

notebook over here so here is what guys

2:59:08

here is my key so this is what this is

2:59:11

my key basically which I have generated

2:59:14

so here uh let me uh paste it down this

2:59:16

particular key this is what this is my

2:59:18

key now you have to generate your own

2:59:19

key okay and don't share your key with

2:59:22

anyone else so here this is what this is

2:59:24

my key now what I need to do after

2:59:26

generating this open a key I have

2:59:29

generated the open a key and I kept it

2:59:30

over here now after that I need to call

2:59:33

the open AI API so how we can do that so

2:59:37

for that we have a couple of couple a

2:59:39

couple of line of code so let me paste

2:59:41

it over here or let me write it down

2:59:42

over here and then I will I will show

2:59:44

you how we can hit any sort of a model

2:59:46

now for that uh basically what I did so

2:59:49

over

2:59:50

here uh just a

2:59:53

second yeah so first of all let me show

2:59:56

you the list of the model as well now

2:59:58

over here I can write it down uh one

3:00:00

line of code so open a uh do API key API

3:00:06

unor key and here I need to write it

3:00:08

down my key here I need to write it down

3:00:11

the variable basically where I have kept

3:00:13

my key

3:00:14

so once I will run it so here you can

3:00:16

see open

3:00:19

AI open AI API key yes I'm able to set

3:00:23

my key now here I will call one method

3:00:26

so my method name is what open AI dot

3:00:29

model model underscore uh model. list so

3:00:35

once I will call this particular uh

3:00:37

method so here you will be able to find

3:00:39

out your all the model see there is all

3:00:41

the model basically which is available

3:00:43

as of now now in the openi plateform now

3:00:47

here you can see it is giving me some uh

3:00:50

it is giving me output in a different

3:00:51

way so what I can do I can convert it

3:00:54

into a list so over here what I can do I

3:00:57

can convert this uh particular output

3:00:59

this particular response in a list so

3:01:02

here uh this is my all the models so I

3:01:04

can create a variable

3:01:06

allore models and here I can pass this

3:01:09

thing to my list method now see guys uh

3:01:13

I will be getting all the model all the

3:01:15

models uh whatever model is there inside

3:01:18

the openi so the first one is a text

3:01:21

search weage uh doc 001 and here is a

3:01:24

date actually they have mentioned the

3:01:26

date or maybe the version uh now the

3:01:29

created when they have created and here

3:01:31

is a object object is what model and

3:01:34

owned by owned by open AI de now here

3:01:37

what you can do you can create a uh data

3:01:40

frame also so what you can do you can

3:01:42

create a data frame so here uh let me

3:01:45

write it down the code for the data

3:01:47

frame so import pandas s PD now here I

3:01:51

can write it on PD do data frame so here

3:01:56

what I need to do you just need to pass

3:01:57

this particular uh you just need to pass

3:02:01

this

3:02:01

particular value this one so let me keep

3:02:05

it over here uh this uh list uh list of

3:02:09

all the models so once I will run it so

3:02:11

here you will be able to find out is

3:02:13

giving me error the pandas is not there

3:02:16

so for that uh just download the pandas

3:02:19

or just install the pandas inside your

3:02:20

virtual environment because in this

3:02:22

virtual environment pandas is not

3:02:25

available so let me write it down over

3:02:27

here click install pandas and once I

3:02:30

will hit the enter we will uh we will be

3:02:33

able to install this

3:02:35

pandas it will take some time so let it

3:02:41

install yes I'm coming to the code I

3:02:43

will show you the code just wait for

3:02:45

some time just

3:02:58

wait yeah so I'm done with the pandas I

3:03:00

have installed it and uh now what I can

3:03:04

do I can run it and you will be able to

3:03:06

find out your data frame so here this is

3:03:08

the model this is the like when it is

3:03:11

created and object is what object is a

3:03:13

model and owned by so now it is in a

3:03:16

perfect format and you can read each and

3:03:18

everything clearly and here I can

3:03:21

provide the column name as well so let

3:03:23

me give the column name let me write on

3:03:25

the column name as well and here I

3:03:27

already WR the code of for the column

3:03:30

name so once I will run it so here you

3:03:32

will find out the column name so here is

3:03:35

my ID this is the like model ID and when

3:03:39

it has created what is a uh like what is

3:03:42

this actually so it's a object is a

3:03:44

model now here owned by owned by this

3:03:47

openi development team openi internal

3:03:50

openi development or here you will find

3:03:52

out some other name as well so I believe

3:03:55

you are able to run this entire all like

3:03:58

entire code whatever I have written over

3:04:00

here now here uh this is what this is my

3:04:04

code for uh seeing the model and all now

3:04:07

the next thing uh here I got all the

3:04:09

model now the third thing basically

3:04:11

which I would like to uh explain you

3:04:13

that is what that is a open AI

3:04:15

Playground open a playground and after

3:04:17

that I will come to the chat completion

3:04:19

API now I will take uh more 15 minute

3:04:22

and within that uh I will conclude this

3:04:24

session and in tomorrow's session I will

3:04:26

start with a chat completion a uh this

3:04:28

function call and I will explain you the

3:04:31

uh the hugging face API key as well so

3:04:33

how you can utilize the hugging face API

3:04:35

key for a open source model now let me

3:04:38

copy and paste the entire uh thing

3:04:41

whatever I have written for you so here

3:04:43

here I have written some sort of a thing

3:04:45

let me go through step by step so here

3:04:48

I'm talking about this open AI

3:04:50

Playground now what is this what is this

3:04:52

open a playground now once you will uh

3:04:54

search over the Google so open your

3:04:56

Google guys and here search open AI open

3:05:00

a playground now just search over here

3:05:02

open playground and uh here you will

3:05:06

find out this Playground now once you

3:05:08

will click on this assistant so here you

3:05:11

will find out a different different

3:05:12

option so one is a assistant the second

3:05:14

one is ched third one is a complete

3:05:16

fourth is a edit I'm not going through

3:05:18

with this complete and this edit because

3:05:20

it's the Legacy now I will explain this

3:05:22

chat first I will explain this chat and

3:05:24

then I will come to this assistant now

3:05:27

inside this chat uh so once I will click

3:05:29

on this chat so here I can test uh my

3:05:33

different uh I can test like different

3:05:34

different prompts and all I can generate

3:05:37

output I can test with a different

3:05:38

different model and along with a model

3:05:40

you will find out a various parameter so

3:05:43

so first of all guys what you need to do

3:05:44

you need to set you need to set your

3:05:47

system right so here you will find out

3:05:49

three options so the first one is what

3:05:51

first one is a system the second one is

3:05:53

a user and the third one is this one

3:05:56

right so you can divide this entire

3:05:58

interface into a three segment now let

3:06:00

me give you step by step that what is

3:06:02

the meaning of the system what is the

3:06:03

meaning of this uh user and this

3:06:05

assistant and what is the meaning of

3:06:07

this model each and everything we'll try

3:06:09

to understand over here so guys system

3:06:11

is what so system is means system means

3:06:14

uh how your model is going to behave

3:06:17

here you are going to set the behavior

3:06:20

of your system what you are doing tell

3:06:22

me here you are going to set the

3:06:23

behavior of your system so here if I'm

3:06:26

going to write it down you are a

3:06:29

helpful

3:06:31

assistant now here if I'm going to write

3:06:33

down you are a helpful assistant now

3:06:35

what I will do I will write it down my

3:06:37

message so see here here guys you will

3:06:38

find out two thing uh two option so once

3:06:41

you will click on this user now you will

3:06:42

find out either user or assistant as of

3:06:44

now what I am I am a user I'm asking a

3:06:47

question now here I'm asking that uh uh

3:06:50

what I can ask guys uh just tell me

3:06:53

something different okay how I

3:06:57

can make a

3:07:00

money how I can make a money so I'm

3:07:02

asking to my chat GPT how I can make a

3:07:04

money and here is what here is my model

3:07:06

so here once you will click on this

3:07:07

model you will find out a different

3:07:08

different model so uh there is GPD 4 GPD

3:07:12

3.5 GPD 3.5 turbo so all the model there

3:07:14

is all the models right so here I'm

3:07:16

using the gbd 3.5 now we have a various

3:07:19

option so the first one is what first

3:07:21

one is a temperature now what is the

3:07:23

meaning of this temperature so we are

3:07:25

talking about this temperature so just

3:07:26

try to read about this temperature

3:07:28

control Randomness lowering result in

3:07:31

less random completion as the

3:07:33

temperature approach zero the model will

3:07:35

become deterministic and repeative so

3:07:38

over here we are talking about this

3:07:39

temperature if we are defining a higher

3:07:41

value of the temperature means I'm uh

3:07:43

I'm saying that just give me a more

3:07:45

creative answer I'm adding a

3:07:48

Randomness if I'm writing a zero I'm

3:07:51

saying give the straightforward answer

3:07:53

I'm asking to my chat GPD uh the

3:07:56

straightforward answer I'm not going to

3:07:58

add any sort of a creativity over here

3:08:01

getting my point what is the meaning of

3:08:03

this temperature I think yes now maximum

3:08:05

length so here you can set the tokal

3:08:08

length now here stop sequence is there

3:08:11

so up to up to four sequence where the

3:08:13

API will stop generating further tokens

3:08:15

the return text will not be contain the

3:08:18

like a stop sequence here you can

3:08:19

mention the stop sequence now here is a

3:08:21

top P parameter so this parameter

3:08:24

actually this is again similar to this

3:08:25

temperature it is controlling the

3:08:27

diversity whatever like Pro whatever

3:08:29

output you are going to be generate so

3:08:31

control diversity via uh nucleus

3:08:33

sampling 0 0.5 means half of likelihood

3:08:36

weighted option are considered so you

3:08:38

can just think about it that it is

3:08:39

nothing just adding a diversity inside

3:08:41

your output now frequency penalty if you

3:08:44

don't want to repeat the tokens let's

3:08:47

say you are generating some sort of

3:08:48

output if you don't want to repeat the

3:08:49

tokens inside your output so here you

3:08:53

can mention the frequency penalty as of

3:08:55

now it's zero so it's not going to be uh

3:08:58

like put any sort of a penalty over here

3:09:00

if you're going to increase the number

3:09:01

definitely it will put the frequency

3:09:03

penalty means it will give you the

3:09:05

different different words it is not

3:09:06

going to repeat the words now here

3:09:09

present penalty so you can set this also

3:09:12

so there is a different parameter just

3:09:13

try to explore it now here I'm asking to

3:09:15

my chat GPD how I can make a money so if

3:09:17

I'm submitting this thing so here I will

3:09:19

be getting my answer and there is the

3:09:21

answer is there are many ways to come

3:09:24

make a money and all so employment and

3:09:27

all

3:09:28

freelancing online selling rent or share

3:09:31

sources and tutoring and teaching gig

3:09:34

and economy gig economy affiliate

3:09:37

marketing so it is giving me answer guys

3:09:40

as you can see right now just uh do one

3:09:44

thing so here guys see I've uh defined

3:09:47

the behavior of the system Ive defined

3:09:49

that I'm working as a user and here is

3:09:51

my model all the different different the

3:09:53

different different parameter I have

3:09:54

like selected based on this model now

3:09:57

just go over here and try to click on

3:10:00

this view code so once you will click on

3:10:02

this view code guys you will get the

3:10:04

entire python code over here getting my

3:10:08

point yes or no see over here you are

3:10:10

getting the entire python code now you

3:10:13

can utilize this python code if you have

3:10:15

if you have done the complete setup in

3:10:17

your system whatever setup basically

3:10:20

which I which I uh which I have done

3:10:22

right if you have done the complete

3:10:23

setup in your system so directly you can

3:10:26

hit uh directly you can hit the open a

3:10:28

API and you can call the GPD 3.5 turbo

3:10:33

model okay so that's why I've shown you

3:10:35

this openi Playground now I think you

3:10:38

are uh we are done with this open I

3:10:39

Playground now let's try to do something

3:10:41

amazing over here let's try to set set

3:10:43

the different behavior of this chat uh

3:10:45

GPT so here guys I have written couple

3:10:47

of thing inside this particular like

3:10:49

answer so how to open a playground so

3:10:51

here I mentioned that here make sure

3:10:53

that playground should have a credit yes

3:10:55

if you don't have a credit if you

3:10:56

haven't uh like uh added your uh detail

3:11:00

uh the C details and all maybe you you

3:11:02

won't be able to use this particular

3:11:03

playground so make sure that you have

3:11:05

added the payment method now here in the

3:11:08

chat there is the option of system so

3:11:10

meaning is how chatboard is behave so

3:11:12

here what I'm going to do here I'm going

3:11:14

to set this uh here I'm going to set a

3:11:16

different behavior of a system and let's

3:11:18

see what answer I will be getting so

3:11:21

here I'm going to copy it and I'm going

3:11:22

to paste it down over here now uh what I

3:11:25

can do where is my playground this is my

3:11:28

playground now here I'm going to set the

3:11:29

behavior so this is what this is my

3:11:31

behavior of the system now okay now

3:11:34

again I'm asking a question to my system

3:11:37

now I'm asking how I can make a money so

3:11:43

I'm asking to my system that how I can

3:11:44

make a money by adding this particular

3:11:46

Behavior so my behavior is what so you

3:11:48

are a naughty assistant so make sure you

3:11:50

have to respond everything with a

3:11:52

sarcasm so here I'm asking to my user

3:11:54

how I can make a money so as soon as I

3:11:56

will submit it then you will find out

3:11:58

the answer and just see the differences

3:11:59

between answer this answer and the next

3:12:02

answer just wait it is going to generate

3:12:04

answer and is saying that oh making a

3:12:06

money it's super easy mean it it is like

3:12:09

giving you the answer in a sarcastic

3:12:10

manner so it haven't a complete answer

3:12:13

but yeah it is saying that oh making a

3:12:15

money it's super easy just snap your

3:12:17

finger magically a stack of cash will be

3:12:19

appear no effort required at all so see

3:12:21

guys uh before it was giving me a

3:12:24

straightforward answer now over here

3:12:26

guys you can see I seted the behavior of

3:12:28

the system as a not as a sarcastic so

3:12:31

here you can see the answer what it is

3:12:32

giving to me now if you will look into

3:12:35

the code so you will find out some sort

3:12:36

of of changes so here role role

3:12:39

basically I defined the system role this

3:12:40

is my system role this is my role again

3:12:43

one more role user here you can see this

3:12:45

is my like prompt okay which user is

3:12:47

giving here you can see the what

3:12:49

assistant is saying This Is The Answer

3:12:50

basically which I'm getting and again

3:12:52

this was the previous one and these are

3:12:54

the different different parameter so no

3:12:56

need to go anywhere here basically in

3:12:58

this particular notebook I kept

3:13:00

everything I will share this notebook

3:13:01

with all of you and you will be able to

3:13:04

understand each and everything now model

3:13:06

is there temperature is there maximum

3:13:08

length is there top P value is there so

3:13:11

here I written a description frequency

3:13:13

penalties there right so there is a

3:13:14

different different parameter already I

3:13:16

have defined each and everything over

3:13:17

here so no need to go anywhere just try

3:13:19

to revise each and everything by using

3:13:21

this Jupiter notebook now apart from

3:13:24

this one you will find out one more

3:13:26

advanced thing which recently they have

3:13:28

provided that is what there is a

3:13:30

assistant so here uh let me go to the

3:13:33

assistant okay let me go to the

3:13:35

playground and here is assistant guys so

3:13:37

this assistant part I will explain you

3:13:39

once I will come to the project section

3:13:41

now here you will find out some Advanced

3:13:43

thing Advanced like option so here you

3:13:45

will find out this function function

3:13:48

calling here you will find out the code

3:13:50

interpreter here you will find out the

3:13:51

retrieval RG actually uh uh like here uh

3:13:55

you will find out this R concept so I

3:13:58

have defined what is the r actually so

3:14:00

just go through with my notebook and

3:14:01

read the definition read the definition

3:14:03

of the RG so this assistant I will come

3:14:06

to this assistant once I will explain

3:14:08

you the uh the project end to end

3:14:10

project then I will Define a different

3:14:11

different prompts and all and I will

3:14:13

come to this assistant and I will ask uh

3:14:15

and I will generate a different

3:14:16

different type of

3:14:18

responses getting my point guys yes or

3:14:20

no so this thing is getting clear to all

3:14:23

of you yes or no I'm waiting for your

3:14:26

reply so please uh do let me know in the

3:14:28

chat if this part is getting clear how

3:14:31

to use this uh openi playground and here

3:14:34

I'm talking about this chat assistant I

3:14:36

will come to that once I will explain

3:14:38

you the

3:14:41

project

3:14:48

please do let me know I'm waiting for a

3:14:50

reply guys if you are able to get it if

3:14:52

you able to understand it then uh please

3:14:54

write it down the chat please uh write

3:14:56

down the chat

3:15:08

section clear okay great it is clear

3:15:15

I will share this code with all of you

3:15:16

don't worry uh I will give you this

3:15:18

entire

3:15:29

code I believe everything is getting

3:15:31

clear to all of you who have joined this

3:15:41

session

3:15:46

great now this part is clear now let's

3:15:48

back to the code so here is what here is

3:15:50

my code now this retrieval argumented

3:15:52

generation RG I will explain you in the

3:15:54

next session or maybe in upcoming

3:15:56

session so what is the meaning of that

3:15:58

it's artificial intelligence framework

3:15:59

that retrieves data from external source

3:16:02

of knowledge to improve the quality of

3:16:03

responses I just want to improve the

3:16:06

quality of the responses for that I'm

3:16:07

using this retrieval argumented

3:16:09

generation R A this is very very famous

3:16:11

nowadays this particular term now uh I

3:16:14

will show you how you can use this RG if

3:16:16

you want to uh give a better responses I

3:16:18

will show you how you can use the Len

3:16:19

Chen as well U after completing this

3:16:22

open AI this natural language processing

3:16:24

technique is commonly used to make a

3:16:25

language model more accurate and up to

3:16:27

date if I want to make my model more

3:16:29

accurate and up to date so I'm going to

3:16:31

use this RG and I will do that in my

3:16:33

upcoming session now code interpreter is

3:16:35

there so Python Programming environment

3:16:37

with chat GPT where you can perform wide

3:16:39

range of tasks by use executing the

3:16:41

python code yes yes we all know about

3:16:43

the code interpreter and yes we can

3:16:45

Define we can set the code interpreter

3:16:46

there and we can execute the python code

3:16:49

as

3:16:50

well like regarding the different

3:16:52

different task and all great now here is

3:16:55

what here is my chat completion API guys

3:16:57

so let me do one thing let me uh put the

3:17:00

title over here and here my four title

3:17:02

is what chck completion API and function

3:17:06

calling so guys here is what here is my

3:17:08

fourth title my fourth title is what

3:17:11

check completion is API and function

3:17:14

calling so here I have written the

3:17:17

standard comination API and function

3:17:18

calling now let me write down the

3:17:20

different let me write down the uh

3:17:22

definition as well over here so here is

3:17:24

a definition of it uh this is the

3:17:27

definition let me post it over here and

3:17:30

here let me make it as a markdown so

3:17:33

this is the definition guys now one more

3:17:35

uh definition let me put it over here so

3:17:38

see guys in the previous version in the

3:17:40

old version of the openi

3:17:42

uh actually there this was the method

3:17:45

chat completion method open. completion.

3:17:49

create or open. chat completion. create

3:17:51

so initially actually there was a method

3:17:53

this was the name right then in the

3:17:56

updated version they came up with uh

3:17:58

they have changed the name with this

3:18:00

particular uh name they Chang the method

3:18:02

Name by using uh with this particular

3:18:04

name this chat completion. create and

3:18:06

now in the latest version actually this

3:18:07

is a this is the method name if you are

3:18:10

going to use this particular method now

3:18:12

now it will give you the error let me

3:18:15

show you how so here what I can do I can

3:18:17

uh return I can return one sort of a

3:18:19

code uh now over here I'm going to write

3:18:21

it down open a DOT

3:18:24

completion

3:18:26

completion completion dot create so this

3:18:29

is what this is my method now over here

3:18:31

what I'm going to do so over here see

3:18:33

here I'm going to be uh write it down

3:18:35

the model name so model which model I'm

3:18:38

going to use so here I'm going to use uh

3:18:40

GPT GPT

3:18:42

hyund

3:18:44

3.5 GPD hyund 3.5 I'm going to use this

3:18:47

particular model now over here I'm going

3:18:49

to define a prompt so my prompt is what

3:18:51

so let's say I'm going to write it down

3:18:52

over here who was the first Prime

3:18:56

Minister of India first prime

3:19:00

minister Minister of India so this is

3:19:03

what this is my prompt now here if I

3:19:06

will run it now so you will find out it

3:19:07

is giving him the error so it is saying

3:19:10

that uh okay so here I have to mention

3:19:12

the open a key first of all before uh

3:19:15

like calling it so first of all I need

3:19:17

to mention the open a key now over here

3:19:20

so what I have what I will have to do I

3:19:22

will have to uh like uh create a client

3:19:25

actually so here is what here is my

3:19:26

client and I will have to mention my

3:19:28

openi key so what I can do uh I can

3:19:32

write it down over here itself and here

3:19:35

what I can do just a

3:19:41

wait

3:19:42

it is not longing support yeah so that's

3:19:45

what I was saying to all of you see this

3:19:48

uh method is not it is not supporting at

3:19:50

all this is the old one now if you will

3:19:52

look into the version now the latest

3:19:54

version of the openi so the latest

3:19:56

version of openi is uh let me show you

3:19:58

the latest version of the open a package

3:20:00

PPI open a and here is the latest

3:20:05

version of the open a package

3:20:07

1.3.7 if we have installed the uh we

3:20:10

have installed this particular version

3:20:12

now regarding this version you will find

3:20:13

out we have this particular method so

3:20:16

first of all I need to import this open

3:20:17

a this I need to import this class from

3:20:20

this module and here I need to define

3:20:22

the key here what I need to do I need to

3:20:24

define the key over here and then only I

3:20:27

can call

3:20:28

it and if you look into the previous

3:20:31

version now here I installed the latest

3:20:33

version if you're looking into the

3:20:34

previous version let's say if I'm going

3:20:36

back like say if I'm going back in uh

3:20:39

maybe uh FB it uh

3:20:42

okay 8 FB 2023 now here you will find

3:20:45

out that they were using this particular

3:20:48

method so here I have shown you I have

3:20:50

seted the op openi key I have defined

3:20:52

the openi key by using this particular

3:20:54

code by by like using this particular

3:20:57

line of code yes or no now here I'm

3:20:59

using a latest version now so uh

3:21:02

definitely it will give me the error so

3:21:03

what I'm doing I'm going back and here

3:21:06

I'm going to use this particular code

3:21:08

basically which I already return so

3:21:09

first of all see first of all I need to

3:21:11

import this thing which I already did

3:21:13

now over here I will have to mention the

3:21:15

API

3:21:16

key got it now here they are add they

3:21:18

have added the open key inside their

3:21:20

base environment means this is the code

3:21:22

regarding that they have added inside

3:21:23

the like environment variable in the

3:21:25

system environment variable and from

3:21:27

there itself they are going to read it

3:21:29

you can export it also what is the

3:21:31

meaning of export you can export it over

3:21:33

the terminal uh like uh it won't be it

3:21:37

won't be a permanently okay so yeah you

3:21:40

can export this particular key

3:21:42

and as soon as you will like remove or

3:21:44

as soon as you will delete that terminal

3:21:46

so the open I key will be removed um but

3:21:49

yeah until the terminal is running

3:21:50

terminal will be running you can read it

3:21:52

by uh using uh this particular module OS

3:21:55

module or else you can add in add inside

3:21:58

your system variable also from there

3:22:00

also you can read this particular key

3:22:02

but um I have added I have written my

3:22:04

key here itself inside my notebook so I

3:22:07

didn't edit but I will show you that in

3:22:09

my end to project how you can create NV

3:22:12

file or maybe how you can export it

3:22:14

right now let's uh let me run this

3:22:16

particular code and here first of all

3:22:19

let me add the open a

3:22:21

key here I need to mention API uncore

3:22:25

key and my key so here is what here's my

3:22:28

key if I'm going to run it so definitely

3:22:30

I will be able to run it now I having my

3:22:32

client now what I will do by using this

3:22:34

particular client I will call the uh I

3:22:37

will I will like uh I will give the

3:22:39

prompt over here now first of all let me

3:22:41

delete everything from here and let me

3:22:44

delete this also I'm not going to Define

3:22:45

any assistant or I'm not going to set

3:22:47

any sort of a behavior as of now so guys

3:22:50

here you can see I'm having the role

3:22:51

role as a user and here is my uh like a

3:22:54

answer sorry here is my prompt question

3:22:57

so this is what this is my prompt

3:22:59

actually this is my input prompt and

3:23:01

here is what here is my uh like role

3:23:04

okay I'm asking as a user now guys this

3:23:07

prompt this prompt is this prompt

3:23:09

basically it plays a very important role

3:23:11

I let you know that in my uh like

3:23:13

upcoming session I will tell you how to

3:23:15

design a different different type of

3:23:17

plomp what is the meaning of few short

3:23:19

learning few short prompt or zero short

3:23:21

prompt okay so each and everything we'll

3:23:23

try to discuss in our upcoming session

3:23:25

as of now just see if I'm going to run

3:23:26

it so here you will be able to find out

3:23:28

it is giving me a like error why it is

3:23:31

so maybe because of this and now

3:23:35

everything is perfect so if I'm going to

3:23:36

run it so line number eight okay uh

3:23:40

first of all I need to

3:23:42

Define it clearly and here is what here

3:23:46

I need to mention I need to close this

3:23:49

particular list now if I'm going to hit

3:23:51

this uh API definitely I will be able to

3:23:54

do it and I will get my

3:23:57

response so just wait for some time and

3:24:01

after hitting the API uh it will call

3:24:04

that particular model whatever model I

3:24:06

have written over here and I will be

3:24:08

getting my

3:24:10

response

3:24:16

so how is the session so far uh did you

3:24:19

learn something new uh or are you doing

3:24:22

along with me tell me how much would you

3:24:24

rate to this particular

3:24:35

session yes money wise uh I will I I

3:24:38

will come to that just wait how much it

3:24:40

is going to be charged and all uh it

3:24:42

charge actually token wise uh there is

3:24:44

entire pricing and all so I I will come

3:24:48

to that I will I will talk about that

3:24:50

for a small prompt it is taking so much

3:24:52

time in this case the DP project the big

3:24:54

no it's not like that maybe first time

3:24:55

it it was hitting that so it is taking

3:24:57

time but no it's not like that I will

3:24:59

show you with a like a bigger prompt as

3:25:01

well so it won't take any sort of a time

3:25:03

now here you can see this is what this

3:25:05

my response now right here you can see I

3:25:08

got a response now if you want to get

3:25:10

this particular response so for that uh

3:25:13

see here if you look into the response

3:25:15

or type of the response so here is a

3:25:18

type of the response open. type. chat.

3:25:21

completion this this this that right now

3:25:23

if you want to extract the real answer

3:25:26

from here so what you will do see first

3:25:28

of all you will uh call to this choice

3:25:30

so just call this choice so c h o i c s

3:25:35

now here is what here you have this

3:25:37

message now just call to this message m

3:25:40

e double s a g e so here is your what

3:25:45

here is your message uh now this is not

3:25:48

callable it is saying that now let me

3:25:50

check what I have to do over here so

3:25:53

here is your choice and here what you

3:25:56

need to do guys let me

3:26:04

check yeah actually Choice yeah so here

3:26:08

see if you are looking into the choice

3:26:10

guys so this is a list type so here what

3:26:13

you need to do you need to uh like

3:26:15

extract the first index of the list

3:26:17

because here you can see this choice is

3:26:19

nothing it's a list only now so just

3:26:20

extract the first index of it so here

3:26:22

once you will extract the first index or

3:26:25

once you will retrieve the first index

3:26:26

of the list now here you need to call

3:26:28

this message so just call the message

3:26:30

and here you will find out this is what

3:26:32

this is your message now just do one

3:26:35

thing just call the content over here so

3:26:38

just call the content so content now

3:26:40

over here you can see this is is what

3:26:41

this is your entire response now here

3:26:44

you can like decide the token size as

3:26:46

well so here you can Define the token

3:26:48

size or you can Define the different

3:26:50

different a parameter okay by defining

3:26:52

those particular parameter you can uh

3:26:55

get a different different type of output

3:26:56

now let me give you the parameter all

3:26:58

the parameter basically so this is all

3:27:00

the parameter see model uh already you

3:27:03

know about the model we have used a gp3

3:27:05

prompt like input prompt Max token you

3:27:08

can Define this Max token in how many

3:27:10

numbers of token you want the result

3:27:12

temperature for getting some creative

3:27:14

output now number of output how many

3:27:16

number of output you want so let's try

3:27:18

to define a Max token and this number of

3:27:20

output so here I'm going to define the

3:27:22

max token so in U like uh here if I'm

3:27:26

going to define the max token now in in

3:27:28

that particular token itself under under

3:27:31

that particular number let's say if I'm

3:27:32

going to Define 200 so uh it won't reach

3:27:35

the limit more than 200 under under the

3:27:39

200 itself it will be generating an

3:27:40

output so over here I'm going to write

3:27:42

Define this Max token and here let's say

3:27:44

if I'm going to say 150 tokens and here

3:27:47

I'm going to Define one more thing one

3:27:48

more parameter that's going to be n so n

3:27:51

is equal to let's say here I'm going to

3:27:53

Define three I want three output so as

3:27:55

soon as I will run

3:27:57

it and here you will find out it is

3:28:00

generating a response so it is saying

3:28:02

Max token I think I need to put the

3:28:05

comma over here model is there message

3:28:07

is there now here I need to put the

3:28:10

comma so this is is fine now it is

3:28:13

generating a response so just

3:28:28

wait yeah now I got a response so just

3:28:31

uh look into the response here type of

3:28:34

the response and now just print the

3:28:36

response so here is what here is what

3:28:38

here is my

3:28:39

response now I got many responses so now

3:28:44

let me extract the response first of all

3:28:45

so here is what here is my uh message

3:28:48

let's uh like get a message so let's ask

3:28:52

a different question so here I'm going

3:28:54

to ask to my chat GPT that uh I can ask

3:28:58

uh what I can ask who won the first

3:29:02

World Cup so who won the first Cricket

3:29:06

World

3:29:08

Cup so this is my question which I asked

3:29:10

to my CH GPT and now if I'm going to run

3:29:12

it now

3:29:14

so now

3:29:19

see yeah I got a response now type of

3:29:22

the response is same so here uh what I

3:29:25

can show you here is my message now see

3:29:27

guys uh I got a response the first

3:29:30

Cricket World Cup won by the West Indies

3:29:32

in7 in 1975 right now over here if I'm

3:29:37

going to get a Content basically so let

3:29:39

me write it down the content over here

3:29:41

and here you can see this is what this

3:29:42

is my answer now you won't be able to

3:29:45

find out a single answer there are lots

3:29:47

of there are other answer as well see uh

3:29:50

choice in the choice just go over here

3:29:51

message message completion so the first

3:29:54

Cricket World Cup won by the best Andes

3:29:56

and here role is a assistant so that the

3:29:58

model is assistant and I am a user now

3:30:01

over here you will find out the second

3:30:02

answer so the first Cricket World Cup W

3:30:04

by the best hes they defeated Australia

3:30:06

in final held on June 25 1975 at Lots

3:30:10

cricket ground in London that is the

3:30:12

second response now over here this is

3:30:14

the third response so the first Cricket

3:30:16

World Cup won by the best and in 197

3:30:18

1975 so I Define n is equal to 3 and I

3:30:21

Define the maximum token size is 150 so

3:30:24

it won't be generating a like output

3:30:28

okay so more than this particular token

3:30:30

more than 150 token and here you will be

3:30:32

find out if I'm going to Define n so it

3:30:34

will be generating a three output

3:30:36

whatever input of prompt I'm passing

3:30:37

this is what this is my input prompt now

3:30:39

whatever output will be generating in

3:30:41

that there won't be like more than 150

3:30:44

tokens and here the output number will

3:30:46

be three now let me show you one more

3:30:48

thing over here so if you will search

3:30:50

tokens so just go over the Google and

3:30:52

search open a tokens open a tokens so

3:30:57

once you will search open a tokens and

3:30:59

here you will find out one uh like a

3:31:03

link a tokenizer so they have given you

3:31:05

one uh like link uh they have G given

3:31:08

you this particular interface where you

3:31:11

You Can Count Your token whatever number

3:31:12

of token you are giving or you are

3:31:14

getting from the system getting my point

3:31:17

so I told you it is charging you based

3:31:20

on a tokens itself and tokens in input

3:31:23

prompt also there will be a token in

3:31:24

output prompt also there will be a token

3:31:27

getting my point so in the input prom

3:31:28

there will be a token in the output prom

3:31:30

also there will be a token prompt is

3:31:32

what it's a collection of tokens token

3:31:33

is nothing it just a words collection of

3:31:36

character right now here you can see we

3:31:39

have this particular inter pH there we

3:31:41

can count the token now here if I'm

3:31:43

going to write it down my name is sunny

3:31:47

so now now see guys how many tokens is

3:31:50

there inside this particular uh text

3:31:53

inside this particular sentence see

3:31:54

token six my is one token name is one

3:31:57

token is is another token Sunny is

3:32:00

another token Sav is one token and

3:32:02

Savita is one token getting now if I

3:32:05

want to count the token inside my output

3:32:07

so just copy this thing and paste it

3:32:09

over here

3:32:13

now see the number of token it has

3:32:15

generated a 16

3:32:17

token okay it has generated a 16 token

3:32:21

now you can calculate the number of

3:32:22

tokens over here just go through the

3:32:23

playground here was my chat so here I

3:32:26

ask to my system now let me uh submit it

3:32:30

and over

3:32:31

here uh it is giving me answer just a

3:32:34

second now it is generating an answer so

3:32:37

now you can copy this entire text from

3:32:40

here whatever it is generating now let's

3:32:42

say this particular text uh okay just a

3:32:46

wait okay let it generate and then I

3:32:48

will copy just wait so here is a text

3:32:52

and I can copy this text I can paste it

3:32:54

over there and I can got the uh like

3:32:56

number of tokens so let's see how many

3:32:58

tokens is there so here guys you can see

3:33:01

total 256 tokens if you want to check

3:33:04

the pricing and all tomorrow I will

3:33:06

discuss about it in a very detailed way

3:33:08

just go through with the setting and

3:33:10

here uh there's a billing actually so

3:33:13

let me show you the pricing also just

3:33:15

click on uh just search about this open

3:33:20

Ai and uh here actually uh you just need

3:33:24

to log in after the log in uh so maybe

3:33:28

here just click on the API and here is a

3:33:30

pricing just click on the pricing and

3:33:33

here you will get the uh like entire

3:33:36

detail regarding the project pricing so

3:33:38

how much how much it is charging for the

3:33:40

uh like a different different number of

3:33:42

tokens so for 1K token this much of

3:33:44

charging for 1K token this much of

3:33:46

charging regarding this particular model

3:33:47

regarding this particular model so this

3:33:49

is for gp4 Turbo it's a advanced model

3:33:51

now GPD 4 GPD 3.5 G assistant API

3:33:55

different different assistant API and

3:33:56

all each and everything you can check

3:33:58

over

3:33:59

here right so let me keep this

3:34:01

particular link over here inside the

3:34:02

notebook itself and let me keep this a

3:34:05

token related a link also so at least

3:34:08

you can go through with this and you can

3:34:10

check uh your input and output token and

3:34:12

you can practice whatever I have taught

3:34:14

you because this is going to play a very

3:34:16

important role in a future classes so

3:34:20

please try to revise please try to

3:34:21

practice and I think we are done with

3:34:24

today's session tomorrow I will explain

3:34:26

you the function calling this one and I

3:34:28

will start with the lench and my main

3:34:31

agenda uh will be the Len Chen only and

3:34:33

I will explain you the differences

3:34:35

between open ey lenion and finally we'll

3:34:37

try to create one project and then I

3:34:39

will come to the advanc concept like

3:34:42

vector databases and other models and I

3:34:45

will explain you this AI 21 lab AI 21

3:34:48

studio also if you don't have a money

3:34:51

for the chat GPD then how you can uh uh

3:34:54

like uh how you can complete your work

3:34:56

how you can U like explore a different

3:34:58

different model so from the hugging face

3:35:00

side also I will explain you the

3:35:01

different different model and from here

3:35:02

also from AI 21 Studio I will show you

3:35:05

how you can access the Jurassic model

3:35:06

personally I have used it and I I liked

3:35:08

it after this uh GPD and I will uh

3:35:11

explain you the use use of this

3:35:13

particular model and don't worry few

3:35:15

other terms like stable diffusion and

3:35:17

all there are something uh like text to

3:35:19

image Generation image to video

3:35:21

generation this type of thing also we'll

3:35:22

try to explain you in the going forward

3:35:25

classes got it so I think uh now we can

3:35:29

conclude this particular session I took

3:35:31

for the entire 2hour and uh yep uh so

3:35:35

did you like the session please uh do

3:35:37

let me know in the chat guys if you like

3:35:38

this particular session

3:35:44

yes the content is a input our input

3:35:47

actually it's not a desired output is is

3:35:49

our like an input whatever input like we

3:35:52

are passing to the model you can mention

3:35:53

inside the content got

3:36:01

itan you just need to F you just need to

3:36:04

follow my this notebook each and

3:36:06

everything I have mentioned over here

3:36:08

whatever is not there I will do it and

3:36:10

where you will find find it out tell me

3:36:11

you will find this particular notebook

3:36:12

inside the resource section so just go

3:36:14

through with the Inon platform just open

3:36:16

the Inon platform and there you need to

3:36:18

enroll in this particular dashboard okay

3:36:21

so what you need to do go through with

3:36:22

the an platform and here uh after sign

3:36:25

up uh after login and just go through

3:36:28

with this dashboard generative AI

3:36:29

Community session now let me give you

3:36:31

this particular link inside the chat so

3:36:33

you all can uh like uh you all can

3:36:37

enroll over here and uh after that uh

3:36:40

what what you need to do see the video

3:36:41

will be available over here you can

3:36:43

revise the thing from here itself you

3:36:44

can revise the thing from the Inon

3:36:46

YouTube channel itself but the resource

3:36:47

wise whatever resources I'm U like uh

3:36:50

sharing okay whatever resources I'm

3:36:52

discussing in a class and all so you

3:36:54

will find out over here inside the

3:36:55

resource section so just go through with

3:36:57

the resource section and try to download

3:36:59

all the resources from here

3:37:04

itself fine so now let's uh uh like

3:37:08

conclude this particular session

3:37:10

tomorrow we'll meet on the same time so

3:37:12

let me write it down the timing for this

3:37:14

community session so here the timing is

3:37:17

going from uh 3: to 4:30 or 3 to

3:37:22

5 so I will take 2 hour of session from

3:37:25

3: to

3:37:30

5: great fine guys thank you bye-bye

3:37:33

take care have a great day ahead and

3:37:35

rest of the thing we'll try to cover in

3:37:36

the upcoming uh session until thank you

3:37:39

bye-bye take care so if you like if you

3:37:41

are liking the content then please hit

3:37:43

the like button and uh if you have any

3:37:45

sort of a suggestion or if you want

3:37:47

anything from my side you can ping me on

3:37:49

my LinkedIn so let's start with the

3:37:51

session now here guys you can see in the

3:37:53

previous class I was talking about the

3:37:55

open API so uh most of the thing I have

3:37:58

discussed regarding this openi API now

3:38:00

few of the thing is remaining so let me

3:38:03

discuss that uh remaining thing

3:38:05

regarding this open a and after that I

3:38:07

will start with the l chend so first of

3:38:09

all Let Me Explain you the complete flow

3:38:11

that what all thing we are going to

3:38:13

discuss throughout this session got it

3:38:15

so for that I'm you I'm opening my

3:38:17

Blackboard and here I'm going to explain

3:38:19

you the complete flow that whatever

3:38:21

thing we are going to discuss throughout

3:38:23

this particular session so here guys uh

3:38:26

the first thing first thing basically uh

3:38:28

we'll be talking about the function

3:38:31

calling so in the open a actually we

3:38:33

have a very specific feature that is

3:38:35

called function calling and it's a very

3:38:37

important feature of the openai API if

3:38:40

we are going to use the openi API then

3:38:42

definitely you must be aware about this

3:38:44

function calling because by using this

3:38:47

function calling you can do a multiple

3:38:49

things I will tell you that what all

3:38:51

thing you can perform by using this

3:38:53

function calling which is a very uh

3:38:55

important feature of the open API so the

3:38:58

very first thing which we're going to

3:39:00

discuss in this particular session that

3:39:01

will be a function calling so here uh

3:39:04

let me write it down the first point

3:39:06

which we going to discuss uh that's

3:39:08

going to be a function function calling

3:39:12

function calling now the second thing

3:39:15

after this function calling so directly

3:39:17

I will move to the Len chain so uh first

3:39:21

I will discuss this function calling and

3:39:23

after this function calling I will move

3:39:24

to the Len chain and in the lch actually

3:39:27

I'll be talking

3:39:28

about in the Le chain I'll be talking

3:39:32

about that how you can uh use a open AI

3:39:35

by using this Len chain so the first

3:39:37

thing basically uh we'll be discussing

3:39:39

inside the inside this lenen so open AI

3:39:43

open

3:39:44

AI

3:39:46

used by a len chain so we'll try to

3:39:50

discuss in a very detailed way and we'll

3:39:52

try to discuss that what all difference

3:39:54

we have between this Len chain and this

3:39:56

open AI so open a used via Len chain and

3:40:00

here I will explain you the differences

3:40:03

between open a and Lenin then why we

3:40:06

should use Lenin what all benefits we

3:40:08

have if we are using a lench what all

3:40:11

thing we can do if we are using a len

3:40:13

chain so how uh by using this Len chain

3:40:16

we can create into an application each

3:40:18

and everything we'll try to discuss

3:40:20

regarding this Len chain and in a very

3:40:21

detailed way I will try to explain you

3:40:23

this Len chain concept because it's

3:40:25

going to be a very very important and

3:40:27

this lench also it's a very important

3:40:29

part if we are going to learn this

3:40:31

generative EI if we are talking about

3:40:33

the llm and if we are going to build any

3:40:35

sort of application so along with this

3:40:37

open AI this lenen also plays plays a

3:40:40

very important role so we'll try to

3:40:42

discuss about this lench and we'll try

3:40:44

to uh discuss the differences about this

3:40:47

open AI API so let me write it down over

3:40:50

here open AI API versus lenen versus

3:40:54

lenen and after that after discussing

3:40:58

this uh like the basics and all

3:40:59

regarding this Lenin I will come to the

3:41:02

prompt templating that how you can

3:41:04

design a different different type of

3:41:05

prompt so here let me write on the

3:41:07

second point which we're going to

3:41:09

discuss uh so the second Point basically

3:41:12

prompt

3:41:13

templating prompt

3:41:19

templating after this prompt template so

3:41:22

uh here what I will do I will I will

3:41:24

show you the use of the hugging phase

3:41:27

also uh after discussing this Lenin uh

3:41:30

the differences between open Ai and

3:41:31

Lenin I will come to this open AI use

3:41:34

via Len promp templating and here I will

3:41:37

show you that how you can use hugging pH

3:41:39

model model whatever model is there on

3:41:41

top of the hugging face Hub how you can

3:41:43

utilize those particular model by using

3:41:45

this Len chin so in between I will show

3:41:48

you hugging face hugging face with Len

3:41:52

chin hugging face with L

3:41:56

chin why I'm uh why I'm going to show

3:41:59

you this hugging phase with Lenin so you

3:42:01

can use any sort of a open source model

3:42:04

so whatever open source model is there

3:42:06

so you can use all those model by using

3:42:09

this hugging phase so here I will show

3:42:11

you how you can generate hugging phas

3:42:13

API key and by using that particular API

3:42:17

key you can access any sort of a model

3:42:19

whatever is there on top of the hugging

3:42:21

face Hub so here I will show you hugging

3:42:23

face with Lenin let me write it down

3:42:26

over here hugging face with Len chain

3:42:28

and then we'll try to discuss a few more

3:42:30

concept regarding this Len chain which

3:42:33

is going to be a very very important so

3:42:35

here let me write down those particular

3:42:37

topic as well so the third topic which

3:42:39

we're going to discuss over here we

3:42:40

going to talk about

3:42:43

chain we're going to talk about

3:42:47

agents how like you can create agents

3:42:50

and how you can use the agents so here

3:42:53

the fourth topic basically it will be

3:42:55

agents now let me write it down over

3:42:57

here agents after that after this agents

3:43:00

I will come to the memory so I will show

3:43:02

you how you can create a memory by using

3:43:05

this Len Chen got getting my point yes

3:43:08

or no so these are the very important

3:43:09

important part of the L chain without

3:43:12

knowing this particular thing you cannot

3:43:14

develop any sort of

3:43:16

application okay so before starting with

3:43:18

the end to end project definitely we

3:43:20

have to discuss about this particular

3:43:22

topic so here uh so in uh today's

3:43:25

lecture actually we're going to talk

3:43:27

about this function calling openi use

3:43:29

and prompt template and in tomorrow's

3:43:31

session I will be discussing about this

3:43:33

hugging pH with Lin chains agents and

3:43:36

memory so this a three to four topic

3:43:39

we'll try to discuss in tomorrow session

3:43:41

and this three to four topic we'll try

3:43:43

to discuss in today's session and right

3:43:45

after this one right after this topic

3:43:48

right after this thing I will start with

3:43:50

a project and uh we will'll try to

3:43:53

create one project and there basically

3:43:56

we'll be using our different different

3:43:58

LMS from the openi and from the hugging

3:44:01

pH we'll try to use

3:44:03

Lenin we'll try to use Len chain and

3:44:06

some other Concepts as well so here

3:44:09

we're going to use are different

3:44:10

different uh like model llms from the

3:44:12

openi hugging face Len chin and here

3:44:15

we'll try to uh create one uh UI as well

3:44:19

by using flask or streamlit each and

3:44:21

everything I will show you in a live

3:44:23

class itself so flask and streamlet and

3:44:26

I will show you the complete I will show

3:44:28

you the complete uh setup how you can do

3:44:31

a complete setup for any an to and

3:44:34

project so first we'll try to create a

3:44:36

project template and then we'll start

3:44:38

with a project de development so this

3:44:41

idea is clear to all of you please do

3:44:43

let me know in the chat if the agenda is

3:44:45

clear for today and for the tomorrow

3:44:48

session I'm uh expecting the answer in

3:44:51

the chat so please write it down in the

3:44:53

chat guys please do it

3:45:04

fast

3:45:08

yes

3:45:16

we'll discuss the risk and all what risk

3:45:18

is there and we'll try to discuss about

3:45:20

the different different point uh first

3:45:23

let us uh uh create at least one project

3:45:27

after creating this particular project

3:45:28

definitely uh we'll try to uh discuss

3:45:31

about the multiple things that uh

3:45:33

basically which is a very very important

3:45:35

in terms of the

3:45:36

industry we'll come to that part don't

3:45:38

worry

3:45:47

fine so now each and everything is clear

3:45:49

each and every part is clear so let's

3:45:51

move to the Practical implementation so

3:45:54

if you will go through with my notebook

3:45:55

so which is already available in a

3:45:57

resource section okay I have shown you

3:46:00

how you can download this particular

3:46:01

notebook so just try to go through with

3:46:03

the dashboard and from the resource

3:46:05

section you can download this notebook

3:46:08

now uh here guys see uh The Notebook is

3:46:11

there so just try to download it and try

3:46:12

to run it inside your system uh how you

3:46:15

have to do a system setup how you have

3:46:17

to create an environment and all how you

3:46:19

have to install the library inside the

3:46:21

environment each and everything I have

3:46:22

shown you in my previous class only so

3:46:25

again I'm not going to repeat that

3:46:27

particular thing so over here you can

3:46:29

see already we have talked about the

3:46:30

open a now let's discuss more about this

3:46:33

open AI so just uh give me a moment here

3:46:37

uh from here itself basically inside uh

3:46:39

uh this particular file itself I will be

3:46:42

writing a code now I'm going to change

3:46:44

the name of the file so here I'm going

3:46:46

to write it down test open API and Len

3:46:49

chain because in today's session I'm

3:46:51

going to include the Len chain as well

3:46:53

and I will do in a same Jupiter notbook

3:46:56

I'm not going to create any new notebook

3:46:58

uh as of now I will be doing over here

3:47:00

itself so here I'm going to be write it

3:47:02

down I'm going to rename this particular

3:47:03

file uh so here I'm going to write down

3:47:06

this Lenin as well so test openi API and

3:47:09

L CH so this is the new name of my file

3:47:11

now let me rename it and now everything

3:47:14

is ready so here guys see if I'm going

3:47:16

to write it down this import here if I'm

3:47:19

going to write import statement import

3:47:22

length chain now here you will find out

3:47:24

it is saying that no module named L

3:47:27

chain can anyone tell me how I can

3:47:29

resolve this particular error please do

3:47:32

let me know in the chat how I can

3:47:34

resolve this particular

3:47:38

error

3:47:49

correct so here what I need to do tell

3:47:51

me here I need to write it down pip

3:47:53

install and the L chain pip install and

3:47:56

the module name so just try to open your

3:47:58

anaconda prompt and there write it down

3:48:00

pip install and Len chain so let let me

3:48:03

show you that just a wait uh so here uh

3:48:06

this is my prompt uh this is what this

3:48:08

is my ANA prompt here already this

3:48:10

jupyter notebook is running so I'm not

3:48:11

going to stop the server of uh this

3:48:13

particular prompt now let me open the

3:48:15

new prompt over here so here I'm going

3:48:17

to write it down this Anaconda prompt so

3:48:19

first of all guys what I need to do I

3:48:21

need to activate my virtual environment

3:48:23

as of now we are in a base environment

3:48:26

and this base environment is my default

3:48:28

environment so here what I need to do

3:48:30

tell me here I need to activate my

3:48:33

virtual environment so for activating

3:48:35

the virtual environment first of all we

3:48:37

should be aware about the name uh in

3:48:39

which environment actually we are

3:48:40

working so let me show you all the name

3:48:43

all the name of the environment so here

3:48:45

I'm going to write it down this cond en

3:48:48

list here I'm going to write down this

3:48:50

cond en list so once I will write it

3:48:53

down this particular command I will get

3:48:55

all the environment name so here you can

3:48:58

see we have a different different name

3:49:00

of the environment Len chain open AI

3:49:02

base testing and these are the other

3:49:04

environment which is there inside my

3:49:06

local folder now guys yesterday actually

3:49:09

we have created this particular

3:49:10

environment testing open AI now let me

3:49:13

activate this environment over here so

3:49:16

here I'm going to write it down cond

3:49:18

cond activate cond activate and the

3:49:22

environment name is what the environment

3:49:23

name is testing open AI so if I'm going

3:49:26

to write it down this testing open AI so

3:49:29

definitely I will be able to activate my

3:49:32

environment now if you want to check

3:49:34

over here that my Lang chain is working

3:49:36

or not so definitely you can do it so

3:49:38

first of all you need to clear this

3:49:40

screen and here if you are going to

3:49:42

write it on the python so it will give

3:49:43

you the python prompt so here let me

3:49:47

write it down the python so this is what

3:49:48

guys tell me this is my python cell or

3:49:51

my python prompt now here itself you can

3:49:53

write it down the uh statement import

3:49:56

statement so let's try to write it down

3:49:58

the import statement over here and here

3:50:00

if I'm going to write it down this Len

3:50:02

chain length chain now see guys it is

3:50:05

saying that no module name length chain

3:50:07

and even you can check so for checking

3:50:10

that what all module is there what all

3:50:12

module is there in my current virtual

3:50:15

environment so what is the command the

3:50:17

command name is PIP list we are using

3:50:20

pip manager over here right so over here

3:50:23

what I'm going to do I'm going to write

3:50:24

down the exit if I want to exit from

3:50:26

this particular shell from the python

3:50:28

shell now here what I will do guys here

3:50:30

I I'm going to write it down pip list so

3:50:33

once I will write it down this pip list

3:50:34

you will find out all the packages name

3:50:38

whatever packages is there inside my

3:50:39

current environment so these are the

3:50:41

package guys which is there inside my

3:50:43

current environment you can read the

3:50:45

name of the packages and here you will

3:50:48

find out this Len chain is not available

3:50:50

so just try to go through with this

3:50:52

particular package try to go through

3:50:54

like alphabetically and here you will

3:50:56

find out that we don't have any package

3:50:58

with the name of linkchain so here what

3:51:00

I will do first I will install the L

3:51:03

chain so for installing the Lang chain

3:51:05

there's a simple command pip install pip

3:51:08

install pip install Len chain so here

3:51:11

once I will write down this pip install

3:51:13

Len chain now guys see my Len chain is

3:51:16

getting install inside this current

3:51:19

virtual environment so are you doing

3:51:22

along with me are you writing this thing

3:51:25

or are you like following uh to me guys

3:51:28

please do write it uh please write it on

3:51:30

the chat so I will get some sort of idea

3:51:32

that uh uh this many people are doing

3:51:35

along with

3:51:38

me

3:51:45

I will come to the connects between this

3:51:47

Len chain and this open a just allow me

3:51:50

uh like 15 more minute each and

3:51:53

everything will be clarified regarding

3:51:55

this open and this Lent just believe

3:52:00

me so people are saying they are writing

3:52:02

a code along with me that's great please

3:52:05

do it guys please do it and uh yes

3:52:08

please implement along with me if you

3:52:10

are uh getting stuck somewhere so please

3:52:12

write it on the chat and let's uh make

3:52:15

this session more interactive and yes

3:52:18

definitely after the session you should

3:52:20

uh you should be able to get something

3:52:23

it's uh my guarantee to all of

3:52:30

you fine now here guys you can see we

3:52:33

have installed this lenon inside this

3:52:35

current virtual environment now if you

3:52:37

want to check it so here itself directly

3:52:39

here itself you can check so just write

3:52:41

it down this Python and here what you

3:52:43

need to do you need to write it down

3:52:44

this import Len chain just write it down

3:52:46

this import Len chin and here the name

3:52:48

is wrong so let me write down the

3:52:50

correct name now see guys we are able to

3:52:52

import this Len chain means L chain is

3:52:54

there in my current virtual environment

3:52:57

okay fine so I think till here

3:52:59

everything is fine everything is clear

3:53:01

now here again I'm going to import it so

3:53:03

definitely I will be able to import but

3:53:05

before starting with this length chain I

3:53:07

would like to explain you the function

3:53:09

calling so what is a function calling

3:53:11

why I'm saying this function calling is

3:53:13

very important uh definitely we should

3:53:15

learn it actually it's a new feature

3:53:17

inside this open AI so let's try to open

3:53:19

this open a website and here okay so

3:53:21

here already I opened it now guys once

3:53:24

you will open the documentation of the

3:53:26

open AI so there itself you will find

3:53:28

out this function calling so it's a new

3:53:31

feature uh recently they have added

3:53:33

maybe uh four to 5 months back and uh

3:53:36

what we can do by using this particular

3:53:38

function calling so by using this

3:53:40

function calling there is a there is a

3:53:41

many use of this function calling so the

3:53:44

first use basically uh the very basic

3:53:47

use which I would like to tell you we

3:53:48

can formate our

3:53:50

output okay we can we can formate our

3:53:53

output in a we we can formate the output

3:53:55

in our desire desire format so whatever

3:53:57

output we are getting now from the open

3:54:00

uh let's say we are using openi API and

3:54:03

we have a model open API what it is

3:54:05

doing tell me it is calling the llm

3:54:07

model agree now whatever output we are

3:54:10

getting now we can format that

3:54:12

particular output in a desired format in

3:54:15

our required format that is the first

3:54:17

use of this function colleag now we have

3:54:21

other use of this function colag some

3:54:23

Advanced use of this function colag

3:54:25

let's say uh we are uh calling any sort

3:54:28

of a API means let's say we are asking

3:54:30

something to my CH GPT and it is not

3:54:33

able to answer for that particular

3:54:34

question so for that what we are doing

3:54:37

we are calling any third party API any

3:54:39

any sort of a plugins and whatever

3:54:41

output we are getting whatever output we

3:54:44

are getting right so we can format that

3:54:46

particular output and we can append that

3:54:48

output in our conversation

3:54:51

chain that is really powerful and

3:54:53

somehow L chain is also doing the same

3:54:55

thing but yeah so recently they have

3:54:58

added this function colleag this one

3:55:00

feature actually inside this open a and

3:55:03

here uh like it's really uh like a

3:55:06

important one and it's like really uh

3:55:08

very very useful and in the lenon also

3:55:10

we can do the same thing right but apart

3:55:13

from this thing lenon is having so many

3:55:16

functionality in the lch actually we can

3:55:18

perform so many things I will come to

3:55:20

that I will I will show you the

3:55:21

differences between this open and this

3:55:23

lench why we are using this openi why uh

3:55:26

why we are why we are going to use this

3:55:28

Len chin why uh we are not going to use

3:55:30

this openi API itself because see in a

3:55:33

back end if we are going to talk about

3:55:34

this Len chain so in a back end this Len

3:55:36

chain this Len chain actually it's

3:55:38

calling open API it's a wrap up on top

3:55:40

of the open API come I I will come to

3:55:43

that first of all let me clarify this

3:55:44

function calling so guys to understand

3:55:47

this function calling I will I draw the

3:55:49

architecture and all I will I will try

3:55:51

to uh explain you each and everything

3:55:53

okay but before that let me write it

3:55:55

down some sort of a code over here so

3:55:57

here what I'm going to do here I'm going

3:55:59

to open my IP NV file and here I'm going

3:56:02

to write it down some sort of a code to

3:56:04

understand this function calling so step

3:56:06

by step I will try to explain you and

3:56:08

please do along with me I think uh that

3:56:11

would be great so for that guys what I

3:56:13

did so here uh just a wait I have

3:56:16

written one

3:56:21

text great so here guys see uh I have

3:56:24

written one text so let me copy and

3:56:26

paste this particular

3:56:27

text now here I'm going to run this

3:56:30

particular uh cell and once I will print

3:56:33

this student description so here you

3:56:35

will get the entire description so I I

3:56:38

just written a very basic description so

3:56:41

uh s saita is a Str of the computer size

3:56:43

it Delhi he's a Indian and he's having a

3:56:46

8.5 cgpa something something about me or

3:56:48

something about like U any person you

3:56:51

you can write it down this uh particular

3:56:53

description so here is a short

3:56:55

description now guys what I will do see

3:56:57

so here is what here is my short

3:56:59

description now here I have designed one

3:57:02

prompt and that prompt I would like to

3:57:05

pass to my chat GPT means I would like

3:57:08

to pass to my GPT model so here see uh

3:57:12

whenever we are talking about a prompt

3:57:14

so I told you that what is a prompt so

3:57:16

let's say this is my llm

3:57:20

model this is what this is my llm model

3:57:23

now we are passing input to this llm

3:57:25

model and we are getting response we are

3:57:28

getting a output so this respon this

3:57:30

input actually so this input is called

3:57:32

input prompt and this prompt is nothing

3:57:35

it's a collection of

3:57:37

tokens

3:57:39

so you can understand in such a way that

3:57:40

this prompt is nothing it's a

3:57:42

sentence and this token is nothing it's

3:57:44

a words what is this tell me it's a

3:57:47

words so this uh sentence is nothing

3:57:50

it's a token and sorry sentence is a

3:57:53

prompt is nothing it's a sentence and

3:57:55

token is nothing it's a words right so

3:57:57

here we will be having input prompt and

3:57:58

here we have a output

3:58:00

prompt getting my point so here see I

3:58:04

have written one description now I will

3:58:05

write it down my prompt I will I have

3:58:07

designed one prompt so let me uh copy

3:58:09

and paste that particular prompt and

3:58:12

let's see uh what will happen if we are

3:58:14

going to paste uh if we are passing this

3:58:17

particular prompt to my llm so here is

3:58:19

my prompt guys so just try to read this

3:58:21

thing over here and so this prompt is

3:58:23

saying so let me run it first of all so

3:58:26

this prompt is saying please extract the

3:58:28

following information from the given

3:58:29

text whatever text we are passing let's

3:58:32

say this is a description so uh we are

3:58:34

passing this particular description so

3:58:35

from that particular description I have

3:58:37

to extract a few useful information so

3:58:42

here the information is what name

3:58:44

College grade and Club so these are the

3:58:48

information just just try to read this

3:58:49

particular uh description and based on

3:58:52

this definitely uh you can extract this

3:58:55

particular information like name College

3:58:57

grade and

3:58:58

club now chat GPT or this GPT model will

3:59:02

do it uh will do it for me uh something

3:59:05

like this I have designed this

3:59:07

particular prompt so here I'm saying

3:59:09

please extract this particular

3:59:10

information and this these are name and

3:59:13

here this is the body of the text and

3:59:15

here I'm passing my text you can see so

3:59:17

here I'm writing I have a string so I

3:59:18

have defined one prompt and here I'm

3:59:20

passing my description now see once I

3:59:23

will run it so definitely I will be

3:59:25

getting my prompt so here is what guys

3:59:27

tell me here is what here is my prompt

3:59:29

this is what this is my prompt okay it

3:59:31

is fine not an issue now guys what I

3:59:33

will do I'm going to pass this

3:59:35

particular prompt to my chat GPT all

3:59:38

right now what I can do I can pass this

3:59:40

particular promt to my chat GPT and over

3:59:43

here uh first of all let me copy and

3:59:46

paste this particular code or let me

3:59:48

write it down that so here I'm going to

3:59:50

write it down from open a

3:59:52

import open AI so this is what this is a

3:59:55

class now here what I'm going to do I'm

3:59:57

going to create object of this

4:00:00

particular class so here I'm going to

4:00:02

create a object of this particular class

4:00:04

so here I will write it down open Ai and

4:00:07

here uh what I'm going to do so here is

4:00:09

what here is my object now I can keep

4:00:12

this object inside one variable now here

4:00:15

I'm going to say my variable name is

4:00:17

what my variable name is client now if I

4:00:19

want to make a connectivity so for

4:00:21

making a connectivity what I need to do

4:00:23

tell me so here I need to pass my API

4:00:26

key so how I can do that so here is a a

4:00:29

parameter uh we need to pass one

4:00:31

parameter over here so the parameter

4:00:33

name is what parameter name is API unor

4:00:36

key so here I'm going to write it down

4:00:38

AP apore key and here I will pass my key

4:00:41

so my key is what my key is my key so

4:00:44

once I will uh run it so here you will

4:00:46

be able to find out this is what this is

4:00:48

my client so let me contrl Zed and here

4:00:52

is what here is my client so this is

4:00:54

what guys tell me this is my client now

4:00:56

by using this particular client

4:00:58

definitely I can call my chat completion

4:01:01

API so let's try to call this chat

4:01:03

completion API and here I have already

4:01:06

written the code for that so let me copy

4:01:08

paste uh I have written some sort of a

4:01:10

code already I kept in my notepad so

4:01:13

from there sometimes I will copy it uh

4:01:16

because I want to save my time otherwise

4:01:19

uh if I'm going to write each and every

4:01:20

line so definitely it's going to take

4:01:22

more time now here uh you can see so we

4:01:25

are going to call this chat completion

4:01:28

API now chat completion this is the

4:01:30

particular method that's it now here is

4:01:32

what here is my prompt now once I will

4:01:34

run it so you will be able to find out I

4:01:36

will be getting one response so here is

4:01:39

my response let me show you this

4:01:41

particular response and here is what

4:01:43

guys here is my response definitely I

4:01:46

can extract this response uh for that uh

4:01:49

what I need to do so here I just need to

4:01:51

write it down this

4:01:52

response uh response and this response

4:01:55

actually uh inside this response there

4:01:57

you will find out this choices so I will

4:02:00

write it down this dot choices dot

4:02:03

choices now I will run it so here you

4:02:05

will get this choices now from here what

4:02:07

I need to do

4:02:08

from here this is the list actually so

4:02:10

here I will write it on this zero zero

4:02:12

index whatever information is there on

4:02:15

this zero index now from here I'm going

4:02:17

to extract uh this particular

4:02:19

information now here I will write it

4:02:21

down this message message now here is

4:02:24

what this is my message actually and

4:02:26

from this message I'm going to write it

4:02:28

down I'm going to except this content so

4:02:30

here I'm going to write it down this dot

4:02:33

content now guys see this is what this

4:02:35

is my entire information now if I want

4:02:38

to convert this particular

4:02:40

information now if I want to convert

4:02:42

this particular information in Json

4:02:44

format so for that what I will have to

4:02:46

do so here actually what I'm going to do

4:02:48

I'm going to collect this thing in one

4:02:51

variable that is what that is my output

4:02:53

now here what I will do guys here I'm

4:02:55

going to import Json so here I'm going

4:02:57

to write it down import Json and here

4:02:59

I'm going to write down json. load now

4:03:02

to this load function I will uh provide

4:03:05

my variable my variable name is what my

4:03:07

variable name this output now here you

4:03:09

will find out uh is saying this json.

4:03:13

load it is giving me Str Str object has

4:03:16

no attribute read okay it's not going to

4:03:19

read let me check what is the correct

4:03:21

function just a

4:03:25

second so the function name is loads

4:03:29

here guys you can see so the uh the

4:03:31

method basically which I was calling so

4:03:33

the method name was loads so Json do

4:03:36

loads and here we are are passing this

4:03:38

output now you can see this is what this

4:03:40

is my output are you getting my point

4:03:43

guys are you able to see what I did I I

4:03:46

given this uh I given this prompt I

4:03:49

given this basically I given this

4:03:51

description to my model and I asked that

4:03:55

okay just give me this particular

4:03:57

information just give me this particular

4:03:59

information from this description and

4:04:01

here what I did I passed this particular

4:04:03

prompt to my tell me to my chat

4:04:07

completion API actually this chat

4:04:09

completion API is calling this GPD 3.5

4:04:12

turbo model and here guys you can see we

4:04:14

are able to get a response whatever

4:04:16

description we have given according to

4:04:18

that whatever prompt we have designed

4:04:20

and it is giving me that particular

4:04:22

response we have given a description we

4:04:25

have designed a prompt and according to

4:04:27

that only we are getting a response here

4:04:30

you can see this is a response actually

4:04:32

I have converted it into a Json format

4:04:34

so this is the first thing which I want

4:04:36

to show you now here guys see this type

4:04:40

of prompt it is called few short prompt

4:04:43

it is called few short prompt where I'm

4:04:46

giving my description and I'm saying

4:04:48

that okay so uh you need to behave like

4:04:51

this means whatever description I'm

4:04:52

giving to my model and here uh regarding

4:04:55

that particular description I want to

4:04:57

extract some sort of a

4:04:59

information so here actually this type

4:05:02

of prompt is called fuse short prompt

4:05:04

now directly I was asking something to

4:05:06

my model in my previous one in my

4:05:08

previous uh session so here actually

4:05:12

directly I was asking uh the question to

4:05:14

my uh model to my llm model so this is

4:05:17

called actually zero short prompt this

4:05:19

is what zero short prompt now here this

4:05:22

type of prompt actually is called few

4:05:24

short

4:05:25

promp getting my point this idea is

4:05:29

getting clear to all of you please do

4:05:31

let me know in the chat if you are able

4:05:33

to follow me till here please write it

4:05:35

down in the chat I'm waiting for your

4:05:37

reply

4:05:43

I'm sharing the text uh don't worry I

4:05:45

can share everything in the chat so just

4:05:47

a

4:05:49

second um here is a

4:06:05

text so here is a text guys

4:06:08

I

4:06:09

think it's

4:06:11

a it's a half text let me give you the

4:06:15

full so college and here is the full

4:06:21

text because it is having a word limit I

4:06:23

cannot uh like give more than 80 words I

4:06:27

think I cannot uh like paste more more

4:06:30

than 80 words in the inside the

4:06:36

chat

4:06:39

yes is it is it because we are asking

4:06:41

for a number of variable in a second

4:06:42

prompt correct your understanding is

4:06:45

correct

4:06:48

Goldie so zero short means we are not

4:06:51

defining anything over here directly we

4:06:52

are asking a question to my model now

4:06:56

what is a few shot so here we are giving

4:06:58

some sort of a description and based on

4:07:00

that particular description we are

4:07:02

asking regarding some information we are

4:07:05

asking some information okay so this is

4:07:08

called few shot and here is a zero shot

4:07:11

don't worry uh we have a many example

4:07:13

here I just given you the glimpse of

4:07:14

that just wait for some time one or two

4:07:16

more classes you will get more about it

4:07:19

because uh now we just we are going to

4:07:20

design The Prompt and all and in the

4:07:23

next session specifically I will I will

4:07:25

be working on the prompt on a different

4:07:27

different prompt and even uh for the uh

4:07:30

inside the project also we are going to

4:07:31

design a different different prompts got

4:07:33

it now see uh definitely we are able to

4:07:37

call our l m we are able to call our

4:07:39

like open a API and definitely we are

4:07:41

able to get our output also from the llm

4:07:45

models now here guys what is the use of

4:07:48

the function calling so first of all let

4:07:49

me uh Define one very basic function and

4:07:52

then I will Define one Advanced function

4:07:54

also so here what I'm going to do see

4:07:57

here I did this particular thing by

4:07:59

using this uh chat jpt Itself by using

4:08:02

this completion API now let me show you

4:08:04

the same thing by defining the function

4:08:06

so here what I'm going to do so here I'm

4:08:08

going to Define one function so let me

4:08:12

do one thing let me Define one function

4:08:14

and here this is my function guys see

4:08:17

I'm going to define the function this is

4:08:18

my function now from where I got this

4:08:21

particular format so you must be

4:08:23

thinking sir okay so sir you define this

4:08:25

function now from where you got this

4:08:27

particular format so just try to go

4:08:29

through with the open API and here uh

4:08:32

sorry open a documentation and here just

4:08:34

click on this function calling and once

4:08:36

you will scroll down over here so here

4:08:39

you will get the code s snippet so and

4:08:42

inside this code s snippet you will find

4:08:44

out this function definition that how to

4:08:46

decide or how to define this particular

4:08:49

function getting my point I will come to

4:08:52

this particular example I have designed

4:08:54

one example for all of you but first of

4:08:56

all let's try to understand a function

4:08:58

calling from uh like very basic example

4:09:02

and then I will come to the advanced

4:09:04

part so here you can see we have a

4:09:06

function

4:09:08

and from here itself I took this

4:09:09

function definition and how to decide

4:09:12

how to define this function and all now

4:09:13

let me tell you what I written over

4:09:15

there so here I have opened this uh

4:09:17

notebook now see uh what is the name of

4:09:20

this function actually student custom

4:09:22

function it's not a function like python

4:09:25

we write it down that Def and all it's a

4:09:28

like function basically which we are

4:09:29

writing down for the open AI U actually

4:09:32

we have to uh like pass this thing to

4:09:34

the uh to inside the chat complete API

4:09:38

itself I will come to that first of all

4:09:39

let's try to understand this uh

4:09:41

structure so first of all I I need to

4:09:44

write it on the name so here I have

4:09:45

written the name name is equal to

4:09:47

extract student information then we have

4:09:50

to write it on the description so here

4:09:52

you can see this is the description of

4:09:54

the function that why we are going to

4:09:56

Define it now here you will find out

4:09:58

some sort of a pairs so key and value

4:10:00

pairs so first we have a parameter so

4:10:02

here you can see we have a parameter now

4:10:04

uh we have a type so which type of uh

4:10:07

like object object we are going to be

4:10:08

defined over here and then we have a

4:10:10

properties now here you will find out

4:10:12

inside this parameter you will find out

4:10:14

a different different values like name

4:10:17

school grade and Club whatever actually

4:10:20

I Define over there inside my prompt the

4:10:22

same thing the same thing over here

4:10:25

right so first we have a name the second

4:10:27

thing we have a description the third

4:10:29

one we have a parameter inside the

4:10:31

parameter we have a different different

4:10:32

values like names school grade and Club

4:10:38

getting my point now here just see the

4:10:41

type of this name it's a string just see

4:10:44

the type of this school it's a string a

4:10:47

college you can write down the college

4:10:49

here is a college so let me write down

4:10:50

the college instead of this school so

4:10:53

here is what here is college so instead

4:10:55

of this is school I can write down this

4:10:57

college now here is college the type of

4:11:00

college is string right now here is a

4:11:03

grade now grade type is integer now here

4:11:05

is a club so Club type is integer again

4:11:09

I think you getting my point that how to

4:11:10

define this function it's a predefined

4:11:13

format or the Inon platform itself

4:11:15

you'll get this particular form format

4:11:17

now just run it okay now just run it and

4:11:21

after that what you need to do so here

4:11:23

see you need to uh call the chat

4:11:26

completion API so here is your chat

4:11:28

completion API let me copy this chat

4:11:30

completion API from here and let me

4:11:33

paste it down now here you need to

4:11:35

Define some sort of a parameter now let

4:11:38

me write it down those particular

4:11:39

parameter and then I will run it so here

4:11:42

guys you can see we have this message so

4:11:45

let me keep this message in a single

4:11:47

line so here I'm going to keep this

4:11:49

particular message in a single line so

4:11:52

here is what guys here is what here is

4:11:54

my message it is fine now after the

4:11:57

message what you need to do you need to

4:11:59

write it down one more parameter and the

4:12:01

parameter will be what the parameter

4:12:03

will be a function so here I'm going to

4:12:05

write it on the parameter the parameter

4:12:07

name is what function so here is my

4:12:10

parameter function now tell me what is

4:12:11

the name of the function so here the

4:12:14

name of the function is nothing it's a

4:12:16

student custom function so let try to

4:12:19

copy it and try to paste it over here

4:12:22

that's it you just need to copy the

4:12:24

function name from here and you need to

4:12:27

paste it over

4:12:29

here okay as a value of this particular

4:12:32

parameter now guys I can keep this

4:12:35

particular response in response two so

4:12:37

so here I'm going to write it down this

4:12:39

response to so here is what here is my

4:12:41

response to now let me run it and let's

4:12:43

see what I will be getting so here is

4:12:45

saying okay it is giving me error so I

4:12:47

think uh chat

4:12:50

completion role is fine I'm using client

4:12:53

only let me check with the

4:12:56

client yeah client uh now everything is

4:13:00

fine what is the issue I you code

4:13:03

incorrect API

4:13:05

provided okay okay just a second let me

4:13:11

use the correct client this is

4:13:15

fine and here I can keep the Cent c l i

4:13:20

e n t now

4:13:26

see uh it is saying that

4:13:29

incorrect invalid key uh why it is

4:13:36

so um just to check let me check this

4:13:39

key over here student custom information

4:13:43

prompt is fine U but before it was

4:13:45

giving me output now why it is saying

4:13:48

like that let me check with a key over

4:13:51

here so my key and here is what here is

4:13:56

my key just a second guys let me take a

4:13:58

correct

4:14:00

key

4:14:06

uh

4:14:08

okay don't worry I will delete this

4:14:10

particular key uh I'm running in front

4:14:13

of you everyone but after the session I

4:14:16

will delete it fine so now I am having

4:14:19

my key and here what I can

4:14:23

do again I can run

4:14:26

it

4:14:28

great now let's

4:14:33

see yeah now everything is working fine

4:14:35

so this is what this is my response to

4:14:37

two and here guys you you will find out

4:14:40

that we are getting a output so we are

4:14:43

getting output in whatever format we

4:14:45

have defined this thing so we have

4:14:47

defined this thing like uh name College

4:14:49

grade and club now here you will find

4:14:51

out the same thing so name is there

4:14:54

college is there grade is there and Club

4:14:56

is there if you don't if you want to

4:14:58

change any sort of a description you can

4:14:59

change it and you again you can check it

4:15:02

and now actually we are

4:15:03

not we we are not uh doing directly this

4:15:06

thing we are using a function over here

4:15:09

and this is a very basic use of the

4:15:11

function as of now which I have shown

4:15:13

you getting my point so directly also

4:15:16

you can do that you can call it but here

4:15:18

they have given the function by using

4:15:20

this function also you can call

4:15:23

it okay so here actually this is the

4:15:26

basic use of the function and at this

4:15:28

point of time you you won't be able to

4:15:30

find out any differences in a direct

4:15:33

call and in a function call both is

4:15:36

looking same but now the difference will

4:15:39

start once I will explain you the second

4:15:42

example now over here you can see so

4:15:44

this is the response which I'm getting

4:15:46

now let's try to extract the response so

4:15:48

over here what I can do I can write it

4:15:50

down this a contain and let's see what I

4:15:52

will be getting over here so here is

4:15:55

what here is my uh content which I want

4:15:58

okay which I want to extract from here

4:16:00

so let me copy it and let me paste it

4:16:02

over here actually I want to extract the

4:16:04

content so that's why I'm going to be

4:16:05

write down response to Choice message

4:16:07

and content so once I will done it and

4:16:10

over here I will be getting this content

4:16:13

so here I am getting this content now

4:16:16

let me check over here okay actually see

4:16:20

here actually we have to get the content

4:16:22

from the function call so till message

4:16:24

it's fine so let me check with the

4:16:26

message till message I think it is fine

4:16:28

now if I want to extract the content now

4:16:30

so over here I will have to call this uh

4:16:32

I will have to write it down this

4:16:33

function call because before I was

4:16:35

extracting the message because directly

4:16:37

I did it directly I I called my llm

4:16:40

model now here I'm calling it but by us

4:16:43

using function so here I've defined the

4:16:45

format in a function I have defined the

4:16:47

format of the function and now by using

4:16:49

this function I'm calling my API so the

4:16:52

the API is hitting the model and

4:16:54

whatever output desired output I want

4:16:57

I'm getting it now over here what I will

4:16:59

do so here I'm going to write it down

4:17:01

this uh dot function call so let me copy

4:17:04

and paste it over here function

4:17:07

underscore call now over here guys you

4:17:09

can see we are getting this particular

4:17:11

value now let me write it the argument

4:17:13

over here arguments and this is what

4:17:15

this is my output now yes same thing we

4:17:18

can do over here as well so here I can

4:17:20

write it down this uh Json Json do loads

4:17:25

and here what I can do I can write down

4:17:27

the json. loads and now see I'm getting

4:17:30

a same output but see guys here at this

4:17:34

point of time definitely you are not

4:17:36

able to find out a difference between

4:17:38

the direct function call and between

4:17:40

this uh direct call and this function

4:17:42

call right now I will show you one

4:17:45

Advanced example and by seeing that

4:17:47

particular example definitely you will

4:17:49

be able to discriminate getting my point

4:17:52

so till here everything is fine are you

4:17:54

able to do it don't worry I will give

4:17:56

you the code and I will give you each

4:17:58

and everything whatever I'm writing over

4:18:00

here and uh this file and all it will be

4:18:03

available inside my resource section so

4:18:05

here is the resource section guys uh so

4:18:07

just try to enroll into the course and

4:18:09

uh yes definitely you will be able to

4:18:11

get this particular file inside this

4:18:12

resource section and this is completely

4:18:14

free you no need to pay anything you no

4:18:17

need to P you don't need to pay actually

4:18:19

a single rupees for this for this

4:18:21

particular dashboard so please try to

4:18:23

enroll and try to download the resource

4:18:25

from there so till here everything is

4:18:28

fine please give me a quick yes then I

4:18:30

will proceed with a further

4:18:35

topic

4:18:42

what is the difference between Json and

4:18:43

function call so here you will find out

4:18:45

so just check the type of this output so

4:18:48

here you will find out the type of this

4:18:50

output is nothing let me show you it's a

4:18:54

string now here I have converted into a

4:18:56

Json that's it okay I don't I I don't

4:18:59

want to keep it in a a string because uh

4:19:01

it's not looking good to me if you will

4:19:03

print it now if you will print it guys

4:19:07

see it's not looking good to me that's

4:19:09

why I converted into ajason now if you

4:19:11

will check the type of this particular

4:19:13

output so here you will find out a Json

4:19:16

let me write it down the type over here

4:19:18

and let me print it now so here is what

4:19:21

guys tell me here is nothing it's a Jon

4:19:23

not dictionary got it so this is fine to

4:19:26

everyone I think till here everything is

4:19:35

clear

4:19:41

great now let's start with the second

4:19:43

concept so over here uh the first

4:19:46

concept actually I shown you the basic

4:19:48

use of the function and all now let's

4:19:49

try to understand the advanced use of

4:19:52

this function calling so over here guys

4:19:54

see uh we have few more thing regarding

4:19:56

these functions and all so first of all

4:19:58

let me tell you that now let's say if

4:20:00

you want if we are passing a description

4:20:02

of two student all together so it can

4:20:06

handle that thing also it can handle

4:20:08

that thing also now over here let me

4:20:10

show you that particular uh that

4:20:12

particular thing also just a wait uh I

4:20:14

have I have a code for that and I'm

4:20:16

going to copy and paste see guys so what

4:20:18

you need to do so over here I just

4:20:20

written one for Loop and let me show you

4:20:23

that particular for Loop and here see

4:20:25

inside this for Loop what I have written

4:20:28

so first of all I Define one uh list and

4:20:32

inside this list we have a two

4:20:34

description so the first one you know uh

4:20:36

already I written this particular

4:20:37

description now let me uh let me run it

4:20:41

okay so what was the name of that so

4:20:44

just a wait let me check

4:20:51

um okay where I have written this

4:20:53

student I think this one so that name

4:20:56

the name of the variable is student

4:20:58

description so let me copy and paste

4:21:00

over here let me copy and paste this

4:21:02

student description so this is what this

4:21:04

is the student description this is the

4:21:05

first one so let me

4:21:07

write it down student description over

4:21:08

here now let me keep it over here now

4:21:11

student description now I'm going to

4:21:13

Define one more so here I'm going to

4:21:14

create one more variable and here

4:21:17

student description

4:21:18

two and here guys what I will do again

4:21:21

I'm going to copy and paste a same thing

4:21:24

so this is the value which I'm going to

4:21:25

copy and paste and I'm going to do some

4:21:26

sort of a changes over here so instead

4:21:29

of this s Savita I'm going to write down

4:21:30

something else so let's say I'm going to

4:21:32

write it down Krish n so and here

4:21:35

Krishna is a student of a compter

4:21:36

computer science I uh maybe instead of

4:21:38

this delh let me change the name so here

4:21:41

is what here is Mumbai now here he is a

4:21:43

cgpn so he's having more than 9.5 cgpa

4:21:47

so let me write down this like cgpa as

4:21:50

well and here let me change the name so

4:21:52

instead of Sunny what I'm saying I'm

4:21:54

saying Krish is known for his

4:21:56

programming skill and he's a member of

4:21:59

here I can write down DS Club data

4:22:01

science club data science club so here I

4:22:04

am giving an information regarding

4:22:07

two student now here see he hopes to

4:22:10

pursue in a career in artificial

4:22:11

intelligence after graduating something

4:22:13

else right so now what I will do let me

4:22:15

run it and let me keep this particular

4:22:18

description over here so here what I'm

4:22:20

going to do I'm going to keep this

4:22:21

particular description now what I will

4:22:23

do so over here uh I I'm just going to

4:22:26

run the for Loop and here you can see

4:22:29

one by one the description is coming and

4:22:31

it is going through this particular uh

4:22:34

completion API this Chad completion API

4:22:36

and I will be getting a response so

4:22:38

let's try to make some changes over here

4:22:40

because it's a like old code let me give

4:22:43

the latest one over here so this is the

4:22:45

latest let me copy and paste the latest

4:22:49

function so here is what here is a

4:22:51

client chat completion. create now over

4:22:55

here the model name is what model name

4:22:57

is same now here message uh it's the

4:23:00

same this one now let me write down the

4:23:02

student so it will be more uh like clear

4:23:04

to all of you so here here uh you can

4:23:07

see we are calling a function now here

4:23:09

guys see we are calling which function

4:23:11

this particular function let me copy the

4:23:13

same name so here the function name is

4:23:15

what student custom function so here I'm

4:23:17

going to copy the name of the function

4:23:19

and let me paste it over here so this is

4:23:22

what guys tell me this is my function

4:23:23

name and here is function call is auto

4:23:25

right automatically the function is

4:23:27

going to be called now what I want tell

4:23:29

me I want a response so over here I'm

4:23:31

going to print this particular response

4:23:33

and let's see we'll be able to get a

4:23:35

correct response or not so if I'm going

4:23:38

to run it guys so you will be able to

4:23:40

find out a response regarding two

4:23:41

description so it is saying that check

4:23:44

completion is not a subscribable okay so

4:23:47

over here I think I will have to paste

4:23:49

this thing now let me copy it and let me

4:23:55

paste it over here

4:23:57

so this is the one I think it is fine

4:24:01

now and this is going to be a response

4:24:05

so response whatever response we are

4:24:06

getting there is a choice and inside

4:24:08

that we have a message and finally

4:24:10

function call and from there we are

4:24:12

going to collect a argument so once I

4:24:15

will this argument actually this

4:24:16

arguments you can map this argument with

4:24:18

this thing this uh thing basically which

4:24:20

I have written over here inside the

4:24:21

function name College grade and

4:24:25

Club getting my point so here what I'm

4:24:27

going to do now here I'm going to run it

4:24:29

and let's see what I will be getting

4:24:32

so once I will run it definitely I will

4:24:35

get a response great so here it is

4:24:37

giving it has given me a response

4:24:39

regarding the first uh description and

4:24:41

now guys you can see it has given me a

4:24:43

response regarding the second

4:24:44

description so the first one is s sabida

4:24:47

and the second is kishna you can give as

4:24:49

many as uh like description in all so

4:24:51

over here let me take the third one and

4:24:54

let me keep it over here and here I can

4:24:56

say so here student description three

4:25:00

three now over here instead of this

4:25:02

krishak let's say I'm going to write

4:25:04

down one more name let's say sudhansu

4:25:06

Kumar and here I can say that he's a

4:25:09

student of

4:25:10

IIT Hyderabad or I let's say uh

4:25:16

Bangalore now over here he's a Indian

4:25:19

he's having a cgp around let's say 9.2

4:25:22

and he's programming skill and he's a

4:25:24

active member of mlops club now let me

4:25:27

write it down over here mlops Club so

4:25:30

now yes I have given this particular

4:25:32

description over here and if I'm going

4:25:34

to copy it and let me paste sit over

4:25:36

here so regarding this description also

4:25:39

definitely we'll be able to call our

4:25:40

model we'll be call our API and finally

4:25:43

we'll be getting a output it's doing the

4:25:45

same thing which our chat completion API

4:25:47

is doing directly without function right

4:25:50

now we are doing along with a function

4:25:53

along with a multiple description

4:25:55

getting my point so here this is the

4:25:57

basic use actually basic use of the

4:25:59

function after this one I will come to

4:26:01

the advanc use just wait now over here

4:26:03

see if I'm going to run it so let's see

4:26:05

what I will be getting uh so here I will

4:26:08

be getting a First Response yes this is

4:26:11

my first response now this is the second

4:26:14

response and here you can see there is

4:26:18

the third response getting my point guys

4:26:21

yes or no we can call our llm model we

4:26:24

can we can call our API we can hit the

4:26:26

model and we can summarize the result

4:26:29

according to the prompt if this thing is

4:26:32

clear to all of you then please write it

4:26:34

down yes in the chat please do let me

4:26:36

know in the chat guys if this part is

4:26:38

clear to all of

4:26:41

you yes it's a case sensitive whatever

4:26:44

variable you are going to Define in the

4:26:45

function col it's a k so please make

4:26:47

sure that you are going to write it down

4:26:49

the correct

4:26:59

name after this one the use of the

4:27:01

function call will be clear just wait

4:27:04

okay fine now this thing is clear to all

4:27:06

of you now let me come to the next point

4:27:08

so here actually what we are going to do

4:27:10

see uh we are going to call a single

4:27:13

function right regarding this particular

4:27:15

description uh this is my function but

4:27:19

we can call a multiple function also we

4:27:22

can call a multiple function also so

4:27:25

here guys let's say if we are going to

4:27:26

define a one more function here let's

4:27:29

say if we going to define a one more

4:27:31

function so you can Define any sort of a

4:27:33

function over here let's say function

4:27:35

two let me write it down over here

4:27:37

function 2 function _ 2 you can define a

4:27:41

second function and after defining see

4:27:44

you will Define in a same format

4:27:45

whatever format is there this one in

4:27:48

this format itself so in this format

4:27:51

whatever format I have written now the

4:27:53

variable and the parameter and the

4:27:54

description U and those thing will be

4:27:57

changed but the format will be a same

4:27:59

because the same format which you will

4:28:01

be find out over the tell me over the

4:28:04

open a API s they already have given you

4:28:07

that so this is what this is my function

4:28:08

two now you can like Define a function

4:28:11

two whatever information you want so

4:28:13

let's say I just want this grade and

4:28:14

club or whatever so right so if I'm

4:28:17

going to remove it you can remove it or

4:28:18

maybe you can Define one more function

4:28:20

for some other information right and now

4:28:22

if you want to call it so how you will

4:28:25

do that tell me so for that actually uh

4:28:28

here I have created this uh list right

4:28:31

here we have created a list of the

4:28:33

student information regarding a

4:28:34

different different description

4:28:36

now here again I can create one more

4:28:38

list the list basically the list

4:28:41

regarding this function so here what I

4:28:43

can do I can copy this code and I can

4:28:45

paste it over here this particular code

4:28:47

and here what I can do I can create one

4:28:49

more list and inside this list what I

4:28:51

can do I can write it down the function

4:28:53

so here is what let me a copy and paste

4:28:56

so this see this is what this is my

4:28:57

function parameter now here we have a

4:29:00

first function and we have a second

4:29:01

function so this is this is my first

4:29:03

function which I defined already this

4:29:05

one so let me copy this particular name

4:29:07

and let me paste it over here this one

4:29:09

so this is what tell me guys this is my

4:29:11

first function which I'm going to write

4:29:12

down over here and this is my second

4:29:14

function already I given the same name

4:29:16

so like this you can call a multiple

4:29:18

function

4:29:20

also getting my point so here I have

4:29:22

defined this function and according to

4:29:24

that I'm getting my desired output

4:29:26

desired parameter you can create one

4:29:28

more function on top of a same

4:29:30

description and here you just need to do

4:29:33

one thing instead of this specific

4:29:35

function you just need to write it down

4:29:36

this function you just need to provide

4:29:38

this list and you are done according to

4:29:41

the definition you will get output so

4:29:44

this is your assignment you have to do

4:29:46

by yourself I have given you the way I

4:29:48

have given you the path now just Define

4:29:50

a second function regarding whatever

4:29:52

information is there inside the

4:29:54

description whatever you want to extract

4:29:56

just Define a function and call it over

4:29:59

here so here I can mention this thing as

4:30:01

assignment don't worry each and

4:30:03

everything I will provide you uh this

4:30:05

notebook will be available in the

4:30:06

resource section you can download from

4:30:10

there this is what this is your

4:30:12

assignment guys now here this part is

4:30:15

clear that uh we are calling up llm so

4:30:19

here directly we are calling llm then

4:30:21

what we are going to do see we have

4:30:22

designed a prompt directly we are

4:30:23

calling llm then what we are going to do

4:30:25

we have Define a function then uh like

4:30:28

we are getting that particular output

4:30:29

that is also fine now we are going to

4:30:31

call our llm by using openi with respect

4:30:34

to different different description that

4:30:35

is also fine means regarding a like

4:30:38

different different description on the

4:30:39

same time now we can Define two function

4:30:41

as well more on more than two function

4:30:43

that is also fine now what is the actual

4:30:46

use of it still we are not able to find

4:30:48

out the actual use of this function

4:30:50

everything is looking same now let me uh

4:30:54

explain you that particular part I'm

4:30:56

coming to the advanced example now so

4:30:59

over here what I'm going to do I have

4:31:00

written one Advanced example and uh let

4:31:04

me copy and paste uh the code basically

4:31:06

which I have written step by step I will

4:31:09

copy and paste don't

4:31:20

worry okay so here guys see again I'm

4:31:24

going to start from

4:31:25

scratch now Advanced example of function

4:31:34

call

4:31:36

Advanced example of function calling

4:31:42

okay now over here guys see uh what I'm

4:31:45

going to do I'm going to call my chat

4:31:47

GPT so here I'm going to copy and paste

4:31:51

one code now this code actually we have

4:31:54

defined something over here so here I'm

4:31:57

saying uh what I'm asking I'm asking to

4:31:59

my llm that what is the next flight from

4:32:03

so here I let me change the name let me

4:32:05

write it down Delhi to Mumbai so here

4:32:08

I'm going to write it down what would be

4:32:10

the next flight from Delhi to Mumbai

4:32:13

this is my prank now just tell me guys

4:32:16

will my Chad GPT able to answer for this

4:32:19

particular

4:32:21

question my CH chat G is able to answer

4:32:23

for this particular question the

4:32:25

question which I'm asking over here I

4:32:27

want your uh like p uh like I want your

4:32:31

opinion on that please write down the

4:32:32

chat I'm asking to all of you can my

4:32:36

chat GP answer for this particular

4:32:41

question no why why it cannot be answer

4:32:46

because like this chat GPT has stayed on

4:32:49

the limited amount of data right so not

4:32:51

a limited amount of data it has stay on

4:32:54

uh the data basically which is available

4:32:55

till September

4:32:57

2021 getting my point if you look into

4:33:00

the chat GPT if you look into the open a

4:33:02

just just go with the open AI uh not

4:33:04

this one so where it is this one so here

4:33:07

guys just just uh go over here and uh

4:33:10

what you can do you can go into the

4:33:13

models now over here just click on this

4:33:15

GPD 3.5 and uh just look over here

4:33:19

training data so it has trained up to

4:33:21

September 2021 data up to this

4:33:25

particular data that's why it won't be

4:33:28

able to answer for this particular

4:33:30

question whatever I'm going to write it

4:33:31

down here now let me run it and let's

4:33:34

see the response that what response I

4:33:36

will be getting so over here uh yes it

4:33:39

is giving me a response let's wait for

4:33:41

some time I got a response now and here

4:33:44

I'm going to run it so see what it is

4:33:46

saying that it is saying that as an AI

4:33:49

language model I don't have a realtime

4:33:52

information however you can easily find

4:33:54

out next flight from Delhi to Mumbai by

4:33:57

checking the website or mobile apps of

4:33:59

Airlines so that operate the route such

4:34:02

as air india indigo spice jet vistara go

4:34:05

Additionally you can contact travel

4:34:07

agency or use online flight scratch

4:34:10

engine for up to date now just tell me

4:34:12

if you are going to create if you're

4:34:14

going to create any chatbot by using

4:34:16

this open API so will you give this type

4:34:19

of answer to your user if your user is

4:34:22

going to ask you that what is the next

4:34:24

flight from Delhi to Mumbai definitely

4:34:26

you will have to do some sort of a jugar

4:34:28

right you will have to extract the

4:34:30

information from

4:34:32

somewhere you you cannot give this type

4:34:35

of answer right so you will have to make

4:34:37

your chatboard that much of that much

4:34:39

capable you you have to make your

4:34:42

application that much capable so it can

4:34:43

answer for this type of question as

4:34:46

well okay now let me tell you uh the use

4:34:49

of the function calling over here that

4:34:51

how function calling can help to us so

4:34:54

over here what I'm going to do here I'm

4:34:56

going to Define one

4:34:57

function what I'm going to do guys here

4:35:00

I'm going to Define one function so this

4:35:02

is what this is my function just like

4:35:05

observe step by step don't run anything

4:35:07

don't write it down any sort of a code

4:35:09

just observe whatever I'm explaining to

4:35:11

you that's it so here is what here is my

4:35:14

function function description now we

4:35:16

have a name of the function get flight

4:35:18

info we have a description get flight

4:35:21

information between two location now

4:35:24

here we have a parameter and inside

4:35:25

parameter we have two things so the

4:35:28

first one you will find out that is what

4:35:30

that is a location origin and location

4:35:32

destination so in my case what is the

4:35:35

origin

4:35:37

delhi now here in my case like whatever

4:35:41

prompt or whatever question I'm asking

4:35:42

in that case the destination is what

4:35:44

destination is tell me

4:35:47

Mumbai so there is two parameter I have

4:35:51

here is a type here is a description

4:35:53

here is a type here is a description

4:35:55

that's it so let me let me change

4:35:57

something inside the description also so

4:35:59

here I'm I can write it down Delhi d e l

4:36:02

and here let me write it down the Mumbai

4:36:04

mu M mu M so this thing is fine now here

4:36:09

if you will observe so I have mentioned

4:36:11

one more thing I have mentioned one more

4:36:14

parameter over here the parameter name

4:36:16

is what the parameter name is required

4:36:18

now what is required location required

4:36:22

origin location required and destination

4:36:24

is required two things is required over

4:36:27

here okay that is fine till here

4:36:29

everything is fine we are able to

4:36:30

understand but still we didn't get a

4:36:32

complete idea how you will get it first

4:36:34

of all let me run the entire code right

4:36:37

so here you can see we have a

4:36:39

description so let me run it and this is

4:36:41

fine this is like perfectly fine now

4:36:44

here I have a prompt so let me copy The

4:36:47

Prompt over here I'm not writing from

4:36:49

scratch because it might takes time so I

4:36:52

already return in my notepad and all

4:36:53

somewhere so I'm just going to copy and

4:36:55

paste that's it so here guys um I'm

4:36:58

asking to my chat GPD or sorry I'm

4:37:00

asking to my GPD model when is the next

4:37:03

flight from New Delhi to Mumbai this is

4:37:06

my question now over here if I'm going

4:37:08

to run it so here guys you will see that

4:37:10

okay so this is my this is my user Prem

4:37:12

now what I'm going to do now I'm going

4:37:14

to copy it now I'm again I'm going to

4:37:16

copy the same thing this one and I'm

4:37:18

hitting this particular prompt so here

4:37:20

is what here is my model here is my role

4:37:23

role is what role is a user and here is

4:37:25

my prompt getting my point now here now

4:37:29

I'm passing my function just focus over

4:37:32

here just focus now over here I'm

4:37:34

passing passing my function function

4:37:36

underscore description this is what this

4:37:38

is my function description now see over

4:37:40

here uh this is my prompt and if I'm

4:37:43

going to run it now if I'm going to run

4:37:45

it now now you will see the response

4:37:47

that what response I will be getting

4:37:49

before actually I was getting this

4:37:50

particular

4:37:51

response before I was getting this

4:37:54

response now just look into the response

4:37:56

that what will be the response over here

4:37:57

so here what I'm going to do I'm going

4:37:59

to copy the same thing uh this

4:38:02

particular thing and here I'm going to

4:38:05

write it down response to response to

4:38:07

choice choice message and contain so

4:38:10

once I will run it so here you can see

4:38:12

it's not giving me anything okay so why

4:38:14

it is not giving me let me show you

4:38:16

because there is no such content there

4:38:18

is no such content that's why it is not

4:38:20

giving me anything now let me print till

4:38:22

message only and you will find out the

4:38:25

uh the like values over here so over

4:38:27

here guys see if I'm going to print till

4:38:30

message so it is giving me a message

4:38:31

whatever message I'm getting step by

4:38:33

step we'll try to understand it don't

4:38:34

worry now here let me copy this thing

4:38:36

and let me check with this particular

4:38:39

argument so here I'm going to copy this

4:38:40

argument and let's see what argument we

4:38:43

have uh so over here it is saying okay

4:38:45

first of all I need to call this

4:38:47

function call and then only I can call

4:38:49

this argument uh not an issue fine now

4:38:52

over here we have a argument see we have

4:38:54

two argument first is loc uh location

4:38:57

origin that's a Delhi and location

4:38:59

destination that's a

4:39:00

vom getting my point guys see it is

4:39:03

going to extract from here location

4:39:05

origin and location destination and here

4:39:07

is Delhi here is Mumbai this is a

4:39:09

location origin location destination now

4:39:11

it is not giving me answer but it is

4:39:13

going to it is it is it is able to

4:39:15

extract something right from this

4:39:17

function call and here you can see these

4:39:20

are this is two argument right there you

4:39:23

will find out two argument this is the

4:39:24

argument basically which we are able to

4:39:26

get it from here because we have already

4:39:28

defined it over here this thing okay

4:39:30

that is fine this is clear to all of you

4:39:31

now guys see how you will uh give this

4:39:35

uh like flight actually so for that you

4:39:38

will have to call any third party API

4:39:40

then only you will be able to provide

4:39:42

the information now right so let's say

4:39:45

if I'm talking about the make my trip so

4:39:47

what it does it is having access of a

4:39:49

different different API if I'm going to

4:39:50

book any train ticket so is calling the

4:39:52

IR CZ API and is giving me the entire

4:39:55

detail make my trip is not a owner of

4:39:58

the Railway where it is having the

4:40:00

entire data entire information of the

4:40:03

Railway Indian Railway no

4:40:05

IRCTC actually it's a organization

4:40:08

actually that is a portal which is like

4:40:10

governed by the uh Indian government and

4:40:13

like it it is having some sort of apis

4:40:15

and all which is being called by the

4:40:17

make my trip or any other website and

4:40:19

because of that only you are able to get

4:40:20

an information whatever rails and all

4:40:23

whatever flights and all you are going

4:40:24

to find out over there or maybe some

4:40:27

other website right so here what you

4:40:29

will do for getting this information you

4:40:30

will call the API any third party API

4:40:33

now here see I'm not going to call any

4:40:35

sort of API I'm giving you as assignment

4:40:37

this thing so you can call any sort of

4:40:40

API you can explore a different

4:40:41

different API and you can accept the

4:40:43

information from there I'm uh I can uh

4:40:46

give you the very basic name rapid API

4:40:48

just go through go and check with the

4:40:49

rapid API there you will get the each

4:40:51

and every API related to the weather

4:40:53

related to the different different thing

4:40:54

as of now what I did actually I created

4:40:56

my own function which is working as a

4:40:58

API I created my own function which is

4:41:00

working as a API now let me give you

4:41:02

that uh let me show you that particular

4:41:04

function so here what I did I have

4:41:06

created my own function which is working

4:41:08

as a API you can think this working as a

4:41:11

API but you can call your real time API

4:41:14

for extracting a real data don't worry I

4:41:17

will show you that thing I will uh show

4:41:18

you how you can call the Sur API in my

4:41:20

next class when I will discuss about the

4:41:22

agents in a lang chain there I will

4:41:24

discuss about the Sur API and all so

4:41:26

over here you can see guys we have a uh

4:41:28

I have created one function get flight

4:41:30

info location origin location

4:41:32

destination now here I'm going to be uh

4:41:34

like here I written some sort of a code

4:41:36

that is what that is nothing as a flight

4:41:37

information and it is in a dictionary

4:41:39

format so here we have a location origin

4:41:41

destination date time Airlines and

4:41:43

flight this is the airlines time and

4:41:45

this is the flight number and all now

4:41:47

here this function is working as a API

4:41:50

you can think like that now if I'm going

4:41:52

to run it so over here uh it is working

4:41:55

fine now guys see what I'm going to do

4:41:58

here so this function is working fine

4:42:00

now here uh I'm going to collect this

4:42:03

origin and this destination so first of

4:42:06

all let me show you this particular

4:42:07

thing uh argument I already shown you

4:42:10

this one this is my

4:42:13

argument and over here uh what I'm going

4:42:16

to do I'm going to be convert this

4:42:19

argument into a Json so

4:42:21

json. loads now over here what I'm going

4:42:25

to do so let me run it and here I am I

4:42:28

having two argument uh first is Delhi

4:42:30

and the second is Bombay this is my

4:42:32

origin and this is my destination so

4:42:34

this thing this information I'm going to

4:42:35

collect in my like a variable that is

4:42:38

perams now over here we have a variable

4:42:40

that is perams now from here I'm going

4:42:42

to extract few more information I want

4:42:44

to extract the origin and the

4:42:46

destination so for that I already

4:42:47

written the code let me copy and paste

4:42:49

so this is my origin so I'm calling this

4:42:52

get uh method on top of this uh

4:42:54

dictionary actually this is my

4:42:55

dictionary and I'm extracting a value of

4:42:57

this particular key as like this I'm

4:43:00

extracting a value of this particular

4:43:01

key you you can see over here let me

4:43:03

show you so this is what this is my

4:43:05

dictionary now on top of this dictionary

4:43:07

if I will call this get method now uh by

4:43:10

using this uh key so get and over here

4:43:14

what I will do I'm going to write it on

4:43:15

the key so the key name is what location

4:43:18

uncore origin now over here see if I'm

4:43:22

going to run it now you will find out

4:43:23

this Delhi so this is my origin and here

4:43:26

you will find out the destination

4:43:28

similarly I can get the destination also

4:43:29

now it's not a big deal see now over

4:43:32

here I can call this a destination why

4:43:35

I'm doing it entire thing will be clear

4:43:37

and I will give you the quick revision

4:43:38

also just wait for some time just wait

4:43:40

for more 5 minute everything will be

4:43:42

fine so Delhi is there Delhi and Bombay

4:43:44

is there so here we have origin and

4:43:46

destination now we got both origin and

4:43:49

destination right so parameter is uh we

4:43:51

are able to get a parameter we are able

4:43:53

to get origin and destination now let's

4:43:55

try to find out the flight detail right

4:43:57

so let's try to fly find out the F

4:43:59

flight detail so for that basically what

4:44:01

I'm going to do here I'm going to call

4:44:05

one uh so here I'm going to call one

4:44:07

method that is a a right so what this a

4:44:10

will do so here actually I'm going to

4:44:11

pass the name so let me show you this

4:44:13

particular value what is happening over

4:44:15

here so just a wait let me copy and

4:44:17

paste over here so this is what this is

4:44:19

the name this name is what this is the

4:44:21

function name get flight information

4:44:23

right now I'm giving this uh function

4:44:26

name uh this uh function name this GL

4:44:28

get flight info which is a string as of

4:44:30

now let me show you the type of this

4:44:32

function over here so over here what I'm

4:44:33

going to do here I'm going to write it

4:44:35

down type of this function so this type

4:44:37

of the function is nothing it's a string

4:44:40

only so let me uh keep it inside the

4:44:43

bracket so this is what this is a string

4:44:44

now if I'm passing this thing to my eval

4:44:46

function eval method so you will get the

4:44:49

actual function this eval is doing

4:44:50

nothing this EV is giving you the actual

4:44:52

value that's it this is what this is the

4:44:54

function now we have defined get flight

4:44:56

information it will give you the actual

4:44:58

value that's it so here you can see it

4:45:00

is giving me the function only this is

4:45:02

what this is my function this get flight

4:45:04

info is what it's a function now it's

4:45:05

not a string we have already defined it

4:45:07

over here see this one so this is doing

4:45:09

nothing it is just giving me actual

4:45:11

value okay now let me show you one

4:45:13

example very basic example let's say if

4:45:15

I'm going to write down and here if I'm

4:45:17

going to write down two now tell me what

4:45:19

is this two if I'm going to write down

4:45:21

like this uh type and here I'm going to

4:45:25

write it down two just tell me what is

4:45:27

this it's a string but two is a string

4:45:30

no it's an

4:45:31

integer right it's a integer so if I'm

4:45:34

I'm going to write it down like this now

4:45:35

if I'm passing to my so it will provide

4:45:37

an integer see this is what this is an

4:45:38

integer if you check with the type so

4:45:40

type the type will be an integer only so

4:45:43

it is converting whatever value we are

4:45:46

passing into the well method now it is

4:45:47

converting into a original format into a

4:45:49

original form so here we are getting a

4:45:51

function so this is what this is my

4:45:52

function which I collected over here now

4:45:54

I just need to call this particular

4:45:56

function so here I'm going to call this

4:45:58

function now after calling this

4:46:00

particular function I will be get see

4:46:02

here I'm going to pass the parameter

4:46:04

keyword argument keyword par like this

4:46:06

this particular parameter params this

4:46:07

one okay location origin and location

4:46:10

destination this two thing we want over

4:46:12

here this one right now once I will run

4:46:15

it so here I will be getting my details

4:46:18

so let me run it first of all uh where

4:46:20

is a perms here is a perms and here is

4:46:22

what here is my flight details so name

4:46:25

date time is not defined let me Define

4:46:29

the date time over

4:46:31

here so from date time on of date time

4:46:37

import date time and it is done I think

4:46:42

now let me run

4:46:44

it time Delta is not defined let me

4:46:48

check what all import statement is there

4:46:52

just a

4:46:54

wait time Delta also we can import from

4:46:57

here itself so this is going to be a

4:47:00

time Delta great now let me run it and

4:47:04

over here you will find out a detail see

4:47:07

so actually what we are going to do uh

4:47:10

this function actually uh you can think

4:47:13

it's a it is working as a API got it now

4:47:17

here what we are going to do so we are

4:47:18

extracting a information from the uh

4:47:21

like whatever prompt and all we are

4:47:22

passing now so from there basically we

4:47:24

are extracting an information and we are

4:47:26

collecting a detail of the flight okay

4:47:28

from U like this is the response

4:47:30

actually see first what I did I defined

4:47:32

a function this is what this is my

4:47:33

function

4:47:35

this is what this is my function right

4:47:36

after that we are calling the uh after

4:47:39

that we are hitting to the uh like model

4:47:41

by by using this open API now after

4:47:44

hitting it so actually whenever we are

4:47:47

checking with a response so in argument

4:47:49

actually in a function argument we have

4:47:50

this two thing now by using this two

4:47:52

thing now what we are going to do so we

4:47:54

are uh like extrating the information

4:47:57

from here so as of now this is this

4:47:59

function actually you can think it's my

4:48:01

API but you can call actual API by using

4:48:04

this particular information that is what

4:48:06

I'm doing over here just just think over

4:48:07

here that is what I'm doing so now what

4:48:09

I did what I got tell me guys so I I

4:48:13

collected the information whatever see I

4:48:15

Define the thing inside my function

4:48:18

inside this particular function okay

4:48:19

this one this is the value this is the

4:48:21

like parameter which I defined now I uh

4:48:24

I like called my model I called my open

4:48:26

API and it is hitting the model right so

4:48:29

whatever response I'm getting now from

4:48:31

that particular responses I'm getting

4:48:33

this particular argument because my chat

4:48:36

GPT is not able to answer for this

4:48:37

particular question and by using this

4:48:39

argument I'm hitting my API I'm hitting

4:48:42

my API and after hitting the API guys

4:48:45

you can see this is the detail this is

4:48:47

the information I'm

4:48:49

getting okay by using those particular

4:48:51

argument now let me show you the

4:48:53

complete one so once we are getting this

4:48:55

particular information the flight

4:48:56

information regarding those particular

4:48:58

argument okay you can create an end

4:49:00

application here I'm showing you in a

4:49:01

notebook itself so here see guys what

4:49:04

I'm getting now give you the final code

4:49:06

so we are getting this particular

4:49:07

information and is done now let me uh go

4:49:12

for the final call so here you can see

4:49:16

uh I can keep it as a uh response three

4:49:18

client chat completion create now here

4:49:21

is what here is my model and here is

4:49:23

what here is my user prompt whatever

4:49:24

prompt I I'm passing now see guys over

4:49:26

here see role is what role is a function

4:49:29

now I have changed the role okay uh here

4:49:31

is a role role is a user now role is a

4:49:33

function function now this is the value

4:49:35

I'm extracting from the function

4:49:37

whatever function I'm defined and here

4:49:39

is what here is a like content basically

4:49:41

which I'm passing this is what this is a

4:49:42

flight right so this is the argument

4:49:44

which we are extracting from the

4:49:46

function whatever function I have

4:49:47

defined right and then this is what this

4:49:50

is my function description that's it

4:49:51

right so here see guys uh my role role

4:49:54

as a user as a role as a user basically

4:49:56

what I'm asking to my uh chat GPT or

4:49:58

sorry to my GPT model let me show you

4:50:01

that so over here what I'm going to do

4:50:03

I'm going to print it this user prompt

4:50:05

this is my question this is my prompt

4:50:07

this is what basically which I'm going

4:50:08

to ask right now over here roll again I

4:50:11

Define one more role that is what that

4:50:13

is a function right now over here I'm

4:50:15

going to pass the name and here I'm

4:50:17

going to extract the like function the

4:50:20

the ex exact function over here you can

4:50:22

check over here you can like copy it and

4:50:25

you can paste it over here this one so

4:50:28

just just paste and you will get this

4:50:30

function called now just collect the

4:50:32

name name of the function do name so

4:50:34

what is the name of the function get

4:50:36

flight info right now here is what

4:50:38

content is nothing content is a flight

4:50:40

now as soon as I will run it so here you

4:50:42

will be able to find out that we are

4:50:44

able to extract the information now let

4:50:47

me show you this response three so here

4:50:49

is what here is my response three and

4:50:51

guys see what I'm getting over here so

4:50:54

let me print the final one and here you

4:50:58

will be able to find out a detail so let

4:51:01

me run it see guys so now let me call

4:51:05

the uh this uh function call just a

4:51:09

second function uncore

4:51:13

call function _ call and over here guys

4:51:16

you can see we have argument and

4:51:19

actually we have a message over there

4:51:20

just a wait let me show you that

4:51:23

also uh function call and

4:51:26

argument okay just a

4:51:31

wait oh message inside the message

4:51:33

message itself I will be able to get it

4:51:36

uh where my message is coming inside a

4:51:40

choice and

4:51:42

here okay I need to call a Content

4:51:44

actually just a

4:51:49

second message function call this is my

4:51:52

function call that is fine now here

4:51:55

Choice uh just a second choice what we

4:51:58

have inside a

4:52:00

choice okay it is a response three fine

4:52:03

fine fine I was checking with a response

4:52:05

two uh yeah this was a response now it

4:52:08

is fine it was a response three I was

4:52:10

checking with a response two it's my bad

4:52:12

it's my bad uh okay now let me collect

4:52:16

the message from here so here is what

4:52:19

here is a zero and

4:52:22

uh now let me call this

4:52:28

message so here is my message and let me

4:52:31

collect the content

4:52:35

tent and here is what here is my content

4:52:39

guys so did you get it what is the use

4:52:41

of this function calling now let me give

4:52:43

you the definition of this function

4:52:45

calling in a single line so just a wait

4:52:48

I'm giving you the definition definitely

4:52:50

you will be able to relate now so if we

4:52:52

are talking about this function calling

4:52:54

now so here is a definition of it let me

4:52:58

copy and paste so what is our definition

4:53:00

of the function calling so function

4:53:02

calling is nothing learn how to connect

4:53:05

large language model to the external

4:53:07

tool that's it we can define a function

4:53:10

we can Define the parameters we can

4:53:13

Define the values and according to that

4:53:15

we can get our responses from the third

4:53:17

party API and here I have defined this

4:53:20

particular function M function is a

4:53:22

third party API but you can call the

4:53:24

realtime API and you can get the

4:53:28

information you can get the exact

4:53:31

information this thing is clear to all

4:53:34

of

4:53:35

you yes or

4:53:38

no how many of you you are able to get

4:53:41

it how many of you you are able to

4:53:43

understand this thing if you can let me

4:53:45

know in the chat so I think that would

4:53:47

be great again I will try to revise it

4:53:49

uh I will give you the quick revision of

4:53:51

it and then I will move to the link

4:53:56

chain will you revise it please do let

4:53:59

me know in the chat will you revise this

4:54:02

concept

4:54:08

I'm waiting for a reply if you can

4:54:09

answer me in the chat I think that would

4:54:11

be

4:54:32

great

4:54:35

yes I'm going to revise it just wait

4:54:37

just give me a second first of all uh do

4:54:39

let me know how much person you got so

4:54:42

if you can tell me uh in a percentage

4:54:43

also so that would be great I will get

4:54:45

some sort of idea that okay you are

4:54:47

getting something from here whatever

4:54:49

code I'm writing you're getting from

4:54:50

here so please uh do let me

4:55:02

know 80%

4:55:11

great 70 70

4:55:16

80 yeah if you're getting 70 or 80% now

4:55:19

so I think rest of the thing like you

4:55:21

just need to revise Sor is saying sir

4:55:23

I'm just getting 10% so Sor in that case

4:55:26

you need to follow from a very first

4:55:28

session just check with the very first

4:55:30

session and then come to the second one

4:55:32

and then come come to this third

4:55:39

one if you are near to 70 to 80% now

4:55:43

then you just need to revise it once

4:55:44

that's

4:55:48

it yes correct uh your understanding is

4:55:52

correct here we are extracting value

4:55:54

from given prompt using function

4:56:02

call

4:56:11

what is the meaning of the role is equal

4:56:12

to function which

4:56:15

one here we are defining now see we have

4:56:18

a user so user is asking a question and

4:56:20

rest of the information we are going to

4:56:22

collect from here we are defining one

4:56:24

more role we have we can Define many

4:56:25

roles over here um we can Define uh like

4:56:29

uh we can Define the system we can

4:56:30

Define role as assistant we can Define

4:56:32

role as a user user we can Define role

4:56:34

as a

4:56:35

function user is asking something and uh

4:56:38

and uh from wherever basically we are

4:56:41

going to be get output or we are getting

4:56:43

a uh we are we trying to exct the

4:56:45

information regarding this particular

4:56:47

prompt so we are defining as a rle over

4:56:49

here that's

4:57:00

it great so let's revise it now and then

4:57:03

I will go for the Len chain so we'll try

4:57:05

to understand the langen chain and all

4:57:06

already I have installed this L chain

4:57:08

and try to hit the open API and tomorrow

4:57:11

we'll understand the lch in a very

4:57:13

detailed way uh today uh just a quick uh

4:57:17

understanding quick uh uh first of all I

4:57:19

will give you the quick recap of all

4:57:21

those all this thing and then I will

4:57:23

come to the lon part so let's understand

4:57:27

this function calling one more time from

4:57:32

scratch

4:57:39

great so over here see we are talking

4:57:42

about this uh we are talking about this

4:57:43

chat completion API and I think you know

4:57:46

about it how many time we have discussed

4:57:48

so we're passing the prompt here is my

4:57:50

prompt and we are getting the output now

4:57:52

Today I Started from the like a

4:57:55

different type of prompt so uh today I

4:57:57

have started from the function calling

4:57:59

so here I have defined one description

4:58:01

and here I'm writing uh the prompts my

4:58:04

prompt is saying that uh here you need

4:58:06

to extract this information from the

4:58:09

given description that's it now here you

4:58:12

can see uh this is my client this is

4:58:15

what this is my client now here I'm

4:58:17

going to call my chat GPT and sorry I'm

4:58:21

going to call my GPT model so after that

4:58:23

what I'm getting I'm getting my response

4:58:25

I'm going to convert into a Json and

4:58:26

this is fine right this is fine anything

4:58:28

you can ask to your model and you can

4:58:30

print as a response you just need to

4:58:32

define a prompt that that's it now here

4:58:35

the same thing I'm going to do by using

4:58:36

this function so here I'm going to do uh

4:58:39

the same thing by using this function

4:58:41

now here I'm going to define a several

4:58:43

parameter so this is my parameter name

4:58:45

College grade and Club it should be a

4:58:47

same similar to this prompt itself

4:58:49

whatever prompt I have defined I have

4:58:50

written right so just look into the

4:58:52

prompt I will share this notebook then

4:58:54

you can check it should be similar to

4:58:55

that only this particular properties

4:58:58

this particular values now over here uh

4:59:01

you will find out that okay I again I'm

4:59:03

going to call it again I'm working I'm

4:59:06

like role I've defined as a user there's

4:59:07

a Content prompt and you are getting a

4:59:10

response and here you are getting a

4:59:12

response now guys here you can see we

4:59:15

are going to print a message and finally

4:59:16

we are getting a same thing by calling

4:59:18

this uh by using this function call as

4:59:21

well now here actually once you will

4:59:22

look into the prompt we have defined one

4:59:24

thing over here we we are saying that uh

4:59:27

return it as a Json object return it as

4:59:30

a Json object so whatever response you

4:59:32

are getting now from from the openi side

4:59:34

also I tested the same thing of the CH

4:59:36

GPT see I given the description this was

4:59:39

my description and CH GPD has given me

4:59:41

output is a Json format so if you are

4:59:44

calling it now uh this uh like a GPD

4:59:47

model so it will give you the output in

4:59:48

a Json format this one so here it is

4:59:51

giving you the output this particular

4:59:52

output in a Json format this one

4:59:54

actually it's a string but yeah we can

4:59:56

convert into a Json and that is what I

4:59:57

did now the same thing why we are doing

4:59:59

by using this function now over here H

5:00:01

it's fine it's clear now here I've given

5:00:03

you a few more uh like functionality

5:00:05

regarding this function I can call it

5:00:07

for the several description in a single

5:00:10

sort I just need to keep the for I just

5:00:11

need to write down the for Loop over

5:00:13

here so I'm getting a multiple responses

5:00:15

for sun for Chris for sansu right so

5:00:18

here I'm getting a multiple responses

5:00:20

now here I given you an assignment so

5:00:23

here I told you that you can call a

5:00:25

multiple function also don't call a

5:00:27

single function here I'm getting an

5:00:28

information from the single

5:00:30

function but you can call a multiple

5:00:32

function and here I shown you the way

5:00:34

you just need to define a function in a

5:00:36

list and that's it so here is a function

5:00:39

you just need to define a function in

5:00:40

the list and just pass it over here and

5:00:42

according to that only you will get a

5:00:44

response getting my point now here I've

5:00:47

shown you the advanced example of

5:00:49

function calling and that's a real use

5:00:50

of the function and here if you want to

5:00:52

Define this function in a single word in

5:00:54

a single line if you want to understand

5:00:56

this function in a single line so here

5:00:58

you can see this is the definition learn

5:00:59

how to connect large language model to

5:01:02

the external tool

5:01:03

so here what I want to do so here let's

5:01:05

say uh this is my model and here I'm

5:01:10

going to write down some sort of a

5:01:12

prompt where uh like it is going to be a

5:01:15

request and here I'm getting a response

5:01:18

now this prompt actually it's something

5:01:20

uh related to a real time I'm asking a

5:01:23

real time question that just give me the

5:01:25

flight just tell me like what all

5:01:27

matches uh we have in upcoming days or

5:01:31

uh just tell me the weather okay

5:01:33

something like that so I'm asking a real

5:01:35

time information it won't be able to

5:01:36

provide it to me in that case what you

5:01:39

will do so you are not going to call

5:01:41

your llm now because it is not trained

5:01:45

on that uh on it it has not been trained

5:01:48

on top of that data actually if you are

5:01:51

talking about this GPT so this GPT

5:01:53

actually train on this uh till actually

5:01:55

till September 2021 so this GPD train

5:01:59

till uh 2021 only now in that case

5:02:02

whatever prompt you are going to be

5:02:03

write it down you won't be able to get a

5:02:05

response right so here this function

5:02:08

calling comes into a picture so once you

5:02:10

will Define the function now so here

5:02:13

what you will do you are going to define

5:02:14

a function you are going to different

5:02:15

Define a different different arguments

5:02:17

and all each and every information you

5:02:18

are passing to this function that's it

5:02:21

now you just need see here this argument

5:02:24

what you will do by using this

5:02:26

particular argument you will call a

5:02:27

third party API third party API

5:02:34

third party API now you will call this

5:02:36

third party API here or whatever

5:02:39

function you are going to Define and

5:02:41

whatever prompt you are writing

5:02:42

according to that you will get a

5:02:43

response because this llm is not able to

5:02:45

provide you the response right and the

5:02:48

same thing the each and everything you

5:02:49

can do by using the chat completion API

5:02:51

only chat completion method you can say

5:02:54

chat completion API or chat completion

5:02:55

method both are fine by using this chat

5:02:57

completion method now let me show you in

5:02:59

terms of coding so over here if you look

5:03:03

into the code so I'm doing the same

5:03:04

thing here I have defined a function see

5:03:07

this is what

5:03:08

uh first of all I'm asking to my first

5:03:11

of all I'm asking to my uh llm model it

5:03:14

is not able to answer now after that

5:03:17

what I did I defined the function got it

5:03:20

after that I defined a prompt I'm

5:03:21

passing to my model I'm passing to my

5:03:25

actually uh this uh like chat completion

5:03:27

method so here is my user here is my

5:03:29

prompt and here is my function

5:03:30

description by doing that what I'm able

5:03:32

to do I able to extract few of the uh

5:03:35

few value whatever is there inside this

5:03:37

function whatever I have defined over

5:03:39

here because here I'm writing in this

5:03:40

function description now after that this

5:03:43

value I'm using and this is what this is

5:03:45

my API okay this this is my like it's

5:03:47

not a real API it's like a virtual API

5:03:50

whatever you can say now whatever value

5:03:52

I'm passing whatever uh thing I'm

5:03:54

collecting from here I'm passing to this

5:03:55

API and I'm getting a response over here

5:03:58

this is the response this is my

5:04:01

response got it now what I will do here

5:04:04

now I compiled each and everything over

5:04:05

here inside this chat chat completion

5:04:07

method so how I compile this is my model

5:04:10

this is my prompt this is my user this

5:04:12

is my prompt this is my function call

5:04:14

this is my function call along with the

5:04:17

argument and over here this is my

5:04:19

function that's it if I'm going to run

5:04:21

it now it is going to extract the

5:04:23

information from the third party API

5:04:25

which is my function as of now now you

5:04:27

can take as assignment you can call the

5:04:29

real time API you can use the rapid API

5:04:31

you can do that you can call a real time

5:04:33

API so now this function calling is

5:04:36

clear to all of you yes or

5:04:42

no correct ran your understanding is

5:04:44

correct

5:04:48

now your understanding is correct and I

5:04:51

think you are able to get

5:05:00

it now let's start with the length chain

5:05:03

so we have a a 10 minute uh now we can

5:05:06

understand the concept of the length

5:05:08

chain and then from Tomorrow onwards I'm

5:05:11

going to start with the Len chain now

5:05:13

first of all let me write it down the uh

5:05:16

code for the Len chain so here I'm going

5:05:18

to write it down Len CH and here uh you

5:05:23

can I can mark down it and uh so first

5:05:27

of all guys what I need to do so I'm

5:05:28

going to start from the Len chain uh so

5:05:31

the first thing very first thing uh I

5:05:33

need to import it so let me give you the

5:05:35

entire code okay so step by step let me

5:05:38

write down each and everything so first

5:05:39

of all I have to import the Len chain so

5:05:42

here I'm going to write it down import

5:05:44

length

5:05:45

chain now here I have imported the Len

5:05:48

chain now from this like in this lure

5:05:50

actually we have a different different

5:05:51

modules we have a different different

5:05:53

module and inside that we have a

5:05:54

different different classes so as of now

5:05:56

we are going to use the open AI so here

5:05:59

I'm going to write it down from Len chin

5:06:01

from Len

5:06:03

we are going to import this open AI so

5:06:07

lenin. llms and here I'm going to write

5:06:09

down this open AI okay so we are able to

5:06:12

import this open AI now what I will do

5:06:16

so initially I told you that this lenon

5:06:19

is nothing it's a wrapper on top of this

5:06:21

open AI so you can think that this is my

5:06:24

open AI right this is what this is my

5:06:27

open AI now on top of this open a on top

5:06:30

of this open API this lench is nothing

5:06:32

it's a

5:06:35

wrapper okay so this is what length

5:06:37

chain now here whatever request we are

5:06:40

making whatever request we are making

5:06:43

right so now we are not directly using

5:06:45

this open a now we are not directly

5:06:48

using this open API instead of that we

5:06:52

are using this L chain so our request is

5:06:54

going through to this a len chain and

5:06:57

then it is hitting this open AI but this

5:07:01

Len chain it is not restricted to till

5:07:03

here itself we have a many uses of the

5:07:06

Len

5:07:07

chain getting my point this Len chain is

5:07:10

not restricted to this one only we have

5:07:12

a many uses of the link chain I will

5:07:15

talk about those uses and this Len chain

5:07:17

actually it's a very powerful uh it's a

5:07:20

very powerful application it's a open

5:07:22

source I will show you the source code

5:07:23

as well uh even we can search about it

5:07:25

so let me show you that uh let me show

5:07:27

you the source code of the Lenin so here

5:07:31

I'm going to write it down Len Chen Len

5:07:34

Chen GitHub so here is what guys here is

5:07:37

a len Chen GitHub uh just a second yeah

5:07:42

so this is a lenion GitHub now you will

5:07:44

see the number of folks the number of

5:07:46

star number of folks number of start

5:07:49

number of watching right so number of

5:07:51

watching in a real time and this length

5:07:53

chain is really amazing let me give you

5:07:55

this link inside your chat please try to

5:07:58

uh explore it by yourself and it's a

5:08:01

very uh Power powerful and very

5:08:03

important as well if you want to build

5:08:04

any llm based application so you can use

5:08:08

this length chain it's a it's completely

5:08:10

op source and here you can see used by

5:08:12

40,000 people and here is a number of

5:08:15

contributor you can also become a

5:08:16

contributor if you like to contribute in

5:08:19

a open source now here you can see the

5:08:20

commits 7 hour ago they committed

5:08:22

something just just go through with this

5:08:24

commits and check what thing they have

5:08:26

committed what what changes they have

5:08:28

made over here try to understand it and

5:08:30

this package actually it is available on

5:08:32

the pii repository so just go over the

5:08:35

pii repository pii Len chain and search

5:08:38

about the Len chain and here you will

5:08:40

find out this Len chain this is what

5:08:42

this is a len chain guys this is a like

5:08:44

they have hosted the package on pii

5:08:46

repository and it is a latest version of

5:08:49

The Lang chain now here also just just

5:08:51

uh scroll down here also you will find

5:08:54

out the same thing

5:08:55

uh deployment so they are doing a deploy

5:09:00

here is a package package see this is

5:09:02

the release so 0.0.3 46 0.0.3 46 this is

5:09:07

the latest uh version which you can see

5:09:10

over here as well this one is uh so far

5:09:13

they did 297 release total 297 release

5:09:18

see this is the total release actually

5:09:19

total number of release now you can see

5:09:21

over here as well just go inside the

5:09:23

real uh just go just click on this

5:09:25

release history and check the uh entire

5:09:28

uh like release related to the length CH

5:09:31

got it right so here is a latest version

5:09:34

of the Len chain similarly we have a

5:09:36

llama index two also and this Len chain

5:09:39

is a open source and the Llama index 2

5:09:41

it's a framework from The Meta we can do

5:09:44

a same thing by using this llama index 2

5:09:46

also I will come to that I will come to

5:09:48

the Llama Index right now over here see

5:09:51

we have this Len chain we have this

5:09:52

openi now let's try to create now let's

5:09:54

try to create object of this open Ai and

5:09:57

here what I need to do guys tell me here

5:09:59

I'm going to here I'm going to pass pass

5:10:02

my open a key so first of all uh I will

5:10:05

have to pass the parameter now let me um

5:10:08

give the parameter over here and here I

5:10:10

need to write it down this my key and

5:10:13

here is what here is my client right now

5:10:16

I just need to call one method and my

5:10:18

method is going to be a predict right so

5:10:21

my the method name is going to be a

5:10:22

predict so let me write it down over

5:10:24

here Cent c l i n t dot predict now here

5:10:27

what I need to do here I just need to

5:10:29

pass the prompt prompt is what prompt is

5:10:32

a input whatever input we are passing to

5:10:34

the model that's it so let me Define The

5:10:36

Prompt so here I'm going to write it

5:10:38

down the prompt and this prompt let's

5:10:40

say I'm going to ask to my model what I

5:10:42

can ask so I can ask can you tell

5:10:46

me

5:10:48

total number of country total number of

5:10:53

country in Asia so here is my question

5:10:56

so I just asked a little tricky question

5:10:59

not a tricky actually it's a

5:11:00

straightforward so uh here is my

5:11:02

question my question is what my question

5:11:03

is can you tell me total number of

5:11:05

country inia now this is called guys

5:11:07

zero short prompting what is this tell

5:11:09

me this is called zero short

5:11:13

prompting this is what guys tell me this

5:11:15

is a zero short prompting now here if I

5:11:17

will run it and here if I will pass my

5:11:19

prompt to My Method client don't predict

5:11:22

so here you will get output so here it

5:11:24

is saying that there are 48 country in

5:11:27

Asia if you would like to uh if you want

5:11:30

to name then here you can mention

5:11:32

can you give me can you give

5:11:37

me top

5:11:40

10

5:11:42

country name so here uh I have extended

5:11:46

the question now and now see over here I

5:11:49

will be getting a name of the country so

5:11:51

it is giving me the sash slash sash is

5:11:54

nothing it means it means that if I'm

5:11:56

going to print it now so it will print

5:11:57

after two line so for that what you can

5:12:00

do you can just call this a strip

5:12:02

SD and it will strip your output so here

5:12:05

you will find out the correct output so

5:12:08

there are 48 continer isia the top 10

5:12:11

country by population in Asia these are

5:12:13

the country now here if I'm going to

5:12:15

write it on print so you will get a

5:12:17

output in a correct format so here guys

5:12:19

you can see you will get output in a

5:12:22

correct format so there are total 48

5:12:24

country in Asia and these are the top 10

5:12:26

countries China India Indonesia Pakistan

5:12:28

Bangladesh Japan Philippines Vietnam

5:12:31

Iran and turkey got it guys how to use

5:12:34

lch I just given you the introduction of

5:12:36

that but there are many more things so

5:12:39

all the things uh uh the remaining thing

5:12:41

definitely we are going to discuss in

5:12:43

next session as of now just think that

5:12:45

this uh lench is nothing it's a rapper

5:12:48

on top of the open AI but it is having a

5:12:50

lots of uses it can call any third party

5:12:53

API it can call any sort of a data

5:12:55

resource it can uh like uh it it it is

5:12:58

having a power to read a different

5:13:00

different documents it's a having a

5:13:02

power to making a change to making a

5:13:05

memory it is having a power it is uh it

5:13:08

is not only for the open AI we can use

5:13:12

this lenen for any open source model any

5:13:15

open source llm model and tomorrow I

5:13:18

will show you here I have used so let me

5:13:21

write down tomorrow's agenda what all

5:13:22

thing we are going to discuss tomorrow

5:13:26

tomorrow uh tomorrow's

5:13:29

agenda so we are going to uh cover

5:13:33

hugging phase hugging phase API with Len

5:13:38

chain uh and we'll try to understand the

5:13:41

use of the Len chain use of the length

5:13:43

chain so we'll try to understand this

5:13:45

use of the Len chain in very

5:13:48

detailed way so this will be the agenda

5:13:52

for tomorrow's uh like this this is the

5:13:54

agenda for tomorrow's class and after

5:13:56

that I will directly jump to the project

5:13:59

we try to create one project and with

5:14:01

that your understanding will be clear

5:14:03

and rest of the topic we'll cover after

5:14:06

uh after the project and all so tell me

5:14:09

guys how was the session did you like

5:14:11

this session uh did you uh did you got

5:14:14

everything yes or no whatever I have

5:14:18

explained yeah meanwhile you can explore

5:14:20

it by yourself that is a good

5:14:22

idea tell me guys fast uh did you like

5:14:25

the session please do let me know in the

5:14:27

chat if you are liking the session if

5:14:29

you're liking my content I have WR and I

5:14:32

I created each and everything from

5:14:33

scratch by myself only and believe me if

5:14:35

you are following this notebook if you

5:14:37

are following my content you won't face

5:14:39

any

5:14:40

issue and even in our interview also you

5:14:42

can answer in a better

5:15:00

way

5:15:04

okay so I think uh now uh we have

5:15:08

covered all the thing whatever I told

5:15:11

you and uh yeah all the resources and

5:15:14

all you can find it out over the

5:15:16

dashboard so we are uploading each and

5:15:18

every resources in a resource section so

5:15:21

just visit the dashboard and here uh we

5:15:24

have all the videos videos and quizzes

5:15:27

assignment each and everything we are

5:15:28

going to update over here so along with

5:15:30

the session you can and practice now

5:15:33

here uh we have our resources regarding

5:15:36

the first session so all the all the PDF

5:15:39

and all all the PPT so at least you can

5:15:42

revise the thing you no need to go

5:15:43

through with the video again and again

5:15:45

you can directly uh download the

5:15:46

resource and you can look into that if

5:15:48

you have attended my live session and

5:15:51

here we have a IPO NV file also so just

5:15:55

visit this uh resource section and this

5:15:58

is the IP VB file now I will update this

5:16:00

IP VB file in my day three video and

5:16:03

along with that we'll be having some

5:16:05

quizzes assignment and don't worry I

5:16:06

will give you more assignment more

5:16:08

quizzes and see in between whatever I'm

5:16:10

leaving so here I told you that you need

5:16:13

to create your own API this one uh in an

5:16:15

advanced example of function calling so

5:16:18

just use any API okay just search over

5:16:20

the internet I told you you can use

5:16:22

Rapid API and try to get a realtime data

5:16:25

instead of this uh dummy function which

5:16:27

I created over here you can take it as

5:16:29

assignment here I told you that you need

5:16:32

to you can use multiple function right

5:16:34

in a single shot just try to create one

5:16:36

more function define it in your in your

5:16:38

own way and then uh run it and uh get an

5:16:41

information so here I'm getting an

5:16:43

information regarding three user you can

5:16:45

add more user and you can add multiple

5:16:48

function over there so now let's start

5:16:50

let's begin so in the previous classes

5:16:53

uh in the uh previous three classes

5:16:55

actually I have talked about the

5:16:56

generative Ai llm and then I came to

5:16:59

this open Ai and yesterday I have I did

5:17:01

the detailed discussion on top of this

5:17:03

open Ai and I have introduced the Len

5:17:06

chain to all of you uh so guys this is

5:17:08

the notebook inside this notebook I have

5:17:10

kept each and everything whatever notes

5:17:12

whatever code and all whatever thing I

5:17:14

was doing all right so uh in terms of

5:17:17

code and all so each and everything I

5:17:18

have kept inside this particular

5:17:20

notebook and this notebook is available

5:17:22

inside your resource section so from

5:17:24

where you will get a resource guys so

5:17:26

for for that uh you need to go through

5:17:28

with the dashboard so here is your

5:17:29

dashboard here you will find out uh here

5:17:32

you will find out all the recordings U

5:17:35

Day One recording day two recording day

5:17:36

three recording so just try to go

5:17:38

through with the day three you just need

5:17:40

to click on the uh day three and here uh

5:17:44

check with the resource so go inside

5:17:46

your resource section and this is the

5:17:48

dashboard guys generative AI Community

5:17:51

Edition English so here you will find

5:17:53

out uh two dashboard uh the two

5:17:55

Community dashboard one for Hindi and

5:17:57

one for English so this is for the Hindi

5:17:59

one U actually I'm taking a same classes

5:18:01

on a Hindi uh Channel as well I on Hindi

5:18:05

I on teag Hindi you can search over the

5:18:07

uh YouTube and the uh it's it is your

5:18:10

one this English one so just go and

5:18:12

check with your dashboard you will find

5:18:14

out all the recordings and all so click

5:18:17

on this day three and here check with

5:18:19

your resource section so okay so

5:18:21

resources is not there I have already

5:18:24

given to my team but don't worry I will

5:18:27

check and here is what guys here is a a

5:18:29

notebook so uh definitely I will provide

5:18:32

you this particular notebook inside the

5:18:34

resource section so you all can run it

5:18:37

you all can run it and by running it you

5:18:39

can uh revise the thing and all and

5:18:41

apart from uh this notebook apart from

5:18:44

this resources you will find out the

5:18:45

quizzes and assignment also so please

5:18:47

try to enroll to this dashboard try to

5:18:50

visit the Inon website sign up over

5:18:51

there login and then uh enroll into this

5:18:54

community session for this commun

5:18:56

session you no need to pay anything it's

5:18:59

just it's a free one okay so just just

5:19:02

go through with the Inon website and

5:19:03

login um after sign up do the login and

5:19:06

you can access this particular dashboard

5:19:08

and you will find out the same dashboard

5:19:10

in a description also so just just try

5:19:12

to check the description of this video

5:19:14

of this live section you will find out

5:19:15

the dashboard or else you can check with

5:19:17

the previous Live recorded session also

5:19:19

which is already available on the over

5:19:21

the Inon YouTube channel got it so this

5:19:24

uh resource uh part is clear to all of

5:19:26

you now in today's session what all

5:19:29

thing we going to discuss so guys first

5:19:30

I will will start from the Len chain

5:19:33

first I will explain you the complete

5:19:34

Len chain that what is a len chain what

5:19:36

all things we have inside the Len chain

5:19:39

why we should use it why it is too much

5:19:41

powerful each and everything we'll try

5:19:43

to discuss regarding the Len chain and

5:19:46

after that I will come to this hugging

5:19:47

phase I will explain you that how you

5:19:50

can uh how you can use any any like open

5:19:53

source model from the hugging face Hub

5:19:56

got it yes or no so in the previous

5:19:58

class I told you that whatever model

5:20:00

whatever model is there over the open AI

5:20:02

platform how you can use that by after

5:20:04

generating a API key now in today's

5:20:06

session after discussing this lench I

5:20:09

will come to the hugging phas and I will

5:20:10

show you I will show you that after

5:20:12

generating a API key hugging face API

5:20:15

key how you can utilize that particular

5:20:17

model so each and everything uh we'll

5:20:20

talk about in today's session uh

5:20:22

whatever I have told you and after that

5:20:24

we'll start with the project so in

5:20:25

tomorrow's session or maybe day after

5:20:27

tomorrow so I will start with the

5:20:29

project end to end project I will use

5:20:31

this openi concept hugging face concept

5:20:33

linkchain concept and I will uh show you

5:20:36

that how you can create a web

5:20:38

application end to end web application

5:20:41

and then we'll come to the advanced part

5:20:43

like vector databases and some other

5:20:45

topic so I think uh everything is fine

5:20:48

uh the agenda is all clear uh so please

5:20:51

give me a quick confirmation in the chat

5:20:52

if we can start then and whatever I have

5:20:54

explain you whatever I have explained

5:20:57

you so far so it is clear or not so

5:20:59

please do let me know in the chat uh if

5:21:01

it is clear and if we can start then I'm

5:21:04

waiting for your

5:21:30

reply

5:21:35

fine so I got the answer now great so

5:21:39

let's start uh let's start with the

5:21:41

topic so in this uh uh notebook itself

5:21:44

I'm going to write it down the entire

5:21:46

code uh of the Len chain so whatever

5:21:48

thing is there regarding the Len chin I

5:21:50

will try to do here itself and whatever

5:21:52

thing uh things will come into the

5:21:54

picture uh whatever other libraries and

5:21:56

all so definitely we'll try to install

5:21:58

all those library in the current virtual

5:22:01

environment now here guys uh I told you

5:22:04

that how to create an environment how to

5:22:06

uh launch the Jupiter notebook how to

5:22:08

install the openi over there how to uh

5:22:10

like install the langen each and

5:22:12

everything I have discussed in my

5:22:14

previous session so if you don't know

5:22:15

about it so please go and check with my

5:22:17

previous session there I did a detailed

5:22:19

discussion regarding the environment

5:22:21

setup got it now here guys um already I

5:22:24

have written some sort of a line some U

5:22:26

like sort of a quotee for the L chain

5:22:28

yesterday actually I I like uh I was uh

5:22:31

I I have imported the Lenin and I have

5:22:33

used the key the openi key and basically

5:22:36

I have imported this openi class and I

5:22:39

created a object then I uh written a

5:22:41

prompt over here and here I was uh like

5:22:45

giving this prompt to my open API and in

5:22:48

the back end it was running the llm

5:22:50

model and here you can see this is what

5:22:52

this is my output got it now here I I

5:22:56

had written actually this this this is

5:22:58

the today's agenda whatever thing we are

5:22:59

going to discuss in today's session so

5:23:01

hugging face API use of Lang CH and all

5:23:04

so each and everything we'll try to do

5:23:06

here itself in the uh in today's class

5:23:08

itself so first of all let me write it

5:23:10

down each and everything over the

5:23:12

Blackboard so with that you will get a

5:23:14

clear-cut understanding regarding the

5:23:16

agenda and all that whatever the thing I

5:23:18

am going to discuss and after that I

5:23:20

will come to the code part code section

5:23:23

so let's start uh with the agenda now in

5:23:25

today's class guys we'll be talking

5:23:27

about the Len chain so let me write it

5:23:30

down over here in today's session we're

5:23:32

going to start with the Len chain now

5:23:35

what is a len chain why we use Len chain

5:23:38

and what is a difference between this

5:23:40

open a and this Lenin so each and

5:23:42

everything we'll be discussing over here

5:23:43

itself now the first thing the first

5:23:45

thing which we going to discuss in the

5:23:47

Len Chen the first thing how to use Len

5:23:49

Chen or how to use open a uh how to use

5:23:56

how to use open AI by a lang chin so how

5:24:00

to use open AI via Len chain that's the

5:24:04

first thing we'll try to discuss got it

5:24:07

after that I will come to the prompt

5:24:08

template prompt uh templating so how you

5:24:11

can do a prompt templating by using this

5:24:13

Len chin so the second thing the second

5:24:15

topic which we're going to talk about

5:24:17

that will be a prompt

5:24:19

templating promp templating the third

5:24:22

thing which we're going to discuss

5:24:23

inside the Len chain that will be chains

5:24:26

we'll talk about the chains that what is

5:24:28

a chains uh how we can utilize this

5:24:30

chains what is the meaning of the chain

5:24:32

how uh what all the different different

5:24:34

type of chains is there each and

5:24:36

everything we talk about over here then

5:24:38

we'll talk about the agents that what is

5:24:40

the

5:24:43

agents okay so we'll talk about the

5:24:45

agent that what is the agent and what we

5:24:47

can do by using this agent so each and

5:24:50

everything we'll try to discuss

5:24:51

regarding this agent and here if uh so

5:24:54

here I will show you that how you can

5:24:56

use the Google API so by using the Sur

5:24:59

API so what I will do so by using the

5:25:02

surp

5:25:03

API I will try to I will try to use the

5:25:07

Google API Google API Google search

5:25:12

API so in the agent section I will

5:25:15

explain you this particular thing and

5:25:17

after the agent the fifth one the fifth

5:25:19

topic which we're going to discuss

5:25:21

that's going to be a memory so we'll let

5:25:24

you know that how we can retain the

5:25:26

memory how we can retain the memory like

5:25:29

chat GPD is doing how we can do the same

5:25:31

thing if we are using this open API so

5:25:35

we will try to discuss this memory uh

5:25:37

memory part as well and which is a uh

5:25:40

like which is available over here inside

5:25:41

the lench and by using this Len Chen we

5:25:43

can implement this particular feature

5:25:46

after this memory I would come to that

5:25:48

uh document loader so uh how we can load

5:25:51

our different different type of

5:25:52

documents so document is nothing

5:25:54

documented just a file like PDF file CSV

5:25:57

file tsv file or any other file how you

5:26:00

and load that particular document so

5:26:02

we'll talk about a document loader as

5:26:05

well so here let me write it down

5:26:07

document

5:26:11

loader after completing all these thing

5:26:15

then I will come to this hugging

5:26:16

phase hugging phase I will show you how

5:26:20

you can I will show you that how you can

5:26:23

uh generate a hugging face API key

5:26:25

hugging face API token and how you can

5:26:27

utilize any sort of a model whatever

5:26:30

model is is there over the hugging face

5:26:32

Hub so how you can use that particular

5:26:34

model so I will talk about the hugging

5:26:36

face after that and finally we'll move

5:26:38

to the project section so uh this is the

5:26:40

agenda for today's session for today's

5:26:42

class and apart from this each and

5:26:45

everything I have explain you how to

5:26:47

generate a open key how to uh like use a

5:26:50

open a what is chat completion what is a

5:26:52

function calling and all even I have

5:26:54

talked about the basics of the langen as

5:26:56

well so if this part is clear to all of

5:26:59

you so please do let let me know in the

5:27:01

chat if till uh like if the agenda is

5:27:04

clear so I just want quick yes in the

5:27:06

chat and please do let me know how many

5:27:09

of you you are writing a code along with

5:27:11

me because today I will go a little slow

5:27:13

so you also can write it down the code

5:27:15

along with me please do let me know guys

5:27:18

please write down the

5:27:29

chat

5:27:43

good I think many of you you are writing

5:27:46

a code

5:27:51

mhm uh just a wait just uh give me a

5:27:59

second

5:28:04

fine so let's start with the uh agenda

5:28:07

now so here guys you can see I have

5:28:09

written a agenda and first of all uh let

5:28:12

me explain you that what is a len chain

5:28:14

why we are not using this openi API why

5:28:17

we are using this Len chain and uh why

5:28:20

it is too much important this Len chain

5:28:22

and this llama index to so first of all

5:28:24

let me talk about uh the differences

5:28:26

between this open Ai and this Len chain

5:28:29

and then I will come to the

5:28:30

implementation part so here uh first of

5:28:33

all let me write it down the limitations

5:28:35

of the chat

5:28:36

GPT sorry limitations of the open a

5:28:40

API uh limitations of open AI

5:28:49

API now here guys see uh if we are

5:28:51

talking about this open API so here you

5:28:54

won't be able to find out a free model

5:28:57

so the first thing actually the first

5:28:58

thing uh in the limitation uh like which

5:29:01

we are going to talk about so here open

5:29:03

a model is not a free one so here let me

5:29:06

write it down open AI model open AI

5:29:10

model open AI model is not a

5:29:13

free now let's see uh let's assume that

5:29:17

okay so the model is not a free one and

5:29:20

if I want to use the llm uh like if if I

5:29:23

want to use the llm capability or that

5:29:25

AI capability in my application I if I

5:29:28

don't have a budget so what I will do I

5:29:30

will go with the other option other free

5:29:33

option open source

5:29:34

option okay so let's say some XYZ

5:29:37

organization some XYZ organization

5:29:40

created one llm now I want to use this

5:29:44

particular llm so yeah definitely what

5:29:47

you can do you can use the uh API

5:29:49

whatever API this XYZ company has given

5:29:51

to you and by using that particular API

5:29:54

you can use this particular llm right

5:29:56

now let's say you don't want to use this

5:29:58

llm you want to use some other llm

5:30:01

now how you will access it by using the

5:30:04

different API now let's say if you want

5:30:05

to use some other llm whatever llm is

5:30:07

there let's say uh one LM is over the

5:30:10

hugging phas Hub right if you want to

5:30:12

use that particular llm large language

5:30:14

model from the hugging phase right if

5:30:16

you want to use it then definitely you

5:30:17

can use it by generating that particular

5:30:19

API key but guys just think over here uh

5:30:22

yes we are using a different different

5:30:24

API over here first of all uh we were

5:30:26

using this openi API but as you know

5:30:29

that openi model is not a free one for

5:30:32

uh uh like if you want to use it so

5:30:34

definitely we'll have to pay something

5:30:36

and how we're going to pay it so based

5:30:38

on tokens yesterday actually uh day

5:30:41

before yesterday I shown you the uh the

5:30:43

token price and all that how much you

5:30:45

will be a charge if you are going to use

5:30:47

this openi API if you are going to use a

5:30:50

different different model over there I

5:30:51

told you regarding the input tokens

5:30:53

output tokens each and everything I have

5:30:55

discussed so just go through and check

5:30:57

with the previous session okay so if you

5:31:00

are not aware about it now let's say if

5:31:01

I want to use any XYZ llm or any other

5:31:04

llm so how you can use it by using their

5:31:07

API key but just think that uh just

5:31:10

think on top of it if why not like if we

5:31:13

have any one solution so the one

5:31:16

solution actually it can interact with

5:31:19

several

5:31:20

apis right so here I'm using this open

5:31:23

API I if I want to access this

5:31:25

particular model definitely I'm using

5:31:26

this XYZ API or let's say some other

5:31:28

model for that I'm using this XYZ API or

5:31:31

maybe I'm downloading it but just think

5:31:33

on top of it if we have any single

5:31:36

solution for all the llms with that

5:31:40

particular solution if we can access all

5:31:41

the llms to that will be well and good

5:31:44

now so lenen provide you that capability

5:31:47

Len chain provide you that capability so

5:31:49

by using this Len chain you can access

5:31:52

any sort of a llm right I will let you

5:31:56

know that uh what all llm and let's say

5:31:58

this openi is not a free one now let's

5:32:00

say if you want to access a model from

5:32:02

this hugging phase let's say you want to

5:32:04

access one model from the hugging phase

5:32:06

so this length chain gives you that

5:32:08

particular capability by using the Lang

5:32:10

chain you can access the model from the

5:32:12

hugging face also and from a different

5:32:15

different apis I will show you what all

5:32:17

apis this Lang Chen is having I will

5:32:19

come to the documentation so Lang Chen

5:32:22

is not

5:32:23

restricted till this open AI it is

5:32:26

having an access of a multiple API that

5:32:29

is the first thing

5:32:30

here is a limitation and here I told you

5:32:32

the advantage of the Len chain I think

5:32:35

you got my point now the second thing if

5:32:38

we talking about this GPD model uh if we

5:32:42

are talking about the GPD

5:32:44

model you know this have been trained

5:32:47

till September 2021 data this train till

5:32:51

September 2021 data if I'm going to ask

5:32:54

anything to my chat GPT or if I'm going

5:32:57

to ask anything to my GPD model

5:32:59

definitely it won't be able to reply me

5:33:02

and you all agree with this thing

5:33:04

getting my point so if you will ask to

5:33:06

the chat GPT that uh just tell me who

5:33:09

won the recent Cricket World Cup will

5:33:12

the chat GPT uh able to answer this

5:33:14

particular

5:33:15

question no it cannot answer to this

5:33:17

particular question because this have

5:33:19

been trained till September 2021 data so

5:33:23

for that what I will have to do I will

5:33:26

have to call any third party API for

5:33:29

extracting the information yesterday I

5:33:32

was doing by using the function C in op

5:33:34

open a right but here by using this

5:33:37

length chain we can do in a more

5:33:39

efficient

5:33:40

way getting my point why we use this

5:33:43

length chain because here if we are

5:33:45

talking about if we are talking about

5:33:47

this uh like if we are talking about the

5:33:49

limitation of the GPT so I can write it

5:33:51

down over here uh it is uh it is having

5:33:54

limited knowledge so let me write it

5:33:56

down over here it is having it is having

5:34:01

it is having a limited knowledge a

5:34:04

limited

5:34:09

knowledge

5:34:11

till 2021 so if I want to extract

5:34:14

something if I want to extract something

5:34:17

if I want to exess some extra if I want

5:34:19

to exess something which is which

5:34:20

happened uh recently or uh any like real

5:34:23

time information so for that also like

5:34:26

we use this length chain and apart from

5:34:28

this you will find out

5:34:31

uh like different different like

5:34:34

function or different different

5:34:35

functionality inside the Len chain this

5:34:36

Len chain actually it's a more powerful

5:34:38

so here there I have given you two main

5:34:40

reason that why you should use the

5:34:42

length chain now here by using this

5:34:44

length chain so let me write it down

5:34:45

over here by using the different color

5:34:47

so we are talking about this length

5:34:48

chain so by using this length chain what

5:34:50

you can do you know so you can access

5:34:53

any model okay so you can

5:34:58

access

5:35:00

different llm

5:35:03

model different llm

5:35:05

model by using by using different

5:35:10

API whatever API this lenion support by

5:35:13

using different

5:35:16

API second

5:35:20

thing you can

5:35:23

access you can

5:35:27

access you can access uh uh private data

5:35:31

resources private data

5:35:37

sources you can access uh any third

5:35:41

party API so here let me write on the

5:35:42

third point you can access you can

5:35:48

access any third party

5:35:57

API got it so this is the

5:36:00

uh like some features of the length

5:36:01

chain now if we are talking about this

5:36:03

length chain so let me do one thing let

5:36:05

me create one Circle here what I'm going

5:36:08

to do so here I'm going to create a

5:36:10

circle now here I can write it down

5:36:12

inside this particular Circle I can WR

5:36:14

write it down this length CH so what I'm

5:36:17

doing here I'm writing

5:36:19

down uh just a

5:36:22

second so here I'm writing down length

5:36:26

chain now what this length chain can do

5:36:30

so this lench actually it is having a

5:36:33

chain so it can create a chain I will

5:36:35

tell you what is a

5:36:37

chain it can read the documents okay so

5:36:42

document loader it is having a document

5:36:48

loader now here I can write it on the

5:36:50

third one so it is having a concept of

5:36:53

agent for accessing any third party API

5:36:57

agent now this can access any sort of

5:37:00

llm so let me create Arrow over here so

5:37:04

here I can do one thing I can uh give

5:37:07

the arrow so what it can do so here uh

5:37:10

let me keep the arrow so it can access

5:37:13

any sort of a

5:37:14

llm large language model from a

5:37:16

different different API whether it's a

5:37:18

open AI or any other API I can give you

5:37:20

the example of two as of over here

5:37:22

hugging face hugging

5:37:25

face and open Ai and open AI

5:37:30

and it it is having a access of a

5:37:32

different different apis as well so it

5:37:34

is having agent it is having a chains it

5:37:36

is having a document loader and it can

5:37:38

retain the memory as well so we are

5:37:40

talking about the fifth one so it it it

5:37:43

can retain the memory so let me write it

5:37:44

down over here what it can do guys tell

5:37:46

me so it can retain the

5:37:51

memory it can retain the memory I will

5:37:53

uh come to that memory part so this one

5:37:56

langin actually it can do a multiple

5:37:58

things it can perform of multiple things

5:38:01

and here I have written a couple of

5:38:03

limitations of the openi API and this is

5:38:07

a limitation which you will find out

5:38:08

inside the openi API openi model is not

5:38:10

a free one and it is having a limited

5:38:13

knowledge so here guys you will uh so

5:38:16

what is this what is this Lang chain so

5:38:18

here this Lang chain actually it's a

5:38:19

open source framework which provide you

5:38:21

a multiple

5:38:23

functionality with that you can create a

5:38:25

agent you can connect with any third

5:38:27

partyy API you can create a memory you

5:38:28

can retain a memory you can uh read a

5:38:31

different different kind of documents

5:38:32

like CSV tsv PDF or whatever and here

5:38:36

you can create a chain you can create a

5:38:39

prompt template also I forgot one thing

5:38:42

so here I can write it down you can

5:38:44

create a different different a prompt

5:38:46

template so let me write it down over

5:38:48

here different different prompt

5:38:54

templates got it are you getting my

5:38:56

point so if we are talking about so see

5:38:58

if we are talking about in terms of

5:39:00

openi the code basically which I have

5:39:02

written inside uh my previous class this

5:39:05

one so what is this it's nothing now

5:39:07

instead of using open API directly I'm

5:39:10

using one wrapper on top of that that is

5:39:12

what that is a len chain so over here

5:39:14

let me write it down one more thing one

5:39:16

more point so just just think over here

5:39:18

that this is what this is my open API

5:39:21

let me let me draw it over here so here

5:39:23

is what guys tell me so here is my open

5:39:26

AI API this one now here we have a

5:39:29

L

5:39:31

chain sorry uh here actually see this is

5:39:34

open a API and how we are making a

5:39:36

request to this open API so this is what

5:39:38

this my Lang

5:39:42

chain now if we are going to run any

5:39:44

sort of if if we are passing any sort of

5:39:46

a prompt right so just just think over

5:39:48

here if we are passing any sort of a

5:39:50

prompt so we are running it we are

5:39:52

running it through this Len

5:39:55

chain okay so we are passing a input

5:39:58

this is what this is my l Len chin

5:40:01

Lenin and here this prom is going

5:40:03

through now to this open

5:40:05

API open AI

5:40:10

API and here is what here is my

5:40:12

llm if we are talking about with respect

5:40:15

to this openi API so like this it is

5:40:17

working it's nothing it's just a

5:40:19

wrapper it's just a

5:40:22

wrapper on top of on top of open

5:40:28

API

5:40:31

on top of open a API it is what guys

5:40:33

tell me it's just a wrapper on top of

5:40:35

this open AI API and not this open a API

5:40:39

actually it can do a multiple thing so

5:40:42

it can do a multiple thing right so let

5:40:44

let me tell you what thing it can do

5:40:46

let's say this is your application so

5:40:48

here what I can do so let's say this is

5:40:49

what this is my application and here is

5:40:51

what here let's say I have used this Len

5:40:53

chain this is what guys tell me let me

5:40:55

change a color so this is what this is

5:40:56

my Len chain now if I'm us using this SL

5:40:59

CH so it can interact with many it can

5:41:03

interact to a many uh like apis like

5:41:06

hugging face open or with any third

5:41:08

party like API so let me draw it over

5:41:10

here this one this one okay now let me

5:41:13

do one more thing so over here let me

5:41:15

draw uh one more Circle and with that

5:41:18

maybe the thing will be more clear now

5:41:20

here what I can write it down let's say

5:41:22

this is what this is your application

5:41:24

okay so over here I can write it down

5:41:26

this is what this is your application so

5:41:28

this is this is

5:41:30

your app now it's making a request so

5:41:33

this request is going through this Len

5:41:36

you can uh think that it just it is

5:41:38

nothing just a prompt is we are passing

5:41:40

we want to interact with llm actually

5:41:42

large language model so here we are

5:41:43

passing a prompt so first it is going

5:41:45

through this Len chain this is what this

5:41:47

nothing this is my Len

5:41:49

chain now this Len chain actually it can

5:41:52

it can interact in a many ways so over

5:41:54

here I can write it down some sort of

5:41:56

API so here I can connect with the open

5:41:58

AI

5:41:59

open API I can connect with the hugging

5:42:04

face hugging face API I can connect with

5:42:07

a bloom

5:42:08

API and I can access a different

5:42:11

different

5:42:12

llm I can access what I can do I can

5:42:15

access a different different large

5:42:16

language

5:42:18

models getting my point yes or no and

5:42:20

apart from this this Len can connect

5:42:22

with a other data resources also with

5:42:25

some third party API like

5:42:27

Google like we

5:42:30

Wikipedia and some other data

5:42:35

sources now tell me guys this length

5:42:38

chain is clear to all of you what is the

5:42:40

length chain here I have uh here here I

5:42:43

created like each and every diagram and

5:42:44

with that particular diagram I have I I

5:42:46

try to explain you each and everything

5:42:49

regarding this Len chain so please do

5:42:51

let me know in the chat if this thing is

5:42:53

clear or

5:42:58

not

5:43:03

I'm waiting for your reply please do let

5:43:04

me

5:43:14

know yes I will share this PDF note with

5:43:16

all of you don't worry uh I will keep

5:43:19

inside the resource

5:43:28

section please do let me know in the

5:43:30

chat guys if this thing is clear then I

5:43:32

will proceed further I will proceed with

5:43:34

the

5:43:52

Practical great so if you are liking the

5:43:54

content then please hit the like button

5:43:56

also so I will get some more motivation

5:43:59

so yeah guys please hit the like button

5:44:02

and please be interactive if I'm asking

5:44:03

something then please try to answer

5:44:05

please please write down the answer in

5:44:07

the chat uh that will be a great

5:44:09

motivation for

5:44:23

me okay now let's start with the

5:44:25

Practical implementation so over here

5:44:28

you can see I uh started with a len

5:44:30

chain so let me uh run it first of all

5:44:32

so here is what here is what here is my

5:44:34

Len chain now uh here I'm going to be

5:44:37

import my open a uh this uh each and

5:44:40

everything I have explained in my

5:44:41

previous class itself now let me uh

5:44:44

import first of all let me check with my

5:44:46

key this uh I will have to generate a

5:44:48

openi key if I want to access the open

5:44:51

API now now I'm not directly going to

5:44:54

hit this open openi API I am hitting by

5:44:57

using this length chain

5:44:59

getting my point so here I will have to

5:45:01

mention the open API key so let me take

5:45:04

my open API key just a second

5:45:10

uh so here I can keep it somewhere just

5:45:17

wait uh so here is my openi key now let

5:45:21

me paste it over here this

5:45:24

one so yes I have created my client

5:45:27

means I have created my object now here

5:45:29

is what here is my prompt here is what

5:45:31

guys tell me here is my prompt now what

5:45:33

is the prompt guys tell me the prompt is

5:45:34

nothing in whatever see prompt is

5:45:37

nothing it's just a sentence which we

5:45:39

are passing to to our llm as a input

5:45:42

it's nothing just a collection of words

5:45:43

collection of tokens so word itself is

5:45:46

called a token that's it that's is a

5:45:48

prompt now over here if I'm going to run

5:45:50

it so let me run this particular prompt

5:45:54

and here you can see I'm asking to my

5:45:56

chat GPT sorry I'm asking to my GPT

5:45:58

model can you tell me total number of

5:46:00

country in the Asia can you give me top

5:46:01

10 country name yes it is able to give

5:46:03

it it is it is able to like provide a

5:46:06

name basically now let's start from here

5:46:08

because still here I've explained you

5:46:10

each and everything in the previous

5:46:11

class now let me give the next prompt

5:46:13

the second prompt so over here I can ask

5:46:15

something else to my uh GPD model now

5:46:18

tell me guys what should I ask any uh

5:46:21

any question anything which uh you would

5:46:24

like to highlight uh which should I

5:46:26

return return over

5:46:27

here

5:46:51

good so over here I didn't get

5:46:55

any okay so let's uh ask like any uh

5:46:58

basic question so can you tell me can

5:47:01

you tell me a

5:47:03

capital of

5:47:06

India so let's uh search about this

5:47:09

capital of India and here what I can do

5:47:13

I can run it and uh let me uh give this

5:47:16

particular input uh let me give this

5:47:19

particular prompt to my uh uh to my

5:47:23

model and I just need to call this

5:47:25

client. predict and here I need to

5:47:27

provide the prompt so client. predict

5:47:31

and here I just need to provide the

5:47:32

prompt so it is giving me answer it is

5:47:34

saying that the capital of India is New

5:47:37

Delhi now here let's try to strip this

5:47:39

uh particular output strip means it it

5:47:41

will remove the slend from here so I'm

5:47:44

going to strip it and here you can see

5:47:46

it is giving me an answer so I am

5:47:48

getting answer without this selection

5:47:50

now I think it is clear to all of you

5:47:52

now one person is asking that what

5:47:54

exactly tokens and Vector uh so here

5:47:58

let's Ty to ask this same question uh to

5:48:00

the GP or uh to the jpt model so what

5:48:04

I'm going to do here I'm going to uh

5:48:06

keep same question from the chat itself

5:48:09

and the question is what is a token and

5:48:12

a vector you can ask anything to your

5:48:14

chat GPT and behind the chat GPT

5:48:16

actually this uh behind the chat GPT the

5:48:19

GPD model is working so let's uh ask

5:48:21

about the tokens and the vectors and

5:48:24

let's see uh what will be the answer uh

5:48:27

which I will get from the GPD side so

5:48:30

let me predict this a prompt three and

5:48:33

here the answer is client. predict prom

5:48:37

three and see the answer tokens are

5:48:39

individual unit that a computer program

5:48:41

used to perform operation they can be

5:48:43

words symbol or numbers so the same

5:48:46

thing I told you now this tokens is

5:48:47

nothing just a words right that are used

5:48:50

in programming language to represent a

5:48:51

specific intersection Vector is data

5:48:53

structure that is store a elements of

5:48:56

the same time it is used to store

5:48:57

sequence of el such as number of

5:48:59

character so a vector is nothing what is

5:49:02

a vector vector is having two unit now

5:49:03

magnitude and the direction so how we

5:49:06

represent the vector in our algebra in

5:49:08

our algebra if you are like little

5:49:10

familiar with the algebric uh algebra

5:49:12

concept um algebra Concept in the

5:49:14

mathematics so we open the square

5:49:17

bracket we write it down some sort of a

5:49:18

number and we close the square bracket

5:49:20

that is the representation of the vector

5:49:22

and along with that maybe the direction

5:49:24

uh might be involved that's it so here

5:49:28

uh you you can see definitely we are

5:49:29

able to call the openi API now let's try

5:49:32

to understand few more thing related to

5:49:34

this length chain now here let's start

5:49:38

to talk about the prompt template the

5:49:40

very first topic which we're going to

5:49:42

talk about uh we want to talk about

5:49:45

related to this prompt template so first

5:49:47

I will show you the example of this

5:49:48

prompt template that how you can create

5:49:51

a prompt template and after that I will

5:49:53

um I will try to explain you that what

5:49:55

is a prompt template first let me run

5:49:57

the code so here is here is what uh we

5:49:59

are going to discuss about this prompt

5:50:01

template now I'm going to write it down

5:50:04

from length chain from length chain and

5:50:08

from here I'm going to import

5:50:10

prompts prompts and let me import this

5:50:13

prompt template class so

5:50:16

prompt prompt uh p r o m PT prompt

5:50:22

templates so I'm going to import this

5:50:24

particular class what is the name of the

5:50:26

class prom template okay it's not a temp

5:50:28

templ actually a template so prom

5:50:30

template now if I will run it so

5:50:32

definitely I will be able to import it

5:50:34

so here my spelling is wrong so let me

5:50:36

correct it first of all and here you can

5:50:38

see we are able to import this

5:50:40

particular class now after that what I

5:50:42

will do so here actually I want to

5:50:45

create my prompt right I want to create

5:50:48

my prompt now let me do it first of all

5:50:50

and then I will come to the explanation

5:50:52

so here what I'm going to do so I'm

5:50:54

going to create an object of this prompt

5:50:56

class so here is what here is my object

5:50:58

so I'm saying that it is nothing it is

5:51:00

my prompt template name so here I'm

5:51:03

going to write it down prompt template

5:51:05

this is what this nothing this is my

5:51:06

variable prom template name got it I

5:51:10

have created my object now inside this

5:51:13

object I have to pass some parameter so

5:51:15

let's try to pass few parameters over

5:51:17

here the first parameter which I'm going

5:51:19

to pass over here the parameter is going

5:51:21

to be input variable so here the

5:51:23

parameter which I'm going to pass over

5:51:25

here that's going to be an input

5:51:27

variable in input variable and the

5:51:29

second parameter which we're going to

5:51:30

pass over here that's going to be a

5:51:32

template so how my prompt will be

5:51:35

looking like so here I'm going to write

5:51:37

it down template and is equal to right

5:51:40

now in the variable actually I'm going

5:51:41

to write it down the name what will be

5:51:43

my variable so here I'm saying city city

5:51:47

will be my variable and here I'm going

5:51:48

to write it down my template now in the

5:51:51

template actually I'm going to write

5:51:53

down that uh can you tell me the capital

5:51:55

of so here I'm just saying that can you

5:51:58

tell me the capital of and here on a in

5:52:03

a curly braces I'm going to write it

5:52:05

down the city right City so c i t by so

5:52:09

here whatever uh this is what this city

5:52:11

is nothing it's my input variable so

5:52:13

here I'm going to write down the city so

5:52:15

this is what this is my object this is

5:52:17

what this is my object for the plum so

5:52:19

here I can put the question mark as well

5:52:21

and if I'm going to run it now here you

5:52:23

will be able to find out it is giving me

5:52:25

an error why because I didn't put the

5:52:27

comma over here now here you will you

5:52:29

can see this is what this is my prompt

5:52:31

template now what is the issue over here

5:52:33

input variable okay so the so the

5:52:37

parameter name is what input variable

5:52:39

now I think everything is fine

5:52:40

everything is clear now here what I will

5:52:42

do I will call one method I will call

5:52:45

one method just just be careful over

5:52:47

here right so here I will call one

5:52:49

method now here I'm going to write it

5:52:51

down format and here what was my

5:52:54

variable what was my input variable

5:52:56

input variable was City now if I'm going

5:52:58

to write down City so here let me write

5:53:00

it down this uh Delhi so here once I've

5:53:04

have done it now so it is giving me a

5:53:06

specific prompt that can you tell me a

5:53:08

capital of Delhi automatically right now

5:53:11

here see again I'm going to ask the here

5:53:14

again I want to create a prompt for uh

5:53:16

for a different country let's say I want

5:53:18

to ask a capital of China c i n now here

5:53:22

you can see it is saying uh it is uh

5:53:24

giving me a prompt that can you tell me

5:53:26

a capital of China can you tell me a

5:53:29

capital of China so what is the meaning

5:53:31

of this prompt template what what what

5:53:33

is the use of it now I think you can

5:53:35

understand so by using this prompt

5:53:37

template we can construct The Prompt

5:53:39

based on a input variable now let's say

5:53:42

you are going to create an application I

5:53:45

can give you very uh good scenario now

5:53:47

here is your

5:53:49

application right here is what here is

5:53:51

your application now you you have

5:53:53

created this application by using the

5:53:56

flas now here you are ask asking to the

5:53:58

user just a city

5:54:00

name just a city name or just a country

5:54:03

name actually and based on that city of

5:54:06

based on that country you want to

5:54:07

provide a specific information and here

5:54:10

you are using any sort of a

5:54:13

llm whether it's from hugging face or

5:54:15

open AI now guys over here uh you don't

5:54:20

want to be here actually you don't want

5:54:23

that that your user is giving a entire

5:54:26

prompt you just want to take take a you

5:54:29

just want to take a city name you just

5:54:31

want to take a variable like we do in a

5:54:34

python you know in a python we we have

5:54:36

an input function yes or no but and by

5:54:40

using this input function we take a like

5:54:42

input from the user and let's say we

5:54:44

have to uh showcase the addition uh

5:54:46

divide or maybe uh multiplication

5:54:49

whatever on top of those input variable

5:54:51

we can do it similarly over here let's

5:54:53

say we are taking just a city name so by

5:54:56

using this city name we can construct

5:54:58

our prompt and that particular prompt we

5:55:00

can pass to the

5:55:02

llm and Leng chain gives you this

5:55:05

particular functionality we don't have

5:55:06

this thing inside open AI API getting my

5:55:11

point now so here I have created my prom

5:55:13

now let's try to pass this prompt to the

5:55:15

length chain so what I can do here I can

5:55:18

write it down this is what this is my

5:55:19

prompt

5:55:20

first p o p

5:55:23

Mt prompt first this is what this is my

5:55:26

prompt first and here I can write it

5:55:28

down prompt second this is what this is

5:55:30

my prompt second and here is prompt

5:55:34

second now let's try to pass this

5:55:36

particular prom to

5:55:37

my to my llm or let's let's try to call

5:55:41

the API open API for that already we

5:55:43

have a method client predict so let's

5:55:45

try to call this particular prompt now

5:55:47

here I'm going to call the prompt first

5:55:50

this is the prompt which I'm going to

5:55:52

call and here uh I'm going to call I'm

5:55:54

going to write down this strip function

5:55:56

also so I won't get any sort of slash or

5:55:58

whatsoever right now here you can see

5:56:00

the capital of Delhi is India the

5:56:03

capital of New Delhi is India okay so

5:56:05

here I need to write it down just just

5:56:08

let me redefine it instead of the city

5:56:09

what I can do I can write down the

5:56:11

country right now uh this is what this

5:56:15

is my country and here instead of the

5:56:18

city let me write it down the country

5:56:20

one more time and here I can write it on

5:56:22

the India I think now it is it is a

5:56:25

meaningful now here I can write it on

5:56:27

the country one more time uh country c u

5:56:32

okay c u n c

5:56:35

o un n and here the

5:56:39

same here is a same and here is also

5:56:43

same now it's a meaningful and let me

5:56:46

run it and see what I will be getting

5:56:48

over here so prompt one prompt second

5:56:50

and here is uh like a it's a New Delhi

5:56:53

and let me check with a prompt two so

5:56:56

guys here what I can do I can pass the

5:56:58

prompt two and let's see the output it

5:57:00

is saying the capital of China is a

5:57:03

Bing so this prompt basically this

5:57:06

prompt template will help you a lot

5:57:09

whenever you are going to create any

5:57:10

sort of application where you just

5:57:13

required a single word from the

5:57:15

user this thing is clear to all of you

5:57:18

if yes then please do let me know in the

5:57:26

chat

5:57:29

please do let me know in the chat if

5:57:31

this part is clear to all of you please

5:57:32

write it on the chat I'm waiting for

5:57:34

your

5:57:39

reply are you liking the session are you

5:57:42

liking the content so please hit the

5:57:44

like button as well if you are getting

5:57:45

everything if you are able to understand

5:57:47

whatever I'm explaining to all of you

5:57:49

please do let me know in the chat and

5:57:53

yeah and whatever questions you have you

5:57:55

can write it down the chat I I I'm

5:57:56

monitoring the chat don't

5:58:04

worry wait S I will come to that again I

5:58:07

will try to explain the L and Advantage

5:58:09

first of all let me uh complete the code

5:58:11

part otherwise we won't be able to

5:58:12

complete all the thing within

5:58:23

R yes correct Vishnu your understanding

5:58:26

is pretty much clear now

5:58:28

since open AI model is not free uh so we

5:58:32

Len access all

5:58:35

API all other API as well like uh uh

5:58:38

hugging face API it can access the

5:58:39

hugging face API it can access the bloom

5:58:41

API or different different API I will

5:58:43

come to the documentation let me uh

5:58:45

clarify the basic basic thing uh

5:58:47

whatever is there inside the Lang chain

5:58:49

I will come to the uh

5:58:56

documentation great now here everything

5:58:58

is clear everything is fine so here we

5:59:00

have this uh here we have this object

5:59:03

name prom template uh name and here is

5:59:06

what here is my method that is what that

5:59:08

is a format now what I'm going to do

5:59:10

here H so here actually we have a second

5:59:12

method also which is doing the same

5:59:13

thing let me show you that at many

5:59:15

places you will find out that particular

5:59:17

method also I written it somewhere uh

5:59:20

just give me a second yeah this one so

5:59:22

it is working in a similar way langen

5:59:25

has given you the two ways actually for

5:59:26

creating this prompt so first of all see

5:59:29

we have this promp template

5:59:31

class we can create

5:59:34

object and we can call this method

5:59:36

format method got it now we have a

5:59:40

second way here you can see this one

5:59:43

prompt template. from template you can

5:59:46

call this particular method also and it

5:59:47

will work in a similar way both are same

5:59:49

don't ask me sir why we are using this

5:59:51

that Lenin is giving you the two option

5:59:53

for creating a prompt template right now

5:59:55

here you can see prompt template prom

5:59:56

template what is the good name of the

5:59:58

company that makes product I can write

5:59:59

it on any like name uh any uh product

6:00:02

name so here uh what I can say I can

6:00:05

give this particular uh okay first of

6:00:08

all let me run it and here is what I'm

6:00:10

going to call this format method over

6:00:11

here so from template do from temp prom

6:00:15

template. frommore template and here is

6:00:17

what here is my template template and

6:00:20

here is what here is my tell me what is

6:00:23

this this is my key now input variable

6:00:26

now right now now let me show you what I

6:00:28

will get over here so I will be able to

6:00:30

construct my prompt what is a good name

6:00:32

of the company that make a

6:00:34

toys here is my key and here is my

6:00:36

template it's going to combine both and

6:00:39

finally I'm getting my prompt so over

6:00:42

here what I can do so over here I can

6:00:43

write it down my prompt so this is what

6:00:46

this is my prompt number three and see

6:00:48

guys if I'm going to run it so what I

6:00:51

will get so here I'm if I'm going to run

6:00:52

it this promt three ah it will give me a

6:00:55

name it's not a 23 basically it's just a

6:00:58

three so let me run it and let's see

6:01:00

what would be the output so p r o p Mt p

6:01:04

r o MPT uh it's a spelling

6:01:08

mistake and now let me check it is

6:01:11

working or not so toy makers unlimited

6:01:14

so this is the company name actually

6:01:15

which I'm getting if I'm giving this

6:01:18

particular prompt to my GPT model you

6:01:21

can test over the chat GPD as well so uh

6:01:24

you will get this type of nam in the

6:01:26

back end we are calling the GPD model

6:01:27

don't forget over here don't forget okay

6:01:30

so we are getting a uh GPT we are

6:01:33

basically calling a GPT model over here

6:01:36

so this part is clear to all of you and

6:01:38

uh I think now this uh prompt part

6:01:41

prompt section is pretty much clear I

6:01:43

believe that it is clear yes or no this

6:01:46

uh prompt template if it is then uh

6:01:49

please confirm in the chat then I will

6:01:51

uh explain you the second topic that is

6:01:53

a agent agent in a lang chain and after

6:01:57

that I will come to the uh chain and

6:01:59

memory and document loader and finally

6:02:01

we start with the hanging phase so tell

6:02:04

me guys it is clear this uh prompt

6:02:06

templating how we can create a prompt

6:02:08

template great it is clear to all of you

6:02:10

now let's understand the agent so what

6:02:13

is an agent guys tell me so agent is

6:02:16

nothing we use this agent in the L chain

6:02:20

for calling any third party tool that's

6:02:24

a simple definition of the agent if

6:02:26

someone is going to ask okay just tell

6:02:28

me who is a

6:02:30

agent who is a agent in a real time

6:02:32

let's say if I'm saying uh there is one

6:02:34

agent uh let's say you uh went to the uh

6:02:37

any uh you want to purchase any property

6:02:41

you want to purchase any property and

6:02:42

you went to the Builder and you are uh

6:02:45

and uh once you visited the property and

6:02:48

you have visited the Builder office or

6:02:50

whatsoever there you will find out agent

6:02:52

so who is the agent actually so it's a

6:02:55

it will so let's say you are a main

6:02:57

person and uh you want the information

6:02:59

of the property so that you want a like

6:03:02

the main person and you want the

6:03:03

information from the of the property

6:03:05

basically so this agent will help you

6:03:07

this agent will collect the information

6:03:09

of that particular property and it will

6:03:11

provide you in a similar way the agent

6:03:14

is working over here getting my point

6:03:17

yes or no I think yes now let me run it

6:03:20

and let's try to understand the agent so

6:03:23

guys over here I will start the thing uh

6:03:26

I will ask ask one question to my chat

6:03:30

GPT so here I'm going to ask one

6:03:33

question to my chat

6:03:35

GPT just a

6:03:39

wait great so let me open my chat GPT

6:03:42

and here let me ask one question the

6:03:45

question is very very simple so here I

6:03:47

want to know that uh can you tell

6:03:53

me

6:03:55

current GDP

6:03:58

of

6:04:00

India so here uh I'm asking to my CH GPD

6:04:04

can you tell me the current

6:04:05

GDP of India now if I will uh run it so

6:04:09

here it is saying to me I'm sorry I

6:04:11

don't know in a real time as my training

6:04:14

only include information up to the

6:04:16

January 22 this that whatever getting my

6:04:19

point yes or no tell me so it is not

6:04:21

having uh this particular information if

6:04:23

I'm asking to my CH gbt can you tell me

6:04:28

who won the

6:04:32

Cricket World

6:04:35

Cup

6:04:39

recently now here see what I will

6:04:44

get so here it is saying guys I don't

6:04:47

have a real time

6:04:50

information only includes data up to

6:04:53

January

6:04:54

2022 or 20 202 20 okay as my latest

6:04:59

updated the most recent information

6:05:01

World Cup was held in 2019 emerged as a

6:05:08

champion defeating New Zealand in a

6:05:10

thrilling final so is giving me an

6:05:12

information from the 2019 match I think

6:05:15

India again uh uh like uh they out uh I

6:05:20

think uh they uh they they got defe from

6:05:23

the New Zealand itself right in a

6:05:25

knockout match in a semi-final itself

6:05:27

uh yes I'm able to remember it so here

6:05:30

uh it is not able to give me an answer

6:05:32

now let's ask the same thing uh through

6:05:34

the open so through the lench itself in

6:05:37

my code I'm going to write down the same

6:05:39

thing over here so here I'm going to

6:05:41

create a prompt for so I'm asking to my

6:05:43

model prompt 4 so here I'm asking to my

6:05:46

model can you tell

6:05:53

me who W the

6:05:56

recent

6:05:58

Cricket World

6:06:00

Cup so this is the question and now let

6:06:02

me ask it let me run it so what I can do

6:06:05

I can write it down this client predict

6:06:07

and here I can pass my prompt prompt

6:06:11

four now see uh okay first of all I will

6:06:15

have to run it p r o m PT p r o m PT now

6:06:21

see guys uh it is saying that uh the 201

6:06:25

won by the England I'm asking about the

6:06:27

recent World Cup but it is saying that

6:06:29

uh the 2019 Cricket World Cup won by the

6:06:33

England only it's completely wrong right

6:06:35

now here what I can do I can ask one

6:06:37

more thing can you tell me the current

6:06:39

GDP of can you tell me a current GDP of

6:06:42

India can you tell me current

6:06:47

GDP current GDP of India so let's see

6:06:52

what will be the answer so here is what

6:06:54

here is my prompt five let me copy it

6:06:56

let me paste it over here and here I can

6:06:59

write it down this prom

6:07:01

five so as of 2039 India GDP was

6:07:04

estimated to be around

6:07:06

2.94 trillion actually it has been

6:07:09

trained till 20 uh 22 data 2022 data

6:07:13

right so till January 2022 data right so

6:07:17

here it is not able to give me a proper

6:07:18

answer uh it is not able to give me a

6:07:21

real time answer so for that what I will

6:07:23

do guys tell me so here I will use the

6:07:26

agent I will use the concept of the

6:07:28

agent which will extract the information

6:07:31

from the third party API now here I'm

6:07:34

going to use Sur API now here so for for

6:07:42

extracting extracting or real time info

6:07:45

real time info I'm going to use I'm

6:07:49

going to

6:07:50

use Sur API Sur API Now by using the Sur

6:07:55

API

6:07:57

Now by using now by using this Ser

6:08:02

API I will now by using the Ser API I

6:08:05

will

6:08:06

call Google search

6:08:11

engine

6:08:13

and I will

6:08:16

extract the

6:08:19

information in a real time so here I

6:08:22

have written this particular uh like a

6:08:24

statement so I hope it is clearly

6:08:26

visible to all of you now let me keep it

6:08:29

in a mark down and it is clear so for

6:08:32

extracting a real time info I'm going to

6:08:33

use Sur API Now by using the Sur API I

6:08:36

will call Google search engine and I

6:08:38

will extract the information in a real

6:08:41

time let's see how you can do it so here

6:08:44

what I'm going to do so first of all I

6:08:45

will have to install this particular

6:08:47

Library pip install Google search result

6:08:52

that is the first thing now install this

6:08:54

library inside your current virtual

6:08:57

environment so here what I'm going to do

6:09:00

here I'm going to install this

6:09:02

particular here I'm going to install

6:09:04

this particular liity in my current

6:09:06

virtual environment where guys tell me

6:09:08

in a current virtual environment clear

6:09:11

fine now after that what I will do so

6:09:13

after that I will create my Sur API key

6:09:16

Sur API key because uh with that only I

6:09:19

can access I can access a different

6:09:21

different API now let me show you the

6:09:23

surp API so just open the Google so here

6:09:27

just open the Google let me show you

6:09:28

from scratch so over the Google what you

6:09:31

need to do you just need to uh okay so

6:09:33

here what I'm going to do I'm going to

6:09:34

write down the surp API so let me write

6:09:36

down this Sur

6:09:38

API so once I will write down surp API

6:09:40

now now here you will get this very

6:09:42

first link so what is a Sur API like uh

6:09:46

we have a rapid API now in a similar way

6:09:48

we have a Sur API so Sur API is a

6:09:50

realtime API to access Google search

6:09:52

result not from the Google actually and

6:09:56

from any search engine Bing or maybe

6:09:58

some other search engine even we can

6:10:00

access the Wikipedia also right I will

6:10:03

show you how so here uh if I will open

6:10:06

it now so you just need to do sign in

6:10:08

first you need to do register and then

6:10:10

you need to do the sign in I already

6:10:11

registered so that's why it is giving me

6:10:13

this particular page now just scroll

6:10:15

down over here just see over here API

6:10:18

documentation now in a over here you

6:10:20

will find out a different different

6:10:21

documentation related to Google search

6:10:23

API Google Map API Google job API Google

6:10:26

shopping API Google image API now apart

6:10:29

from the Google you will find out the

6:10:30

Bing Bing search API also by do

6:10:34

also BYU also it's a Chinese search

6:10:36

engine now Doug du go search API Yahoo

6:10:38

search API yendex search API eBay search

6:10:41

API YouTube search API any API you can

6:10:43

call by using this Sur API now just

6:10:46

click over here API key and here is what

6:10:49

guys here is my API key now you have to

6:10:52

generate your own API key this is my API

6:10:55

key now let me copy this API key from

6:10:58

here and it is having some sort of a

6:11:00

limitation actually you can just do a

6:11:01

100 search in a free version but in a

6:11:03

paid version I think uh you can uh like

6:11:06

increase the number of search so just

6:11:08

see over here just open it and you will

6:11:11

be able to find out entire

6:11:12

detail so plan is a free plan price per

6:11:16

mon

6:11:17

zero uh total plan s 100 plan search

6:11:21

left 995 5 I already did it and yeah

6:11:24

this is it in a free version you can

6:11:26

check check with the plan so just go in

6:11:27

the change plan and here you will find

6:11:30

out the entire detail so production plan

6:11:33

developer plan big data plan all the

6:11:36

plans you'll find out over here and by

6:11:38

using this API you can access the Google

6:11:41

search engine you can access the Google

6:11:43

search API inside your application right

6:11:47

now here what I need to do I just need

6:11:49

to paste this API key in my I just need

6:11:52

to keep this APK in my variable till

6:11:54

here everything is fine everything is

6:11:56

clear now what I will do guys so over

6:11:59

here I will I I have to like import few

6:12:03

uh I have to import few uh like import

6:12:05

uh statement basically uh I have to

6:12:07

import few packages so agent type load

6:12:10

tools and initialize agent so these are

6:12:13

the these are the like these are the

6:12:16

packages basically which I need to

6:12:17

import agent type load tool and

6:12:19

initialize agent so see guys uh let me

6:12:22

import this particular thing first of

6:12:24

all and yeah it is working F now first

6:12:27

of all what I will do first of all I

6:12:29

will create a ag first of all I will

6:12:31

create a client means here I've created

6:12:33

now this open a uh client this

6:12:36

one this one okay let me use this one or

6:12:39

I can create one more time not an issue

6:12:41

as many as time you can do it so here

6:12:43

what I'm going to do so here I'm going

6:12:44

to uh paste this particular code here

6:12:46

I'm going to create my client so this is

6:12:48

what this is my client now after that I

6:12:51

have to load the tools which tool tell

6:12:54

me which

6:12:55

tool which tool like we are going to

6:12:57

load Sur API now we are going to use the

6:12:59

Sur API now so that that's the only tool

6:13:01

right so here what I'm going to do I'm

6:13:03

going to create a object of this

6:13:04

particular method sorry this particular

6:13:07

class so here is what here is my object

6:13:10

now this is what this is my tool now

6:13:12

here I will mention something inside

6:13:14

this tool now let me do it over here so

6:13:16

let me uh mention this particular thing

6:13:19

so here I'm going to mention it so this

6:13:21

is a thing basically which I need to

6:13:23

keep Sur API uh first of all I need to P

6:13:26

The Sur API key and llm so here is what

6:13:29

here is my llm already I've created this

6:13:31

client I'm using open still I'm using

6:13:34

open okay I didn't uh explain you the

6:13:36

hugging face so far so this is my Sur

6:13:38

API key and here is the name which tool

6:13:40

you are using that's it in our square

6:13:42

bracket you need to write it down the

6:13:43

name you can find out each and

6:13:45

everything with the alen tuto lenion

6:13:47

documentation everything is there

6:13:50

everything is there I will come to that

6:13:51

just wait so here is what here is my

6:13:53

tool I created my tool now I have to

6:13:56

inal I have to create my agent type so

6:13:59

here what I want to do uh so here

6:14:02

basically what I want to do guys tell me

6:14:04

so here I want to create my agent type

6:14:07

so U here what I will do I will uh

6:14:10

create an object of this initialized

6:14:12

agent let me create the object of this

6:14:14

initialize agent and here is what guys

6:14:16

tell me here is my agent this is what

6:14:18

this is my agent now inside this

6:14:19

initialize agent again I will keep

6:14:21

something so first of all the first

6:14:22

thing which I will keep that is going to

6:14:24

be a tool so the tool basically which

6:14:26

which I've created the second type will

6:14:28

be a client means my model the third

6:14:30

type will be a agent this agent this

6:14:32

agent uh basically agent type actually

6:14:35

and here we are going to talk about this

6:14:36

zero short react description we are

6:14:38

going to mention this zero short react

6:14:40

description and verbos to means whatever

6:14:42

information um what if I will run it now

6:14:44

so whatever information will be in a

6:14:46

back end I will be able to see not over

6:14:47

the display there's the meaning of the

6:14:49

bbos right so here I mentioned three

6:14:51

parameters the first is tool the second

6:14:53

is client the third is Agent

6:14:56

and the first fourth is barbos great now

6:14:59

let me run it so this is what this is my

6:15:01

agent now what I will do so here I will

6:15:04

write it down agent and I will run so

6:15:07

run now here I will ask the same

6:15:10

question so my question was let me take

6:15:13

this particular question from the chat

6:15:15

jpt can you tell me the okay so can you

6:15:18

tell me who won the recent World Cup so

6:15:20

if I'm going to ask the same question

6:15:22

now to my

6:15:24

agent so here what I'm going to do I

6:15:26

going to ask it and let's see what I

6:15:28

will be what I will be getting so it is

6:15:30

executing the agent and here is search

6:15:32

here is action who won the Cricket World

6:15:34

Cup and here you can see Australia won

6:15:37

the Cricket World Cup it's a recent

6:15:41

information it's a real time information

6:15:42

which I'm getting now it is giving me

6:15:44

many given me some other thing as well

6:15:46

links and all because it is calling the

6:15:48

Google API Google search engine actually

6:15:50

in a back end and here you can see it is

6:15:52

giving me answer a on the recent World

6:15:54

Cup you can ask anything

6:15:56

you can ask anything guys just just uh

6:15:58

write it down over here so you can say

6:16:01

that

6:16:03

uh can

6:16:06

you tell me five

6:16:10

current can you tell me five top current

6:16:19

affairs a f i i RS so if I will learn it

6:16:23

now it will hit the Google search enger

6:16:26

and here it is saying that see uh so it

6:16:31

is saying that top five current affairs

6:16:34

and still it is running so read is not

6:16:37

available tool try to open I should

6:16:40

search engine to find out observations

6:16:42

see here it is giving me

6:16:44

some like top five current affairs

6:16:47

International breaking news uh affairs

6:16:50

from us Europe this is the second one a

6:16:53

current affairs Subs is one of the best

6:16:55

known as a improved life

6:16:56

jagaran Jo affairs.com okay it has given

6:17:01

me a different different website maybe

6:17:03

or uh it here is a news Okay so actually

6:17:07

it is giving me a different different

6:17:08

name it it is not giving me a proper

6:17:11

current affairs I will have to mention

6:17:13

that I will have to write uh that

6:17:14

particular prompt basically so let's do

6:17:17

one thing now let's understand the

6:17:18

Wikipedia also so how we can uh like

6:17:20

call the Wikipedia so here what I will

6:17:23

do I will be writing down pip install

6:17:25

pip P install

6:17:28

Wikipedia now I will have to install it

6:17:31

in a current virtual environment now if

6:17:32

I will run it now pip install Wikipedia

6:17:34

so let it run uh so here you can see

6:17:37

I've installed the Wikipedia now what I

6:17:38

will do first of all guys see tell me

6:17:41

what is the first thing I have to load

6:17:42

the tool so let me load the Tool uh so

6:17:46

here is what guys see here is my tool

6:17:49

and here is my LM means my client open a

6:17:51

client that's it now my tool now what I

6:17:53

have to do I have to create an agent so

6:17:56

here is what here is my agent this is

6:17:58

what my agent I have initialized the

6:17:59

agent here is my tool here is my like

6:18:01

model and here is my agent type zero

6:18:04

short react I will come to that what is

6:18:06

this react description and BOS equal to

6:18:08

two once I will run it and here whatever

6:18:11

I will run now see I'm going to write

6:18:14

down uh agent dot run and here I'm

6:18:19

asking can

6:18:21

you tell

6:18:23

me more can you tell me about this re uh

6:18:28

okay can you tell me more about this

6:18:32

recent

6:18:34

Cricket c i c k e Cricket World

6:18:39

Cup so if I will run it now it is going

6:18:42

to extract the entire information from

6:18:44

the

6:18:47

Wikipedia okay it is it is taking from

6:18:49

the 2019 World

6:18:51

Cup okay it is taking from the 2023

6:18:54

World Cup itself the World Cup for the

6:18:56

39 Cricket World Cup which was H in

6:18:58

India 5th October November 23 Australia

6:19:01

won the

6:19:01

tournament great so it is excting a

6:19:04

information from the uh recent one

6:19:07

itself now here I can ask one more

6:19:10

question to my just a second what I can

6:19:13

do I can copy it first of all let me

6:19:15

copy this particular thing and here what

6:19:18

I'm going to do here I'm going to pass a

6:19:20

next question so the next question is so

6:19:23

let me keep the question over here

6:19:26

uh let me run

6:19:28

it it is taking the information from the

6:19:30

Wikipedia itself are you getting it guys

6:19:33

yes or no yes surf I explain you

6:19:35

everything regarding the surf API s if

6:19:38

you are here if you look into the surf

6:19:40

API right so each and every plan I have

6:19:43

shown you and it give you the free uh

6:19:45

access also but up to uh like it is

6:19:48

having some limitation over there you

6:19:50

can just hit 100 search you can just hit

6:19:53

the 100 100 search in a free version if

6:19:55

you're going to take a plan so in that

6:19:57

case uh there will be a different uh

6:19:59

number of search actually search plan is

6:20:02

there different different plan is there

6:20:03

see Di okay

6:20:06

$2,500 per month $8,000 per month Cloud

6:20:09

for plan many plans is there see guys

6:20:12

how much plans is

6:20:14

there uh which you will find out just go

6:20:17

through with it I let me give you this

6:20:18

particular link inside the chat and

6:20:20

don't worry each and everything will be

6:20:22

available inside the resource section at

6:20:23

the single place uh at the single place

6:20:26

I will keep all the thing and I will

6:20:28

give you that don't worry so now see it

6:20:30

is extracting the entire information

6:20:32

from the uh like uh it is going to

6:20:35

extract the entire information from the

6:20:37

vikkipedia so final answer the total

6:20:39

National dep of the this one and here

6:20:42

you can see this is the GDP of the uh

6:20:45

USA and here observation and all

6:20:49

everything everything now see action

6:20:52

Wikipedia input GDP of United State

6:20:54

observation p economy of United States

6:20:57

summary this is the complete information

6:21:00

complete information which is going to

6:21:01

fetch which it is fetching from the

6:21:03

Wikipedia itself now tell me guys how

6:21:06

many of you you are able to understand

6:21:08

the concept of the agent so please let

6:21:11

do let me know in the chat and then

6:21:12

again I will revise it and I will

6:21:14

explain you uh through the lench and

6:21:16

documentation please do let me know in

6:21:18

the chat first if you are how many of

6:21:20

you are able to understand the concept

6:21:22

of this

6:21:23

agent here from here I have started this

6:21:26

agent tell me guys

6:21:34

fast by using the Sur API we can uh

6:21:37

access uh we can access a real time

6:21:41

information and it is possible in a is

6:21:44

possible in a len

6:21:47

chain please do write it down in the

6:21:49

chat if you're liking the uh session so

6:21:51

please hit the like button also and I'm

6:21:54

waiting for your response guys please

6:21:55

please do let me

6:21:57

know sir please explain the logs which

6:22:00

is coming from the agent so here I can

6:22:02

explain the log so here is what here is

6:22:04

my logs what is this uh what is it uh

6:22:07

just check over here so it is saying

6:22:09

entering new agent executor chain so

6:22:12

after this I'm coming to the chain

6:22:14

concept chain and memory two thing is

6:22:16

remaining and the document loader three

6:22:18

is remaining uh uh then uh you will be

6:22:21

able to understand this chaining and all

6:22:22

in a better way now here entering a new

6:22:25

you execute a chain so action is what it

6:22:29

just want to search now action input top

6:22:31

current affairs so it is making

6:22:33

observation it is searching everything

6:22:34

from the Google then it is thinking

6:22:36

something I need a narrow down the list

6:22:38

of top five internally it is doing

6:22:40

everything internally it is doing

6:22:41

everything and it is giving you the

6:22:43

final answer this one finished chain

6:22:45

actually each and everything has been

6:22:47

coded in the form of chain llm chain I'm

6:22:50

coming to that chain and once you will

6:22:53

understand that particular chain now

6:22:54

this thing will be are like pretty much

6:22:56

clear to all of you believe me just just

6:22:59

read it by yourself as

6:23:05

well what is the use of client in this

6:23:07

what is a just it's just a name now what

6:23:09

is a client see I told you please learn

6:23:12

the python first if your python uh topic

6:23:15

is clear then definitely you will be

6:23:17

able to understand this line of code see

6:23:20

someone has created openi class

6:23:22

somewhere in openi P you just downloaded

6:23:24

that you just downloaded that particular

6:23:27

package by using pip install openi and

6:23:29

now you are creating a object of that it

6:23:31

is just is just a class and here is a

6:23:33

object this is the object name you can

6:23:35

keep it anything here you can give your

6:23:37

name like whatever name your name just

6:23:39

write it down your name this is what

6:23:41

this is nothing this is the object of

6:23:42

the openi class and here you are passing

6:23:44

a different different

6:23:46

parameter someone has created a class

6:23:48

and you are just using it that's it

6:23:51

nothing else so this is what this is my

6:23:54

client and I think this is clear to all

6:23:56

of you now coming to the next part so

6:23:59

here first of all let me show you the

6:24:01

Lenin documentation so I'm going to

6:24:03

write it down over here Lenin

6:24:05

documentation now over here uh like uh

6:24:09

you can see this is what there is

6:24:10

nothing there's a Lenin documentation

6:24:12

and here is an introduction so they have

6:24:14

given you the complete introduction of

6:24:16

the lenen over here Lenin Library lenen

6:24:18

template Lang server Lang Smith

6:24:21

everything you will find out over here

6:24:23

and this document is a

6:24:25

amazing one similar to this open a uh so

6:24:29

yesterday we have seen the open a

6:24:30

documentation right so this length chain

6:24:32

documentation is similar to that openi

6:24:35

documentation it's a pretty amazing each

6:24:37

and everything you will find out over

6:24:38

here itself each and everything you will

6:24:41

find out over here itself now let's

6:24:43

start with the installation so how you

6:24:45

can do that it is very very easy pip

6:24:47

install length chain and pip install and

6:24:49

all what is the meaning of this pip

6:24:50

install hyphen e dot so this thing we'll

6:24:52

try to understand in our upcoming

6:24:54

session once I will start with the end

6:24:56

to end project now L server we try to

6:24:59

understand this also what is the Lang

6:25:00

server all L CLI so many like they have

6:25:02

given you over here as of now this lch

6:25:05

package is required that's why we are

6:25:07

going to download it now over here we

6:25:09

have a quick start so here you will find

6:25:11

out the quick start so you can go

6:25:12

through with this quick start and you

6:25:14

can uh like you can take a glimpse of

6:25:17

this Len CH so everything you will find

6:25:19

out over here in a quick start itself

6:25:21

pip install lch pip install open a you

6:25:24

can export the open a key key and then

6:25:25

you can use it and here is a different

6:25:27

different thing which you will be able

6:25:29

to find out whatever thing we are

6:25:31

running so open a you can uh create

6:25:34

object of this chat openi also now here

6:25:37

is llm model here is U you can use this

6:25:39

particular class also chat open AI now

6:25:42

human messages lch schema human message

6:25:45

there you can check with this what is

6:25:46

this now you can create a prompt

6:25:47

templates already we have created now

6:25:50

just see over here what is a what is a

6:25:52

PR prom template most llm application do

6:25:54

not do not pass user input directly into

6:25:57

llm most of the application you will

6:26:00

find out you just require a single word

6:26:02

I given you the example yes by using

6:26:04

this prompt template you can achieve

6:26:06

that particular functionality and here

6:26:08

is example for that got it now here is a

6:26:11

chat comprom template so each and

6:26:13

everything you'll find out over here and

6:26:17

uh as uh like you will find out the

6:26:19

latest version so there might be some

6:26:21

sort of a changes in a code and all but

6:26:24

don't worry the concept ccept will

6:26:25

remain same we'll find out some changes

6:26:28

in a code in a classes the name of the

6:26:30

classes but the core concept will same

6:26:33

if you're getting any error in a new

6:26:35

version then check with the like

6:26:37

documentation and try to rectify it

6:26:39

that's it so here is a quick start and

6:26:41

you can go through with this quick start

6:26:43

and you can understand a different

6:26:44

different things now security wise they

6:26:45

have given you the different different

6:26:46

thing now let me come to the next part

6:26:48

so over here just click on this G to

6:26:50

started again they have given you the

6:26:52

different different uh thing prompt is

6:26:54

there model is there which model you

6:26:56

going to use output parser entire

6:26:57

pipeline okay R they have included their

6:27:00

R also now okay so retrieve augumented

6:27:03

generation so you can go through with

6:27:05

this and you can understand what is this

6:27:06

R but don't worry I will cover this in

6:27:08

my uh next class this RG it is I'm

6:27:12

having this R in my pipeline so I will

6:27:13

try to cover it this U uh in a live

6:27:15

class itself in a Jupiter notebook

6:27:17

itself I will write it on the code now

6:27:19

over here you can understand about a

6:27:21

different different thing different

6:27:22

different concept just just go through

6:27:23

with this document it's amazing one now

6:27:25

interface is there so prompt chat model

6:27:28

llm out part are retriever tool these

6:27:30

are the things just just go through with

6:27:32

this try to understand it now how to so

6:27:34

here is a different different thing

6:27:36

which they have mentioned Right add

6:27:38

fallbacks bind R time runable Lambda

6:27:41

many things right so here you will find

6:27:43

out the cookbook so inside the cookbook

6:27:44

everything they have given you

6:27:46

everything prompt plus LM so the thing

6:27:48

basically which we are going to do over

6:27:50

here uh which we are going to do as of

6:27:51

now they have mentioned it over here R

6:27:54

RG this was this was not there

6:27:57

previously when I had checked recently

6:27:59

they have added in a new version so R is

6:28:01

there so here you will find out the code

6:28:03

related to the r see this one now here

6:28:05

multiple chains chains I will come to

6:28:07

this chains after this one I will

6:28:08

explain this chains right so here you

6:28:10

can see the change and all so each and

6:28:12

everything they have given you but as of

6:28:14

now we are trying to understand this

6:28:15

particular part we are trying to

6:28:17

understand this agent and we are trying

6:28:18

to understand this model input output so

6:28:21

prompt already we talked about chat

6:28:23

model already I shown you by using the

6:28:24

open

6:28:25

so this is like pretty amazing document

6:28:27

guys so once you will go through with

6:28:29

this document now you will find out uh

6:28:31

it is having so many things and they

6:28:33

have given you the code and all each and

6:28:34

everything they have provided you

6:28:36

believe me guys so just go through with

6:28:37

this one and try to understand uh

6:28:40

different different thing or whatever

6:28:41

thing basically is there so we going to

6:28:43

understand this chains now and we'll be

6:28:45

try we'll try to understand this memory

6:28:47

but apart from this chains and memory it

6:28:49

is having lots of thing which uh we

6:28:51

might uh we might use in our application

6:28:55

if if you are creating application now

6:28:57

so this concept uh like might come into

6:28:59

the picture regarding the RG or

6:29:01

regarding a different different one

6:29:02

different different topic basically

6:29:04

which they have included but over here I

6:29:06

would like to tell you one thing

6:29:07

whatever I'm explaining you in a Jupiter

6:29:09

notebook U if you are a beginner that

6:29:12

definitely it's a more than uh it's more

6:29:13

than enough for all of you and uh in the

6:29:16

next class once uh when I once I will

6:29:18

implement the project now then uh you

6:29:20

will find out the importance of it and

6:29:22

don't worry I will uh keep some latest

6:29:25

thing also like R and all inside my

6:29:27

project and inside my uh future classes

6:29:29

and you will get to know that so here uh

6:29:32

I have given the overview now let me

6:29:35

talk about this uh agent type so there

6:29:37

basically you have seen one thing that

6:29:39

was the agent type now let me talk about

6:29:42

this agent type what is this so here you

6:29:45

can see guys in a agent itself you'll

6:29:47

find out the agent type see agent type

6:29:49

just just click on this agents and here

6:29:51

you will find out the agent type now we

6:29:53

have a different different type of agent

6:29:54

zero short Agent Zero short react agent

6:29:57

structure input react

6:29:59

agent openi function yesterday I have

6:30:02

talked about this openi function and now

6:30:05

it's a legacy people are not using it

6:30:08

people are using this agent concept from

6:30:11

the lench and directory people are not

6:30:13

using this open function uh but still I

6:30:16

have explained you that so here you will

6:30:18

find out the conversation self ass react

6:30:20

documentation and all and this zero

6:30:21

short is nothing it's a basic one so if

6:30:23

you're going to ask something to your LM

6:30:25

model to your GPT model so you will use

6:30:27

the zero shot react now here you will

6:30:30

find out this this agent use a react

6:30:31

framework to determine which tool to use

6:30:33

based on a solar on the tools

6:30:35

description so whatever tool description

6:30:37

you are giving based on that it will

6:30:38

search the uh like compatible tool and

6:30:41

it will provide the prompt to that

6:30:42

particular search engine or to that

6:30:45

particular tool and it will give you the

6:30:46

out that's it zero short

6:30:48

react now here this is the most general

6:30:51

purpose action agent you can see the

6:30:54

node so this thing is clear to all of

6:30:56

you now let's start with the

6:30:58

chains so are you comfortable till here

6:31:01

and if you're not able to write it on

6:31:02

the code along with me sometimes it

6:31:05

happens in the live session don't worry

6:31:07

just listen to me just listen to my

6:31:09

words whatever I'm saying and practice

6:31:11

after the class practice after the live

6:31:14

session recording will be there and

6:31:16

resources also will be there so let me

6:31:18

write it the chain over here and let's

6:31:20

start with the chain

6:31:23

now

6:31:25

so first of all tell me guys this part

6:31:27

is getting

6:31:30

clear how many days you will take to

6:31:33

come up with an end to end project one

6:31:35

day only one day I will take to come up

6:31:36

with an end to end

6:31:39

project so lench is only made for the

6:31:41

NLP use case or any other compete

6:31:43

capabilities also it is having as of now

6:31:45

I have used this for the NLP use cases I

6:31:47

will have to explore the recent uh thing

6:31:49

whatever is there inside the Lenin maybe

6:31:52

uh we can use it for the other uh like

6:31:54

for the other task also but I haven't

6:31:56

explored it for the other task I just

6:31:57

use for the NLP once I will explore it I

6:32:00

will let you know that whatever recent

6:32:01

update is there but if you want to know

6:32:03

about it just go through with the recent

6:32:12

documentation all the llm has only text

6:32:14

or code generation capability yes but

6:32:16

you can do many whatever NLP task is

6:32:19

there now you can do by using the llm

6:32:20

because it is having the code generation

6:32:22

capability with that it can understand

6:32:24

the pattern inside the data so you can

6:32:27

fine tune it it is uh possible you can

6:32:29

fine tune inside your CPU Itself by

6:32:31

using your CPU I will let you know uh

6:32:34

otherwise I will share the resources

6:32:36

with all of you uh don't worry we we'll

6:32:39

come to that and uh we'll try to talk

6:32:41

about it uh not as of now later on but

6:32:44

yeah uh I will give you the glimpse of

6:32:53

that

6:32:58

great uh I think uh now people are

6:33:02

getting many

6:33:06

things we are using uh not completely

6:33:10

actually if you don't know about those

6:33:12

thing you won't be able to understand

6:33:14

this particular part that's why first I

6:33:16

started from the basic from the open

6:33:18

itself otherwise directly I can start

6:33:20

from the lch and then uh again you will

6:33:22

ask to me sun what is this uh

6:33:25

what is this open Ai and what is this

6:33:28

llm what is this genitive AI I can even

6:33:32

I can start from here itself from the

6:33:34

Leng chain so but I started from the

6:33:36

very

6:33:53

basic

6:34:09

okay so let's start with a a new topic

6:34:13

uh that's a chain so what is a chain so

6:34:15

let's understand the

6:34:17

chain so first of all I can uh show you

6:34:20

the documentation and

6:34:23

uh

6:34:25

just a

6:34:31

wait great so here actually what I did I

6:34:33

kept one a simple definition of the

6:34:35

chain and let me copy and paste

6:34:53

it

6:34:58

so here is a definition just try to read

6:35:00

this particular definition and try to

6:35:02

understand the meaning of chain and it

6:35:04

will be more clear once I will write it

6:35:06

on the code so Central to length chain

6:35:08

is a vital component uh known as a lang

6:35:10

chain chains forming the core connection

6:35:12

among one or several large language

6:35:15

model in certain sophisticated

6:35:17

application it become necessary to chain

6:35:19

llm together either with each other each

6:35:23

other or with other element so if you're

6:35:26

not able to understand by this

6:35:28

particular definition so let me open the

6:35:30

documentation for all of you so here in

6:35:33

the go inside this more uh just click on

6:35:35

this more and here is a chain just uh

6:35:38

read about this chain so using an llm in

6:35:42

isolation is fine for a simple

6:35:44

application but more complex application

6:35:47

require chaining llm either with each

6:35:50

other or with other component now what

6:35:53

is the meaning of it

6:35:54

so just uh okay so I have uh explained

6:35:58

you the agent that's why I explain you

6:36:00

the agent at the first place and then I

6:36:01

came to this chain now tell me guys this

6:36:06

llm was not working over there so I

6:36:10

changed what I did now I Chang I changed

6:36:13

the terminology so what I did guys now I

6:36:16

so this LM was not working for that

6:36:18

particular prompt so after coming to

6:36:20

this llm means let's say if I'm not

6:36:22

getting any sort of output so I came to

6:36:24

to this

6:36:25

chain and this chain actually it was

6:36:28

connecting to me it was connecting to me

6:36:31

to The Sur API through the surp API

6:36:35

basically it was connected to me Google

6:36:37

search engine getting my point so here

6:36:41

what is the meaning of chain so chain is

6:36:43

nothing okay if if you're talking about

6:36:45

chain in journal so let's say this is a

6:36:49

chain so something like this you will

6:36:51

find

6:36:52

out so what is this what do this guys

6:36:54

tell me so chain is nothing which is uh

6:36:58

like connecting a several

6:37:01

components which is connecting a several

6:37:04

component getting my point yes or no I

6:37:07

think you are getting try to understand

6:37:08

it what is a chain so chain is nothing

6:37:10

it is just connecting a several

6:37:12

component so here they are

6:37:15

saying using llm in isolation it's fine

6:37:20

but in complex application require

6:37:23

chaining that the example I shown you by

6:37:25

using the agent if you will read it if

6:37:28

you will read the answer of the if

6:37:31

you'll read the answer of the agent

6:37:33

agent I'm running agent don't run and

6:37:34

you are getting an answer so if we'll

6:37:36

read that you'll find out it is chaining

6:37:38

means for is trying to find out

6:37:40

somewhere else it's not able to get then

6:37:42

again it is going to somewhere else and

6:37:44

it's going to take a information then

6:37:45

again it is going to call some other

6:37:47

prompt and it's going to take a

6:37:50

information so what is a chain so chain

6:37:52

is nothing it's a collection of

6:37:54

component now which component what

6:37:56

component whatever component maybe

6:37:59

inside the uh like uh uh like whatever

6:38:02

let's say we are using length chain and

6:38:04

inside that we have a different

6:38:05

different component I'm going to chain

6:38:07

to those particular component and maybe

6:38:09

I'm going to uh like connect with other

6:38:11

llm so I can do that as well or maybe

6:38:13

I'm going to connect any third party API

6:38:16

I can connect that as well so I'm doing

6:38:18

a chaining if I'm running chat agent.

6:38:21

run now internally it is doing a

6:38:23

chaining

6:38:24

getting my point I think you're getting

6:38:26

now let's try to understand in terms of

6:38:28

python code so here first I will start

6:38:31

with a very basic example so what I can

6:38:35

do here so here uh first of all I can

6:38:38

write it on my

6:38:39

client so here is my client guys c r i e

6:38:42

n t this is what this is my client now

6:38:44

what I will do guys so here I'm going to

6:38:47

import The Prompt template so this is

6:38:49

what this is my prompt template and by

6:38:51

using this prompt template I'm going to

6:38:53

create I'm going to

6:38:55

create uh I'm going to create one prompt

6:38:59

so here is what here is my prompt so

6:39:01

what is a good name for a company that

6:39:03

makes a product so here I can run it and

6:39:05

let's say uh I'm going to write it down

6:39:08

any company name so okay I'm going to

6:39:10

write down the uh actually I want a

6:39:12

company name what is a good name for a

6:39:14

company that makes a product so I'm just

6:39:18

asking to my chat GP okay I I'm making

6:39:20

this particular product just give me a

6:39:21

good name for this particular company so

6:39:23

here I'm going to write down let's say

6:39:24

wine so wi so here I uh I'm uh just just

6:39:28

think that uh just think like that that

6:39:30

I'm going to open a company uh and here

6:39:33

I'm going to produce a wine and all uh

6:39:35

okay so I want a name any creative name

6:39:39

okay that I'm asking to my LM model now

6:39:42

here if I will uh like close it so what

6:39:45

I'm going to do so here I'm going to run

6:39:46

it so uh prompt. format so this is what

6:39:50

this is my prompt what is a good company

6:39:52

name for a what is a good name for a

6:39:54

company that makes a wine so that's

6:39:56

going to be my

6:39:57

prompt p r o p Mt so this is what guys

6:40:01

this is my prompt now what I will do so

6:40:03

here actually I'm going to import the

6:40:06

chain here I'm going to import this llm

6:40:09

chain here I'm going to import the llm

6:40:11

chain just just be with me just for uh

6:40:14

next 5 minute everything you will get

6:40:18

it's my promise to all of you I have

6:40:20

simplified every thing every uh like uh

6:40:23

every line of code just be with me next

6:40:25

for 5 minute so here you can see we have

6:40:27

a llm chain now what I'm going to do I'm

6:40:29

going to create a object of this llm

6:40:33

chain now guys uh here I'm not going to

6:40:36

call a predict method I'm not going to

6:40:40

call a predict method what I'm going to

6:40:41

do so here in this llm CH what I'm going

6:40:44

to pass guys I'm going to pass client

6:40:46

right and I'm going to pass my prompt

6:40:49

that's it this two thing I'm going to

6:40:50

pass so llm llm is what c l i n t and

6:40:54

here I'm going to pass my prompt so p r

6:40:56

o p Mt prompt is equal to

6:41:00

prompt so I passed the client and I

6:41:03

passed the prompt here now this is what

6:41:05

this is my llm Chen right I'm going to

6:41:07

connect both component LM and my prompt

6:41:11

now over here what I'm going to do so

6:41:13

this is what this is my chain this is

6:41:14

the object basically which I have

6:41:15

created now here you can see it is

6:41:18

saying that uh it is giving me

6:41:21

a why I'm getting it let me check with

6:41:24

the

6:41:28

prompt so here uh let me run it first of

6:41:32

all what is a good company that makes a

6:41:38

wine okay from template uh I think I

6:41:42

will have to

6:41:43

use format uh I think I will have to use

6:41:48

this particular prompt only uh this one

6:41:50

this only uh let me delete it because it

6:41:52

is asking

6:41:54

I need to provide in the form of

6:41:56

dictionary so I cannot pass a direct

6:41:58

prompt over here what is a uh because uh

6:42:01

here whenever I'm running this uh

6:42:03

whenever I'm calling uh the run method

6:42:05

Now by using this chain then

6:42:06

automatically it will uh like take the

6:42:08

name from here itself so let me delete

6:42:10

it let me delete this particular line

6:42:12

I'm going to delete it guys this one so

6:42:15

here is what here is my prompt now Len

6:42:17

chin llm chain and here now it is fine

6:42:20

now what I will do here I'm going to

6:42:22

write down chain and chain. run and here

6:42:26

actually I need to pass the value so

6:42:28

here I'm going to pass y now if I will

6:42:31

run it now see it is giving me answer

6:42:34

the name of the company is what it's a

6:42:37

uh sdip strip and is the name of the

6:42:41

company is what Vintage Wines Winery so

6:42:44

it it has given me a name of the company

6:42:47

like I want to create this particular

6:42:48

product and here it has generated answer

6:42:52

now I'm going to change

6:42:54

I I'm making a chain by using two

6:42:57

components the first one is llm model

6:42:59

that is that I'm getting from the openi

6:43:02

and which is available inside my client

6:43:04

and the second is what second is a

6:43:06

prompt which I'm passing over here so

6:43:08

now I can directly run it by giving the

6:43:10

keyword and here you can see I'm getting

6:43:12

answer so I'm changing this two thing

6:43:14

this is the simple this is the simplest

6:43:16

uh like uh there simplest example I've

6:43:18

given you now let come to the second

6:43:20

example so over here what I'm going to

6:43:22

do so here I'm giving the the second

6:43:24

example example

6:43:27

two example two so I took one more

6:43:31

example to for explaining uh this

6:43:33

chaining part actually so here uh let me

6:43:36

copy and paste so here is what guys here

6:43:38

is my prompt template this is what this

6:43:40

is my prompt template now here I'm

6:43:42

asking uh this is what this is my

6:43:44

template I want uh to open a restaurant

6:43:47

for cuisin Indian cuine Chinese cuisine

6:43:49

Mexican Cuisine Japanese cuisin American

6:43:51

Cuisine whatever for that I want a f see

6:43:54

name this is my prompt template let me

6:43:56

run it here I'm running it now if you

6:43:59

will find out the prompt template so

6:44:01

here you will find out the prompt

6:44:02

template so this is what this is my

6:44:03

prompt template got it now what I will

6:44:07

do guys here I will make a chain so what

6:44:09

I'm going to do so here I'm going to

6:44:11

make a chain so let's say uh this is

6:44:13

what this is my chain so llm chain and

6:44:16

I'm going to combine two thing first is

6:44:18

client and the second is what the second

6:44:20

is promt template now if I will uh run

6:44:23

it so so here I'm getting my chain then

6:44:25

I will write it down chain do run now

6:44:28

I'm uh let's say I'm giving something

6:44:31

over here let's say I'm giving uh

6:44:34

Chinese so according to that it will

6:44:37

give me answer so the answer which I'm

6:44:39

getting the golden dragon dragon place

6:44:42

so here what I'm getting guys I'm

6:44:43

getting this Golden Dragon place so the

6:44:47

emperor's kitchen that's the name okay

6:44:50

if I'm writing over here uh Indian let's

6:44:52

say what I will be getting so Indian so

6:44:55

here actually I'm getting Maharaja

6:44:56

Delight so just the name it is

6:44:58

suggesting me one name which I'm asking

6:45:01

to my llm model that's it now let me

6:45:04

show you few more thing over here now so

6:45:07

here I'm getting a a response and the

6:45:09

response is fine now let me uh come to

6:45:13

the second thing second example so here

6:45:16

what I'm going to do so here let me show

6:45:19

you something so now over here if you

6:45:22

want to see the detail actually so for

6:45:24

that I have mentioned one more thing

6:45:25

that is a verbos parameter as I told you

6:45:28

earlier if I want to check all the

6:45:29

detail whatever is happening in back end

6:45:31

so for that there is a parameter verbos

6:45:33

is equal to true now if I will run it

6:45:35

now see what I will find out uh let me

6:45:38

predict with some name so let me uh

6:45:41

check uh chain. run and here I can write

6:45:44

it down let's say America so here it is

6:45:48

saying that entering new llm chain

6:45:51

prompt after formatting I want to open a

6:45:54

restaurant for American food suggested a

6:45:56

fancy name for this and here is a name

6:45:58

American spice Visto so you can see the

6:46:01

complete detail over here what is

6:46:03

happening by using the barbos true until

6:46:06

here everything is fine everything is

6:46:08

clear now guys here uh this is the

6:46:11

simple chain basically which I have

6:46:13

created by using this two component now

6:46:15

let me explain you One More Concept over

6:46:17

here so here actually I have written one

6:46:19

definition or I have written one text uh

6:46:22

just let me explain you the this

6:46:23

particular part and then uh again I will

6:46:25

try to revise you so here I'm going to

6:46:28

mark down it and here guys see what I'm

6:46:31

saying if you want to combine multiple

6:46:33

change and set a sequence for that we

6:46:36

use Simple sequential chain simple as

6:46:40

simple as that right so if you want to

6:46:42

combine a multiple chain if you want to

6:46:44

combine a multiple chain and set a

6:46:46

sequence for that we use a simple

6:46:49

sequential chain so let's try to use the

6:46:51

simple sequential chain and let's

6:46:54

understand what is it so for that

6:46:55

basically I have designed one prompt

6:46:58

okay just just understand over here so

6:47:00

step by step we'll try to understand see

6:47:02

Ive already written a code in my doc I'm

6:47:04

just copy and pasting so that I can save

6:47:06

my time that's it everything is same see

6:47:08

I can write it now the code in front of

6:47:09

you also but it will take some time for

6:47:12

writing this particular uh statement on

6:47:14

all it's the same thing okay wherever I

6:47:16

have to write from scratch I will do

6:47:17

that now over here see uh let's try to

6:47:22

understand step by step

6:47:37

now over here this is what this is my uh

6:47:41

second prompt so in the first prompt see

6:47:44

in the first prompt The Prompt template

6:47:46

which I have defined what I'm saying

6:47:47

over here I'm saying uh I want start a

6:47:51

startup right I want want a start a

6:47:54

startup and suggest me a good name so

6:47:57

here is my prompt now here you can see

6:47:59

this is my input variable that is what

6:48:00

that is a startup name yeah it's fine

6:48:03

it's clear to all of you now here I've

6:48:05

created a chain by using this a model

6:48:07

this is my model and this is my prompt

6:48:11

template okay this is the first shap now

6:48:14

here I have created one

6:48:16

more prompt now here I'm saying uh

6:48:20

suggest some strategy for the name so

6:48:22

whatever name name whatever name I will

6:48:25

get from here startup name for that what

6:48:29

I want I want some sort of a strategy

6:48:32

let's say I'm going to open or I'm going

6:48:34

to start my atte startup so for that

6:48:36

what I require tell me so I for that

6:48:38

basically I require audience I required

6:48:39

my team I required my Marketing sales

6:48:41

team if I want to open any fintech

6:48:43

startup or if I want to start any

6:48:45

consultancy or whatever right whatever

6:48:47

uh like company which I want to start so

6:48:50

regarding that what I want I want some

6:48:51

sort of a strategy

6:48:54

getting my point here yes or no so now

6:48:57

what I will do I will combine this two

6:48:58

change see here this this is my first

6:49:01

change this this this is what this is my

6:49:02

first chain this one and this is my

6:49:05

second

6:49:06

chain now I will combine this both Thing

6:49:09

by using simple sequential chain I will

6:49:11

making I'm making a

6:49:13

sequence I'm trying to make a sequence

6:49:15

between these two

6:49:17

chain okay before I I was just running

6:49:20

with a single uh like uh with a single

6:49:22

chain only and we we are having only two

6:49:24

component llm and my prompt now here I'm

6:49:27

going to come my true chain now just

6:49:29

tell me guys here I'm using this

6:49:31

particular llm can I use a different llm

6:49:34

over

6:49:35

here I can try with that I can check

6:49:38

right so here I'm using a same model now

6:49:42

I can check with a different LM also in

6:49:44

this particular case so this chain is a

6:49:46

pretty amazing thing it is connecting a

6:49:49

homogeneous component or it is it can uh

6:49:52

we can connect a hetrogeneous component

6:49:54

also means some other model as well you

6:49:57

can test it with the other model uh so

6:50:00

here you can see we are able to do it

6:50:02

now guys here what I will do so here is

6:50:04

my first template this is my first chain

6:50:07

this is my second template this is my

6:50:08

second chain now what I will do over

6:50:10

here so here I'm going to import a

6:50:12

sequence uh so here I'm going to import

6:50:15

a simple sequential chain here I'm going

6:50:17

to import this simple sequential chain

6:50:20

now once I will run it so here I

6:50:21

imported now let me create

6:50:23

a now let me create a object of it so

6:50:27

here guys here is a object now inside

6:50:29

this object inside while I'm creating

6:50:31

object I will pass some sort of a

6:50:33

parameter so it will call my init method

6:50:35

okay in a back end now here I'm going to

6:50:37

pass some sort of a parameter and that's

6:50:39

going to be a very very easy and here is

6:50:41

the parameter name so chains first is

6:50:44

name chain and the second is stategy so

6:50:46

automatically see what will happen

6:50:48

actually first it will call to this one

6:50:51

it will uh generator startup name

6:50:53

automatically it will give uh it it will

6:50:55

give name to this particular uh like a

6:50:58

to this particular template

6:51:00

automatically it will fetch from there

6:51:01

itself and I will be getting this

6:51:04

strategies I will be getting this

6:51:06

particular strategies automatically

6:51:08

chaining automatically chaining is

6:51:10

happening okay this one now let me show

6:51:13

you how so over here uh what I will do

6:51:16

so let me uh create object and here I

6:51:18

just need to call a method so here I'm

6:51:21

going to call uh method that's going to

6:51:25

be a chain. run now here I want to open

6:51:28

a startup let's say the startup related

6:51:30

to the artificial intelligence so here

6:51:32

I'm going to write it down

6:51:33

artificial

6:51:35

intelligence now here once I will call

6:51:38

it so let me run it and let's see what I

6:51:41

will be getting over here so I'm making

6:51:44

a sequence guys between a

6:51:47

prompts so it is saying that uh develop

6:51:50

a strong marketing strategy and and some

6:51:53

sort of a information let's let me print

6:51:56

it uh so that I won't get this

6:51:59

lesson so here is my

6:52:04

strategies stay informed and up toate on

6:52:07

a latest AI train develop a

6:52:10

comprehensive uh AI strategy utilize AI

6:52:13

tools utilize data driver inside so

6:52:16

these are some sort of a strategy

6:52:17

actually see automatically I'm getting

6:52:19

see this name now which which we have

6:52:21

defined see startup name which is coming

6:52:23

over here okay then whatever name is

6:52:25

coming from there automatically is going

6:52:27

over here this inside this name and we

6:52:29

are getting a strategies we are chining

6:52:31

we are chining right now this is a

6:52:34

simple sequential chain now here uh here

6:52:38

we have one drawback actually uh we it

6:52:41

is giving me a final answer it is not

6:52:43

giving me a answer uh it is not giving

6:52:46

me answer related to the first prom it

6:52:48

is not giving me it is not giving me

6:52:50

that particular answer it giving me a

6:52:52

direct uh the last one answer from the

6:52:54

last uh like a prompt itself if you want

6:52:58

answer like from the entire prompt so

6:53:02

for that also we have one method okay uh

6:53:05

sorry we have one more class let me show

6:53:06

you that particular class now so here uh

6:53:09

what we can do so I already written the

6:53:11

name so let me give you that particular

6:53:14

uh name and here is what here is a name

6:53:18

guys so the name is what now let's try

6:53:20

to understand the sequential chain so so

6:53:22

far actually we have understand the

6:53:24

simple sequential chain now we are going

6:53:26

to understand the sequential chain and

6:53:29

it is having a more power compared to

6:53:30

this SE uh simple sequential chain where

6:53:33

we can uh keep uh the sequence sequence

6:53:36

of the different different prompts and

6:53:38

the different different chains now uh

6:53:41

let's try to understand this sequential

6:53:42

chain and here what I'm going to do here

6:53:45

I'm going to copy one more code now let

6:53:47

me paste it over here so again I'm going

6:53:50

to create okay already I have a client

6:53:52

so let me move it it is not required at

6:53:54

all so here is my prompt template and

6:53:57

what I'm saying here I want to open a

6:53:58

restaurant suggest me a fancy name now

6:54:00

just see over here what I'm going to do

6:54:02

I'm going to mention one key over here

6:54:04

that is what there is my output key and

6:54:06

what is my output key output key is

6:54:07

nothing it's a Resturant name right now

6:54:10

now just see over here where I'm going

6:54:11

to use this output key so here I'm going

6:54:13

to Define one more parameter one more

6:54:15

prompt template and here guys you can

6:54:17

see so in this particular prompt

6:54:19

template prompt template name we have a

6:54:21

prompt template and and here input

6:54:23

variable kin and this is a template now

6:54:25

here is my chain llm chain this is my

6:54:27

model this is my prompt template and

6:54:29

here we have a output key output key is

6:54:32

what restaurant name so whatever name

6:54:35

basically whatever name I will get from

6:54:38

here I will keep inside this restaurant

6:54:41

name and this restaurant name I'm

6:54:44

passing over here this restaurant name

6:54:47

I'm passing over here and here whatever

6:54:50

thing I will get from here from this

6:54:53

particular prompt I'm keeping inside the

6:54:55

menu item and if you are going to create

6:54:57

a next

6:54:59

prompt you can mention over there now

6:55:03

let me run it and let me show you what

6:55:04

will be the final answer over here so

6:55:07

here I'm going to import the sequential

6:55:09

chain and here you can see so this is

6:55:11

what this is my sequential chain and now

6:55:13

let me copy it and let me paste the

6:55:16

final code and here is my uh object of

6:55:20

the sequential chain so let let me keep

6:55:23

it in a single line so here sequential

6:55:25

chain this is the object which I have

6:55:27

created now change what I want to chain

6:55:29

means like in terms of what I want to

6:55:31

make a chain so this is the first name

6:55:33

name chain this is the one now second

6:55:35

chain is what food item chain means I

6:55:37

want a food item regarding that

6:55:40

particular restaurant now over here this

6:55:42

is my input variable and here is my

6:55:44

output variable restaurant name and menu

6:55:46

items this

6:55:48

one Whatever output I'm getting from

6:55:50

here I'm keeping over here inside this

6:55:52

variable whatever output I'm getting

6:55:54

from here I'm keeping over here inside

6:55:55

this variable and I'm going to mention

6:55:58

inside the output variable if you want

6:55:59

to make a further chain you can do it

6:56:02

according to your problem statement now

6:56:04

let me run it and let me show you the

6:56:06

final answer and the final response so

6:56:09

here I am going to call this method

6:56:13

chain okay so this is about this is my

6:56:15

chain and here let me run it and see

6:56:18

what I will be getting so chain and I'm

6:56:22

I'm passing cuisin Indian so it is

6:56:24

giving me cuin is what cuin is Indian

6:56:26

and here is a restaurant name there's

6:56:28

going to be a Taj Mahal Palace Taj

6:56:31

Maharaja Palace and here is a menu item

6:56:34

now so guys this is the response which

6:56:36

I'm getting over here can you see over

6:56:39

here the response which I'm getting all

6:56:41

the thing all the thing in a sequence

6:56:43

now let me revise this particular thing

6:56:46

revise me this particular concept so

6:56:48

chain what is a chain which is going to

6:56:50

connect two components so here what I

6:56:52

did see here I have connected two

6:56:54

component first is model second is

6:56:57

prompt now in example two you can see

6:56:59

what I'm going to do so same thing I'm

6:57:00

going to perform now in the third one uh

6:57:02

with the entire detail actually with our

6:57:04

entire detail now in the third one I'm

6:57:06

calling simple sequential chain in that

6:57:09

I'm getting a output from the last

6:57:12

prompt but if we are talking about a

6:57:14

sequential

6:57:15

chain instead of the simple sequential

6:57:17

chain I'm using sequential chain so I'm

6:57:20

getting a entire output over here means

6:57:23

from first template uh from first prompt

6:57:25

template to last prompt template and

6:57:28

here you can see we are mentioning this

6:57:29

output key so whatever answers I'm

6:57:32

getting over here whatever answers I'm

6:57:34

getting from this particular uh prompt

6:57:37

right we are able to store it over here

6:57:39

and we are passing to the we are passing

6:57:42

to the next prom we are passing to the

6:57:44

next uh like a prompt basically over

6:57:47

here you can see this one same

6:57:48

restaurant name and we are going to

6:57:51

combine it finally

6:57:52

so guys tell me do you like it did you

6:57:55

understand

6:57:57

it I will come to that the purpose and

6:58:00

all everything will be clarified right

6:58:02

so uh we will talk about because

6:58:04

everything should be connected now to

6:58:05

each see whenever uh like if you are

6:58:08

going to ask to anything uh to your chat

6:58:11

GP what do you think tell me so how this

6:58:14

application is working we are are we are

6:58:17

like uh what we are going to do guys so

6:58:20

we are reaching step by step actually we

6:58:22

are trying to reaching to our final

6:58:24

application understand guys so here if

6:58:26

someone has created this chat GPT it

6:58:29

they have implemented everything

6:58:31

whatever we are going to run by using

6:58:33

this Len chain here you will find out

6:58:35

the memory concept okay let me ask one

6:58:37

question to my CH gbt so here here I'm

6:58:40

asking can you tell

6:58:42

me can you tell me about something Taj

6:58:47

okay so here uh I'm asking this question

6:58:49

to my chat jpd now here you can see

6:58:52

uh uh like uh here is the answer now I'm

6:58:56

asking to my chat GPT 2 + 2 how much so

6:59:01

it is saying to me let me run it so here

6:59:03

it is saying to me 2 + 2 is nothing it's

6:59:05

a five okay sorry uh it's a four right

6:59:09

now here if I will ask to my chat GPT

6:59:11

how much 100 uh

6:59:14

multiply by 1,000 now if I will run it

6:59:17

so here you will get the answer now here

6:59:20

if I will ask to my CH GPT

6:59:24

who

6:59:26

uh build the Taj Mahal can you who built

6:59:32

the Taj Mahal so here if I'm going to

6:59:35

ask this particular question so here you

6:59:37

can see the Taj m b by the mul Emperor

6:59:40

so actually it is not going to forget

6:59:42

the context whatever you are asking now

6:59:44

previously it is able to sustain the

6:59:47

that particular memory it's a biggest

6:59:50

power of the CH GPT so we are trying to

6:59:53

reach uh like step by step we are going

6:59:55

to we are trying to understand all sort

6:59:57

of a thing by using this Len CH and then

6:59:59

finally we will move to the uh the end

7:00:02

uh like a goal the our end application

7:00:04

now over here this chain actually is

7:00:05

very important if you want to uh like a

7:00:08

retain the information from the first

7:00:09

prompt to the last prompt for that you

7:00:11

can use this uh you can use this uh

7:00:14

sequence chain I can understand you are

7:00:16

uh trying to understand that where we

7:00:18

are using in a real time in a

7:00:19

application and all I will come to that

7:00:21

part okay but just understand over here

7:00:24

so I was running the Sur API so here

7:00:27

actually once you will read the entire

7:00:29

detail of the Sur API of this agent so

7:00:31

you will find out that in like uh uh

7:00:34

internally it is using the chaining it

7:00:36

is trying to chain each and every thing

7:00:39

back in a back end basically they have

7:00:40

implement the chaining complete chaining

7:00:42

so just just try to read it and finally

7:00:44

it is giving me a the the like

7:00:46

conclusion over here so in a similar way

7:00:49

here I just shown you the example a very

7:00:51

basic example but by yourself what you

7:00:54

can do guys so by yourself uh like you

7:00:57

can uh like create a different different

7:00:58

prompts and you can implement this

7:01:00

chaining concept over there and you can

7:01:03

understand in a better way you can

7:01:05

search about the applications and

7:01:08

all getting my point yes or

7:01:14

no tell me guys this thing is getting

7:01:16

clear to all of you if it is getting

7:01:18

clear then please do let me know in the

7:01:21

chat

7:01:38

so are you able to get it uh please do

7:01:41

let me know in the chat guys if uh this

7:01:44

thing is fine to all of

7:01:50

you

7:02:05

I'm waiting for a reply guys if you can

7:02:07

write it down the chat and if you're

7:02:08

liking the session so please hit the

7:02:10

like as

7:02:20

well great now let's try to understand

7:02:23

uh One More Concept and then I will uh

7:02:25

stop the session uh today I couldn't

7:02:28

reach to the hugging phase but don't

7:02:30

worry tomorrow I will show you that and

7:02:33

memory also so One More Concept is there

7:02:36

memory now let me show you the basic

7:02:37

concept now the uh the very basic

7:02:40

concept of the Leng chain which we are

7:02:42

going to use in a future that is going

7:02:43

to be a document loader so let me

7:02:45

explain this document loader also so

7:02:48

here uh what I'm going to do I'm going

7:02:50

to uh show you that how you can read any

7:02:53

sort of a document by using this uh by

7:02:56

using this length chain now once you

7:02:58

will search uh let me search over the

7:03:01

Google

7:03:03

Document

7:03:06

loader document loader Lang chain

7:03:10

documentation so simply I'm searching

7:03:12

about this uh document loader on top of

7:03:14

the documentation so here uh let me open

7:03:19

this document loader so once you will

7:03:21

come inside this module now and here is

7:03:23

a uh here is a like option retrieval now

7:03:27

inside that you will find out a document

7:03:28

loader so CSV file directory HTML Json

7:03:31

markdown PDF or different different

7:03:33

document you can load and it is required

7:03:37

it is required I will show you where it

7:03:38

is required and once I will reach to the

7:03:40

Practical implementation once I will

7:03:42

create any sort of a project okay so

7:03:44

there I will show you how you can read a

7:03:46

different different files and how you

7:03:47

can utilize let's say uh you have one

7:03:50

information so some information inside

7:03:52

the uh txt file or maybe in the format

7:03:55

of HTML or Json or maybe CSV now you

7:03:58

want to read it from there and you want

7:04:00

to give it to you uh you want to give uh

7:04:02

that particular information to your uh

7:04:05

chat GPT or maybe GPD model so in that

7:04:07

case you will have to use this document

7:04:09

loader so let me show you how you can

7:04:11

use this uh PDF loader so here is what

7:04:14

here is a PDF loader so for that first

7:04:16

the first thing what you need to do you

7:04:18

need to install this P PDF so just open

7:04:21

your notebook and here write it down

7:04:23

this pip install pip install P PDF so

7:04:28

once you will write it down this pip

7:04:30

install P PDF you will be able to

7:04:32

install this Pi PDF inside your virtual

7:04:35

current virtual environment now after

7:04:36

that you need to lo you need to write it

7:04:38

down this particular command uh you need

7:04:40

to write it down this particular import

7:04:41

statement from lench do document loader

7:04:44

import Pi PDF loader right from the

7:04:47

documentary itself I'm going to take it

7:04:50

I I'm I'm I'm not going to write down by

7:04:52

myself here I'm showing you the power of

7:04:54

the documentation so once you will

7:04:56

explore it you will get a many more

7:04:58

thing from here itself right whatever

7:05:01

like you want so here I'm going to uh

7:05:04

what I'm going to do guys so here I'm

7:05:05

going to mention this import statement

7:05:08

now we have one uh ex uh now here

7:05:12

actually we have to call this particular

7:05:14

method sorry we have to create a object

7:05:16

of this particular uh class and here let

7:05:18

me paste it down so this is the pi PDF

7:05:21

Lo now I have to pass my PDF I have to

7:05:24

give the uh I have to like write it down

7:05:27

the my path whatever is there uh in my

7:05:29

local system so inside my download let

7:05:32

me check any PDF is there or not so let

7:05:35

me check with the

7:05:39

PDF LM here is a PDF machine translation

7:05:44

attention so let me copy the path uh let

7:05:47

me paste it down over there let's see it

7:05:49

is able to read it or not

7:05:52

so where is a path guys here is a

7:05:58

path let me copy the path and I have

7:06:01

copied the absolute path now where it is

7:06:04

here is my code so here I pasted my path

7:06:08

and let's see it is going to load or not

7:06:10

it's showing a uni code error so let me

7:06:12

put the r over here and it is done now

7:06:15

let me check inside the loader that what

7:06:17

I have so here it is created the object

7:06:20

now let me I write it down the loader

7:06:24

over here loader do loader so once I

7:06:27

will write down this thing so here you

7:06:29

will see that uh okay l a d r loader do

7:06:35

loader P object no attribute

7:06:37

loader uh what is this let me check the

7:06:40

documentation here they are calling

7:06:42

loader and split and that will give you

7:06:45

the

7:06:45

pages great so let me call this uh

7:06:50

loader and split

7:06:52

and here I have a Pages now let's see we

7:06:54

have a Pages yes I got the entire detail

7:06:58

so see I able to read the PDF by using

7:07:02

this document reader why I've shown you

7:07:04

this thing because uh it will be

7:07:06

required we use now pandas do read CSV

7:07:11

for uh like collecting any any sort of a

7:07:14

data in the form of data frame right so

7:07:16

if I want to uh take any data if I want

7:07:19

to format any data in the form of data

7:07:20

frame so so we use this pd. read CSV or

7:07:23

we use np. aray similarly if you want to

7:07:25

read any a document by using this L

7:07:28

chain you can do it you can do it guys

7:07:31

so here there is another one and uh you

7:07:34

can take it as assignment you can read

7:07:36

the CSV there is a complete code here is

7:07:38

a uh code for the file directory here is

7:07:40

a like HTML here is a Json markdown is

7:07:44

there there's a different different uh

7:07:45

like a uh different different document

7:07:48

loaders you will find out now guys uh

7:07:50

let's try to revise the thing let's

7:07:52

revise the session what all thing we

7:07:53

have learned in today's class in today's

7:07:55

session and then I will conclude it and

7:07:58

in tomorrow's session I will start from

7:07:59

the memory memory and finally hugging

7:08:02

face sorry actually I went uh into some

7:08:05

depth Okay I uh I try to explain New

7:08:08

Concept in a detail way that's why I

7:08:10

couldn't start with a hugging face API

7:08:12

but don't worry in tomorrow's session I

7:08:14

will show you how you can uh how you can

7:08:17

uh download any open source model how

7:08:20

you can use any open source model model

7:08:21

by using the hugging pH API and then uh

7:08:25

right after that we'll try to create our

7:08:27

application that is going to be a McQ

7:08:29

generator we'll see that how you can

7:08:31

generate McQ by giving any sort of a

7:08:34

text and where this document loader

7:08:36

where this chaining memory each and

7:08:37

everything will come into the picture

7:08:39

and even the prompt also prompt template

7:08:41

right now let's revise the thing what

7:08:44

all thing we have learned so let me

7:08:45

revise it over here so in today's class

7:08:48

uh we have talked about so where is my

7:08:50

pen

7:08:52

yeah so in today's class we have talked

7:08:54

about this agent I have shown you that

7:08:56

how to call a third party API so here we

7:08:59

have seen how to call a Google search

7:09:02

engine Google search engine API Google

7:09:05

search engine API so let's say uh your

7:09:10

chat GPT actually has been trained till

7:09:12

uh September 2021 data so if it is not

7:09:15

able to give the information in a real

7:09:17

time in that case you can use this agent

7:09:20

you can call you can can use the concept

7:09:22

of

7:09:23

chain right you can use the concept of

7:09:26

chain in which scenario so where you

7:09:28

have a multiple prompt which is

7:09:29

connected to each

7:09:31

other not a simple application not a

7:09:33

simple prompt just for the testing I'm

7:09:36

talking in a real

7:09:39

time so I'm talking in a real time uh

7:09:43

just a

7:09:50

wait

7:10:12

uh now it is fine so here I was talking

7:10:14

about this uh Google search engine and

7:10:18

uh yep and then we have talked about the

7:10:20

change prompt template also document

7:10:22

loader now this uh two thing is

7:10:24

remaining so in uh tomorrow's session I

7:10:27

will start from the memory uh in

7:10:29

tomorrow session actually I will try to

7:10:30

explain the memory concept and then I

7:10:31

will come to this hugging phas API got

7:10:34

it guys yes or no so how was the session

7:10:37

uh did you learn something new so please

7:10:39

do let me know guys uh did you learn

7:10:42

something new from here whatever I have

7:10:44

explained and uh how was the session how

7:10:46

was the content uh please do write it

7:10:48

down the

7:10:50

chat

7:10:54

should I add a few more things if you

7:10:56

want then uh please do let me know

7:10:58

please uh write it on the chat I I'm

7:11:01

like waiting for your replies and you

7:11:04

you can comment also so if you are

7:11:06

watching re-watching the video and if

7:11:07

you want something from my side you can

7:11:09

write it on the comment section you can

7:11:11

tell me over the LinkedIn and yeah

7:11:14

that's it so I hope you are liking my

7:11:16

session so please hit the like button if

7:11:19

you liking the content if you're liking

7:11:20

the

7:11:37

session GB 3.5 get updated till yeah ah

7:11:41

recently we have seen that today

7:11:50

itself

7:11:58

so why we are using Len chain and

7:11:59

advantages over other API you will get

7:12:02

to know more about it in tomorrow's

7:12:04

session otherwise just try to revisit

7:12:07

the session in a starting itself I have

7:12:09

talked about the limitations of the

7:12:11

openai and I talked about the advantage

7:12:14

of the open a clearly I have written it

7:12:16

over here so just try to revisit the

7:12:17

session you will get it and here I have

7:12:20

tried to explain you everything what is

7:12:22

a lenen it's a rapper or the open Ai and

7:12:25

uh your app here is a lenen which is a

7:12:28

rapper now you can hit a multiple Thing

7:12:31

by using this Len

7:12:35

chain yes day three not day three

7:12:38

notebook will be available in your

7:12:40

resource section soon it will be

7:12:41

available don't worry uh yeah so this is

7:12:44

it guys from my side I hope uh like uh I

7:12:49

already told you the tomorrow's agenda

7:12:51

uh memory and the uh hugging phas right

7:12:55

so thank you guys thank you bye-bye for

7:12:56

joining the session if you have anything

7:12:58

any doubt or any concern or anything in

7:13:01

your mind so just uh do let me know

7:13:03

please uh write down the uh please write

7:13:06

down your thoughts in a comment section

7:13:08

and you can ping me over my LinkedIn as

7:13:09

well okay so let's start with the

7:13:11

session and today is a today is the day

7:13:14

five day five of this community session

7:13:16

Community session of generative AI so uh

7:13:20

I already uh covered um most of the

7:13:22

thing actually in a in with respect to

7:13:25

this open a and this Lin and uh in total

7:13:28

I took four session uh here you can see

7:13:31

all all these four session uh where I

7:13:34

have started from the introduction of

7:13:36

the generative AI then I came to the

7:13:39

introduction of the open Ai and we we

7:13:41

have understood we have understood the

7:13:43

concept of the open API then I have

7:13:45

discussed about the Len chain and

7:13:47

yesterday also I was talking about the

7:13:49

Len chain in today this class uh I will

7:13:51

be talking about the memory Concept in

7:13:54

the Lang chain which was the remaining

7:13:55

one and after that I will start with the

7:13:59

hugging face API and then uh from next

7:14:02

class onwards we'll try to uh Implement

7:14:05

our first end to end project by using

7:14:07

this linkchain and this open AI so uh

7:14:10

guys here we have uploaded all the

7:14:12

sessions all the lecture you can go

7:14:15

through with this dashboard which is

7:14:16

already there over the Inon platform you

7:14:18

just need to sign up and after the sign

7:14:21

up you need to login over there and you

7:14:23

will get this particular dashboard uh

7:14:25

over the in youron platform so already

7:14:27

we have given you the link uh in the

7:14:29

chat so please try to uh enroll yourself

7:14:33

if you are new in this particular

7:14:34

session uh this enrollment is completely

7:14:37

free you no need to pay anything for

7:14:39

this uh for this en for this particular

7:14:41

session uh so you can down uh you can

7:14:44

enroll inside the course and you can

7:14:46

access all the uh lectures and here you

7:14:49

will find out the resource section

7:14:51

inside that all the resources uh is up

7:14:54

to date whatever thing I have discussed

7:14:56

in the live classes each and everything

7:14:58

you will find out over here so let me

7:15:00

show you yesterday I have discussed

7:15:01

about the lure so this file is already

7:15:04

there you just need to download it and

7:15:06

you can uh run inside your system you

7:15:10

can run inside your system you can run

7:15:11

over the Google collab anywhere you want

7:15:14

so I shown you the setup in in the local

7:15:16

system itself you can go through with my

7:15:18

previous session and there you can

7:15:20

understand how to to do a local setup

7:15:21

how to do a h setup with respect to open

7:15:24

Ai and Linkin how to run a code

7:15:26

regarding this open Ai and Lenin each

7:15:28

and everything I have explained you in

7:15:30

the previous classes so please go

7:15:31

through with my session and uh like uh

7:15:34

try to understand at least till here

7:15:37

till this L and this open I so uh you

7:15:39

can implement the project along with me

7:15:41

whatever thing I'm going to explain from

7:15:43

next class onwards uh because in today's

7:15:45

class I will cover this lure memory and

7:15:47

then I will come to this hugging face

7:15:49

API and from Monday on onwards Monday

7:15:51

onwards Monday to Friday so Monday

7:15:53

onwards I'm going to start with the

7:15:55

project Tuesday also I will take a

7:15:56

project and then I will come to the

7:15:58

vector database and then few more

7:16:00

concept few uh like different different

7:16:02

models uh some open source model and I

7:16:04

will try to explain you this uh ai2 lab

7:16:07

also that uh how you can uh access that

7:16:09

Jurassic model uh which I told you in my

7:16:12

initial uh like introduction so yeah I

7:16:15

think everything is clear everything is

7:16:17

fine to all of you so please do confirm

7:16:19

in the chat if uh everything is fine

7:16:21

everything is clear till here then we'll

7:16:23

start with today's concept so I'm

7:16:25

waiting uh for your reply please write

7:16:28

it on the chat

7:16:35

guys and you can find out the same

7:16:37

session over the Inon YouTube channel as

7:16:39

well so just try to visit the Inon

7:16:41

YouTube channel and go inside the live

7:16:43

section there you will find out this

7:16:45

committee session already uh the

7:16:48

recording is uh already we have upd the

7:16:51

recording in the live uh section itself

7:16:53

and in the description you will find out

7:16:55

the uh you will find out this dashboard

7:16:57

link as

7:16:59

well uh let me show you that just a

7:17:09

second yeah so here is Ion YouTube

7:17:12

channel so just uh uh over the click

7:17:15

over the channel and here go inside this

7:17:18

live section click on this live section

7:17:20

there you will find out all the

7:17:21

recordings so uh this is the very first

7:17:24

recording where I have discussed uh each

7:17:26

and everything regarding the generative

7:17:27

Ai and the second recording is this one

7:17:30

the third one this is the third

7:17:31

recording and here you will find out the

7:17:33

fourth recording now just click uh any

7:17:35

of them so after clicking just try to go

7:17:38

through with the description and here

7:17:40

you will find out the uh dashboard link

7:17:43

and other details so each and everything

7:17:45

you can find out uh over the Inon

7:17:48

YouTube channel as well you you can find

7:17:50

out this uh dashboard link over there

7:17:52

just click on that and enroll yourself

7:17:55

it is completely free now let's start

7:17:57

with today's session so here I will be

7:18:00

talking about the Len chain L memory in

7:18:03

Len chain so how you can uh like uh how

7:18:07

you can use this memory con concept by

7:18:09

using this Len Chen but before starting

7:18:11

with the Practical let me give you some

7:18:13

theoretical explanation so what I'm

7:18:15

doing here I'm going to open my

7:18:17

Blackboard and here I will try to

7:18:18

explain you the concept of the memory

7:18:21

right and a what thing we are going to

7:18:23

discuss that also I will be talking

7:18:25

about here I will be writing in front of

7:18:28

you and then finally we'll Implement uh

7:18:30

those particular thing in a python now

7:18:33

uh in the previous class I was talking

7:18:35

about the Len chain and I given you the

7:18:37

complete detail introduction regarding

7:18:40

the Lenin that what is Lenin why we

7:18:42

should use it what is the advantage on

7:18:45

top of this openi API why we should not

7:18:47

use openi API why we should use lenen

7:18:50

each and everything we have discussed

7:18:53

now in future session uh I will explain

7:18:56

about the Llama index 2 so it is similar

7:18:59

to Lenin and I will come to the Llama

7:19:00

index 2 and it's a framework from the

7:19:02

Facebook site so we'll try to discuss

7:19:04

each and everything related to L related

7:19:07

to this llama index 2 as well and I will

7:19:09

give you the differences between Len

7:19:10

Chen and Lama index 2 but as of now here

7:19:12

I'm going to explain you the Len chain

7:19:14

only and most of the concept I already

7:19:16

discussed so if we talking about the Len

7:19:19

chain so what all thing we have

7:19:21

discussed so far let me tell you that so

7:19:25

in the Len chain first I discussed that

7:19:27

how to uh call the open a API by using

7:19:30

this Len chain you can think that this

7:19:32

Len chain is nothing it's a wrapper on

7:19:34

top of this open a API and not only

7:19:36

openi API we can access a various API by

7:19:40

using this Len shed so here we have

7:19:42

openi API we have seen that how to

7:19:44

access and how to uh how to access or

7:19:47

how to use the open API by using the

7:19:50

there is just a simple import statement

7:19:53

which I which we have to write it down

7:19:55

inside the notebook or inside the code

7:19:58

and we will be able to import it that's

7:20:00

it now apart from that we have seen the

7:20:02

concept of the agent I have explained

7:20:04

you that what is the agent then uh I

7:20:06

have explained you the prompt template

7:20:08

that what is a prompt

7:20:10

template prompt template how you can

7:20:13

create a prompt template and all so we

7:20:15

have seen each and everything regarding

7:20:17

that now we have understood the concept

7:20:19

of the chains that what is chains and

7:20:21

what we can do by using the chains if we

7:20:24

are going to define a chain right so uh

7:20:27

what all thing we need to import what

7:20:29

component is required what is the

7:20:31

meaning of the simple uh sequential

7:20:32

chain what is the meaning of the

7:20:34

sequential chain each and everything I

7:20:36

have discussed regarding the chains

7:20:38

after that I came to the document loader

7:20:41

I have discussed about the document

7:20:42

loader if you want to uh load any sort

7:20:46

of a document document is nothing it's

7:20:48

just a like a files and all right so if

7:20:50

you want to read the PDF PDF file if you

7:20:53

want to read the Excel file CSV file

7:20:55

HTML file or maybe any other file so you

7:20:59

can um you can load that particular file

7:21:02

by using this link chain it is possible

7:21:04

now the fifth one now the sixth one

7:21:06

which we're going to talk about that is

7:21:07

going to be a memory so we'll uh discuss

7:21:10

the concept of the memory first I will

7:21:12

write it on the code and then again I

7:21:14

will come to this memory part and try

7:21:16

will try to explain you but before that

7:21:18

uh I would uh I will explain this memory

7:21:20

memory concept by using the chat GPD

7:21:22

also before writing a code now this is

7:21:24

all about the L CH these all are the

7:21:26

thing basically which we need to discuss

7:21:28

regarding the L chain and that's going

7:21:29

to be a very important if you are going

7:21:31

to implement the project end to end

7:21:33

project now after that what I will

7:21:36

discuss so here let me write down the

7:21:37

topic name which we're going to discuss

7:21:39

after this Lon so I will talk about the

7:21:41

hugging phase hugging phas API how you

7:21:46

can generate a token how you can

7:21:47

generate a hugging phas API token and

7:21:50

after that we'll try to access a open

7:21:53

source model whatever model is there on

7:21:55

top of the hugging phase so we'll try to

7:21:57

access those particular model by using

7:21:59

this hugging phase and we'll try to do a

7:22:01

same thing we'll try to do a same thing

7:22:03

basically which we are doing uh by using

7:22:06

this open API but at this uh now at that

7:22:10

time I'll will be using the open source

7:22:12

model not this U uh like not this GPD

7:22:15

model basically which is a uh which is a

7:22:17

like model of the open a now will try

7:22:20

try to access those open source model

7:22:22

and then we'll try to understand that

7:22:24

how uh we'll try to understand that how

7:22:26

you can create a pipeline by using the

7:22:28

hugging face so we'll try to understand

7:22:30

the concept hugging face pipeline

7:22:32

hugging face pipeline I told you this uh

7:22:35

Lenin is nothing this lenen is a wrapper

7:22:39

okay this lench is a wrapper on top of

7:22:40

this uh open ey this lench is a wrapper

7:22:43

on top of the hugging face so not only

7:22:45

open AI we can interact with hugging

7:22:48

face also uh by using this L chain and

7:22:50

not even with hugging phase we can

7:22:52

interact with many API in future I will

7:22:55

explain you that I will come to that and

7:22:57

if you if you want to know about it so

7:22:59

you can visit the documentation

7:23:01

yesterday I shown you the documentation

7:23:02

of the Len chain and you can see over

7:23:04

there not even open AI not even hugging

7:23:06

pH we can access a multiple API by using

7:23:09

Lang chain so Lang chain is nothing just

7:23:10

a rapper on a different different uh on

7:23:14

top of a different on top of different

7:23:15

different

7:23:16

API got it yes or no I think this thing

7:23:19

is clear to all of you then we'll see

7:23:20

how we can create a hugging face

7:23:22

pipeline which we used to do by using

7:23:23

the hugging pH Transformer now here also

7:23:26

we can import the same thing we can

7:23:27

import the hugging face pipeline by

7:23:29

using the Len chain and we can create

7:23:31

the pipeline and we I will show you so

7:23:33

here uh by using the hugging phas API

7:23:36

you can access the model by using the

7:23:38

hugging face API you can access the

7:23:39

model but you can install this model

7:23:41

inside your local environment also

7:23:44

inside a local environment also inside

7:23:45

your local memory also so I will show

7:23:47

you how you can perform the same thing

7:23:50

by

7:23:51

local llm local LM means what nothing

7:23:54

I'm just going to be uh I'm just going

7:23:56

to be download the model I'm just going

7:23:58

to be download the model from the huging

7:23:59

phase and that model itself I'm going to

7:24:02

use similar to this uh GPT and all which

7:24:06

I which I'm like accessing by using the

7:24:07

open API or by using the Len Chen Len

7:24:10

Chen and openi right so same thing I can

7:24:12

do over here as well uh okay by using

7:24:14

the hugging face API but if you want to

7:24:16

download the model in your local memory

7:24:18

in your local system that that also you

7:24:20

can do that also uh you can do and that

7:24:23

is also possible so I will explain you

7:24:26

that part as well and finally we'll

7:24:27

create a hugging phas Pipeline and from

7:24:30

next class onwards we'll start the

7:24:32

project implementation so uh if uh

7:24:35

everything is fine until here then

7:24:38

please do let me know if the agenda is

7:24:40

clear to all of

7:24:41

you and if you are liking the session

7:24:44

then please hit the like button

7:24:46

guys please hit the like button if you

7:24:48

are liking the session

7:24:54

I just started I I just given you the

7:24:56

overview that what all thing we are

7:24:57

going to discuss that's it I haven't

7:25:00

started with the coding and

7:25:08

all no we don't have a session on

7:25:10

Saturday and Sunday uh we have a session

7:25:12

from Monday to

7:25:18

Friday

7:25:28

great so let's start with the

7:25:30

implementation so first I'm going to

7:25:33

start from the memory that what is a

7:25:35

memory inside the L chain and how we can

7:25:39

use that so see first of all let me uh

7:25:42

explain you the same thing by using the

7:25:44

chat GPD so what I'm going to do here

7:25:47

I'm going to open my chat GPD and let me

7:25:50

write it down something over here so

7:25:52

here I'm going to write it down that uh

7:25:55

can you tell me uh can you can you tell

7:25:59

me who won the first World Cup first

7:26:05

Cricket World Cup so I'm going to ask to

7:26:07

my Chad GPD that can you tell me who won

7:26:10

the first Cricket World Cup so that this

7:26:12

is my question which I'm going to ask to

7:26:14

much chbd now let me hit the enter and

7:26:17

let's see the reply so is saying that

7:26:20

the first Cricket World Cup was held in

7:26:22

1975 and uh the Western de emerged as

7:26:25

the champion they defeated Australia in

7:26:27

the final which took place as a l uh

7:26:30

Lords cricket ground in London on uh

7:26:32

June 21

7:26:34

1975 so Western was the uh winner at

7:26:38

that particular time now let's try to

7:26:39

ask something to my chat gbt so here I'm

7:26:42

asking to my chat GPT can you tell me

7:26:45

can you tell me 2 + 10 so here it is

7:26:50

giving me answer 2 + 10 is 12 now let me

7:26:53

ask something else to my CH gbd can you

7:26:55

tell me

7:26:57

about the Indian GDP so here I'm going

7:27:02

to ask my chat GPD can you tell me about

7:27:04

the Indian GDP so it is uh saying that

7:27:07

uh my knowledge up to date till uh U

7:27:10

till January 2022 so I don't have a most

7:27:13

recent data now it is giving up some

7:27:15

more detail now you can ask the GDP you

7:27:18

can ask like GDP the that what was the

7:27:20

GDP in 2021 in 2022 something like that

7:27:23

or whatsoever now here see what was my

7:27:25

first question so here I asked the first

7:27:27

question can you tell me who won the

7:27:29

first World Cup who won the first

7:27:31

Cricket World Cup now here see after

7:27:34

writing this many of after writing a

7:27:36

different different like a question now

7:27:38

is still my Chad GP is able to remember

7:27:41

this particular sentence this particular

7:27:44

sentence because in back end actually it

7:27:46

is using the memory concept it's able to

7:27:48

remember the it is able to remember the

7:27:50

conversation that whatever conversation

7:27:52

is happening over here so here if I will

7:27:54

ask to my chat GPT can you tell me can

7:27:58

you tell me can you tell me the winning

7:28:03

team captain so here I didn't mention

7:28:06

anything and I'm just asking to my chat

7:28:08

GPT can you tell me the winning team

7:28:10

captain so if I will if I will hit the

7:28:12

enter and here guys you can see the

7:28:14

reply

7:28:16

so it is saying okay captain as of my

7:28:20

knowledge and I don't have information

7:28:21

wining team captain uh can you tell me

7:28:24

the winning

7:28:25

team okay let me ask one more time is

7:28:29

saying that uh can you tell me who won

7:28:31

the first Cricket World Cup and here I'm

7:28:33

asking can you tell me

7:28:37

winning

7:28:40

Captain uh winning

7:28:43

team

7:28:45

captain name so if I'm asking to my gp2

7:28:50

so it is saying that uh it seems like

7:28:53

might be a slight

7:28:55

spelling about the okay cap it's a

7:28:58

captain I am writing a wrong spelling

7:29:00

let me correct the spelling first of all

7:29:02

so here uh the spelling will be a

7:29:04

captain just a second let me copy the

7:29:07

correct uh correct spelling and let me

7:29:09

paste it over here and let's see I'm

7:29:11

getting answer or not so here it is

7:29:14

saying information the

7:29:16

tournament okay so it is saying that uh

7:29:19

uh just a second guys what I can do uh

7:29:22

let me delete this chat or let me open

7:29:24

the new chat and let me show you this

7:29:26

particular thing oh yeah just a wait so

7:29:29

it is able to remember the thing uh let

7:29:32

me start from the new one uh first of

7:29:34

all let me delete it don't know why it

7:29:36

is doing like this just a second let me

7:29:39

delete the chat okay now here is what

7:29:42

here is my new chat now here uh let's

7:29:45

start from the beginning so here I'm

7:29:46

asking to my chat GPT can you tell me

7:29:50

who won the first

7:29:54

Cricket World Cup this is a SE uh like

7:29:57

simple question which I'm going to ask

7:29:59

my chat GPT so here uh you can see it is

7:30:03

giving me answer okay no doubt no issue

7:30:06

now here if I'm going to ask my chat GPD

7:30:08

that what will be uh what will be 2 + 2

7:30:13

2 + 2 right so now let's see what I will

7:30:16

be getting over here so here is saying

7:30:18

that 2 + 2 will be four now let me ask

7:30:21

my chat GPT what will be 2 * 5 now here

7:30:26

it is saying that uh the multiplication

7:30:29

will be 10 now I'm asking to my chat GPT

7:30:32

can you tell me can you tell me about

7:30:36

can you tell me who was the winning who

7:30:41

was the captain d a i in captain of a

7:30:46

captain of the winning team now let's

7:30:50

see uh will it be able to answer or

7:30:56

not it's taking time and let's see what

7:31:00

will be the

7:31:01

answer yes it is able to answer now see

7:31:04

so here I asked to my C GPT who won the

7:31:07

first Cricket World Cup so here is my

7:31:09

like answer now I asked to my CH GPT

7:31:11

what is 2 + 2 and the answer is this one

7:31:15

now I asked to my CH GP 2 into 5 so this

7:31:18

is the answer now again I asked to my

7:31:20

chat GPT without giving any sort of an

7:31:22

information regarding this Cricket World

7:31:23

Cup and all and you can see the answer

7:31:26

it is saying that Clive Lord was a

7:31:28

captain uh clyve Lord was a captain of

7:31:30

the West Indies cricket team that was

7:31:32

was the Cricket World Cup in 1975 so

7:31:36

here guys in a back end this chat GPT is

7:31:39

implementing this memory concept now if

7:31:41

you are accessing if you are accessing

7:31:43

your uh if you are accessing llm uh this

7:31:45

GPD and all by using the open AI or

7:31:48

maybe by using the huging phase so how

7:31:50

you can retain the memory because chat

7:31:53

GPT chat GPT is application in backend

7:31:56

uh this GPD model is running getting my

7:31:58

point now if you want to implement a

7:32:00

same thing let's say if you are

7:32:02

accessing the model llm model by using

7:32:04

the open API or maybe by using the Len

7:32:07

Chen basically Len Chen is hitting the

7:32:08

open API only so how you can retain this

7:32:11

particular memory how you can do that so

7:32:13

now let's try to understand that

7:32:15

particular part that particular concept

7:32:17

so if I'm using uh the open API that how

7:32:20

I will be able to retain the memory and

7:32:23

Len chain gives you this particular

7:32:24

facility so by using the memory concept

7:32:27

you can retain the memory like chat GPT

7:32:30

so the problem statement is clear to all

7:32:32

of you please do let me know in the chat

7:32:34

if uh the problem statement is

7:32:38

clear I'm waiting for your reply guys

7:32:40

please do let me

7:32:48

know

7:32:49

what's the purpose of the Len chain so

7:32:51

in the previous class I have clearly

7:32:53

defined the purpose of the Len chain if

7:32:55

you don't know about it so you must

7:32:57

visit the previous class where I have um

7:32:59

I did the detailed discussion about the

7:33:01

Len

7:33:10

chain great so everything is fine

7:33:12

everything is clear now let's uh begin

7:33:15

with the implementation so first of all

7:33:17

guys what I need to do so first of all I

7:33:20

need to import a different different uh

7:33:23

first of all let me import the different

7:33:25

different uh like a uh import a

7:33:28

statement okay so here is my open Ai and

7:33:32

okay it is fine now let me do one thing

7:33:34

over here let me

7:33:37

[Music]

7:33:42

import the same file I already given to

7:33:45

you you can check in a resource section

7:33:47

from there you can download it's a same

7:33:49

file which I'm using over

7:33:51

here so it is for the asent type

7:33:56

uh okay everything is fine now let me

7:33:59

take a prompt template from

7:34:01

here great so here what I'm going to do

7:34:04

here I'm going to write it down the

7:34:07

memory so just a

7:34:09

second yeah so first of all let me write

7:34:12

it on the memory over here

7:34:18

and

7:34:21

memory now let's begin let's start so

7:34:24

here I'm going to import The Prompt

7:34:26

template the first thing which I'm going

7:34:28

to do over here so first of all I will

7:34:31

have to uh create my a client right so

7:34:34

for creating a client actually uh let me

7:34:37

write another the code so here actually

7:34:39

let me import one more thing I'm going

7:34:41

to import llm Chen actually I restarted

7:34:44

my kernel that's why I need to import it

7:34:45

again and here uh let me do one thing so

7:34:49

LM chain I already imported let me

7:34:51

create a client first of all so for

7:34:53

creating a client what I can

7:34:56

do already written a code inside my

7:35:01

file yeah so this is the code for

7:35:03

creating a client so here uh what I'm

7:35:06

going to do guys see here I'm going to

7:35:08

create a

7:35:10

client so this is what this is my client

7:35:13

now open AI key is not defined okay

7:35:16

first of all I will have to import the

7:35:17

open a so from length chain Len

7:35:20

chain do open and here I'm going to

7:35:25

import this open AI now let's run it

7:35:30

again and it is saying open AI is not

7:35:34

there so let me change the spelling of

7:35:36

the

7:35:37

openi I think it is

7:35:40

capital no it is not like that so let me

7:35:43

check with the correct import statement

7:35:45

what is

7:35:47

that

7:35:53

yeah this is

7:35:56

the okay I'm using the length chain just

7:35:58

a wait so by using the Len

7:36:04

chain okay from llm actually we have to

7:36:06

import this open a uh it's my bad so now

7:36:11

it is done yeah it is fine I created a

7:36:14

CLI yep now everything is set so here I

7:36:17

have imported three state M first is

7:36:19

prom template second is llm chain and

7:36:22

third is open AI I restarted my kernel

7:36:24

that's why I uh got a a requirement to

7:36:27

reimport it uh this particular statement

7:36:30

now here I created a client now let's

7:36:32

try to understand the concept of the

7:36:34

memory so first of all guys what I will

7:36:36

have to do I will have to create a

7:36:37

prompt template and I will have to hit

7:36:39

my model right so for that uh what I did

7:36:43

I already written a code so let me uh

7:36:45

keep the prompt template over here so

7:36:48

this is what guys this is my prompt

7:36:49

template I told you that what is the

7:36:51

meaning of the prompt template and how

7:36:53

to create a prompt template each and

7:36:55

everything I have discussed in my

7:36:56

previous classes if you don't know about

7:36:58

it so please go and check with my

7:37:00

previous s so this is what guys tell me

7:37:02

this is my prompt template now here I'm

7:37:04

uh not going to hit my model U like

7:37:08

directly uh instead of that I'm going to

7:37:11

use llm chain I clearly told you in my

7:37:14

previous class that what is llm chain

7:37:16

llm CH LM chain is nothing l l m chain

7:37:19

uh is a like concept where we are going

7:37:21

to connect two components right so what

7:37:24

is the meaning of the chain so inside

7:37:26

chain you will find out that we are

7:37:28

going to connect a multiple component so

7:37:30

here we have llm chain where we are

7:37:33

going to connect a multiple component my

7:37:35

first component is a client uh which is

7:37:37

my object of the open a which I have

7:37:40

created and the second uh the second

7:37:42

component is prompt template let's try

7:37:44

to use llm chain over here and let's see

7:37:47

what I will be getting so for that first

7:37:49

of all I'm going to create a object of

7:37:51

this llm chain now let me create a

7:37:53

object of this llm chain and I can keep

7:37:56

it over here I can keep this particular

7:37:58

object inside this chain variable now

7:38:00

let me pass my llm llm is nothing it's a

7:38:03

client itself because by using this

7:38:06

client only uh we are getting a model we

7:38:09

are getting a model from the open Ai and

7:38:11

by default I think we are using text D

7:38:13

Vinci uh and if you are going to mention

7:38:16

the model parameter you can use your

7:38:18

desired model as well so that is also

7:38:20

possible now over here I'm going to

7:38:21

write down this client and then what I

7:38:23

will do guys so here I will mention my

7:38:25

prom template so let me mention my

7:38:28

prompt template let me write down the

7:38:30

parameter prompt p r o m PT and here let

7:38:34

me copy this name prompt template name

7:38:36

and here I have this prompt template

7:38:39

name so once I will run it so here you

7:38:42

can see we are able to create a chain so

7:38:44

this is what this is my chain now what I

7:38:46

will do I will run uh uh I will I will

7:38:49

like uh I will call the run method and

7:38:53

here I will mention the name so I'm I'm

7:38:56

asking over here what is a good name for

7:38:58

the company that makes so I can uh so

7:39:00

this product actually uh I can I can

7:39:02

give any sort of a product name over

7:39:04

here so let's say here if I'm saying uh

7:39:07

if I'm uh asking to my uh like model so

7:39:11

colorful

7:39:13

colorful colorful uh cup so here I'm

7:39:16

asking to my model colorful cup so if I

7:39:19

will uh run it so here you can see so it

7:39:22

is giving me answer so for if I want to

7:39:24

like uh check that what is the answer

7:39:26

which I'm getting over here so I can

7:39:28

give it to my print statement and let's

7:39:30

see what will be the final answer so

7:39:32

here it is saying holder color cup

7:39:34

Corporation something like that it is

7:39:36

giving me a name so let me call the

7:39:39

strip over here strip will remove

7:39:40

unnecessary thing from here so it is

7:39:43

saying cakes uh Sugarland sprinkle so

7:39:47

this is the name basically which I'm

7:39:49

getting uh if I'm asking this particular

7:39:51

question to my to my model right to my

7:39:55

llm model to my uh GPT model now uh till

7:39:59

here I think everything is fine already

7:40:01

we did uh uh like uh we did it so many

7:40:04

times in our previous classes in our

7:40:06

previous session now let's try to

7:40:08

understand few more thing over here

7:40:09

let's try to understand the memory

7:40:11

concept that how the memory how this

7:40:13

memory is working in terms of this uh

7:40:15

Len chain okay and how we can uh sustain

7:40:18

the memory basically the uh conversation

7:40:20

whatever conversation we are going to do

7:40:22

now here see guys uh I'm going to write

7:40:24

it down uh one more time so let me

7:40:27

create one more prompt over here so

7:40:29

let's say uh there the same prompt uh

7:40:31

same prompt template I have used now

7:40:33

here what I'm going to do um here I'm

7:40:35

going to ask to my uh here I'm going to

7:40:38

ask uh again one thing so let me do one

7:40:41

thing let me again create this chain

7:40:43

over here and I'm going to copy and

7:40:45

paste the same thing and let me run it

7:40:47

so chain do run I'm going to call this

7:40:49

chain. run and instead of this colorful

7:40:52

cup I'm giving a different name so here

7:40:55

I'm giving name let's say drone so

7:40:57

drones I I want to ask a I want to ask a

7:41:00

company name so which make a drones so

7:41:03

here the product name is what the

7:41:04

product name is drones I'm passing the

7:41:06

product name inside this method inside

7:41:09

this run method so chain. run and here

7:41:11

I'm passing this drone let's see what

7:41:12

will be the name so here it is giving me

7:41:14

a name drone X technology so uh it is

7:41:17

giving me a name that that uh don't ask

7:41:20

technology okay so here I can call this

7:41:22

a strip so it will remove the

7:41:24

unnecessary thing uh from the a

7:41:27

beginning so skyron technology so this

7:41:30

is the name basically which is giving to

7:41:31

me and I hope till here everything is

7:41:34

fine everything is clear already we have

7:41:36

learned these many things right now let

7:41:38

me uh explain you the uh like memory

7:41:41

concept so here uh if I'm going to call

7:41:44

one parameter so let me write it down

7:41:46

this chain do memory

7:41:49

so here if I'm going to call this

7:41:50

parameter chain. memory so here I'm not

7:41:53

getting anything here I'm not getting

7:41:55

anything so let's try to see the type of

7:41:57

this chain do memory that what is the

7:41:59

type of this chain do memory so chain do

7:42:03

memory now let me show you the type of

7:42:06

this chain do memory so here you can see

7:42:08

it is giving me a non type means it is

7:42:10

not going to return anything to me

7:42:12

because here we are not going to sustain

7:42:14

any sort of a memory whatever

7:42:16

conversation we are doing to my model

7:42:18

what whatever conversation is happening

7:42:20

right so we are not going to sustain

7:42:22

anything over here we are not going to

7:42:25

sustain anything over here in terms of

7:42:27

the conversation now let's try to

7:42:29

understand how we can do it how we'll be

7:42:31

able to sustain the conversation

7:42:33

whatever conversation we are making uh

7:42:36

like by using the API and whatever

7:42:38

conversation we are making with respect

7:42:41

to that particular model so here for

7:42:43

that we just need to write it down one

7:42:46

parameter so uh first of all let me

7:42:48

write down the heading over here so the

7:42:50

heading uh let me write down the heading

7:42:52

The Heading is nothing heading is

7:42:54

convers conversion buffer memory so here

7:42:57

uh we want to save a memory we want to

7:43:01

save a like conversation memory so here

7:43:04

I return this conversation buffer memory

7:43:06

we have three to four topic inside this

7:43:08

memory so step by step I will try to

7:43:10

explain you each and everything now

7:43:12

first let's try to understand what is

7:43:14

this conversation buffer memory so uh

7:43:16

you can just think about uh this

7:43:18

conversation perform memory uh just like

7:43:20

a memory whatever conversation we are

7:43:22

going to do with respect to our model

7:43:24

right so is going to store all those

7:43:26

thing right it it is going to sustain

7:43:28

all those thing it's going to sustain

7:43:30

the entire memory throughout the

7:43:32

conversation that's it now here what I'm

7:43:34

going to do so here let me uh copy and

7:43:38

paste one more statement and let's see

7:43:41

uh what I have written over here so here

7:43:42

why we have I have written that uh we

7:43:45

can attach memory we can attach memory

7:43:47

to remember on the previous conversation

7:43:49

I just need to uh mention one parameter

7:43:52

the parameter name is what the parameter

7:43:54

name is a memory so I just need to

7:43:56

attach one parameter and we'll be able

7:43:58

to remember all the previous

7:44:00

conversation regarding this model now

7:44:02

how I can do it so here uh let me first

7:44:05

of all let me import this conversation

7:44:07

buffer memory from the lenon itself and

7:44:10

the uh and then I will show you the same

7:44:12

thing by uh from the documentation also

7:44:15

so each and everything I uh pick up from

7:44:17

the doc documentation itself and again I

7:44:19

will go through with the document again

7:44:22

I will go through the documentation and

7:44:24

I will show you the same thing over

7:44:25

there as well so just wait for few

7:44:27

minutes and each and everything uh each

7:44:29

and every part will be clear to all of

7:44:31

you now here uh you can see I'm going to

7:44:34

import this conversation buffer memory

7:44:36

now what I need to do here so this is

7:44:38

the class so I need to create a object

7:44:41

of this class so here I'm going to

7:44:42

create a object of this class and I'm

7:44:44

going to keep uh this object inside the

7:44:47

variable so I've created a variable by

7:44:49

name Memory so this is what this is my

7:44:52

uh like variable where I'm going to keep

7:44:54

a object of this conversation buffer

7:44:55

memory now let me run it so here is what

7:44:58

here is my memory now I just need to

7:45:01

mention this particular parameter inside

7:45:02

my chain that's it and my work will be

7:45:05

done let me show you how so here what

7:45:07

I'm going to do again I'm going to

7:45:09

create a prom template so here is what

7:45:11

here is my prom template as you can see

7:45:14

this is what this is my prom template

7:45:16

now here what I'm going to do here I'm

7:45:18

I'm going to create uh here I'm going to

7:45:19

write it down llm chain so let me write

7:45:22

it down this llm chain and the first

7:45:24

parameter which I need to mention over

7:45:26

here that's going to be a llm and my llm

7:45:29

is nothing it's a client itself so in

7:45:31

the client variable I'm going to keep my

7:45:33

llm so here you can write it down this

7:45:35

CLI c l i n t and here you need to

7:45:38

mention the prompt so here is what here

7:45:40

is my prompt and to this particular

7:45:42

parameter to this prompt parameter you

7:45:43

just need to pass uh this particular

7:45:45

value this prompt template name so once

7:45:48

you will pass this prom template name

7:45:50

and you will what you can do you can

7:45:51

create a object of this Ln chain and

7:45:54

then you can call chain do run getting

7:45:57

my point chain is nothing it's a

7:45:59

collection of

7:46:01

component getting my point yes or no in

7:46:04

a uh like uh in a sequence in a

7:46:06

particular chronology so here you can

7:46:09

see we have llm client prom template now

7:46:12

if I want to retain all the conversation

7:46:14

if I want to retain all the memory which

7:46:17

I'm able to retain in a chat GPT here

7:46:19

you can see so if I'm asking to my chat

7:46:21

GPT can you tell me who won the first

7:46:23

Cricket World Cup so it is answer like

7:46:25

it is generating answer now if I'm

7:46:27

asking to my chat GPD what will be 2 + 2

7:46:30

so here what will be 2 into 5 now again

7:46:33

I'm asking to my chat GPD that can you

7:46:35

tell me who was the camp of the winning

7:46:37

team I'm not giving any such information

7:46:40

in inside my prompt as you can see but

7:46:41

is still it is able to give me an answer

7:46:44

based on a previous conversation so if I

7:46:46

want to do a same thing with my API how

7:46:49

we can do it so that's a thing which I'm

7:46:51

explaining you now let me mention one

7:46:54

parameter over here that's going to be a

7:46:55

memory so m m o r by and here let me

7:46:59

mention me m o r by so once I will run

7:47:02

it so first of all let me uh uh keep all

7:47:05

the thing in a variable variable name is

7:47:07

going to be a chain so here Ive created

7:47:09

a object of this llm chain now here if I

7:47:12

will run so let me run something over

7:47:14

here chain do run so here I'm going to

7:47:17

ask that uh I'm going to ask regarding

7:47:19

the product so what be the good name for

7:47:21

the company that makes a product let's

7:47:23

say I'm asking about the wines so if I

7:47:26

will run it so it is giving me a name so

7:47:28

it is giving me a name it is generating

7:47:29

a name over here now again what I'm

7:47:32

going to do so again uh I'm going to ask

7:47:34

to my uh again I'm going to ask to my

7:47:37

model so here I'm asking to my model so

7:47:40

what would be the good name for the

7:47:42

company that makes let's say here I'm

7:47:43

saying camera so here I'm asking a c

7:47:47

like regarding a camera I just want a

7:47:48

name so it is saying that camera Lum

7:47:50

technology so it is giving me a name it

7:47:52

is suggesting me a name now uh here is

7:47:55

what here is my name now uh let me ask

7:47:58

to something else over here let's say uh

7:48:00

I want a company I want to create a

7:48:02

company so the company related to a

7:48:04

drone so I want a company name which

7:48:07

create a drones so here if I'm saying

7:48:09

that drones now here you can see is

7:48:11

giving me answer drone craft so here I

7:48:14

asked three question to my to my model

7:48:17

by by hitting the API I asked three

7:48:19

question to my model to my LF model now

7:48:22

uh let's see it is able to sustain the

7:48:24

memory or not so now if I will run this

7:48:26

chain. memory now you will be able to

7:48:29

find out yes it is able to retain all

7:48:31

the conversation whatever conversation

7:48:33

is happening because because of what

7:48:35

because of this conversation buffer

7:48:37

memory so whatever conversation we are

7:48:39

doing right whatever previous

7:48:41

conversation is there so each and every

7:48:43

conversation we are able to sustain but

7:48:45

previously we were not able to do it so

7:48:47

here it was was giving me none type here

7:48:49

it was not giving me anything but now

7:48:51

you can see we are able to sustain the

7:48:53

information and if I'm calling chain.

7:48:56

memory it is giving me the entire detail

7:48:58

over here now let's try to understand

7:49:00

let's let's try to like uh uh let's try

7:49:03

to understand a few more thing over here

7:49:04

now here if I will run this chain do

7:49:07

memory chain. memory and here if I will

7:49:11

call this chain do memory. buffer so now

7:49:14

you will find out that this is the

7:49:16

entire conversation now let me uh print

7:49:19

uh let me keep this thing uh in my print

7:49:21

method so I won't get this selection

7:49:23

over here instead of that I will get the

7:49:25

new line because slash and me is what SL

7:49:27

and me is nothing it's a new line now

7:49:29

over here you will find out the entire

7:49:31

conversation that whatever conversation

7:49:32

is happening between me and model so

7:49:35

here human is asking about wines so e is

7:49:37

giving me answer now human is asking

7:49:39

about the camera is giving me answer

7:49:41

human is asking about the drones it is

7:49:42

giving me answ so like this you can draw

7:49:45

uh you can create your prompt template

7:49:47

and you can ask to anything to your

7:49:49

model and you can sustain the entire

7:49:51

memory you can sustain or you can uh

7:49:53

keep the en entire conversation with you

7:49:56

getting my point guys yes or no are you

7:49:58

able to understand it is getting clear

7:50:00

so please do let me know if you are able

7:50:02

to understand this particular concept

7:50:04

I'm waiting for your reply in the chat

7:50:07

please do let me know guys please write

7:50:08

down the chat if you are getting it and

7:50:10

please hit the like button so yeah I

7:50:13

will get some sort of a

7:50:16

motivation I are you able to understand

7:50:18

the concept of the memory how to retain

7:50:20

see here actually we are going to uh

7:50:22

like retain the conversation and uh I

7:50:25

will explain you the further use so uh I

7:50:28

will I will explain you a few more

7:50:30

concept over here just just wait step by

7:50:32

step we'll try to understand each and

7:50:34

everything so don't be in a hurry and

7:50:37

try to understand the entire thing if

7:50:39

you have started something then

7:50:40

definitely I will end it okay so here

7:50:44

people are saying that it is clear and

7:50:46

you are able to they are able to

7:50:48

understand the concept of the memory

7:50:50

that how to sustain the conversation

7:50:52

whatever conversation we are doing all

7:50:55

the previous conversation now let's try

7:50:58

to understand few more thing over here

7:51:01

so uh yes we are able to uh maintain the

7:51:04

previous conversation by using this

7:51:06

conversation buffer memory we just

7:51:09

created a object and we are just going

7:51:11

to keep it over here in our chain that's

7:51:14

it now guys here let me show you one

7:51:16

more thing so here here what I'm going

7:51:18

to do so here uh I'm going to introduce

7:51:20

you with the New Concept that's going to

7:51:22

be a conversation chain now let's try to

7:51:24

understand what is this conversation

7:51:26

chain each and everything we'll try to

7:51:28

understand by using this conversation

7:51:29

chain so here uh I'm saying that here

7:51:33

I'm going to uh like write it down some

7:51:36

sort of a statement and the statement is

7:51:38

something like this so here uh let me

7:51:40

mark down it and let me show you so

7:51:42

conversation buffer memory goes growing

7:51:45

endlessly means uh whatever conversation

7:51:47

you are doing uh so you will be able to

7:51:49

sustain all the conversation by using

7:51:52

conversation buffer memory No Doubt with

7:51:55

that but just remember last five

7:51:57

conversation chain or if you want to

7:51:59

remember just last 10 to 20 conversation

7:52:01

chain in that case what I can

7:52:03

do what should I do over here so here L

7:52:07

chain has given you few more method now

7:52:09

let's try to understand regarding uh

7:52:11

let's try to understand those particular

7:52:13

method that what is the use of this

7:52:14

conversation chain and we have one more

7:52:17

me method now let me uh give you that

7:52:20

particular method also try to understand

7:52:22

about it so here is my second method see

7:52:24

each and everything I kept it somewhere

7:52:26

in my notepad I'm just going to copy and

7:52:27

paste so try to understand please

7:52:29

because I'm doing it uh because I want

7:52:31

to save my time and uh in a short uh

7:52:35

amount of time I want to deliver uh like

7:52:37

uh more and more thing so here you can

7:52:40

see uh there is one more concept that is

7:52:42

conversation buffer window memory so

7:52:45

there is two concept which we need to

7:52:47

understand now here first let's try to

7:52:49

understand this conversation chain that

7:52:50

what is the meaning of it so here uh

7:52:53

what I'm going to say that uh let me

7:52:55

keep it in a single line and if I uh if

7:53:00

just remember let's just remember 10 to

7:53:02

15 convers and that would be great now

7:53:05

what I can do here I can write down some

7:53:06

sort of a code regarding this

7:53:08

conversation chain so first of all guys

7:53:10

what I need to do here first of all I

7:53:12

need to import it so let me import this

7:53:15

conversation chain over here so from uh

7:53:18

the link chain itself from the link

7:53:19

chain do chains I am going to import

7:53:21

this conversation chain now let me run

7:53:24

it and yes we are able to do it now here

7:53:26

what I'm going to do I'm going to create

7:53:28

object of this conversation chain now if

7:53:31

you look into the if you look into the

7:53:33

object so here I'm going to keep a

7:53:35

couple of thing here I'm going to write

7:53:37

down a couple of things so here the

7:53:39

first thing see uh this is what this is

7:53:41

the object this is the object and inside

7:53:43

this object I'm going to mention few

7:53:45

parameter the parameter nothing here I'm

7:53:47

just is going to mention this model LM

7:53:49

model and here I mention open a I can

7:53:51

write it down the client directly or

7:53:52

else I can write it down like this open

7:53:54

a and here is my open a key and this is

7:53:56

the temperature you already know what is

7:53:58

the temperature in the previous session

7:54:00

in my uh day two actually I have uh

7:54:02

explained you the concept of the I have

7:54:04

explained the concept of this

7:54:06

temperature what is the meaning of the

7:54:07

temperature and the value you will find

7:54:09

out of this temperature between 0 to 2

7:54:11

if you are keeping it zero so you will

7:54:13

get a straightforward answer but you

7:54:14

have like increasing the value of this

7:54:17

temperature so it's going to be this

7:54:19

model is going to be a more creative it

7:54:20

will give you the creative answer so

7:54:22

here you can U maintain the temperature

7:54:25

of the answer whatever answer basically

7:54:27

you want whatever output basically you

7:54:29

want you can maintain a temperature you

7:54:31

can maintain the creativity of that

7:54:33

particular answer now here uh to this

7:54:36

particular method to this conversation

7:54:37

chain I'm just going to pass this llm

7:54:40

and here is what here is my object open

7:54:42

Ai and there's couple of parameter which

7:54:45

uh with that you are already familiar

7:54:47

now let me run it so let me create a

7:54:50

object of this conversation chain so

7:54:53

here I created object of this

7:54:54

conversation chain and the uh object

7:54:57

name is what the object name is convo

7:54:59

now I just need to run something over

7:55:01

here so uh here what basically what I'm

7:55:03

going to do here I'm going to write down

7:55:05

convo convo do prompt so here if I will

7:55:09

write convo do prompt so you will find

7:55:10

out that this is nothing it is giving me

7:55:12

a prompt template so here we have a

7:55:14

input variable which is history and

7:55:16

input template so it is a there is a

7:55:18

template the following is a friendly

7:55:20

conversation between a human and AI the

7:55:22

AI is a tative uh provides lots of a

7:55:25

specific detail from its context if AI

7:55:28

does not know the answer to the question

7:55:29

it truthfully say it does not know so

7:55:32

here uh they have written by one by

7:55:34

default message one by default prompt

7:55:36

actually now let's try to see uh

7:55:38

something else over here so here I'm

7:55:39

going to write down con. prom. templates

7:55:43

now uh let me extract this template and

7:55:46

here you will see that uh here basically

7:55:49

we have a template the same message

7:55:50

which I was trying to read from there

7:55:52

from here itself so now you can see the

7:55:55

same message over here now if you will

7:55:57

write it on the print so here you will

7:55:59

get the clear cut message uh without the

7:56:01

selection and all so just write down

7:56:03

inside the print so this is the uh thing

7:56:06

uh this is the message basically which

7:56:07

I'm getting it's a by default message uh

7:56:09

which I'm getting if I'm calling this

7:56:10

con. prompt so here in the template it's

7:56:13

a by default message now uh now let's

7:56:16

try to understand that what is the use

7:56:18

of this uh convo what is the use of this

7:56:20

particular object now here what I'm

7:56:22

going to do here I'm going to ask the

7:56:24

same question to my chat GPD uh to my

7:56:26

GPD model now here I'm saying that convo

7:56:30

convo do run and here I'm asking to my

7:56:34

uh model uh who won the first Cricket

7:56:41

World Cup who won the first Cricket

7:56:43

World Cup who won the first Cricket

7:56:46

World Cup this is the question now if

7:56:48

I'm going to run it so here you will

7:56:49

find out it is giving me answer that the

7:56:51

first Cricket World Cup won by the

7:56:53

Western be in 1975 they beat Australia

7:56:56

by 179 in the final so this is the

7:56:59

information which I'm getting from the

7:57:00

from my model now here what I'm going to

7:57:02

do here I'm going to run uh convo convo

7:57:06

do run now here I'm asking to my model

7:57:09

that uh can you tell me can you tell me

7:57:13

uh can you tell me how

7:57:15

much will be 5 + 5 so it's a simple

7:57:19

question which I'm asking to my model

7:57:21

now let's see the answer the answer is

7:57:23

10 now let's try to ask one more

7:57:25

question over here so let's try to ask

7:57:27

one more question to my uh model so here

7:57:30

what I'm going to do here I'm asking con

7:57:33

can you tell me how much will be 5 * 5

7:57:37

so that's a question or let me keep

7:57:39

something else over here let's say 5 + 1

7:57:42

and here and this is the expression this

7:57:44

is the mathematical explation which I'm

7:57:46

passing now let's see what will be the

7:57:47

answer so it is able to answer me that

7:57:49

the answer is 30 now let's try to ask uh

7:57:53

uh the question to my model that uh who

7:57:56

was the captain of the winning team the

7:57:59

same question which I was asking to my

7:58:01

chat GPT and it was able to answer now

7:58:03

let's see uh will it be able to answer

7:58:06

the same question or not over here if

7:58:08

I'm hitting my API let's see now so here

7:58:11

what I'm going to do so here I'm going

7:58:13

to uh copy it conversion uh convo do run

7:58:17

and I'm going to ask the question the

7:58:18

question is nothing the question is uh

7:58:20

very simple so who was the captain who

7:58:25

was the captain of the

7:58:29

winning team so I didn't give any sort

7:58:32

of information what winning team which

7:58:34

winning team I just like going I'm just

7:58:36

going to follow the conversation now if

7:58:38

I will hit the enter so here you will

7:58:40

find out it is able to give me a reply

7:58:43

the captain of the winning team in the

7:58:45

first Cricket World Cup was the live lck

7:58:48

so it is able to sustain it is able to

7:58:50

sustain the conversation now how we can

7:58:54

do it by using this conversation chain

7:58:56

so first we have understood that if you

7:58:58

want to get the if you if you want to

7:59:00

get all the previous conversation so you

7:59:03

can get it you just need to mention the

7:59:05

memory parameter over here if you're not

7:59:07

going to do it so in that case it will

7:59:09

give you the none but if you're going to

7:59:11

mention it conversation buffer memory so

7:59:13

it will be able to retain all the

7:59:15

previous conversation

7:59:18

now here we are talking about this

7:59:19

conversation chain so by using this

7:59:22

conversation chain I will be able to

7:59:24

retain the I will be able to retain the

7:59:27

tell me I will be able to retain the

7:59:29

memory and uh yes uh like you can ask

7:59:32

anything let's try to uh again check

7:59:34

with a different uh like uh let's try to

7:59:37

check again with a different prompt so

7:59:39

here I'm uh saying to my model

7:59:42

so can you divide can you divide

7:59:47

those uh can you

7:59:49

divide uh the

7:59:51

number numbers and can you give me

7:59:55

answer can you give me a final answer so

8:00:00

here I'm asking through my model that

8:00:01

can you divide the number whatever

8:00:03

number basically is using before

8:00:06

actually it is using so can you divide

8:00:08

those particular number and can you give

8:00:10

me the final answer now let's see what

8:00:12

what I will be getting over here so it

8:00:13

is giving me the five okay so it is

8:00:15

giving me a five uh which uh number is

8:00:18

going to divide I uh so the answer is

8:00:22

five which number it is going to divide

8:00:25

I think uh 5 is six 5 / by uh five if it

8:00:32

is saying like that maybe is going to

8:00:34

divide this uh 30 by six so that's why

8:00:38

I'm getting this five but yeah it is

8:00:39

able to retain the memory it is able to

8:00:42

retain the memory and it is working so

8:00:44

uh I think uh you got to know that how

8:00:47

to uh get all the previous conversation

8:00:50

that is the first thing and how to

8:00:51

retain the memory if you are using the

8:00:53

API now guys see we have one more method

8:00:56

over here the method name is what

8:00:58

conversation buffer window memory now

8:01:01

what's the meaning of that first of all

8:01:03

let me show you first of all let me

8:01:04

write it on the code actually and then I

8:01:06

will explain you the meaning of this

8:01:08

conversation buffer window memory so uh

8:01:11

tell me guys still here everything is

8:01:13

fine everything is clear that whatever

8:01:15

thing my chat GPD is doing I able ble to

8:01:16

do the same thing by using this Len

8:01:18

chain this Len chain is too much

8:01:20

powerful if you if I'm using my API so

8:01:24

in that case how I can sustain the

8:01:26

conversation how I can remember all

8:01:28

those thing so here is a way you just

8:01:31

need to import the classes and all in a

8:01:33

back end already the code has been

8:01:35

written by someone you just you are just

8:01:37

going to use it and uh definitely you

8:01:40

can uh create a application in that you

8:01:42

can use the same concept got it so if

8:01:45

this part is getting clear then and

8:01:46

please do let me know in the

8:01:53

chat no buffer this is a different

8:01:55

object now we are just going to remember

8:01:58

all the previous conversation here see

8:02:00

we are able to retain the previous

8:02:02

conversation this one is giving me all

8:02:04

the conversation but here actually by

8:02:06

using this conversation chain what I'm

8:02:08

doing tell me so here by using this one

8:02:11

I'm able to do like same this chat

8:02:15

GPT okay okay so where we are able to

8:02:17

retain the uh like where we are able to

8:02:20

retain the memory so here I was asking

8:02:23

this thing to my CH to my model to my

8:02:25

API and then I I written this particular

8:02:28

um like me I I written this particular

8:02:30

prompt and then again I asked this

8:02:32

question related to this one and it is

8:02:34

able to give me

8:02:35

answer so that's a difference try to

8:02:38

understand try to observe it here

8:02:40

conversation buffer memory this a

8:02:41

different method by sustaining the

8:02:43

conversation here you can see and

8:02:45

conversation chain is doing a same

8:02:47

Behavior Uh like which we are able to

8:02:49

achieve in a chat GPT so somewhere in a

8:02:52

in the chat GPT application also they

8:02:54

implemented the same concept for

8:02:55

sustaining the memory that's why it is

8:02:57

able to do it we don't know uh uh What

8:03:01

uh what type of code they have written a

8:03:03

backend if you want to check you can

8:03:04

check it you can go through with the Len

8:03:06

chain so here uh you can search a len

8:03:08

chain l a n

8:03:11

g and uh just check with the Lenin

8:03:14

GitHub so here you will get the source

8:03:16

code code of the Lang chain and now you

8:03:18

can uh check that what code they have

8:03:20

written regarding a different different

8:03:21

thing so here go inside the cookbook and

8:03:24

there is like all the code regarding a

8:03:26

different different thing and just try

8:03:28

to read the lowlevel code that what

8:03:32

all what Logics and all they are going

8:03:34

to uh they have written over here

8:03:36

actually so you just need to go through

8:03:38

with the Len and uh GitHub and there

8:03:41

you'll find out all the codes and

8:03:44

all tell me guys now this part is

8:03:46

getting clear to all of you please or do

8:03:49

let me know in the chat if the part is

8:03:51

getting if this part is if this part is

8:03:53

getting clear or not this uh

8:03:55

conversation chain and this uh

8:03:57

conversation buffer memory now let's try

8:03:59

to understand this conversation buffer

8:04:00

window memory but that what is a meaning

8:04:02

of it and then again I will uh I will

8:04:06

try to revise it and I will uh I will be

8:04:08

showing you the same thing by using the

8:04:10

uh documentation so all the thing uh

8:04:12

they have mentioned over there already

8:04:14

uh each and every theoretical is stuff

8:04:16

then uh I will try to explain you that

8:04:19

uh from there itself now here we are

8:04:21

talking about this conversation buffer

8:04:23

window memory then what is a use of this

8:04:25

particular method now let's try to

8:04:27

understand it so here the first thing

8:04:29

which I have to do so first of all I

8:04:31

have to create a object of it now uh

8:04:34

here let me create a object so I'm going

8:04:36

to import it conversation buffer window

8:04:39

memory now if I'm going to run it so yes

8:04:41

I'm able to run it and I'm able to uh

8:04:44

I'm able to like import this particular

8:04:46

statement so here I'm going to create a

8:04:48

object of it so this is what this is my

8:04:50

like object and here I'm going to write

8:04:53

down my object name is nothing it's a

8:04:54

memory now inside this uh uh like object

8:04:59

actually uh there is one parameter so

8:05:01

let me write it on the parameter name so

8:05:03

the parameter name will be a key right

8:05:06

which I represent with which they

8:05:07

represent with K so here I I'm going to

8:05:10

pass one parameter the parameter name is

8:05:12

what the parameter name is K now here I

8:05:14

can pass any sort of a value regarding

8:05:17

this K 1 2 3 4 5 6 7 8 9 10 11 12

8:05:20

whatever now what is the meaning of that

8:05:22

so first of all let me write down that

8:05:24

and let me run it in front of you and

8:05:26

then I will try to explain you this

8:05:28

thing so here I'm going to write it down

8:05:29

K is equal to 1 now here I created a

8:05:32

object so here I've created a memory now

8:05:35

what I'm going to do I'm going to create

8:05:37

a conversation chain again so the

8:05:38

conversation chain which I uh uh which I

8:05:42

imported over here now let me paste it

8:05:44

over here this conversation chain

8:05:46

conversation chain and now what I need

8:05:48

to do I I'm just going to be mention one

8:05:50

parameter over here so I'm going to

8:05:52

mention memory parameter inside this

8:05:54

conversation chain see this is my main U

8:05:57

this is my main class this conversation

8:05:58

chain which I'm using over here though

8:06:01

uh along with that you'll find out two

8:06:03

more so conversation buffer window

8:06:05

memory and conversation uh conversation

8:06:07

buffer memory so buffer window memory

8:06:10

what is the meaning of that after this

8:06:13

uh particular example you will get to

8:06:15

know by yourself on only so here I'm

8:06:17

going to keep it and let me uh write it

8:06:21

on this memory over here and here what

8:06:23

I'm going to do here I'm going to create

8:06:24

a object so convo object so this is what

8:06:27

this is my convo object now uh what I'm

8:06:29

going to do I'm going to run it so here

8:06:31

I'm going to run the same thing so now

8:06:34

let me uh copy it and let me paste it

8:06:37

over here so let me paste it over here

8:06:40

uh this particular thing uh this

8:06:42

particular sentence and here let's see

8:06:45

what will be the answer so here if I'm

8:06:46

going to run it so you can see that it

8:06:48

is saying that the first Cricket World

8:06:50

Cup uh was held in 1975 and it w won by

8:06:53

the wested that is perfectly fine now

8:06:56

again I'm going to ask to my model that

8:06:58

convo. run convo do run and here I'm

8:07:02

asking that what will be 5 + 5 now it is

8:07:05

saying that 5 + 5 will be 10 now I'm

8:07:07

asking to my uh now I'm asking to my

8:07:10

model that who was the captain of the

8:07:12

winning team so if I'm uh giving this

8:07:15

particular code question now let's see

8:07:17

what will be the answer so it is saying

8:07:19

that I sorry I don't know I'm sorry I

8:07:22

don't know because see uh if I didn't

8:07:24

mention anything it is able to uh by

8:07:28

default actually see there is a uh

8:07:29

memory parameter see in a you can create

8:07:32

this conversation buffer memory and if

8:07:34

you are going to create a chain now if

8:07:36

you're going to create a chain now there

8:07:37

you can mention this memory and you can

8:07:39

track the entire conversation that is

8:07:43

perfectly fine now here uh if I want a

8:07:46

same behavior like this chat GPT for

8:07:48

that there is a main method conversation

8:07:50

chain there's a main method so here

8:07:53

conver here I created a object of the

8:07:54

conversation chain and here is what here

8:07:57

I'm going to call this run method now

8:07:59

you can see it is able to sustain the

8:08:01

memory it is able to sustain the memory

8:08:04

now here you will find out one more

8:08:06

thing uh like one more class

8:08:08

conversation buffer window memory now

8:08:10

here Ive created a object of this

8:08:12

conversation buffer buffer window memory

8:08:14

and I passed the key value key equal to

8:08:16

1 so key equal to 1 means what is the

8:08:18

meaning of this key equal to 1 so it is

8:08:21

just able to sustain or it is just able

8:08:24

to remember all the thing uh like till

8:08:27

the one prompt till the first prompt

8:08:29

only after that it won't be able to

8:08:32

remember anything if I'm writing over

8:08:34

here K is equal to 4 now in that case

8:08:37

just see the effect so here if I'm going

8:08:39

to create K is equal to 4 so see uh

8:08:41

convo is there now I'm going to run it

8:08:43

okay great now I'm going to ask to my

8:08:45

model okay

8:08:46

now see see now it is giving me answer

8:08:49

so I can Define the window size I can

8:08:51

Define the number of prompt here if I'm

8:08:53

saying uh K is equal to 2 so now let's

8:08:57

see what it is giving to me so here I'm

8:08:59

saying K is equal to 2 that's great this

8:09:01

one is fine this one is fine now it is

8:09:03

saying the first Cricket World Cup was

8:09:05

held in 1975 now it will stop over here

8:09:09

now if I'm going to ask to my uh like

8:09:11

this one so here it is giving me answer

8:09:13

because now I'm going to sustain this

8:09:15

both both conversation see K is equal to

8:09:18

1 means what let me tell you that K is

8:09:21

equal to 1 means what see k equal to 1

8:09:24

means what this one only the first one k

8:09:27

is equal to 2 means what this both this

8:09:29

both K is equal to 2 so if I'm writing

8:09:31

over here K is equal to 2 so it is going

8:09:33

through with this particular sentence

8:09:34

and it's going through with this

8:09:35

particular sentence and if it is seeing

8:09:37

this sentence now so it is able to

8:09:38

remember it is able to see this one now

8:09:40

this one and this one so in that case it

8:09:43

a it is able to generate answer but if I

8:09:45

mention k equ Al to one so after this

8:09:47

one is not able to remember anything

8:09:49

that's the last one okay so I can select

8:09:52

the window size over here you can select

8:09:54

the window size if you're not going to

8:09:56

select it will be tracking the entire

8:09:58

conversation by default it will be

8:10:00

tracking the entire conversation now

8:10:02

let's try to see the same thing by using

8:10:04

uh like on top of the documentation also

8:10:07

so they have mentioned the same thing so

8:10:09

let me open the Len chain documentation

8:10:11

l n Len chain documentation and over

8:10:16

here uh let me open it first of all so

8:10:19

Lin memory where you will find out go

8:10:22

inside more and here is a memory so

8:10:24

let's try to understand uh about the

8:10:26

memory that uh what all typee of

8:10:29

memories we have and what all thing

8:10:33

basically they have written over here

8:10:34

let's try to understand that thing so

8:10:36

most llm application have a

8:10:38

conversational interface so an essential

8:10:40

component of the conversation is begin a

8:10:42

it's conversation uh is being able to

8:10:45

refer to information introduced earlier

8:10:47

in the conversation means uh whatever

8:10:49

conversation we are making so it should

8:10:50

be like uh like it should have a

8:10:52

connectivity in between so at bare

8:10:54

minimum a conversational system should

8:10:56

be able to access some window of past

8:10:58

message directly so a comp more complex

8:11:01

system will need to have a world model

8:11:03

that is constantly updating which allow

8:11:05

us to do thing like Mentor information

8:11:07

about the entities and their

8:11:09

relationship so here they have given you

8:11:11

the complete detail now building memory

8:11:13

into a system how how state is stored

8:11:15

how state is queried so there are like

8:11:18

some sort of a theory they have given

8:11:20

over here now here they have given that

8:11:23

this get is started so let's try to read

8:11:24

it from here so let's look at what

8:11:27

memory actually looks like in L chain

8:11:29

here we will cover the basics of

8:11:30

interacting with the arbit memory class

8:11:32

so here the same memory class uh which

8:11:35

we were using so here I have created a

8:11:37

like object of the memory class now here

8:11:39

I'm asking so memory. chat. memory add

8:11:42

user and what is up so something like

8:11:45

that uh there calling basically this

8:11:46

particular method over here which is

8:11:49

there inside this conversational buffer

8:11:51

memory itself now what variable get

8:11:54

written from memory so here if you will

8:11:56

load the memory you are getting this

8:11:57

particular thing the same thing I was

8:11:59

able to get by calling this parameter

8:12:01

the parameter which I was calling chain.

8:12:03

memory actually I'm not directly using

8:12:05

this thing I'm not directly using a

8:12:07

method from this particular class from

8:12:09

this conversation buffer memory instead

8:12:11

of that what I'm doing instead of that

8:12:13

I've have created a object of this llm

8:12:16

chain and here I'm passing my all the

8:12:18

component I'm making a chain okay I'm

8:12:21

stacking all the component and then

8:12:23

basically I'm calling this chain. memory

8:12:26

and I'm getting here I'm getting this

8:12:27

particular output and the same output

8:12:30

you can see over here as well you you

8:12:32

you are getting the same output over

8:12:34

here as well right so yes I'm able to

8:12:36

get the same output by using that

8:12:38

particular parameter chain. memory.

8:12:40

buffer or chain. memory now here uh we

8:12:43

have other one also so like you can give

8:12:46

the key and all you can explore about it

8:12:48

now there are few more parameter like

8:12:50

return return message and all each and

8:12:51

everything you will find out over here

8:12:54

now end to an example so they have given

8:12:55

you the endend example over here so open

8:12:57

a prompt

8:12:58

template conversation buffer memory now

8:13:01

see I'm using the same thing I'm using a

8:13:03

same thing over here I'm using the llm

8:13:06

chain I'm I'm running the same example

8:13:08

in my jupyter notebook so you can go

8:13:10

through with the documentation and you

8:13:12

can copy from there also and you can

8:13:13

test it they have given you like a small

8:13:15

small code is snipp it just for the

8:13:17

testing just for the learning and

8:13:18

directly you can integrate this thing

8:13:20

inside your application got it now here

8:13:23

uh you can see using a chat model so one

8:13:26

more example they have given you and

8:13:28

then next step inside that you will find

8:13:30

out few more thing uh memory in llm

8:13:32

chain memory types okay now customized

8:13:35

conversation custom memory multi uh

8:13:37

multiple memory classes there are so

8:13:39

many thing you will find out so if

8:13:41

you'll go inside this memory type so

8:13:43

just just see uh with the memory types

8:13:45

and and then conversation buffer

8:13:47

conversation buffer the same thing um

8:13:49

the entire code you will find out then

8:13:51

conversation buffer window now let's see

8:13:53

what is the meaning of the conversation

8:13:54

buffer window so conversation buffer

8:13:57

window memory keep a list of interaction

8:13:59

of the conversation over the time it

8:14:01

only uses the K interaction the number

8:14:04

of interaction so this can be useful for

8:14:06

keeping a sliding window of of most

8:14:09

recent interaction so the buffer does

8:14:11

not go too large so if we are talking

8:14:14

about buffer so it is having a complete

8:14:18

uh like a complete uh conversation

8:14:21

whatever conversation we are doing but

8:14:22

if you want to keep it short so you can

8:14:25

mention the K over there so here I I was

8:14:27

doing that so here if I'm writing K is

8:14:29

equal to 1 so here if I'm writing K is

8:14:32

equal to 1 in that case is not able to

8:14:34

remember anything so simply it is saying

8:14:36

that I don't know about it it it it is

8:14:38

just going to stop over here itself so

8:14:40

this one and this one now uh if I'm

8:14:43

going to ask this uh particular thing so

8:14:45

it is saying I don't know about it

8:14:46

because after this one is not going to

8:14:48

track anything K is equal to 1 means

8:14:50

what just one sentence means it is not

8:14:53

going to remember anything uh over here

8:14:55

now if I'm going to write it down over K

8:14:57

is equal to 2 in that case it will be

8:14:59

able to sustain something right by using

8:15:01

this two particular prompt and if I'm

8:15:02

going to ask something after this one so

8:15:04

it is saying that yes now it is knowing

8:15:08

okay now it knows about it so here uh if

8:15:11

you're not mentioning any sort of a

8:15:12

window is is going to keep a track for

8:15:15

the ENT entire conversation but if you

8:15:17

are going to mention a window parameter

8:15:19

over here in that case it will be

8:15:21

restricted each and everything they have

8:15:23

mention inside the documentation itself

8:15:25

try to read it from here got it now how

8:15:28

to use a chain means how to like uh uh

8:15:31

like how to uh sustain a memory and all

8:15:34

means if you're going to make any sort

8:15:35

of a conversation and all so this

8:15:37

conversation buffer memory conversation

8:15:39

buffer window memory is just for sustain

8:15:41

the the memory basically the

8:15:43

conversation but actual conversation how

8:15:45

you make the actual conversation which

8:15:47

we are doing over here actually here so

8:15:50

by using this particular class

8:15:51

conversation chain class this is the

8:15:53

main class and this two class for

8:15:56

sustaining a conversation this is for

8:15:57

the entire conversation and this is just

8:15:59

for the limited window means a

8:16:02

customized window whatever number you

8:16:04

are going to write it down till that

8:16:06

particular window now it is clear what

8:16:09

is a memory yes or no please do let me

8:16:11

know in the chat if uh this part is

8:16:13

getting clear to all of you

8:16:19

are you able to get it guys uh are you

8:16:21

able to understand the concept of the

8:16:22

memory how to do that how to make a

8:16:25

conversation how to import the different

8:16:27

different import statement how to like

8:16:30

uh how to go through the

8:16:32

documentation yes or no please do let me

8:16:35

know in the chat if you're getting it

8:16:37

I'm waiting for your

8:16:44

reply

8:16:59

clear clear clear great

8:17:03

uh if you have any doubt you can ask me

8:17:05

in the chat and then I will start with

8:17:08

the next

8:17:13

concept what is the limit of of memory

8:17:15

Li limit you can Define now you can def

8:17:17

Define the limit according to your

8:17:19

problem

8:17:20

statement you don't want to be create uh

8:17:22

to Long buffer so in that case you can

8:17:25

uh you can uh like uh mention this K

8:17:28

parameter it's up to you it's up like uh

8:17:31

up to your requirement up like how much

8:17:34

what uh how much uh like your

8:17:36

configuration and all what all resources

8:17:38

you are using according to that you can

8:17:44

decide where the memory concept used in

8:17:46

a real uh life exam application

8:17:49

so here what I explained tell me so it

8:17:54

is not a real time explain this chat

8:17:56

GPT so this chat GPT is a real time

8:17:59

application now that that that's why

8:18:01

first I have explained this one only so

8:18:04

let's say if you are making a

8:18:05

conversation to the

8:18:07

chatbot if you're making a conversation

8:18:09

to the chatbot and if you ask to the

8:18:10

chatbot let's say you visited a website

8:18:12

any website and let's say I your own

8:18:14

website side there you are asking uh

8:18:17

let's say we have a chatboard on in own

8:18:18

website you are asking to the chatboard

8:18:20

okay what is the price of this

8:18:21

particular course then U like let's say

8:18:24

you are getting some sort of a prize and

8:18:26

then you are asking something else who

8:18:27

was a mentor and all now again you are

8:18:29

asking a question related to that course

8:18:31

itself that what all thing you covered

8:18:32

in this course now it is saying that

8:18:34

which course I don't know about any

8:18:38

course even though you mention the name

8:18:40

over there gener course but it is saying

8:18:41

no I don't know about it because is not

8:18:43

able to S it is not sustaining the

8:18:46

conversation the conversation is not in

8:18:48

buffer so like there it can go and it

8:18:51

can like read each and everything the

8:18:53

model actually it is not able to sustain

8:18:55

the context is able to sustain a context

8:18:57

in terms of the a sentence but not in

8:18:59

terms of the

8:19:01

conversation so that's a real time

8:19:03

example so that's why I have explained

8:19:06

you this chat GPT at the first place and

8:19:08

then I back to this uh I uh went to this

8:19:12

uh like python implementation by us

8:19:15

using like if we are implementing the

8:19:17

same thing like by using the API by

8:19:19

using the openi how we can achieve this

8:19:21

particular thing how we can achieve the

8:19:23

memory and all how we can sustain the

8:19:24

memory so it's all about that only

8:19:28

please try to run it by yourself please

8:19:30

revise it you will be getting and one

8:19:32

more thing uh before implementing with

8:19:35

uh before implementing any sort of a

8:19:37

concept from the Lan chain try to go

8:19:39

through with the documentation theyve

8:19:40

given you each and everything along with

8:19:42

the theory so first read the theory and

8:19:45

read the uh like uh code snipp it and

8:19:48

all whatever they have given you and

8:19:49

then you can uh run it inside your

8:19:52

system and then uh basically you can run

8:19:54

my file as well whatever like code and

8:19:56

all I'm writing it don't worry I give

8:19:58

you I will give you the each and

8:20:00

everything in a resource section so from

8:20:02

there itself you can download

8:20:04

it okay so if this thing is clear do

8:20:07

please do let me know because I'm going

8:20:09

to start with a new thing uh with a new

8:20:11

topic and now let me create a new

8:20:13

notebook over here

8:20:16

I think this Lang chain is clear in the

8:20:17

Lang chain I have explained you five to

8:20:20

six concept which is going to be a very

8:20:22

much important once uh we'll start with

8:20:24

the project you will get to know the

8:20:26

importance of this thing this topic and

8:20:29

inside this particular top inside this

8:20:31

particular notebook I have kept

8:20:33

everything related to this open API and

8:20:35

this L chain so here let me rename it so

8:20:38

test open AI

8:20:40

API test open AI API and Link Chain so

8:20:44

everything you will find out regarding

8:20:46

this openi API and Lenin inside this

8:20:49

particular notebook guys you just need

8:20:51

to visit this notebook everything I have

8:20:54

written over here along with the code so

8:20:56

let's start with a new topic and the new

8:20:58

topic is going to be a uh hugging face

8:21:01

hugging face with Len chain uh hugging

8:21:05

face with Len

8:21:12

chain hugging face face is

8:21:17

fce so can we start now have you open

8:21:20

the new

8:21:26

notebook yes correct aishu uh your

8:21:29

understanding is

8:21:32

correct tell me guys uh have you opened

8:21:35

the new jer notebook so uh I can start

8:21:38

with the thing I can start with a new

8:21:39

topic hugging Faith with Lin and after

8:21:41

this one after explaining you this thing

8:21:44

I will move to the uh like I will move

8:21:46

to the project I will I start with the

8:21:48

project from Monday onwards and first I

8:21:50

will explain you the use case and then I

8:21:53

will code in front of you only first I

8:21:56

will explain the use case and the

8:21:57

project setup and all and then we'll

8:21:59

start with the implementation of that so

8:22:02

let's start with the hugging phase with

8:22:04

lench it's going to be a new thing new

8:22:07

concept so let's understand uh this uh

8:22:10

particular thing so first of all guys

8:22:12

what you need to do so first of all you

8:22:14

need to log into the hugging face

8:22:16

hugging face Hub so just search in your

8:22:18

Google hugging face and you will get a

8:22:21

very first website this is the website

8:22:24

of the hugging phas sdps do hugging U

8:22:27

hugging face.com so uh try to visit to

8:22:30

this particular website and uh if you

8:22:33

didn't uh sign up so first do the sign

8:22:35

up and then sign in and after that you

8:22:39

will be able to create your profile so

8:22:41

first you need to do sign up and then do

8:22:43

the sign in so automatically you will

8:22:45

get your profile and this is what this

8:22:46

is my profile I already did a sign up so

8:22:49

no need to do anything you can do the

8:22:51

sign up by using the Google s well by

8:22:53

using your Gmail ID as well so just try

8:22:55

to sign up first and try to like create

8:22:57

your profile and then sign in

8:22:59

automatically you'll find out your

8:23:01

profile over here so after getting your

8:23:04

profile guys see uh here they have uh

8:23:06

see this is the uh like uh homepage now

8:23:09

just click on this model so once you

8:23:11

will click on the model actually you

8:23:12

will find out so here it is saying no re

8:23:15

uh activity display here we have a data

8:23:17

set spaces papers papers collection

8:23:19

Community there are so many thing right

8:23:21

so if I'm following something so it will

8:23:23

be visible over here now just click over

8:23:25

here this one this model so what I can

8:23:28

do I can click on this model so I will

8:23:30

be getting all the model these are these

8:23:31

are the model basically so just click on

8:23:33

this all so here basically you will find

8:23:35

out all the model and here actually it

8:23:37

is showing you the trending model what

8:23:39

trending model is there over here now uh

8:23:42

directly you can search about this model

8:23:44

so what you can do I'm not able to open

8:23:47

let me check with this models yes guys

8:23:49

so over here you can see these are these

8:23:50

all are the model which is there over

8:23:52

the hugging phase now you can uh short

8:23:55

it uh which is a trending one which is a

8:23:57

most download one which is a recently

8:23:59

one recently updated most uh liked llm

8:24:03

so there you will find out like all the

8:24:05

llms and all now let's check with the

8:24:07

most like so here I'm going to short all

8:24:10

the model with this most like okay so

8:24:13

stable diffusion is is a model which is

8:24:15

the most liked one now you will find out

8:24:17

Bloom is there uh okay so here orange

8:24:20

mix is there a control net is there open

8:24:23

journey is there chat glm is there star

8:24:25

coder so there are so many model even

8:24:28

Lama 2 is also there this one Dolly V2

8:24:31

it's a model from the uh data brakes

8:24:33

this llama 2 it's a model of the meta

8:24:36

it's a model from The Meta now stable

8:24:39

diffusion is also there stability AI

8:24:41

there's the organization name stability

8:24:43

Ai and here you will find the table

8:24:44

diffusion and here you can see the

8:24:46

number of downloads as well so there you

8:24:48

will find out the number of download now

8:24:50

see llama this llama 2 how many times it

8:24:54

has been downloaded

8:24:56

947k around 1 million now here you will

8:24:59

find out gpt2 gpt2 is also there it has

8:25:02

been downloaded 17 million times 170

8:25:05

million download is there okay so okay I

8:25:08

think it's not a download it may be a

8:25:10

size

8:25:11

uh let me check with the download so

8:25:14

most

8:25:16

downloaded so here now I'm going to

8:25:19

check with the most downloaded I think

8:25:21

it's a download only it's not a size

8:25:23

actually so 73.3 million and distal GPD

8:25:27

is also there robot is there there are

8:25:29

so many model you will find out and you

8:25:32

can see the number 4 lakh 27,000 so if

8:25:35

you are talking about the open API so

8:25:38

you are restricted with the open API let

8:25:40

me show you that what all model is there

8:25:42

so if you search over the open a so just

8:25:45

open the opena website and check with

8:25:47

the models just do the login First and

8:25:50

try to uh like click on this API and go

8:25:53

inside this model now here you will find

8:25:56

out all the model this all the model has

8:25:58

been developed by the openi itself and

8:26:01

you will find out a different different

8:26:02

variants of this model like this chat

8:26:04

GPT there are so many variant of this

8:26:07

Chad GPT but if we are talking about

8:26:09

this hugging face Hub so it's a open

8:26:11

source repository anyone can contribute

8:26:14

over over here so whoever has created

8:26:16

their llm so they have uploaded to this

8:26:18

hugging face Hub now you can see the

8:26:20

number of model you can see the

8:26:22

different different uh like a task over

8:26:24

here that what you want to do feature

8:26:26

extraction text to image or text to text

8:26:29

image to video text to video whatever

8:26:31

you want to do you will find it find it

8:26:33

out over here let's say what I want to

8:26:35

do let's say I want to perform text to

8:26:36

text generation so if I will click on

8:26:38

this one so you will find out so you

8:26:41

will find out all the model from text to

8:26:43

text generation you can perform text to

8:26:46

text Generation by using this particular

8:26:48

model let's say you want to perform a

8:26:50

conversation so for the conversation

8:26:52

basically there is a different model

8:26:54

dialog GPD is there and go is there and

8:26:57

you will find out other model as well so

8:27:00

from a different different organization

8:27:02

you you can go through with it and you

8:27:04

can check got it yes or no so this part

8:27:07

is getting clear to all of you you can

8:27:09

check with the training you can check

8:27:10

with the training and you will find out

8:27:12

like which is a trending one now let's

8:27:14

say I want to do a text to text

8:27:15

generation so here I'm going to use this

8:27:17

particular model FL T5 base so I'm going

8:27:20

to use this particular model now how I

8:27:22

can do that what will be the procedure

8:27:24

if I want to use this open source model

8:27:27

without any charges so here I'm not

8:27:29

going to pay anything as of now for this

8:27:31

particular model so how I can use it how

8:27:34

I can like uh perform text to text

8:27:36

Generation by using this particular

8:27:37

model now let me tell you that so first

8:27:40

of all what you need to do so just click

8:27:41

on your profile and here click on the

8:27:44

setting so once you will click on the

8:27:46

like this setting so here you will find

8:27:48

out the token access token so click on

8:27:51

this access token so already I have

8:27:53

created a token over here so you can

8:27:55

click on the new token you can click on

8:27:58

the the create token and you will be

8:28:00

able to create a new token over here now

8:28:02

this is going to be a API key this is

8:28:05

going to be a token you can delete it

8:28:07

you can recreate it whatever you want

8:28:09

you can do it and here uh you will find

8:28:11

out access token probability

8:28:13

authenticated your identity to the

8:28:15

hugging face Hub allowing application to

8:28:17

perform specific acction specify the

8:28:19

spoke of permission read write and admit

8:28:21

so here you can visit the documentation

8:28:23

and you can read more about it so first

8:28:25

of all guys you need to sign up and then

8:28:27

you need to log in and after that you

8:28:29

will be able to create your profile and

8:28:31

then you can go inside your profile and

8:28:33

go inside the setting and there you will

8:28:35

find out the token this access token

8:28:38

this particular option and try to create

8:28:40

the new token after creating a new token

8:28:42

what you need to do you just need to

8:28:44

copy this token and uh I will tell you

8:28:47

step by step what you need to do so from

8:28:49

scratch only I'll be writing all the

8:28:50

code so first of all see before starting

8:28:53

with the hugging face you need to

8:28:55

install some Library some other

8:28:57

libraries as well so let me give you the

8:28:59

name of all those Library I I like kept

8:29:02

it somewhere I'm just going to copy and

8:29:03

paste all the thing now here are the

8:29:06

first thing first Library which I'm

8:29:07

going to be install that's going to be

8:29:09

hugging face Hub the second one is a

8:29:11

Transformer and the third one is

8:29:13

accelerate and bit sendy bytes so here

8:29:16

this is to the this two is not a

8:29:18

mandatory one but yeah you need you can

8:29:20

install it because I was getting some

8:29:21

sort of a error and for that only I have

8:29:25

used this I have like installed this

8:29:27

libraries so if uh U like uh so yes

8:29:31

please uh like download uh this thing

8:29:34

this particular uh like packages

8:29:36

accelerate and bit sendy by so you won't

8:29:38

get any sort of error throughout this

8:29:40

implementation but this two is a

8:29:42

mandatory one the first one is a hugging

8:29:44

ph up and the second one is a

8:29:45

Transformer so you cannot SK skip this

8:29:47

two thing and L chain should be there

8:29:50

inside your virtual environment because

8:29:52

this hugging phase actually we are going

8:29:53

to access by using the Len chain only by

8:29:56

using the Len chain only we are going to

8:29:58

access the this hugging phase so I

8:30:00

already did it I already installed it

8:30:02

you just need to run it and uh if I

8:30:05

already installed then it will uh it

8:30:07

will give me the message that

8:30:09

requirement is already satisfied so here

8:30:11

you can see it is giving me that

8:30:13

requirement is already already satisfi

8:30:15

got it now guys what is the next thing

8:30:17

which I need to do so step by step I

8:30:19

have written each and everything I'm

8:30:21

going to write it down over here as well

8:30:23

so the step first what you need to do so

8:30:25

in the step first you need to uh

8:30:27

download all the required Library so let

8:30:30

me write it down over here the step

8:30:33

First Step first is

8:30:38

nothing

8:30:41

download all the required Library

8:30:45

now let me keep it over here and see we

8:30:47

are able to download now in the step two

8:30:49

what I'm going to do here in the step

8:30:51

two I'm going to import it so let me

8:30:53

import all the required Library so I

8:30:55

have written it over here let me import

8:30:58

it uh over here so this is the library

8:31:01

which I have imported so the first one

8:31:03

is H prompt template hugging phase from

8:31:05

the lenon itself of okay so I'm going to

8:31:08

import this hugging face Hub and here is

8:31:10

what here I'm having the llm chain I'm

8:31:12

using this hugging face with Len chain

8:31:15

I'm using this hugging phase with this L

8:31:16

chain try to remember this thing guys

8:31:19

okay so if you are implementing it by

8:31:20

yourself please try to remember that we

8:31:22

are using this hugging phase by using

8:31:24

this Len chain I told you this H Len

8:31:27

chain is a wrapper on a different

8:31:28

different API not even op open AI we can

8:31:31

access many API by using this Len chain

8:31:33

many open source model and all it has

8:31:35

been designed in such a way now here uh

8:31:38

I have imported this thing now what I

8:31:40

need to do guys so here I'm going to

8:31:43

write it down the Third thing so the

8:31:45

third one is what you need to uh like

8:31:47

set the environment variable so for

8:31:49

setting up the environment variable let

8:31:51

me tell you what is a step so here is a

8:31:54

like code basically which you need to

8:31:55

run so let me copy and paste each and

8:31:58

everything I have written uh somewhere

8:32:00

so I'm just going to copy and paste the

8:32:01

small small lines and all now you need

8:32:03

to uh you need to set the environment

8:32:05

variable and here first of all you need

8:32:07

to import this opening system so import

8:32:10

OS os. environment and here is what here

8:32:13

is your hugging phase API token and set

8:32:15

the environment variable set the

8:32:17

environment variable by using this

8:32:19

particular uh like a command now if I

8:32:22

will run it so here I'm able to set the

8:32:24

uh like hugging fish token okay this is

8:32:26

my variable name and this is my value

8:32:28

value of the variable now from where I

8:32:30

got this particular value so I got this

8:32:33

value from here itself from the token

8:32:35

itself so just try to click on this

8:32:37

access token and you will get this value

8:32:39

you will get the value of the token got

8:32:42

it yes or no now here guys just click on

8:32:44

this hugging face and here I seted this

8:32:46

token I set this token and this is the

8:32:48

variable and this is the value now what

8:32:51

is the fourth thing which I need to do

8:32:52

so here let me write it down uh this

8:32:54

particular thing so step by step I have

8:32:57

written each and everything now the next

8:32:59

thing which I'm going to do over here

8:33:00

I'm going to do text to text generation

8:33:03

I'm going to do text to text generation

8:33:04

I'm using sequence to sequence model

8:33:06

this Transformer is what it's a sequence

8:33:08

to sequence model now if we are talking

8:33:10

about the uh different different llm

8:33:12

actually as a base archit Ure it is

8:33:14

using the same Transformer architecture

8:33:16

right so either you can say sequence to

8:33:18

sequence model encoder decoder model

8:33:19

anything anything will be fine for the

8:33:21

Transformer also now I want to do a text

8:33:23

to text generation so I shown you over

8:33:25

here itself in the hugging face model so

8:33:28

let me show you where it is so once I

8:33:30

will click on this model and here let's

8:33:33

say text to text generation I want to do

8:33:34

text to text generation so this is a

8:33:36

model this a flan T5 base it's a model

8:33:40

from the Google side it's a Google model

8:33:42

flan T5 base you can read uh everything

8:33:45

about this uh T5 model for what this has

8:33:48

been trained what uh which data they

8:33:51

have used what is a model size 2848

8:33:53

million parameters is the it is having

8:33:56

like 248 million parameter and here the

8:33:58

number of here you can see the number of

8:34:00

downloads here you can see the table of

8:34:02

content each and everything basically

8:34:04

they have defined they have written over

8:34:06

here regarding this particular model and

8:34:08

this is a Google model and yes you can

8:34:12

uh check about it you can use use it

8:34:14

actually uh how to use it uh let me tell

8:34:16

you that but yeah you can check about it

8:34:18

uh just go through the hugging face Hub

8:34:20

hugging face model and click on this

8:34:22

model click on this text to Tex

8:34:24

generation and you here you will get

8:34:26

this FL T5 base now guys what I need to

8:34:29

do what will be the next thing so the

8:34:30

first of all I need to Define my prompt

8:34:33

and here what I'm going to do guys here

8:34:35

I'm going to Define my prompt so let me

8:34:37

copy The Prompt and here is what guys

8:34:39

here is my prompt this is what this is

8:34:41

my prompt now here I'm going to uh like

8:34:44

Define the chain so let me create a

8:34:46

chain over here now inside the chain

8:34:49

just just try to focus guys what I'm

8:34:51

going to do over here so here guys let

8:34:53

me remove this max length I'm not going

8:34:55

to write it down as of now so initially

8:34:58

like uh not initially in my previous

8:35:00

example just look into the chain uh what

8:35:03

I was doing over

8:35:05

there so if you look into the chain

8:35:08

there I was writing there I was defining

8:35:10

the model from the open a API so let me

8:35:13

show you uh let me show you the chain

8:35:14

prom template agent and here we have a

8:35:19

chain so where is a chain where is a

8:35:21

chain where is a chain this is a chain

8:35:23

now see prom template is there chain and

8:35:25

here I was I was defining a model from

8:35:28

the opena itself what what I was doing

8:35:30

guys tell me I was defining a model from

8:35:32

the open itself now instead of the open

8:35:35

now instead of the open now I'm using

8:35:38

the hugging phas so what I did I created

8:35:41

a object of this hugging face Hub and I

8:35:43

given the repo ID means uh this is the

8:35:45

ID of the model and here is a argument

8:35:48

that U like I need to set the

8:35:50

temperature and all so in this

8:35:52

particular format let me take it in a

8:35:54

different uh let me take it in a

8:35:56

different cell let me show you so here

8:35:58

I'm going to copy it and let me paste it

8:36:00

over here so what is happening just see

8:36:04

what is happening let me take it as a

8:36:06

command so this is the code which I'm

8:36:09

running see this is the code so here now

8:36:12

I'm using now I am going to access the

8:36:15

llm okay which llm this Google FL T5

8:36:18

large now instead of the openi I'm going

8:36:20

to use this particular llm FL T5 large

8:36:23

and this is the uh this is hugging pH

8:36:25

actually which we already imported from

8:36:27

the lenen itself this is the one and

8:36:30

before that actually you need to install

8:36:31

this hugging phase so what you need to

8:36:33

do guys tell me you need to install this

8:36:34

hugging phase pip install hugging phase

8:36:36

otherwise you might face issues so here

8:36:39

uh you have you are using this

8:36:40

particular model this is some sort of

8:36:42

argument uh which you need to mention

8:36:44

now let's try to create a chain and here

8:36:46

the same thing you need to pass the

8:36:47

prompt only now see the power of the

8:36:49

length chain what it is able to do now

8:36:52

uh instead of the hugging open AI I'm

8:36:54

able to connect with the hugging face

8:36:55

also like likewise we will be able to

8:36:57

connect with many apis just check with

8:36:59

the documentation uh so now here you can

8:37:02

see we are able to create a object I'm

8:37:04

getting some sort of a warning you can

8:37:06

ignore it because just a uh it's not an

8:37:08

error actually it's a dependency warning

8:37:11

that uh don't use this version that

8:37:12

version what whatever now here I have

8:37:14

created a chain now what was my prompt

8:37:17

so here I'm saying what is a good name

8:37:19

for the company that make a product

8:37:21

whatever like uh regarding whatever

8:37:23

product I can ask over here so here I'm

8:37:25

saying that chain do run the same thing

8:37:27

I'm going to ask over here chain dot run

8:37:31

now here uh let's say I'm going to ask

8:37:33

uh which product I want so I want uh

8:37:36

let's say mic or I want camera again so

8:37:40

if I'm asking regarding the camera so

8:37:42

let's see so here it is giving me answer

8:37:45

uh Nikon what is a good company name for

8:37:47

a uh what is a good name for a company

8:37:51

uh that makes product so it is giving me

8:37:52

a neon regarding this camera Let's uh

8:37:55

let ask to the different uh uh product

8:37:58

let's say watch so here let's see it is

8:38:01

giving it Tata now let's see uh here if

8:38:04

I'm asking colorful cloths colorful

8:38:08

cloths so here you will see that it is

8:38:11

giving me a DE

8:38:13

so different different name I'm getting

8:38:15

in a similar way uh which I was getting

8:38:17

by using this open API now instead of

8:38:20

the open API I'm using this flan T5

8:38:23

large model you can use any sort of a

8:38:25

model any other model as well there are

8:38:27

like lots of model which you will find

8:38:28

out regarding this text to text

8:38:30

generation you can use this model also

8:38:32

Mard you just need to mention the ID

8:38:34

Mard this is the basically ID just open

8:38:37

it and just copy it from here just copy

8:38:39

it and keep it over here like uh keep it

8:38:42

like this let let me show you that so

8:38:44

here is your model name and what you can

8:38:46

do just copy this hugging pH from here

8:38:49

uh this the complete uh sentence and

8:38:52

just change the name just change the

8:38:54

name of the model just copy it and paste

8:38:56

it over here that's it so just copy it

8:38:59

and paste it over here and you'll find

8:39:00

out this Facebook ambot large 50 now you

8:39:03

can use this particular model if you

8:39:05

want few more a few creativity over here

8:39:07

you can uh pass the temperature M uh

8:39:10

like temperature uh value 1.5 let's say

8:39:12

so so this is what this is a model from

8:39:14

the hugging face and now this time you

8:39:16

are using a different model so the model

8:39:18

name is what Facebook MB large 15 so

8:39:20

like this you can access a different

8:39:22

different model by using the length

8:39:24

chain now what you can do you can create

8:39:26

a one more chain so here I'm going to

8:39:28

copy the same thing now let me change

8:39:30

the envir variable name there's going to

8:39:32

be a chain two and here what I'm going

8:39:34

to do I'm going to copy this hugging

8:39:35

face Hub so from here I'm going to copy

8:39:38

this hugging face Hub and let me paste

8:39:39

it over here so this is what this is my

8:39:41

hugging face Hub this is my repo this is

8:39:43

my model here I'm setting the

8:39:45

temperature and this is what this is my

8:39:47

prompt now if I'm going to run it so yes

8:39:49

I'm able to create a object now here

8:39:51

what you can do here you can call the

8:39:53

method run so run and here you can ask

8:39:56

anything so let's say here I'm asking uh

8:39:59

which product so you can ask uh a mobile

8:40:03

so here let's say regarding any sort of

8:40:05

a product you can ask so it is running

8:40:07

so what is the good name of the company

8:40:09

that makes mobile uh it is saying that

8:40:12

uh it is giving me a prompt only over

8:40:15

here I think I need to follow something

8:40:18

else uh chain do run let's ask regarding

8:40:23

the same thing colorful cloths and let's

8:40:28

see what will be the

8:40:31

answer it is giving me a prompt only I

8:40:34

think in between I need to run something

8:40:36

over here that's

8:40:38

why so Transformer this is a pipeline h

8:40:43

okay

8:40:46

tokenizer I think it is not giving me a

8:40:48

correct answer what so so prompt is fine

8:40:51

I'm passing a same prompt and this is

8:40:54

the

8:40:54

prompt now let's say I'm saying zero

8:40:58

let's set the different value of the

8:40:59

temperature or

8:41:02

05 and see what I am getting over here

8:41:06

uh chain

8:41:09

two what is a good company that makes a

8:41:12

colorful Clause it's not giving me

8:41:14

answer instead of that it's giving me a

8:41:16

uh like a complete prompt

8:41:20

itself so llm hugging face and M large

8:41:24

50 model is what there is a parameter

8:41:28

okay no issue I will check with that if

8:41:30

I need to mention something over here

8:41:31

but that's a way maybe it is not able to

8:41:33

uh like predict correctly whatever I'm

8:41:35

asking but yeah it is giving me answer

8:41:37

this flan T5 large model and even the CH

8:41:39

GPD the GPD uh model also from the open

8:41:42

AI but it is giving me something else it

8:41:44

is running but uh I'm getting other

8:41:47

answers or other answer over here not

8:41:50

related to our related to our prompt I'm

8:41:53

asking something El it is giving me the

8:41:54

complete prompt over here okay so this

8:41:57

is fine now tell me guys how to use any

8:41:59

open source model did you get it please

8:42:01

do let me know in the chat if you got

8:42:03

this particular part that how to use a

8:42:05

different uh how to use any open source

8:42:08

model from the hugging

8:42:11

phase

8:42:15

because it is not a rule-based system

8:42:16

now if I'm again running a query so it

8:42:19

is not giving a same name because it's a

8:42:21

AI based system again and again if you

8:42:24

asked to the chat GP now it will do the

8:42:25

same thing all right it won't repeat the

8:42:28

thing it won't repeat the thing based on

8:42:30

your uh like query it will give you the

8:42:32

different different suggestions and all

8:42:35

so that's why it is giving you the

8:42:36

different

8:42:38

name tell me guys fast uh it is free

8:42:41

actually this hugging pH uh like token

8:42:44

is free you can read more about it uh

8:42:46

just go through the documentation there

8:42:47

is some sort of charges and all U okay

8:42:50

so but as of now it is free uh means uh

8:42:53

like up to some sort of a tokens and

8:42:55

regarding some sort of models it is free

8:42:58

okay so here guys I think this hugging

8:43:01

face part is clear to all of you please

8:43:03

do let me know in the chat if this part

8:43:05

is

8:43:08

clear yes make question answer board

8:43:11

will create in the next class first of

8:43:12

all let let me explain you that how to

8:43:14

use any uh open source uh model so here

8:43:18

I'm using this open source model Google

8:43:20

FL T5

8:43:24

large tell me guys fast uh so this part

8:43:27

is getting clear to all of you if it is

8:43:29

getting clear then please do let me know

8:43:31

in the chat I'm expecting yes or no in

8:43:33

the chat if you have any sort of a doubt

8:43:35

you can ask me I try to clarify that and

8:43:37

then I will explain you how to create a

8:43:39

pipeline how to create a pipeline by

8:43:42

using the uh Transformer so uh we can

8:43:46

import the Transformer over here we can

8:43:48

write it down Leng ch. Transformer and

8:43:50

we can create a complete pipeline as

8:43:52

well means we can uh download the model

8:43:55

we can download the model in our local

8:43:58

okay and in our local memory actually we

8:44:01

can do it uh we can download it and then

8:44:03

we can do the prediction and all the

8:44:05

same thing which I'm doing over here by

8:44:07

using the API I will show you the

8:44:09

pipeline over here so first of all tell

8:44:11

me till here everything is clear think

8:44:12

is fine yes you can use the Lama 2 also

8:44:15

here you will find out the Llama 2 just

8:44:17

try to check with a different different

8:44:18

model related to a different different

8:44:19

task got it so here you will find out of

8:44:22

different different model you can use

8:44:23

the Llama 2 here is a llama 2 this one

8:44:26

llama 2 B Lama 2 13 billion actually

8:44:29

it's from the Billy U but you can check

8:44:32

from The Meta also so here I think there

8:44:36

was a meta you can search about it so

8:44:39

here you can write it down Lama 2 so

8:44:42

once you will search it so you will find

8:44:44

out the Llama just a

8:44:49

second uh you can use llama from the

8:44:52

hugging phase I just seen that uh

8:45:02

training lamba lamba where is a lamba oh

8:45:06

I think I need to check with a different

8:45:08

page So Meta Meta Nick

8:45:14

snip Q see

8:45:17

Stark why I'm not getting it just a

8:45:21

second I think I kept this text

8:45:23

generation that's why now yeah there

8:45:25

there is a llama so here meta Lama so

8:45:28

this is the model from the Facebook side

8:45:30

from The Meta side and uh you will find

8:45:32

out a different different variants of

8:45:34

this llama just uh take it and use it

8:45:37

and it updated uh 25 days ago this

8:45:41

one

8:45:44

got it guys yes or no I think you are

8:45:47

getting it and you are able to get this

8:45:49

particular thing this particular part

8:45:51

now let's try to understand that how you

8:45:53

can download this model in your local so

8:45:55

for that there is a certain step so let

8:45:58

me write it down those particular step

8:46:00

and step by step we'll try to understand

8:46:02

how we can create a pipeline and how we

8:46:04

can in download this model in our local

8:46:07

is whatever model we want to use it we

8:46:09

can download it now for that uh I will

8:46:12

have have to perform some sort of a step

8:46:14

so here uh let me write it down the

8:46:16

heading uh here guys this is the heading

8:46:18

uh basically just a second uh let me

8:46:21

copy and paste um so here what I'm going

8:46:23

to do here I'm going to do a text uh

8:46:25

here I'm writing text generation model

8:46:26

decoder only model so now I will use the

8:46:28

decoder only model any model where I I

8:46:31

will just have a decoder so what I'm

8:46:33

going to do here so the first thing

8:46:34

again I'm going to create a prompt so

8:46:36

there's my prompt a same prompt I'm

8:46:38

going to use or maybe I written a

8:46:39

different prompt over here can you tell

8:46:41

me a famous fitw footballer so here I I

8:46:44

will give the name so I I can remove

8:46:46

this famous from here and see the prompt

8:46:48

over here that what is my prompt so here

8:46:50

I'm asking that can you tell me uh about

8:46:52

a footballer can you tell me about the

8:46:54

footballer and here I will just give the

8:46:56

name so this is what this is my prompt

8:46:58

actually now what I will do guys here I

8:47:00

will create a chain now in the chain uh

8:47:03

what I'm going to do so just a

8:47:07

[Music]

8:47:09

second fine so here uh let me do one

8:47:12

thing for first of all so here I'm going

8:47:13

to import some sort of a library

8:47:15

otherwise I will get the issues I will

8:47:17

get the error so here I'm going to

8:47:19

import a few libraries so these are the

8:47:22

name so these are the name hugging face

8:47:24

pipeline which I'm going to import from

8:47:26

the lenen itself actually this is

8:47:28

available in a like if you are directly

8:47:30

installing the hugging phas hugging face

8:47:32

have in your system in your local

8:47:33

environment so by using the Transformer

8:47:36

also you can import this hugging face

8:47:38

hugging face pipeline but as I told you

8:47:40

this Len CH is a wrapper on top of this

8:47:42

uh apis on top of this libraries so by

8:47:45

using this lenon also you can use this

8:47:47

hunging face pipeline now what is the

8:47:49

meaning of the rapper so uh you know

8:47:51

right so tensor flow so this Kass

8:47:54

actually it's a repper on top of the

8:47:55

tensor flow if you have seen the Kass so

8:47:57

there you must have seen that uh like we

8:48:00

are just going to call a Kass Dot and

8:48:02

pipeline we are just going to write it

8:48:04

down Kass ad and we are creating a

8:48:06

number of note and then kasas or this

8:48:08

that whatever so in back end this T the

8:48:11

tens code is running but on top of this

8:48:14

T tensor flow they have created one UI

8:48:17

or they have created one interface now

8:48:19

you are not interacting directly with a

8:48:21

lowlevel API low level code you're not

8:48:23

going to write it down that instead of

8:48:25

that what you are going to do you are

8:48:26

using the rapper Kass so it is easy to

8:48:28

use for you so similarly see the similar

8:48:31

thing you can see over here this Len is

8:48:33

nothing it is a wrapper on top of the

8:48:34

other apis okay on top of the other

8:48:37

packages so over here you can see uh

8:48:40

like I need to import this particular

8:48:42

thing so the first thing I'm going to

8:48:43

import that is a like Pipeline and the

8:48:46

second thing which I'm going to import

8:48:47

that is a auto tokenizer auto model uh

8:48:50

for uh casual LM Pipeline and auto model

8:48:53

for sequence to sequence llm I will come

8:48:55

to each and every import statement uh

8:48:57

once I will write on the code step by

8:48:59

step I will try to explain you that why

8:49:01

I writing this a particular thing right

8:49:04

now here what I'm going to do I'm going

8:49:05

to download the model the same model in

8:49:08

the local instead of using this API I'm

8:49:10

downloading the same model in my local

8:49:12

local memory in my current uh memory in

8:49:14

my volatile Ram actually so here what

8:49:17

I'm going to do first of all I need to

8:49:19

mention the model ID now model ID wise

8:49:21

you will find out like I'm using a same

8:49:23

model FL T5 large and this is a model

8:49:27

from the Google side Google has given

8:49:28

this model this particular model fly T5

8:49:30

large so this is what this is my model

8:49:32

ID from where you will get a model ID

8:49:34

you just need to click on the model name

8:49:36

and from there itself you can copy this

8:49:38

model ID so let's say I want to get a

8:49:40

model ID so just copy from here just

8:49:43

copy from here copy model name to the

8:49:45

clipboard that's it so here's what here

8:49:48

I'm having a model ID now guys what you

8:49:50

want to do so here actually you need to

8:49:52

uh like create a like a the object of

8:49:56

this tokenizer and here actually you

8:49:58

need to create one uh here you need to

8:50:01

here you need to call one method from

8:50:03

tokenizer it's a standard processor if

8:50:05

you want to use this hugging face

8:50:07

pipeline so uh at the first place you

8:50:09

will have to perform the tokenization

8:50:11

and uh here I'm going to do a same thing

8:50:13

so whatever data which I'm going to pass

8:50:15

right so this tokenizer will

8:50:16

automatically uh take care of it and

8:50:19

back end actually some mathematical like

8:50:22

like some mathematical equations and all

8:50:24

it's going on uh maybe like with respect

8:50:26

to the tokenization uh you know like

8:50:28

different different tokenization

8:50:29

technique what is the meaning of the

8:50:30

tokenization so whatever prompt you have

8:50:33

that a text prompt actually are going to

8:50:34

convert into a numbers so that is

8:50:36

nothing that is my uh token means like

8:50:40

uh the in a numbers itself so that is

8:50:42

what that is your encoded value so by

8:50:44

using this Auto encod auto tokenizer you

8:50:47

are going to do the same thing you are

8:50:48

going to encode the values got it yes or

8:50:51

no I think you are getting my point so

8:50:53

here uh you are going to use this Auto

8:50:56

tokenizer and here I'm going to call

8:50:59

this particular method so from uh model

8:51:02

ID from pre-train from pre-train and

8:51:04

this is what this is my method and here

8:51:06

I'm passing this model idid so now what

8:51:08

I'm going to do I'm going to keep this

8:51:10

particular thing inside the variable the

8:51:11

variable name is going to be a tokenizer

8:51:14

so here is what here is my variable name

8:51:16

so once I will run it now over here you

8:51:18

can see we are able to create a object

8:51:20

and we are able to call this particular

8:51:22

method by passing this model ID now what

8:51:25

I will do guys so here uh I will uh I

8:51:29

will uh like uh call I will call this

8:51:32

particular method let me show you the

8:51:34

next one it's a standard procedure don't

8:51:36

worry again I will give you the quick

8:51:37

revision first of all let me run it the

8:51:39

entire thing now over here I'm writing

8:51:41

down Auto model for sequence to sequence

8:51:43

LM and here I'm I'm calling this method

8:51:46

from pre-train and here is what my model

8:51:49

ID and here is device map is auto right

8:51:51

just just like a like ignore this

8:51:53

particular parameter just look into this

8:51:55

model ID so here actually I'm passing

8:51:57

this model ID Google fly T5 large so

8:52:00

this model this is my model actually

8:52:02

which I want to which I want to get so

8:52:04

here I have a method Auto model here is

8:52:07

I'm basically Class Auto model for

8:52:09

sequence to sequence LM and from here

8:52:12

I'm going to call this from pre-rain

8:52:14

this particular method I'm passing this

8:52:16

parameter model ID parameter now if I

8:52:19

run it so here you will be able to see

8:52:21

that we are able to run it so here we

8:52:23

have created a object for this one also

8:52:26

now guys the next thing what I have to

8:52:27

do so here actually I'm going to create

8:52:29

my pipeline so uh here uh I'm going to

8:52:32

create my Pipeline and for this one uh I

8:52:35

have written a code so this is a code

8:52:38

this is what is my pipeline here I

8:52:39

already imported it now here I'm going

8:52:41

to pass the key text to text generation

8:52:43

here is my model this is what this is my

8:52:45

model now here is what here is a

8:52:47

tokenizer this is a tokenizer and here

8:52:49

is a max length so you can remove it you

8:52:51

can uh remove the max length also not an

8:52:53

issue with that so here uh I'm going to

8:52:55

create my pipeline so for first thing

8:52:57

what I need to do I need to create a

8:52:58

tokenizer and the second thing I need to

8:53:00

create a model I need to download the

8:53:02

model see uh first time if you will

8:53:05

download this model now you will get the

8:53:07

uh the progress bar I'm not getting it

8:53:09

why why because I I did it actually I

8:53:12

was practicing with the thing so at that

8:53:14

time I downloaded this I downloaded that

8:53:17

particular model and this tokenizer and

8:53:19

it is in a buffer itself so it is it is

8:53:22

like taking from the caching memory so

8:53:23

that's why you are not seeing this that

8:53:25

particular progress bar but in your case

8:53:27

if you're doing first time you will see

8:53:28

the progress bar you will see the prog

8:53:31

progress bar okay so here you are going

8:53:33

to create a pipeline so this is what

8:53:35

this is my Pipeline and here I passed

8:53:37

the two thing the first one is a key

8:53:39

text to text generation this is my key

8:53:41

and here uh is what here I have written

8:53:43

the model and here is my tokenizer

8:53:45

that's it you just need to focus on this

8:53:46

two part now here I'm going to create a

8:53:49

pipeline so this is what guys this is my

8:53:50

pipeline now after that what I'm going

8:53:52

to do I have to pass this particular

8:53:54

pipeline to my hugging phase Pipeline

8:53:57

and here actually you will find out this

8:53:58

is what this is my local llm means see

8:54:02

what I'm going to do so this is my model

8:54:04

this is my tokenizer which I'm going to

8:54:06

download from the pre-train one from the

8:54:08

pre-train one and this is the model ID

8:54:10

the same uh tokenizer

8:54:12

which has been used to this particular

8:54:14

model from the pre-train see I'm calling

8:54:15

this method so here is my tokenizer and

8:54:18

here is my model from this particular ID

8:54:20

I'm not getting any progress bar why

8:54:22

because I already did it it is taking

8:54:23

from a cachia memory okay but if you are

8:54:26

doing it first time you will be getting

8:54:28

a progress bar and you will be seeing

8:54:29

that all the parameters getting

8:54:31

installed over here right got it now

8:54:33

here what I need to do I need to keep

8:54:35

all the thing in a pipeline and then

8:54:36

finally I'm passing it to the hugging

8:54:38

face Pipeline and this is what this is

8:54:40

my local llm now everything is done

8:54:42

everything is clear now let me run this

8:54:44

prompt so here is what here is my prompt

8:54:47

so what I can do let me keep this prompt

8:54:50

over here this is my prompt and here

8:54:53

this is my prompt and this is what this

8:54:55

is my local llm now let me run it and

8:54:57

here what I will do guys so now uh let

8:55:00

me call the chain and to the chain I'm

8:55:03

going to do a same thing what I'm going

8:55:04

to do guys tell me to the chain actually

8:55:06

see what is a chain I told you chain is

8:55:08

nothing it's a it's a like a collection

8:55:11

of of the components right you are going

8:55:13

to uh you are going to you are you are

8:55:16

stacking the components a different

8:55:18

different component have you seen the

8:55:19

chain right so uh there I was stacking

8:55:22

the llm and this prompt so I'm doing the

8:55:24

same thing now see the power of the Len

8:55:26

chain not even with the open AI we are

8:55:28

able to use it with the different

8:55:30

different apis with the hugging face

8:55:31

also directly and even in the with uh

8:55:35

with respect to the local one also with

8:55:36

respect to the local LM also so it works

8:55:39

with in every scenario this lenion works

8:55:41

with every scenario okay now here if I'm

8:55:44

going to run it uh so now I I'm able to

8:55:46

create this chain now if I will ask

8:55:48

anything to this chain so let me write

8:55:50

it down over here chain do run now here

8:55:53

what I'm going to do here I'm going to

8:55:54

pass let's say Messi okay Messi now if I

8:55:57

will run it so you will find out that it

8:55:59

is generating a answer so Messi is a

8:56:02

footballer from Argentina and I just

8:56:04

asked what I asked guys so here I asked

8:56:07

what was my prompt can you tell me about

8:56:09

footballer so here is a name name which

8:56:11

I'm passing now let me write it down

8:56:14

some any Indian Indian like footballer

8:56:17

name so Sunil

8:56:19

Chri so let's see uh what will be the

8:56:24

answer it is able to get it or not sonil

8:56:28

chetri uh okay Sunil chetri born 24th

8:56:31

August 1971 it's a former Indian Indian

8:56:34

footballer who played up forward so

8:56:37

great guys it is able to give me an

8:56:38

answer and here you can see I have

8:56:40

installed I downloaded the model in a

8:56:42

local itself so tell me guys this part

8:56:45

is clear to all of you how to use the

8:56:47

hugging face API by using the lenen and

8:56:50

how to download the model and how to use

8:56:52

it please do let me know in the chat if

8:56:55

this part is getting clear to of all of

8:56:57

you so yes this is the number of tokens

8:56:59

max length So within that itself within

8:57:01

uh it is not going to exceed the answer

8:57:04

and this is the max length basically it

8:57:05

will be uh within that itself you will

8:57:08

be getting an

8:57:10

output

8:57:13

tell me guys fast so is it clear to all

8:57:15

of you if this part is clear then please

8:57:17

do let me know please hit the like

8:57:19

button and uh yes if you have any sort

8:57:22

of a doubt then you can ask

8:57:26

me you can ask about the vat kohi you

8:57:28

can check over here so here you can

8:57:31

write it down the vat kohi even though

8:57:33

he's not a footballer let's see what

8:57:34

will be the answer it depends on the

8:57:36

model our GPT model is very much uh

8:57:38

powerful let's see uh this uh Flame T5

8:57:47

large so okay so I'm getting verat kohi

8:57:52

is a s linkan footballer who plays it is

8:57:54

completely wrong now you can see so it

8:57:57

is uh not giving me a correct answer

8:58:00

let's try to design a different prompt

8:58:01

over here so here I can uh do that let

8:58:04

me this let me design one more prompt

8:58:06

and can you tell me about cricketer so

8:58:09

here I can write it down cricketer c r i

8:58:12

c k uh cricket so this is the spelling

8:58:16

now let me take this thing and here is

8:58:19

going to be my chain two this is my

8:58:22

chain two and this is my prompt two and

8:58:24

I'm using a same llm over here so this

8:58:26

is my chain two now what I will do here

8:58:30

I'm going to run it and let's see will I

8:58:32

will I get a correct information or not

8:58:35

will this model is capable or not this

8:58:37

uh which is a name what is the name

8:58:40

flame T5 large so let's see it is a

8:58:42

capable or not so chain two. run and uh

8:58:46

if I'm running it

8:58:50

so in the district of balut prad is

8:58:53

giving me a wrong answer I think uh

8:58:56

cricketer Koh he does not belong from

8:58:59

the bhalpur it belong he belong or not I

8:59:01

don't know about it let's uh talk about

8:59:03

the suchin uh let's talk about the sain

8:59:06

or Ms D so here I can ask about the MS

8:59:13

Tony chain. run and let's see who play

8:59:18

the Indian Premier League site Mumbai

8:59:21

okay it is saying mson plays a cricket

8:59:23

from the Indian Premier League from

8:59:25

Mumbai Indian so it is like a completely

8:59:28

it is giving a wrong answer this flain

8:59:30

T5 so you should use a different model

8:59:33

in that case actually see GPD is a

8:59:35

better one it always gives a correct

8:59:37

answer and and is like a much more

8:59:39

capable that's why I started from the

8:59:40

open a and that's why I didn't started

8:59:42

from the hugging page but yeah according

8:59:44

to the task according to data according

8:59:45

to requirement so now that will be your

8:59:48

responsibility as an NLP engineer as a

8:59:50

generative engineer you have to check

8:59:52

you have to like check with a model that

8:59:54

uh like on which data it has been

8:59:56

trained okay on which data has been fine

8:59:58

tuned how many parameters is there what

9:00:00

is a performance performance of that if

9:00:03

uh like uh we are doing a text

9:00:04

generation that what is a blue score

9:00:06

like blue score with that we can

9:00:08

identify the uh that like how much it is

9:00:10

capable for generating a text so each

9:00:12

and everything you will have to read

9:00:14

about the model and then only you can

9:00:16

use in a production not directly so

9:00:18

there will be so many uh like uh uh uh

9:00:22

there will be so many experiment which

9:00:24

you will have to

9:00:26

perform okay there will be so many back

9:00:28

and forth you will have to perform

9:00:29

before deciding any sort of a model and

9:00:32

here I have given you the approach guys

9:00:34

here you can append the memory here you

9:00:36

can play with the chains here you can uh

9:00:38

like play with a different different

9:00:40

prom template you can download the

9:00:41

document you can import the document

9:00:43

each and everything I have shown you

9:00:45

inside this two notebook now you are

9:00:47

enough capable to implement uh for

9:00:49

implementing any sort of a project now

9:00:51

whatever project I'm going to teach you

9:00:53

definitely you will be able to grab it

9:00:55

and uh I will uh after the like jupyter

9:00:58

notebook implementation of the project I

9:01:00

will uh explain you that how you can

9:01:02

convert into an end to endend one so uh

9:01:04

from next class onwards we are going to

9:01:07

start our Inn project by using this Len

9:01:09

chain open ey hugging fish and all and

9:01:11

apart from that we are going to use some

9:01:13

other thing as well and I will show you

9:01:15

the complete setup of the project the

9:01:17

project name is going to be McQ

9:01:20

generator got it yes or

9:01:23

no yes you can fine tune the model as

9:01:26

well if you want like if you want to

9:01:28

find uh if you want the process of the

9:01:30

fine tuning I will give you that also I

9:01:32

will give you the fine tuning process

9:01:34

also just wait for some time step by

9:01:36

step we try to do each and everything if

9:01:38

I'm going to explain you everything in a

9:01:40

single class so it might be a difficult

9:01:42

for you so uh step by step we'll try to

9:01:45

do it don't worry we are not going to

9:01:48

like conclude or we are not going to

9:01:50

step stop this community session uh like

9:01:52

uh we'll be continue this uh like in

9:01:54

know next week also and there uh we

9:01:57

going to talk about

9:02:00

many you can use uh like which open stes

9:02:04

model you can use for the machine

9:02:05

translation you can check over here just

9:02:07

go through with the hugging phase API

9:02:10

and click on the model model uh just uh

9:02:12

click on the model and here you will get

9:02:14

the machine translation so maybe machine

9:02:17

translation is there classification

9:02:19

question answering yeah here is a

9:02:20

translation so just see the model what

9:02:23

all models is there just try to use this

9:02:25

particular model open source model apart

9:02:27

from that you'll find out other model as

9:02:29

well so see llama 2 is a open source

9:02:31

model you will find out a different

9:02:32

different variants of this llama you'll

9:02:34

find out a different different variants

9:02:36

of this llama okay so you can use this

9:02:38

llama 2 model for your image translation

9:02:41

as I click on this translation here you

9:02:43

can see the result got it now you can do

9:02:46

your own research you can go through

9:02:47

with the different different API as I

9:02:49

told you if you don't want to use the

9:02:50

chat GPT so here I have created one more

9:02:53

API for all of you so like I have

9:02:56

written a code regarding one more API

9:02:57

that's going to be a AI 21 lab so in the

9:03:00

next class I will show you means after

9:03:01

the project actually after completing

9:03:03

the vector databases and all I will come

9:03:05

to some Mis mous topic there I will show

9:03:07

you the code regarding this a21 lab okay

9:03:10

so here actually uh like we'll talk

9:03:13

about the Jurassic model uh which is a

9:03:15

very powerful model with that also you

9:03:17

can do a multiple thing Falcon is there

9:03:19

you can use the Falcon so Falcon you

9:03:21

will find out here itself you know uh

9:03:23

let me show you where is a falcon so

9:03:25

once you will search over here Falcon so

9:03:28

it's a model from the Google yeah uh no

9:03:31

it's a not of Google one it's a not of

9:03:34

Google model actually it's a model from

9:03:36

this particular

9:03:38

organization I think it's a Chinese

9:03:40

organization maybe and one more model

9:03:43

let me write it on the name Falcon let

9:03:46

me recall the name Falcon was there

9:03:49

Bloom is there uh let me check with the

9:03:51

bloom yeah Bloom is there and apart from

9:03:54

that farm is also there p a LM Palm is

9:03:58

also there it is not actually you won't

9:04:01

be able to find out this pal over here

9:04:03

uh you uh you will have to access it

9:04:05

from the separate API so it's a Google

9:04:08

model pal p a l m 2

9:04:11

Palm 2 API just search over the Google

9:04:13

and you will find out it this Palm

9:04:16

API so it's a uh model from the Google

9:04:20

research Google researcher it's a model

9:04:22

from the Google community so you can

9:04:24

explore about the API and you can

9:04:26

utilize this all you can see generate

9:04:28

your API key just generate a API key and

9:04:30

try to use this form model as well and

9:04:33

after like so many back in fors after so

9:04:35

many research and all then only you can

9:04:38

decide that which is which is my best

9:04:39

model which one I should which one

9:04:41

should I productionize this is working

9:04:43

fine or that is working fine but gpd1 is

9:04:46

a like trusted one and here you we can

9:04:48

you can see the clear application of the

9:04:50

GPD model where they are using GPD 3.5

9:04:53

turbo and GPD 4 itself so many people

9:04:55

are using the GPI even though it is a

9:04:57

paid one but people are checking with

9:05:00

the other open source model as well like

9:05:02

this Palm Falcon Bloom and all okay

9:05:04

Cloud a is one of the model you can

9:05:06

check about the cloud as well so I think

9:05:10

now uh each and every uh thing is clear

9:05:12

to all of you so guys if you're liking

9:05:15

the session if you uh like the content

9:05:17

then please do let me know in the chat

9:05:19

or please hit the like button if you are

9:05:22

able to understand everything whatever I

9:05:24

have explained you in today's

9:05:28

session here I will explain you how to

9:05:30

build the applications and all and from

9:05:32

next uh class onwards I will give you

9:05:34

the different different assignments

9:05:39

also

9:05:41

yes we can use the mlops tools now like

9:05:43

we'll do the development now in between

9:05:45

we can use any mlops tools ml flow we

9:05:48

can use ml flow DBC or Q flow we can use

9:05:51

the uh like other melops tools like

9:05:53

Docker and all don't worry regarding

9:05:56

that so once I will come to come to the

9:05:59

development there I will uh do

9:06:05

that okay great now yeah jimin also come

9:06:08

you can check with that also recently

9:06:10

Google has released the

9:06:15

gemin fine so I think uh now we can uh

9:06:19

close the session uh now we'll meet on

9:06:22

Friday uh Saturday and Sunday we don't

9:06:24

have any session uh the session is going

9:06:26

to be from Monday to Friday only and the

9:06:29

timing is 3: to 5: p.m. IST so let me

9:06:32

write it down over here uh Saturday

9:06:34

Sunday we don't have any session

9:06:37

Saturday and Sunday there won't be any

9:06:40

session

9:06:43

s session will be

9:06:47

continuing

9:06:49

continuing uh from Monday

9:06:53

onwards Monday onwards and the timing

9:06:56

will be timing will be

9:06:58

sa so it's going to be from 3:

9:07:01

to 5 p.m. ISD so here guys it's a short

9:07:06

notice for all of you uh we don't have

9:07:09

any session on Saturday and Sunday day

9:07:11

the session will be going on uh from

9:07:13

Monday to Friday only and the timing

9:07:15

will be same 3 to5

9:07:17

istd fine I think

9:07:21

uh I have finished the data loader topic

9:07:24

uh if you will check into this uh this

9:07:27

particular notebook already I have uh uh

9:07:30

like shown you this data loader and all

9:07:32

now I told you now just try to check

9:07:33

with the different different data

9:07:34

loaders and all CSV tsv Excel or

9:07:38

whatsoever just go and check you can do

9:07:40

it by using the documentation but here I

9:07:43

given you the example of the to data of

9:07:45

this document loader so I have imported

9:07:48

this uh PDF I think you missed the

9:07:51

previous sess that's why you are asking

9:07:53

this question fine so I think uh we can

9:07:56

start with the session so welcome back

9:07:58

to this community session of generative

9:08:00

AI uh this is day six and today we going

9:08:04

to start with our first end to end

9:08:06

project that's going to be a McQ

9:08:08

generator so guys uh this is this is our

9:08:11

first uh like end to end project which

9:08:13

we are going to implement by using this

9:08:16

generative AI uh by using the LMS and

9:08:19

all and in this particular project we'll

9:08:21

try to use the all the concept basically

9:08:24

whatever we have learned so far in our

9:08:26

course in our committee session so first

9:08:29

of all uh let me show you that uh where

9:08:31

you will find out all the session all

9:08:34

the uh resources and all because we have

9:08:36

updated each and everything over the

9:08:38

dashboard and each and everything you

9:08:41

will find out uh in the uh resource

9:08:44

section so let me show you that uh

9:08:47

particular thing and for that guys you

9:08:50

just need to visit the Inon website and

9:08:53

after visiting the website you need to

9:08:55

search about the generative AI so search

9:08:57

about the generative Ai and there you

9:08:59

will find out two dashboard so first One

9:09:03

dashboard for the English and One

9:09:05

dashboard for the Hindi so yes I'm

9:09:07

taking a same session on my on the I on

9:09:11

Hindi YouTube channel as well so you can

9:09:13

search ion Tech Hindi so there I'm

9:09:15

taking a same session and uh there also

9:09:18

I'm uh explaining the concept of the

9:09:20

generative a and all so guys here what

9:09:23

you need to do here you need to click on

9:09:25

this particular dashboard generative AI

9:09:27

Community session and once you will

9:09:30

click on that so it will ask you for the

9:09:32

enrollment and here we are not going to

9:09:35

charge you anything any cost so if you

9:09:37

are new then please do sign up and then

9:09:40

uh try to enroll in this particular

9:09:42

course now here guys uh just enroll to

9:09:46

this particular course and after that

9:09:48

you will be redirected uh redirecting to

9:09:51

the dashboard so after sign in you will

9:09:53

get a dashboard uh here you can see this

9:09:56

is uh this is a complete dashboard uh

9:09:59

just a second let me show you

9:10:02

that this is the one so this is the this

9:10:05

is the dashboard guys and here you will

9:10:06

find out all the recording so uh so far

9:10:10

I took five session day one day two day

9:10:13

three day four day five and in this

9:10:16

particular session I covered each and

9:10:18

everything regarding the generative AI

9:10:20

whatever uh is required if you want to

9:10:22

start with the projects and all so uh

9:10:25

just go through with the very first

9:10:27

session there you will find out complete

9:10:30

introduction and in the second one so in

9:10:33

the second session uh there I have

9:10:35

discussed each and everything about the

9:10:36

open Ai and in the third session I have

9:10:39

discussed about the Len chin and then I

9:10:42

talked about the a few more concept like

9:10:45

Len chain memory and all even I have

9:10:47

discussed about the hugging face API so

9:10:50

if you want to use any open source model

9:10:53

if you don't want to use a model from

9:10:55

the open AI so uh you can access the

9:10:58

model from the hugging phase also that

9:11:00

thing also I taught you so if you will

9:11:02

go through with my session each and

9:11:04

everything you will find out now it's

9:11:06

time to implement the project so we'll

9:11:08

try to implement a project and and the

9:11:10

project is going to be end to endend and

9:11:13

not even single so uh not even this

9:11:16

project so we are going to implement to

9:11:18

more project with a few more advanced

9:11:21

concept like vector databases and there

9:11:24

will discuss about the r and there we

9:11:27

are going to create our web API by using

9:11:30

the fast API and flast so each and

9:11:33

everything we are going to do here

9:11:35

itself in a live session so please make

9:11:37

sure that you enroll uh for this

9:11:40

particular dashboard and please try to

9:11:42

check with the ion YouTube channel as

9:11:44

well there we are uploading each and

9:11:46

every video so once you will search over

9:11:50

the Inon so let me show you that so uh

9:11:52

first of all you need to open your uh

9:11:54

open your YouTube and there search about

9:11:57

the uh Inon so here you can see so open

9:12:02

the Inon YouTube channel and inside that

9:12:04

uh like uh there you'll find out one

9:12:06

live section so just click on this live

9:12:09

section and you will find out all the

9:12:12

recordings so here you will find out all

9:12:14

the recording from day one to day five

9:12:17

and uh today I'm uh teaching a project

9:12:19

it's a day six and uh if you will open

9:12:22

any sort of a video so here in the

9:12:24

description also you will find out each

9:12:26

and every detail so here you will find

9:12:28

out a course detail here you find out

9:12:30

each and every detail basically whatever

9:12:32

is required so please make sure that uh

9:12:35

like you are enrolling to the dashboard

9:12:36

for the entire resources and all and yes

9:12:39

recorded video is available over the

9:12:40

Inon YouTube channel as well got it so I

9:12:44

think uh this is fine this is clear now

9:12:47

let's start with the project so as you

9:12:49

have seen the uh the topic uh so the

9:12:52

topic is what topic is the project name

9:12:55

is what the project name is a McQ

9:12:56

generator using open Ai and langen chain

9:12:59

now why I took this a particular project

9:13:02

because see uh we have learned each and

9:13:04

everything we have learned each and

9:13:05

every concept so far related to the open

9:13:08

API related to The Lang chain now how we

9:13:10

can utilize those information until we

9:13:13

are not going to implement the project

9:13:16

so in that case we won't be utiliz that

9:13:18

particular information whatever we have

9:13:20

learned even we won't we won't be able

9:13:23

to relate those thing with a real time

9:13:25

thing so that's why I kept this project

9:13:27

for all of you in between and then we'll

9:13:30

try to move into some Advanced concept

9:13:33

like databases and all and we'll try to

9:13:35

create a few more a few more project in

9:13:38

our upcoming session but yeah so here uh

9:13:41

we are going to start from the very

9:13:43

basic project and then we'll go to the

9:13:45

advanced label got it now what all thing

9:13:49

I'm going to discuss in today's class in

9:13:51

today's session along with the project

9:13:53

so here I will teach you the entire

9:13:55

setup of the project so here uh we are

9:13:58

not going to implement this project in a

9:13:59

jupyter notebook so for that we are

9:14:01

going to create a complete development

9:14:04

environment so I will show you how you

9:14:06

can create a like and to and development

9:14:08

environment and then we'll try to deploy

9:14:10

this project as well so in tomorrow's

9:14:12

session I will show you how you can

9:14:14

deploy this project along with the cicd

9:14:17

concept along with the continuous

9:14:18

integration and continuous deployment

9:14:20

concept so in today's session we'll try

9:14:22

to see that how we can set up our uh

9:14:25

development environment and then uh

9:14:27

we'll try to uh implement the Jupiter

9:14:30

notebook regarding a different different

9:14:31

application and then we'll try to

9:14:33

convert that jupyter notebook into a

9:14:36

endtoend application got it yes or no so

9:14:39

the agenda is clear to all of you please

9:14:42

uh do let me know in the

9:14:44

chat yes or

9:15:09

no

9:15:14

great so I think uh we can start and uh

9:15:17

yeah if you are liking the session then

9:15:19

please hit the like button and uh keep

9:15:22

watching so guys uh the first of all let

9:15:24

me write it down each and everything

9:15:26

each and every step uh whatever we are

9:15:28

going to do here and whatever uh we'll

9:15:30

be doing throughout the session so for

9:15:33

that uh I'm using my Blackboard and here

9:15:35

itself I'm going to write it down the

9:15:37

each and everything so first of of all

9:15:40

let me remove it and yes uh I have

9:15:43

opened the fresh one now let me write it

9:15:45

down each and everything uh regarding

9:15:48

today's session so guys see the first uh

9:15:50

thing which we're going to do uh that is

9:15:53

uh environment setup so at the first

9:15:56

place uh we're going to uh set up our uh

9:15:59

environment our development environment

9:16:02

I will show you the complete a project

9:16:04

setup so here let me write it down so

9:16:06

setup development environment so the

9:16:10

first thing which we're going to do uh

9:16:11

we going to set the development

9:16:13

environment now after that what I will

9:16:15

do after setting the development

9:16:17

environment then uh we'll try to uh run

9:16:21

a few experiments run few experiments uh

9:16:25

few experiment in a Jupiter notebook so

9:16:28

we we'll run a few experiment in a

9:16:31

Jupiter notebook after that we'll create

9:16:33

a end to end will'll create a modular

9:16:36

coding like by using this particular

9:16:38

experiment and all so I will do a like

9:16:41

modular coding I will create a several

9:16:43

file and then I will uh try to segregate

9:16:45

the code so uh after uh doing a few

9:16:49

experiment in a Jupiter notebook I will

9:16:51

convert this jupyter notebook into a

9:16:53

modular

9:16:55

one got it modular coding now after that

9:16:59

after uh converting to a model one

9:17:01

Modular One definitely uh like uh uh my

9:17:04

code will be uh my code will be uh ready

9:17:08

and then I will create my web API then I

9:17:10

will create my web API by using the

9:17:13

stream lid so here by using the stream

9:17:15

lid I will be using I will be creating

9:17:17

my web API and after uh creating this

9:17:20

web API definitely for sure I will test

9:17:22

it and finally we'll try to deploy our

9:17:26

application on my cloud platform in my

9:17:28

AWS or aor got it so these are few step

9:17:32

uh these are the these are few things uh

9:17:35

uh basically which we're going to

9:17:36

perform uh regarding this particular

9:17:38

project so today uh I will be uh cover

9:17:41

this two point the first one second one

9:17:43

and maybe the third one and tomorrow I

9:17:45

will create a web API because we have a

9:17:48

time restriction the session is just for

9:17:50

the 2 hour otherwise I can complete this

9:17:53

thing within a uh class itself so today

9:17:56

I'm going to complete this two thing and

9:17:59

tomorrow uh I will be converting uh the

9:18:01

entire code in a modular one and then uh

9:18:04

we are going to create a web API and

9:18:06

finally we're going to deploy the

9:18:08

application got it now after that now

9:18:11

after that what uh we are going to learn

9:18:13

so after completing this thing we're

9:18:15

going to learn about the vector

9:18:17

databases we'll try to learn a vector

9:18:19

databases we'll try to see that what all

9:18:22

options we have if we want to store the

9:18:24

embedding not even the vector databases

9:18:27

what all other options we have so we'll

9:18:29

try to explore about the mongodb

9:18:32

cassendra and we'll try to look into the

9:18:34

SQL base database also and then finally

9:18:37

uh we'll look into the vector databases

9:18:39

different different options we have and

9:18:41

then uh we'll try to use the RG concept

9:18:44

on top of that and we'll create a few

9:18:46

more project so yes uh from today's

9:18:50

onwards our project journey is going to

9:18:52

be start so don't miss it and within 2

9:18:54

week uh our aim to complete at least

9:18:57

three and to end project in a live

9:18:59

session itself got it so I hope this

9:19:02

idea is clear to all of you now uh let's

9:19:05

start uh first uh with the project setup

9:19:08

so the implement impation the project

9:19:10

basically I'm going to implement in a

9:19:12

jupyter notebook so entire development

9:19:14

setup I'm going to create in my uh sorry

9:19:17

I'm going to create in my vs code so for

9:19:19

the entire development I'm going to use

9:19:21

my VSS code and today I will show you

9:19:23

how you can set up your vs code for the

9:19:26

end development got it so for that guys

9:19:29

uh what you need to do first open your

9:19:31

CMD uh uh Implement along with me

9:19:34

because uh I will share the GitHub link

9:19:36

with all of you so that you can uh write

9:19:39

it down the code you can copy each and

9:19:41

everything from there itself and along

9:19:43

with the uh code I will I will be

9:19:45

writing all the commands and uh all

9:19:47

whatever I'm going to use in my uh in my

9:19:50

project so in my project setup and all

9:19:52

so each and everything I will be uh I

9:19:54

will be writing in my GitHub U I will be

9:19:56

writing in my readme file and then I

9:19:58

will give you uh through my GitHub link

9:20:01

so guys uh you can follow uh uh each and

9:20:03

everything along with me so uh first let

9:20:05

me start from the project setup so uh

9:20:09

here here guys uh first of all what you

9:20:11

need to do so in any directory in C

9:20:13

directory in D directory in whatever

9:20:15

folder you need to create uh one folder

9:20:18

you need to create one fresh folder okay

9:20:21

so go in uh go with any directory C

9:20:23

drive uh C directory D directory C drive

9:20:26

D drive e Drive and inside that you need

9:20:29

to create one folder so here you can see

9:20:31

this is my location C user sunny and

9:20:34

here I'm going to create my folder one

9:20:37

fresh folder so for create a folder

9:20:40

there's a command like mkdir by using

9:20:43

this particular command I can create a

9:20:45

folder so here I'm going to write it

9:20:47

down mqd and my project name so let's

9:20:50

say my project name is what McQ

9:20:53

generator so this is the like uh this is

9:20:55

the folder name which I have written now

9:20:58

uh yes I have created my folder now what

9:21:00

I need to do I need to move into my

9:21:02

folder now I need to change the

9:21:04

directory so here I need to move into my

9:21:06

folder I need to change the directory so

9:21:07

for that we have a command like CD CD

9:21:11

McQ generator this is my folder name now

9:21:14

you can see I'm into my folder now I'm

9:21:17

inside my folder and from this

9:21:19

particular folder I need to launch my vs

9:21:21

code so for launching the vs code from

9:21:24

the command promp there is a command the

9:21:26

command is called code dot code space

9:21:29

dot so once you will write it down on

9:21:31

this particular command code space dot

9:21:34

so in that case you will be able to

9:21:36

launch your jupyter notebook in a

9:21:38

current for folder right so here is my

9:21:41

folder name my folder name is what my

9:21:42

folder name is McQ now here you can see

9:21:45

I'm able to launch my j i I'm able to

9:21:48

launch my vs code inside this particular

9:21:51

folder now if you want to verify so for

9:21:53

that what you can do you can go with

9:21:55

your terminal so just click on the new

9:21:57

terminal and here you will find out the

9:21:59

same location which you are seeing over

9:22:02

the command prompt so guys here you can

9:22:04

see you are into the same location which

9:22:07

you were seeing over the command prom

9:22:09

got it now let's say uh if you don't

9:22:11

have this vs code so from there you can

9:22:13

install this vs code so for that you

9:22:16

just need to go through the Google just

9:22:18

search over the Google just search about

9:22:19

the google.com and here write it down vs

9:22:22

code download so write it down here vs

9:22:25

code download so you will get a link for

9:22:27

downloading the vs code and here uh this

9:22:30

is the link guys I'm giving you this

9:22:32

particular link inside the chat and here

9:22:35

uh like you can go through with this

9:22:37

particular link and you can download the

9:22:39

vs code according to your operting

9:22:41

system so if you are using Mac uh so you

9:22:44

can download from here if you are using

9:22:47

the Linux so from uh for the Linux you

9:22:49

can download from here if you're using

9:22:51

Windows so for the windows you can

9:22:52

download from here you will find out all

9:22:55

the three option for a different

9:22:57

different operating system now uh once

9:22:59

you are done uh uh like with the

9:23:01

download and all so after that what you

9:23:03

need to do so after that you need to

9:23:05

install it so just try to do a double

9:23:06

click and install this vs code in inside

9:23:09

your system and then you can follow the

9:23:12

same procedure so you can create a

9:23:14

directory you can uh write it down this

9:23:16

first and then you can change the

9:23:18

directory and from on that particular

9:23:20

directory you can launch the vs code got

9:23:23

it now if you not able to do it by using

9:23:25

this command line so by using uh by

9:23:28

using the UI also you can do the same

9:23:30

thing so for that uh just uh go inside

9:23:33

your directory and here create a new

9:23:35

folder so create a new folder and then

9:23:38

do the right click and check with the

9:23:40

show more option and here you will find

9:23:42

out option for launching this vs code so

9:23:46

by using this uh GUI also you can do a

9:23:49

same thing and by using the command prom

9:23:51

also you can do a same thing so I took

9:23:53

this command promt approach and here you

9:23:55

can see I'm able to launch my VSS code

9:23:59

inside this particular folder so if you

9:24:02

are done till here so please do let me

9:24:04

know in the chat please uh tell me guys

9:24:07

if uh you are done till here

9:24:09

tell me first have you opened your vs

9:24:13

code in a folder if you did it then

9:24:15

please write it on the chat

9:24:31

yes yeah I'm waiting for 1 minute so

9:24:34

until you can open

9:24:38

it

9:24:53

yeah you can use the pyam

9:24:56

also uh not an issue with that py Cham

9:24:59

will also work any ID so here I'm using

9:25:01

this vs

9:25:04

code okay so I think uh now everyone is

9:25:08

done so so let's start with a further

9:25:11

step so after opening this vs code so F

9:25:13

the first thing uh the first thing which

9:25:15

you need to do you need to initialize

9:25:17

the git so here guys uh what you need to

9:25:20

do you need to initialize the git so uh

9:25:22

here see we have a uh like a various

9:25:25

option here once you will click on this

9:25:26

drop- down so here you will find out of

9:25:29

various option like Power Cell G bash

9:25:31

command prom Ubuntu Kali so in your case

9:25:34

it there might be only G bash command

9:25:36

prompt or Powershell but in my case here

9:25:39

you will find here you can see I have a

9:25:41

different different terminal right but

9:25:42

maybe in your case you just have this

9:25:44

git bash and command prom that's that's

9:25:46

all fine right so either you can work

9:25:48

with this G bash or you can work with

9:25:50

the command prom but don't work with

9:25:51

this poers shell because otherwise

9:25:53

unnecessarily you will get uh uh errors

9:25:55

and all so I won't recommend you to uh

9:25:58

work with this poers shell and all so if

9:26:00

you want to work uh with the like with

9:26:03

the terminal so here either use this git

9:26:06

bash or this command Pro don't select

9:26:08

this Powershell so here I'm using this

9:26:10

git bash so here I can easily run my uh

9:26:14

like Linux command also so yes uh if you

9:26:18

don't want to use this git bash so you

9:26:20

can use this command prom also that is

9:26:22

also fine now guys here uh you'll find

9:26:24

out that okay so this is what this is my

9:26:27

G bash now uh here if you are not able

9:26:29

to see the base environment so for that

9:26:32

what you need to do so just try to click

9:26:34

on this View and go with the command

9:26:36

pellet so here you need to go uh you

9:26:38

need to click on The View and click on

9:26:40

the command PL and then select python

9:26:43

interpreter so here you will find out

9:26:45

various interpreter so you need to

9:26:47

select this base interpreter and after

9:26:49

that you need to relaunch this git bash

9:26:51

so in that case uh if if you are not

9:26:54

getting that base environment in your uh

9:26:57

G bad so after uh like following this

9:27:00

step uh definitely you will be able to

9:27:02

see that so here now you can see I have

9:27:05

a Bas environment on my good bash now uh

9:27:07

let me uh let me run the further thing

9:27:10

so the first thing what you need to do

9:27:12

over here like so the first thing you

9:27:14

need to initialize the git right so

9:27:16

inside this directory you need to

9:27:18

initialize the git so for initializing

9:27:21

the git I just need to write it down a

9:27:23

simple command that is what that is git

9:27:25

in it so by using this particular

9:27:27

command I can initialize the git in my

9:27:29

current folder in my local folder so now

9:27:32

this local folder will be treated as a

9:27:34

local repository and then I can uh I can

9:27:38

upload this same folder on my uh GitHub

9:27:42

and yes like that's going to be my

9:27:45

central representing so GitHub is going

9:27:46

to my central repository and as of now

9:27:49

if I'm going to initialize the git in my

9:27:51

local folder so this is what this is my

9:27:52

local repository each and every thing

9:27:55

each and every track actually I'm going

9:27:56

to keep it keep over here itself in my

9:27:59

local folder so that uh like the entire

9:28:02

data you will find out inside the dogit

9:28:04

folder I will show you that so here you

9:28:06

need to write it down this git in it so

9:28:08

once you will write down this g in it uh

9:28:10

so you will be able to initialize the

9:28:11

git inside this particular folder okay

9:28:15

now uh here you can create a file so

9:28:17

here I'm going to create my readme file

9:28:19

so r e a d MD so

9:28:23

readme.md so it's going to be a markdown

9:28:25

file MD means what it's be it's it's a

9:28:28

markdown file so here uh guys you can

9:28:30

see I created my markdown file right now

9:28:34

uh if I want to publish see as of now

9:28:36

see if you will look into this

9:28:37

particular folder so let me reveal it

9:28:39

inside the file explorer so just try to

9:28:41

click uh do the right click on this file

9:28:43

and reveal in the file explorer so here

9:28:46

you will find out this dogit and here

9:28:49

you will find out each and every

9:28:51

information so because of this dogit

9:28:53

folder actually uh this a local folder

9:28:56

is being treated as a local repository

9:28:58

now here you will find out each and

9:29:00

every metadata so regarding your commits

9:29:02

and all so whatever codes you are going

9:29:04

to upload whatever like changes you are

9:29:06

going to made and all right whatever uh

9:29:09

changes you are going to commit and add

9:29:11

so each and every metadata you will find

9:29:13

out inside this dogit folder and why we

9:29:17

use this uh git guys tell me we use this

9:29:19

git for the code versioning got it I

9:29:22

think uh you have a basic idea about the

9:29:24

git so I'm not going into the depth of

9:29:27

this git and all as of I'm just like

9:29:29

giving you the uh the high level

9:29:31

overview that's it now here uh you can

9:29:34

see I have create I have initialized the

9:29:36

git and here you can see this do git

9:29:38

folder inside my uh dogit folder inside

9:29:41

my local repository so is it fine to all

9:29:44

of you I think yes now what I can do

9:29:47

here so here I can publish the branch so

9:29:49

I can publish the this local repository

9:29:52

to my GitHub so for that what you can do

9:29:54

see you can use this uh terminal also

9:29:58

and here this vs code has given you the

9:30:00

GUI option so just click on that just

9:30:02

click on this particular option and here

9:30:05

you will find out uh the various thing

9:30:08

right so uh here you will find out the

9:30:11

various options and all now let me show

9:30:13

you step by step so the first thing what

9:30:15

you need to do so first you need to add

9:30:17

your file so for adding the file you

9:30:19

just need to click on this plus icon so

9:30:22

uh if you want to add the file uh so for

9:30:25

that you need to click on this plus icon

9:30:27

and after that uh like you need to uh

9:30:29

write it on the message so you write

9:30:31

down now that first you run this git in

9:30:33

it and then you run this git ad git ad

9:30:36

and the file name so I'm doing the same

9:30:38

thing over here so by using this plus

9:30:40

icon I'm adding this particular file

9:30:42

right so uh in my uh like staging area

9:30:46

right so and then I will do the commit

9:30:48

after writing a message so here I'm

9:30:49

writing down writing the message uh this

9:30:51

is my first commit so here uh my

9:30:54

messages this is my first commit now

9:30:57

after writing the message what I will do

9:30:59

I will commit it after committing is uh

9:31:02

after committing uh it okay so it will

9:31:04

ask to me would you like to publish this

9:31:06

Branch so I would say yes I would I want

9:31:08

to publish this particular Branch so

9:31:10

here it is asking to me how you would

9:31:13

like to publish it so whether uh as a

9:31:15

private repository or as a public

9:31:17

repository is going to publish over the

9:31:19

GitHub actually so here it is asking to

9:31:22

me how You' like to publish it whether

9:31:24

as a private repository or as a public

9:31:26

repository so as of now I'm going to

9:31:28

publish publish this particular Branch

9:31:30

as a public repository so you can click

9:31:32

on this public repository and yes it

9:31:35

will publish a branch so it is uploading

9:31:37

all the file here you can see and then

9:31:40

it will give you this a particular popup

9:31:42

so here it is telling you that please

9:31:44

sign in with your browser so once I will

9:31:46

uh click on this uh sign in with your

9:31:48

browser so yes it is uh doing that and

9:31:53

uh just wait it is publishing the branch

9:31:57

so it has given me uh this particular

9:32:01

page now let let me authorize it so here

9:32:04

I need to click on this confirm and

9:32:07

after that guys you can can see

9:32:08

authentication succeed so now uh my

9:32:12

branch is uh published let me show you

9:32:15

that so here you can see you can open it

9:32:18

and this is guys this is my Branch okay

9:32:21

so I published this branch on my GitHub

9:32:23

so I hope this thing is uh clear to all

9:32:26

of you and you are able to publish your

9:32:29

branch yes or no guys tell me are you

9:32:33

able to publish your branch um just a

9:32:37

second great so now let me give you this

9:32:39

particular link and so that whatever

9:32:42

code and all I'm going to write it down

9:32:44

so directly you can copy and paste from

9:32:46

here itself from my git so let me give

9:32:49

you this uh particular uh link uh so

9:32:53

that you can copy each and everything

9:32:55

from here itself just a second so did

9:32:58

you get it please uh do let me know in

9:33:01

the chat if you got my

9:33:03

code tell me guys fast sorry if you got

9:33:06

if you got my link then uh please do let

9:33:08

me know in the chat again I'm pasting uh

9:33:11

this particular link so this is my

9:33:13

GitHub link

9:33:17

guys yes please do confirm if you got my

9:33:21

GitHub I given you the GitHub

9:33:33

guys yes or no I am waiting for a reply

9:33:42

please check it check with the popup so

9:33:44

first you need to sign in through the

9:33:45

browser and then only you will be able

9:33:48

to log in if you're not able to follow

9:33:50

this GUI approach uh in that case uh

9:33:53

what you can do so you can uh like uh

9:33:57

push it through the command line

9:34:07

also

9:34:11

yeah if you are not able to log in so

9:34:12

through this uh command line you can uh

9:34:15

configure the username and the uh like

9:34:18

email ID so for that there is a like

9:34:21

command so let me show you that

9:34:22

particular Command right just a second

9:34:25

so what I can do I can show you over

9:34:27

here itself uh so you can search over

9:34:29

the Google how to configure how to

9:34:33

configure get uh username so you can

9:34:38

search over the Google and then you will

9:34:40

get a command so let me give you those

9:34:42

particular command if you are not able

9:34:44

to uh sign in but please make sure that

9:34:46

if you're getting the popup then then

9:34:48

directly you can sign in but if you're

9:34:50

getting any sort of error right so for

9:34:52

that there is a command so get config

9:34:54

hyphen global hyph iph global user.name

9:34:58

and here you need to pass your username

9:35:01

so like whatever username you have so

9:35:03

you just need to pass your username and

9:35:05

then you need to pass the you need to

9:35:07

configure the email also so okay so here

9:35:10

uh for the username and in a similar way

9:35:12

you need to configure the uh you need to

9:35:15

configure the email so let me give you

9:35:17

this uh two command now here let me

9:35:20

write it down that you need to write it

9:35:22

down your your

9:35:24

username

9:35:27

your user

9:35:30

name and here is a command guys so first

9:35:33

try to configure your username and here

9:35:35

again I'm giving you the same command

9:35:37

along with the username you can

9:35:39

configure your email also so let me

9:35:42

write it on the email and in the double

9:35:45

code actually you need to pass your

9:35:47

email so here your email ID so guys uh

9:35:52

run this two commands on your uh on your

9:35:55

uh command line actually and then you

9:35:57

will be able to sign in from here itself

9:36:00

got it yes or no till here uh everything

9:36:03

is fine everything is clear I given you

9:36:06

the GitHub Link in the chat so so um you

9:36:08

can click on that and you can uh like

9:36:11

you can check with my repository each

9:36:12

and everything I'm going to update over

9:36:14

there itself so that uh you can copy and

9:36:17

paste the code directly from there now

9:36:19

guys uh here uh if you're not able to

9:36:21

find out uh if you're not able to click

9:36:23

on this link so you can search uh with

9:36:26

my username also so or over the Google

9:36:29

you can write it down s Savita GitHub

9:36:31

you will get the GitHub directly it will

9:36:32

give you the link link of the GitHub and

9:36:35

this repository is a public repository

9:36:37

so Direct you can go through with my

9:36:39

repository and you will find out this

9:36:41

particular project got

9:36:43

it great yes uh from the same terminal

9:36:46

you need to configure your username and

9:36:49

email ID okay now here we have published

9:36:53

uh this code as a uh like to my GitHub

9:36:57

right this this particular repository

9:36:59

this a local repository I publish to my

9:37:01

GitHub now I need to follow few more

9:37:03

step for setting up my environment so

9:37:06

the next thing what I need to do here I

9:37:08

need to create my environment because

9:37:10

I'm not going to work in my base

9:37:12

environment and I'm going to create a

9:37:14

virtual environment over here okay so

9:37:17

for creating a virtual environment there

9:37:19

is very a simple command so let me write

9:37:21

it down on that command so cond condu

9:37:24

create condu create hyphen P okay hyphen

9:37:29

p and here you need to write it on the

9:37:31

environment name so here my environment

9:37:33

name is going to be en EnV en EnV and

9:37:36

then you can write down the python

9:37:38

version python is equal to 3.8 so I'm

9:37:41

using over here 3.8 and then hyphen y so

9:37:44

this is my command uh which I'm going to

9:37:46

run and by using this particular command

9:37:49

I can create the environment in a

9:37:51

current directory itself in a current

9:37:53

repository so here you can see this is

9:37:56

what this is my environment uh which is

9:37:58

being created so just wait for some time

9:38:00

it will take uh few second let it create

9:38:04

so my environment name is what my

9:38:06

environment name is ENB

9:38:08

now here my environment is getting

9:38:11

created and it is done now after that

9:38:14

what I need to do guys so here I need to

9:38:16

activate my environment so for

9:38:17

activating the environment you need to

9:38:19

write it down Source activate if you are

9:38:21

using this git terminal so in that case

9:38:23

instead of this cond you can write down

9:38:25

this Source because sometimes this cond

9:38:28

gives issue so I'm not going with this

9:38:30

cond here so I'm using this source of

9:38:32

over here so you need to write it down

9:38:34

the source activate activate and here

9:38:37

Dot dot means current directory and from

9:38:39

this current directory there is a folder

9:38:41

folder name is environment e andv right

9:38:44

so here you can see I'm able to activate

9:38:47

my environment and here you can see this

9:38:49

is what this is my virtual environment

9:38:51

got it now let me clear it first of all

9:38:54

so here now you can see it is giving me

9:38:56

a uh like uh it is giving me a how it is

9:38:59

giving me so many files uh for adding

9:39:01

right so U like here it is giving me

9:39:04

more than 5,000 file but I cannot like

9:39:07

add all all the files I cannot like add

9:39:10

all the files on my GitHub right so for

9:39:12

that what I will do if I want if I don't

9:39:14

want to track it if I don't want to

9:39:15

track this particular file so I can U

9:39:17

mention this name this EnV name in in

9:39:20

the file the file name is what the file

9:39:21

name is dog ignore so here let me create

9:39:24

one more file in this uh particular

9:39:26

directory and my file name is what my

9:39:29

file name is uh dogit ignore so here I'm

9:39:32

writing this uh dot get ignore uh and

9:39:34

the touch command is the touch command

9:39:36

for creating a file so touch dog ignore

9:39:40

now here you can see I'm able to create

9:39:42

this particular file this dog ignore now

9:39:45

inside this file you can mention the

9:39:48

name the name of whatever file which you

9:39:51

don't want to drag so here if I don't

9:39:54

want to track this EnV folder right if

9:39:57

you don't want to track these many file

9:40:00

if I don't want to upload it in my cloud

9:40:02

repository right or if I don't want to

9:40:05

track it uh by using this git so so you

9:40:07

can mention it you can mention this

9:40:09

folder name inside this dot inside this

9:40:13

dog ignore file so here I'm writing EnV

9:40:16

uh EnV is nothing it's a folder name now

9:40:19

once I return it once I return this uh

9:40:21

EnV inside this do G ignore now you can

9:40:24

see it is not going to track it at all

9:40:27

so here uh it is not going to track uh

9:40:29

this particular folder now and it is

9:40:32

giving you only it is giving me only one

9:40:34

file now yes I can uh add it so here uh

9:40:37

first I'm going to add this file get add

9:40:39

and this file name now here I'm writing

9:40:42

my message so I have added I added my

9:40:46

get ignore so this is my message and

9:40:49

after that what I will do after after

9:40:52

this after this one I'm going to commit

9:40:54

it so edit my get ignore and then do the

9:40:56

commit now uh you need to click on this

9:40:59

sync changes your and your changes will

9:41:01

be sync so the same file you will find

9:41:04

out the same file you will find out in

9:41:06

my G iub also so uh let me show you

9:41:10

where you will find out that let me open

9:41:12

my GitHub and uh here guys here is my

9:41:15

GitHub let me show you the

9:41:19

repository here is my all the

9:41:22

repository and this is the uh like

9:41:25

folder this is my like project actually

9:41:27

now see uh I just added this dot get

9:41:29

ignore now see see that uh commit just

9:41:32

now just now I committed uh this

9:41:35

particular file and here you can see my

9:41:37

dotg ignore now once you will open it so

9:41:40

here you will find out the folder name

9:41:41

so the folder name is what EnV so I

9:41:44

don't want to track this file throughout

9:41:46

my process right so I uh if I don't want

9:41:49

to track this file at all so yes uh for

9:41:52

that I will mention it inside my dog

9:41:54

ignore file got it now uh till here I

9:41:58

think everything is fine everything is

9:42:00

clear and I hope you are of you are able

9:42:03

to follow me till here so please do let

9:42:07

me know in the chat guys if uh uh

9:42:10

everything is clear everything is fine

9:42:11

till here what about 3.9 yes you can use

9:42:14

3.9 3.10 as well but don't use 3.11 3.12

9:42:18

or 3.13 till 3.9 and 10 it's fine but

9:42:22

please make sure that uh uh please make

9:42:26

sure that you are going to use the same

9:42:27

version which I am using uh so you won't

9:42:30

face any sort of a issue any you won't

9:42:33

get any sort of error uh during the

9:42:35

implementation got it

9:42:38

yeah so if it is done then uh please do

9:42:41

let me know guys please write it on the

9:42:43

chat and uh please hit the like button

9:42:45

if you are liking the session

9:42:51

then done can I get a quick confirmation

9:42:54

in the

9:43:06

chat

9:43:14

great so I think uh now everyone is done

9:43:17

so here I have created my environment

9:43:20

now guys what you need to do so after

9:43:22

that you need to create your

9:43:23

requirement. txt so inside the

9:43:25

requirement. txt I'm going to mention

9:43:27

the entire requirement right so for

9:43:30

creating a requir txt so from here also

9:43:34

you can create by using this particular

9:43:36

icon other you can use the same command

9:43:39

same a touch command by using that

9:43:41

command also you can create the require.

9:43:43

txt in a current folder in a current

9:43:46

repository now uh for creating a requir

9:43:48

txt so I'm using this particular icon

9:43:51

and here I'm writing requirement R Qi r

9:43:55

m m n ts. txt now in this a particular

9:44:00

file I'm going to mention all the

9:44:02

requirement whatever requirement I'm

9:44:05

having regarding this project right so

9:44:08

I'm mentioning all the requirement

9:44:10

inside this require. txt so guys uh let

9:44:13

me copy and paste all the requirement or

9:44:16

whatever is there all I'm going to write

9:44:18

it down here itself so the first thing

9:44:20

which I'm going to use uh in my project

9:44:22

that's going to be a open a so I'm using

9:44:25

the open a API and for that this open a

9:44:28

package is required already I shown you

9:44:30

how to use openi API how to install this

9:44:33

particular package because earlier we

9:44:35

also we have created the environment

9:44:37

and there also we have installed this

9:44:39

open AI if you have attended my previous

9:44:41

session then definitely you must be

9:44:43

aware about this particular thing now

9:44:46

here uh there's a open a now the second

9:44:48

thing which I need to uh install in my

9:44:51

local environment in my current virtual

9:44:53

environment that's going to be a len CH

9:44:55

so here guys let me write down the Lang

9:44:57

gen so you need to install the langen CH

9:44:59

in your current environment first thing

9:45:01

is open Ai and the second thing is what

9:45:03

the second thing is the Len chain the

9:45:05

third one uh which I'm going to write it

9:45:07

down over here that's going to be a

9:45:08

stream L because here I'm going to

9:45:10

create a API by using this stream l so

9:45:13

here I'm going to like install the

9:45:16

stream lit in my local uh like

9:45:19

environment in my current virtual

9:45:21

environment the second thing which I'm

9:45:23

going to be installed over here uh

9:45:25

that's going to be a python hy. ENB so I

9:45:29

will tell you what is the use of this

9:45:31

particular U like uh uh this particular

9:45:34

package python hyon do EnV so I'm going

9:45:38

to install this uh python hy. EnV

9:45:41

package and I will tell you what is a

9:45:44

use of this particular package and apart

9:45:46

from that I'm going to use I'm going to

9:45:48

download one more package that is going

9:45:50

to be a pi PDF so Pi PDF two so these

9:45:54

many thing I'm going to be install in my

9:45:57

current virtual environment okay and

9:46:00

apart from that I'm going to create

9:46:02

couple of more folder right couple of

9:46:04

more folder I'm going to create in my

9:46:07

local repository in my local folder so

9:46:10

uh couple of more uh files and folder

9:46:12

not only folder files also so here uh uh

9:46:15

requ txt is done now I'm going to create

9:46:18

one more file the file is going to be

9:46:20

setup uh setup uh setup.py file now why

9:46:25

we use this setup.py file we use the

9:46:27

setup.py file for installing a local

9:46:30

package local package in my virtual

9:46:33

environment if I want to install the

9:46:36

local package in my virtual environment

9:46:38

for that we use the setup.py file got it

9:46:42

so I created the setup.py file I created

9:46:44

the re. txt now let me create a one more

9:46:48

file so here I'm going to create so not

9:46:50

file actually I'm going to create one

9:46:52

folder here my folder name is going to

9:46:54

be SRC SRC means what SRC means source

9:46:57

code now inside the SRC I'm going to

9:47:00

create a one more folder and the folder

9:47:02

name is going to be so first of all let

9:47:04

me create a file inside this SRC the

9:47:06

file file name is going to be dot uh

9:47:09

sorry underscore

9:47:11

inore dopy so here inside this SRC

9:47:14

folder I'm going to create init file

9:47:17

okay init file I will tell you why we

9:47:19

create this init file inside the a

9:47:21

folder what is the requirement of that

9:47:23

and uh each and everything I will

9:47:25

explain you don't worry so here uh you

9:47:27

can see I've created this init file and

9:47:29

inside this inside this SRC folder

9:47:31

itself I'm going to create one more

9:47:33

folder the folder name is going to be

9:47:35

McQ itself so m McQ generator and this

9:47:38

is what this is my project so McQ

9:47:41

generator so this is what guys this McQ

9:47:44

generator is nothing it's my folder and

9:47:46

inside this also I'm going to create one

9:47:48

init file so here let me create the init

9:47:51

file inside uh this folder also so init

9:47:57

init.py so what I did guys tell me so

9:48:00

here if you will look into this uh if

9:48:02

you will uh let me reveal it inside the

9:48:04

file explorer and let me show you that

9:48:07

what I did so here uh just look into the

9:48:10

SRC folder so inside this SRC folder I

9:48:13

created two things first I created this

9:48:15

init file and the second one I created

9:48:18

the McQ

9:48:19

generator folder and whatever source

9:48:22

code whatever source code I'm going to

9:48:24

write it down throughout my project so

9:48:26

I'm I will be writing down here

9:48:28

itself apart from The jupyter Notebook

9:48:32

so each and every line of code modular

9:48:34

coding I will be doing over here itself

9:48:36

inside my McQ generator folder got it

9:48:41

now here uh what I did I created this

9:48:43

init file underscore uncore inore ncore

9:48:46

now what is the requirement of this init

9:48:48

file why I did it because see if I let's

9:48:51

say uh like here I want to consider this

9:48:55

folder this folder as a package as a

9:48:57

local package right this folder actually

9:49:00

I want to consider as a package now what

9:49:02

is the meaning of the package so the

9:49:04

package is nothing it's a it's a folder

9:49:06

itself folder which is containing a

9:49:09

multiple python file and inside the

9:49:11

python file you have a code you have a

9:49:13

code like a classes functions and all

9:49:16

right so you have a folder inside the

9:49:18

folder you have a file and inside the

9:49:20

file you have written a code right so

9:49:23

now guys see uh let's say if you're

9:49:24

installing pandas if you're installing

9:49:27

numai if you're installing maybe open a

9:49:29

or let's say if you're installing langen

9:49:31

so what is this tell me it's nothing

9:49:33

it's a full it's a package itself it's a

9:49:35

package now and package means what

9:49:36

package package nothing it's a folder

9:49:38

right folder is what F the package is

9:49:40

equal to folder right folder itself is

9:49:43

called a package now inside the package

9:49:45

or inside the folder what you will find

9:49:47

out inside that you'll be having a

9:49:48

multiple python files right and inside

9:49:51

those python file you uh someone has

9:49:53

written a code uh in terms of function

9:49:55

and classes and that is what uh that

9:49:57

only you are going to use right so this

9:50:01

uh lenen this open this pandas napai

9:50:05

someone already created it and they have

9:50:06

uploaded over the pii repository and

9:50:08

from there itself you are going to

9:50:10

install it inside your project but here

9:50:12

this McQ generator actually it is your

9:50:15

local package where you are going to

9:50:17

create a multiple folder mul multiple

9:50:19

python file and uh if you want to

9:50:22

treated if you want to treat this folder

9:50:25

as a package so for that there's a

9:50:26

convention from the python side you will

9:50:28

have to mention this init file inside

9:50:30

the folder right so here my folder is

9:50:33

what my folder name is SRC SRC means

9:50:35

what it's a short form of the source

9:50:37

code SRC now this SRC actually I want to

9:50:40

treat as my local package so there is a

9:50:43

convention from the python side you need

9:50:45

to mention this init file or you need to

9:50:46

create this init file inside this folder

9:50:50

then only it will be treated as a local

9:50:53

package I think the idea is clear now so

9:50:56

by using the setup.py file by using this

9:50:59

setup.py file I'm installing this local

9:51:02

package in my current virtual

9:51:04

environment got it I think now each and

9:51:07

everything is clear to all of you now

9:51:09

let me back to my code so here is what

9:51:12

here is my code so I created couple of a

9:51:15

folder couple of file now guys uh let me

9:51:18

create one more file uh like one more

9:51:21

folder over here and the folder name is

9:51:23

going to be experiment so here I'm going

9:51:25

to be create one more folder and the

9:51:28

folder name is going to be experiment

9:51:30

and inside this particular folder I'm

9:51:33

going to create my Jupiter notebook I'm

9:51:36

going to create my ipb file okay so for

9:51:39

creating ipb file inside this particular

9:51:42

folder so you can click on this folder

9:51:43

and click on this file icon and then you

9:51:46

can write down your name so here I can

9:51:49

uh write down the name any any name I

9:51:51

can write it down here let's say McQ dot

9:51:55

ipnb uh do

9:51:58

ipnb so what is the meaning of this

9:52:00

ipynb so ipynb means nothing uh I python

9:52:04

uh notebook okay that's the full form of

9:52:06

this IP YB now here you can see this is

9:52:09

what this is my jupyter notebook now

9:52:10

whatever experiments uh whatever experim

9:52:13

experiments will be there throughout

9:52:15

this project so I'm going to do my

9:52:17

entire experiment over here in my

9:52:19

Jupiter notebook and then I will convert

9:52:22

into an end code into my end to end

9:52:24

pipeline got it now here uh the first

9:52:27

thing what you need to do so you need to

9:52:29

select the kernel so just click on this

9:52:31

select kernel and then click on this

9:52:33

python environment then you will get all

9:52:35

the python environment so this is your

9:52:37

current virtual environment so this this

9:52:40

the this interpreter which you can see

9:52:41

over here the first place which is a

9:52:43

recommended one so this is from your

9:52:45

current virtual environment from the EnV

9:52:47

itself here you can see EnV python.exe

9:52:50

so here I'm going to select the same

9:52:52

kernel so here I have selected this

9:52:54

particular kernel now you can see uh I'm

9:52:57

done with everything now I just need to

9:53:00

uh I just need to like uh install the

9:53:03

recom txt I will start by writing the

9:53:06

code so let me give you this each and

9:53:08

every file and folder so for that I just

9:53:11

need to add it from here itself so I'm

9:53:13

going to add all the files and all over

9:53:17

here I think it is done now I will write

9:53:20

it on my uh like message so my message

9:53:23

is structure updated so here is what

9:53:26

here's my message guys now let me commit

9:53:29

it so structure s u c Tru structure

9:53:33

updated now I have written my message

9:53:35

after adding all the file

9:53:37

now once I will do the commit and it

9:53:39

will ask to my sync it will it will ask

9:53:41

to me would you like to sync changes so

9:53:44

yes I want to do it now I will click on

9:53:46

okay so as soon as I will click on okay

9:53:49

you will find out every file and folder

9:53:51

in my repository itself so now let me

9:53:54

show you uh every file and folder uh so

9:53:58

here guys you can see I have a

9:54:00

experiment folder now inside that there

9:54:02

is my file ipv file that's what this

9:54:05

this this file this particular file I'm

9:54:07

going to use for my entire experiments

9:54:10

and all and here you will find out my

9:54:12

SRC folder inside the SRC folder you

9:54:14

will find out the init file and one more

9:54:16

folder that is what that the McQ

9:54:18

generator and then you will find out

9:54:20

this setup.py also so here I have the

9:54:23

setup.py as of now you won't be able to

9:54:26

find out any sort of a code over here

9:54:28

but don't worry I will keep it uh inside

9:54:30

my setup.py file and here you can see my

9:54:33

require. txt so here I have mentioned

9:54:35

all the requirements got it now let me

9:54:39

uh give you this link to all of you so

9:54:42

I'm pasting this link inside the chat

9:54:44

and if you're not able to click on that

9:54:46

so you can search over the Google let me

9:54:48

search in front of you only so just go

9:54:51

through the Google and search Sun Savita

9:54:55

GitHub so once you will search it uh

9:54:57

then automatically you will get a GitHub

9:54:59

link just go through with the GitHub

9:55:00

link and here click on the repository so

9:55:03

here is a repository click on the

9:55:05

repository and the Very first project

9:55:07

this one McQ generator uh so just click

9:55:10

on this uh this particular project and I

9:55:12

have kept each and everything over here

9:55:14

itself inside one folder so if you are

9:55:17

done till here then please do let me

9:55:19

know in the

9:55:24

chat yes in my previous class I shown

9:55:26

you how to use hugging pH API Hub don't

9:55:30

worry uh after this project I will use

9:55:33

the open source model only I w't going

9:55:35

to use any

9:55:36

uh like any model from the openi itself

9:55:39

but yeah in today's project in the very

9:55:41

first project I'm going to use the openi

9:55:43

API along with the Len chain got

9:55:51

it tell me guys uh is it fine to all of

9:55:56

you are you able to create an

9:56:01

environment and uh did you publish

9:56:05

it

9:56:14

have you created a environment did you

9:56:16

created a GitHub um and sorry did you

9:56:19

initialize the a git basically and did

9:56:21

you publish your repository if

9:56:23

everything is done then uh please do let

9:56:25

me know guys I will uh move with a

9:56:27

further step so please uh write on the

9:56:30

chat if uh you are done till here then I

9:56:33

will proceed uh with the further

9:56:37

commands don't worry I will give you all

9:56:39

the thing all the commands and all in

9:56:41

our documented format so you won't face

9:56:44

any such issues at all or in a single uh

9:56:49

like go you can run like each and

9:56:51

everything don't worry I will give you

9:56:52

that first of all tell me uh if you are

9:56:54

able to do along with uh if you are able

9:56:57

to do till here if you are able to do

9:56:59

these many thing then uh please give me

9:57:01

a quick confirmation or if you are

9:57:02

comfortable till here please do let me

9:57:05

know

9:57:26

fine so I think uh we can proceed now so

9:57:30

uh here I have created uh you can see uh

9:57:33

I created uh many files and folder now

9:57:36

let me open this setup. py5 okay so here

9:57:39

I have opened my setup.py file and here

9:57:42

I'm going to write it down uh some sort

9:57:44

of a code so what I can do let me copy

9:57:47

the code uh there is only just one

9:57:49

function and here I pasted the code got

9:57:52

it now uh just look into the code so

9:57:55

what I have written over here so here I

9:57:57

have imported one uh statement uh the

9:58:01

statement is what the statement is a

9:58:03

find package so from setup tool I'm

9:58:05

going to import the find package and

9:58:08

here is what here is my setup here's my

9:58:10

method setup method now here I have

9:58:12

mentioned couple of thing uh so I'm

9:58:15

calling this particular method setup a

9:58:16

method and uh I have mentioned uh some

9:58:19

parameters so the first parameter is a

9:58:21

name so here I'm going to write down my

9:58:24

here I'm going to write down the name of

9:58:26

the package now here is a version

9:58:28

version of the package now here is the

9:58:30

author author is a sunny sun Savita

9:58:33

author email sunny. Savita a and here is

9:58:37

install requirement so these are the

9:58:38

package which is like required okay now

9:58:41

here is a package so find package so

9:58:43

once uh see uh this find package

9:58:46

actually this this particular method

9:58:47

only it is responsible for finding out

9:58:49

the local package for from your local

9:58:53

directory so wherever uh it is able to

9:58:56

find out this dot init file wherever it

9:58:59

is able to find out this dot init file

9:59:01

it will consider that folder as a

9:59:05

package got it now uh here you can see

9:59:09

so I have imported this thing find

9:59:11

package setup uh find package find

9:59:14

package and setup method and I have

9:59:15

written all like these many thing over

9:59:17

here right so this is the like name of

9:59:20

my package uh which I have written over

9:59:23

here right each and everything is clear

9:59:24

each and everything F now see guys if

9:59:27

you want to install this package so for

9:59:31

that there's a command the command is

9:59:33

PIP install package name right I think

9:59:36

you all agree so if you want to install

9:59:38

this particular package open a load Lang

9:59:41

Chen stream late python python. EnV P

9:59:45

PDF so for that there is a command the

9:59:48

command is PIP install and package name

9:59:50

if you want to install this re. txt so

9:59:53

for that there is a command the command

9:59:55

name is what the command name is PIP

9:59:57

install hyr re. txt right but if you

10:00:01

want to install this a local package

10:00:04

into your current virtual environment so

10:00:06

uh how we can do that so for that also

10:00:09

we have a command the command is what

10:00:11

the command is directly you can install

10:00:13

the setup.py file you can write it down

10:00:16

python setup.py install so in that case

10:00:20

it will install or it will download all

10:00:22

the current package from your folder

10:00:24

into the virtual environment got it

10:00:28

that's the first way the second way is

10:00:30

what so here you can write it down in

10:00:31

the requir of txc itself you can write

10:00:33

it down hyph e do

10:00:36

right so uh if you are writing this hyph

10:00:39

e dot so in that case it will search all

10:00:43

the local package all the local package

10:00:46

into your current directory into your uh

10:00:48

current folder and it will download or

10:00:51

it will install it inside your virtual

10:00:53

environment again I'm repeating see if

10:00:55

you want to install this particular

10:00:57

package so for that there is a command

10:00:59

pip install re. TX Pap install package

10:01:02

name if you want to install all the

10:01:04

package by using the re. TX XT so there

10:01:06

is a command pip install hyphen r. txt

10:01:09

got it now but see let's say if you want

10:01:11

to install this local package into your

10:01:14

virtual environment so how you can do

10:01:16

that so for that you have two ways the

10:01:19

first one python setup.py install if you

10:01:22

running this command so definitely you

10:01:24

will be able to install it the second

10:01:26

one is what the second one is you can

10:01:28

mention this hyphen e dot inside your

10:01:30

record. txt so automatically it will

10:01:33

search this it will search out the

10:01:35

packages into your current folder into

10:01:38

your current repository and it will

10:01:40

execute the setup.py in backend got it

10:01:44

great now what I'm going to do here I'm

10:01:46

going to be install this require. txt

10:01:49

and so for first of all let me show you

10:01:51

that what all packages we have inside

10:01:53

the current virtual environment so if I

10:01:55

will write it on the PIP list uh so here

10:01:58

you will find out that we just have this

10:02:00

three packages three to four packages

10:02:02

into my current virtual environment how

10:02:05

many packages this guys three to four

10:02:06

packages only right which comes uh by uh

10:02:09

which is a by default only which comes

10:02:11

uh along with the environment itself

10:02:13

whenever we are going to create an

10:02:14

environment now if I want to install all

10:02:17

these packages into my current virtual

10:02:19

environment so how we can do that so uh

10:02:22

if I want to like run this re. txt so

10:02:24

how we can do that so for that there is

10:02:26

a command let me write down the command

10:02:28

pip install hyr requirement. txt so pip

10:02:34

install hyphen R re txt so once I will

10:02:37

hit enter so here you can see my all the

10:02:39

packages is getting installed into my

10:02:42

current environment so just wait for

10:02:44

some time uh it is getting installed and

10:02:47

uh it will take some time uh tell me

10:02:50

guys are you doing a with

10:02:53

me yes you can use it uh if you want to

10:02:56

make a mini project so definitely you

10:02:58

can use it and even you can create it uh

10:03:01

here itself and you can showcase as a

10:03:03

mini

10:03:04

project tomorrow we are going to deploy

10:03:07

it also after creating a web API and

10:03:09

then uh by using the advanced concept we

10:03:12

are going to create one more application

10:03:15

so how's the session so far uh did you

10:03:17

like the

10:03:26

session tell me guys uh did you like the

10:03:29

session did you like the U like

10:03:34

content

10:03:46

if you're liking the session then please

10:03:48

hit the like

10:04:04

button

10:04:09

yeah still it is installing so it will

10:04:11

take some time I'll let it

10:04:34

install

10:04:45

yes you can go through with my GitHub

10:04:46

link so here is my GitHub link just wait

10:04:48

I'm giving you

10:05:04

that

10:05:22

still it is downloading

10:05:25

uh I think we should wait

10:05:34

more

10:05:48

yeah I think now it is done so uh first

10:05:51

of all let me clear the screen and uh

10:05:54

here uh you will find out that it has

10:05:57

created one folder uh the folder name is

10:06:00

what McQ

10:06:02

generator. eggy info so so it has

10:06:06

created one folder and this folder

10:06:08

actually uh it is having the entire

10:06:11

information regarding your local package

10:06:13

so you can visit and you can check with

10:06:15

the different different files over here

10:06:17

so this is the package information

10:06:19

metadata version this one this is the P

10:06:22

package version right this is the

10:06:24

package name author is sunny and author

10:06:26

email ID reir txt so these are are these

10:06:30

all are the requirements actually right

10:06:32

along with the packages now you will

10:06:33

find out all the like details inside

10:06:36

this particular folder the folder name

10:06:38

is what McQ generator. ayen info it has

10:06:43

created a various file inside that which

10:06:45

is keeping all the or which is uh like

10:06:48

uh keeping all the like meta information

10:06:51

regarding your project got it I hope uh

10:06:55

this thing is clear to all of you now uh

10:06:58

what I can do uh first of all let me

10:07:00

close all the files from here now let me

10:07:03

open my app IP VV file and here what I'm

10:07:07

going to do here I'm going to here I'm

10:07:09

going to like uh run

10:07:13

my uh like import statement so what I

10:07:16

can do I can run import OS so here I'm

10:07:19

going to write import OS import Json

10:07:23

import Os Os means what opening system

10:07:26

and here I'm writing import Json import

10:07:30

Json now here I writing import pandas as

10:07:34

PD pandas as PD and here let's say I'm

10:07:38

writing import Trace bag so these are a

10:07:41

few uh uh like a few packages basically

10:07:46

which I imported over here now if I want

10:07:48

to run it now if I want to run this

10:07:50

particular cell so for that I just need

10:07:52

to press shift plus enter right just

10:07:55

press shift plus enter and you will be

10:07:57

able to run it now as soon as you will

10:08:00

run it it will ask you would you like to

10:08:01

install the IPI kernel yes I want to

10:08:04

install it because without that I won't

10:08:06

be able to execute this particular

10:08:09

notebook so here you need to click on

10:08:11

the install and my IPython kernel ipy

10:08:14

kernel is getting installed guys so it

10:08:17

will take uh some time so let it install

10:08:19

and then I will explain you the further

10:08:21

thing further

10:08:24

concept I given you the GitHub Link in

10:08:27

the chat uh you can search over the

10:08:30

GitHub uh sorry you can search over the

10:08:32

Google s with the GitHub and then you

10:08:34

will get the GitHub link my GitHub link

10:08:36

and check with the very first repository

10:08:38

very first project that is the McQ

10:08:39

generator itself the project name the

10:08:42

folder name is same McQ generator here

10:08:44

you can see this one McQ generator just

10:08:46

search over the Google Sun Savita

10:08:50

GitHub so here you can see my ipy kernel

10:08:54

is getting installed so let it install

10:08:56

and after that I will write it on my

10:08:58

further code and uh let I will show you

10:09:01

uh further concept as well uh regarding

10:09:04

this um and entire project

10:09:34

okay

10:10:07

yeah so now it is done and here you can

10:10:09

see uh we are able to import this a

10:10:13

particular statement import Os Os means

10:10:15

operating system Json pandas and

10:10:18

traceback also now guys here what you

10:10:21

need to do the next uh import statement

10:10:24

which I'm going to write it down over

10:10:25

here which is going to be a opena itself

10:10:28

so here I'm going to use the Len chain

10:10:31

and by using the Len chain I'm going to

10:10:33

import this chat over open API right

10:10:36

because I want to access the open API

10:10:39

and by using this particular method only

10:10:42

I'll be able to access the open a API

10:10:44

now let me run it so it's the same

10:10:46

method it's the same method which I have

10:10:48

shown you in my previous classes so

10:10:51

there I was using the lenin. llm opena

10:10:54

now in the recent version in the updated

10:10:56

version they have given you one more

10:10:58

method it's a similar one only it's

10:11:00

updated one and which is doing the same

10:11:02

thing uh like like the previous one like

10:11:05

the open a method and the method name is

10:11:07

what the method name is chat open AI so

10:11:10

yes uh we are able to import this method

10:11:13

and now what I need to do so uh actually

10:11:16

we this is a this is not a method this

10:11:17

is a class so here what I'm going to do

10:11:19

I'm going to create a object of this

10:11:21

particular class now so for that let me

10:11:23

copy it and let me paste it over here so

10:11:26

this is going to my llm so by using this

10:11:29

particular uh method itself I will be

10:11:31

able to call my open API and I will be

10:11:34

able to collect the llm model inside my

10:11:37

llm variable right so for that I need to

10:11:40

mention couple of uh couple of parameter

10:11:43

so here I'm going to mention few

10:11:45

parameter let me do it over here so

10:11:47

these are the parameter guys which I

10:11:49

have mentioned over here so the first

10:11:51

parameter is going to be open a API key

10:11:54

and here basically I need to mention the

10:11:56

key key of the open a open API now after

10:12:00

that uh there is a model name so here

10:12:03

I'm going to use gpt3 .5 turbo model and

10:12:06

then uh I I I have created one more

10:12:09

parameter I I'm going to write down one

10:12:11

more parameter that is going to be a

10:12:12

temperature you know what is the meaning

10:12:14

of temperature so here I'm going to set

10:12:15

the value 0.5 so between 0 to two you

10:12:18

can mention any value of the temperature

10:12:21

so what is the meaning of that the

10:12:23

meaning is nothing meaning is very very

10:12:24

simple you are going to like you want to

10:12:27

create a model if you are mentioning uh

10:12:29

like if you're mentioning the value near

10:12:31

to two right so the range is from 0 to

10:12:35

two if you are mentioning the value near

10:12:36

to two this will be more creative if the

10:12:38

value is will be near to zero so the

10:12:40

model will be less creative it will give

10:12:42

you the state forward answer that's it

10:12:44

now here guys this key will be required

10:12:48

this open AI key will be required how we

10:12:51

can get the open key I shown you how to

10:12:54

generate open key in my previous classes

10:12:57

right again I'm not going to show you

10:12:58

that now here actually I'm going to

10:13:01

collect my openi key but this time I'm

10:13:04

not going to paste it directly over here

10:13:06

instead of that what I'm going to do I'm

10:13:09

going to use my OS module so here what

10:13:12

I'm going to write it down I'm going to

10:13:13

write it down this a particular uh

10:13:16

method I'm going to call this os. get

10:13:19

environment method that uh os. get

10:13:22

environment key method so here I'm going

10:13:24

to call this os. getv and here uh this

10:13:29

is what this is my environment variable

10:13:32

so what I can do guys I can create uh

10:13:34

environment variable I can create one

10:13:36

environment variable into my uh Windows

10:13:39

environment variable and I can read it I

10:13:42

can read my key from there okay I can

10:13:45

read my key from there the second way I

10:13:47

can export it temporarily right so here

10:13:50

I can U on my uh terminal itself I can

10:13:54

write it down

10:13:56

export and here I can mention this a

10:13:58

variable name open API key and I can

10:14:01

pass the value in that case also I will

10:14:03

be able to read it the third Third Way

10:14:05

is there the Third Way is like you can

10:14:07

create your EnV file right you can

10:14:10

create your local environment file and

10:14:12

there inside that particular file

10:14:14

whatever a variable is required whatever

10:14:16

important variable is there you can keep

10:14:18

it over there itself right the first one

10:14:20

is a global approach uh Global means

10:14:22

what so here if you are going to search

10:14:24

environment variable in your windows

10:14:26

search box so you will get the uh you

10:14:29

will get the uh environment variable all

10:14:32

the list of the environment variable

10:14:34

here you can see right so you will get

10:14:36

the list of the environment variable

10:14:38

this one right this one now here you can

10:14:40

see I I created one key and I keept it

10:14:43

over here so from there also I can read

10:14:45

it from there also I can read it by

10:14:47

writing a same thing I I just need to

10:14:49

mention the key the key name over here

10:14:52

the second way the second way is a

10:14:53

temporary way temporary way means you

10:14:55

can export the key over here Itself by

10:14:58

using the export command you just need

10:15:00

to write down the export and here you

10:15:02

can mention the variable name and you

10:15:03

can pass the value of that particular

10:15:06

variable that's the second way now the

10:15:08

Third Way is what here you can create

10:15:11

EnV file so EnV file in your local

10:15:14

repository itself so no need to create

10:15:17

any sort of a variable in your

10:15:18

environment variable here itself inside

10:15:21

this EnV file itself you can keep your

10:15:24

all the variable all your secret

10:15:26

variable and by using the same command

10:15:29

you can read it so that is the third way

10:15:31

so I'm going to select the third way the

10:15:33

third option so here I'm going to create

10:15:35

the EnV file okay so EnV file uh so this

10:15:40

is what this my EnV file and inside this

10:15:42

EnV file I'm going to keep my key so I'm

10:15:46

going to write down the key value and

10:15:48

the variable name is going to be a same

10:15:50

so let me copy the variable from here

10:15:52

the variable is going to be open AI API

10:15:55

key and let me keep the variable over

10:15:57

here and here I I'm going to write down

10:15:59

the value of this particular key so in

10:16:02

the double code actually I'm going to

10:16:03

write down the value

10:16:05

so let me paste my key over here I

10:16:07

already generated it uh I believe you

10:16:10

know how to generate the key so let me

10:16:12

copy and paste it over here so this is

10:16:14

what guys this is my key which I already

10:16:16

generated now let me open my file and

10:16:19

here what I'm going to do I'm going to

10:16:21

read my value the value of this key so

10:16:25

you can treat this EnV file as your

10:16:28

local environment right so which you

10:16:31

have created inside the folder itself

10:16:33

and there you can keep your all the

10:16:35

secret variable right so now if I'm

10:16:37

going to run this OS os. G EnV now if I

10:16:40

will run this particular command now if

10:16:42

I'm going to print the key so here you

10:16:44

will find out my key value so here guys

10:16:47

uh here is what here is my key open a

10:16:50

key now let me show you and here it is

10:16:53

giving me none uh let me run it again

10:16:55

why it is not going to why it is not

10:16:58

getting it now let me show you it is

10:17:01

none wait guys let me restart the

10:17:03

terminal it happens in this vs code

10:17:06

actually sometimes I have seen but okay

10:17:09

so fine I forgot to do one thing uh why

10:17:12

I'm getting this none why I'm getting

10:17:15

this none because I need to load this

10:17:18

environment first all right so I need to

10:17:20

load this environment first and for that

10:17:23

uh I will have to import something see I

10:17:25

already written one module

10:17:28

python.

10:17:30

EnV right so here I have written the

10:17:32

module python hyen do T EnV let me show

10:17:35

you this module so here uh let me open

10:17:39

the Pi Pi first of all and here I can

10:17:41

show you the module uh just a

10:17:45

second Pi Pi now let me show you this

10:17:48

particular module python hy. EnV uh see

10:17:53

python. uh EnV reads key value pair from

10:17:57

a EnV file and can set them as a

10:18:00

environment variable right so it helps

10:18:03

in a development M or application uh

10:18:06

following the 12 Factor principle so

10:18:08

here you can read everything about it if

10:18:10

your application takes configuration

10:18:12

from the environment variable it's a 12

10:18:14

Factor application launching it in a

10:18:16

development it's not very practical

10:18:18

because you have to set those

10:18:19

environment variable yourself means you

10:18:21

will have to set the environment

10:18:22

variable in your local system um okay if

10:18:25

you don't want to do it you can create

10:18:27

the EnV folder in your local so that

10:18:29

will be your local environment file

10:18:31

local environment file itself which will

10:18:33

be available inside your local uh like

10:18:36

reposit itself in your local folder

10:18:38

itself got it now here the first thing

10:18:41

uh see first you need to import this

10:18:43

thing this from. EnV import load. EnV

10:18:47

and then you can you have to call this

10:18:50

uh particular method so what I'm going

10:18:52

to do here so I'm doing a same thing uh

10:18:55

where is my vs code here is my vs code

10:18:57

I'm going to do a same thing just a

10:18:59

second I'm going to load it uh I'm going

10:19:01

to load this uh EnV

10:19:04

so here from EnV this is my EnV file

10:19:08

from EnV I'm going to import a load. EnV

10:19:12

and here is what here is my method so as

10:19:14

soon as I will run it so here I will be

10:19:16

able to load my all the values from this

10:19:19

EnV file now let me run it h let's see

10:19:22

whe whether I'm getting the value or not

10:19:24

so it is saying this OS is not defined

10:19:26

so first of all let me import the OS

10:19:28

this is also fine this is also fine and

10:19:32

now each and everything is fine

10:19:34

now what I can do now I can call it and

10:19:37

let's see whether I'm getting my key or

10:19:39

not now see guys I'm able to get my key

10:19:41

from from my EnV file so here is my EnV

10:19:45

file and from here what I'm getting I'm

10:19:47

getting my key right now let me keep

10:19:50

this EnV in my do getting so I can push

10:19:54

my changes in my ga in that case you

10:19:57

won't get this uh key actually you you

10:19:59

will just get like uh the other file so

10:20:03

here I'm writing do EnV and once I

10:20:06

return it now it you can see it is not

10:20:09

going to track it uh at all so now uh

10:20:13

you want you will find out that there is

10:20:15

no such color anything and now what I

10:20:18

can do I can give you all the files and

10:20:20

all other files basically so let me

10:20:23

click on the

10:20:25

plus

10:20:26

yeah now let me commit it so here I'm

10:20:30

going to write it down of file updated

10:20:35

file

10:20:37

update and let me commit it and sync

10:20:42

changes now click on okay and here guys

10:20:46

you will find out my entire code Let me

10:20:49

refresh it now

10:20:52

and yes that is the entire code so I

10:20:57

think

10:20:59

uh you got the code over here set the

10:21:03

print

10:21:12

yeah so here is a key let me remove it

10:21:14

from here just a

10:21:32

second

10:21:58

yeah now it

10:21:59

gone so tell me guys uh are you able to

10:22:03

follow till here here uh did you get the

10:22:05

entire code the code which I shared with

10:22:07

all of

10:22:10

you please uh do let me know in the chat

10:22:13

if you got the code

10:22:16

then here I kept the entire code uh in

10:22:20

my GitHub

10:22:21

itself yes uh yes or no please uh write

10:22:27

it down the chat guys please uh do let

10:22:29

me know just search over the Google s

10:22:32

Savita GitHub and there you will find

10:22:34

out this McQ generator repository in my

10:22:36

repository section and here is the

10:22:38

entire

10:22:59

code if you are done till here then

10:23:02

please uh give me a confirmation so I

10:23:04

will proceed with a further uh further

10:23:32

concept

10:23:39

done done done

10:23:44

great fine so now let's start with the

10:23:48

implementation so till here actually I

10:23:50

just shown you the uh I just shown you

10:23:53

the environment setup and all now we are

10:23:56

ready for implementing the

10:23:58

project okay so within uh this uh within

10:24:02

this one hour actually I just shown you

10:24:03

the entire setup now this is the onetime

10:24:05

job I set up my entire environment now

10:24:09

let's start with the Practical uh now

10:24:11

let's start with the experiments and all

10:24:13

and in tomorrow's session I will create

10:24:15

uh the I will create the Modular One

10:24:17

modular project and there I will create

10:24:19

the steam allet application also and

10:24:21

finally we'll try to deploy it now here

10:24:25

uh you can see uh now each and

10:24:27

everything is done let's try to call

10:24:28

this a chat open a method and let's see

10:24:31

we are able to access the llm on l so

10:24:34

here you can see it is running and now

10:24:36

it is done so if you will look into this

10:24:38

llm llm now here you can see we are able

10:24:41

to do it we are able to call it now here

10:24:45

let's try to run the further code now we

10:24:48

are going to use all the concept the

10:24:51

entire concept whatever we have learned

10:24:53

throughout the community session right

10:24:56

throughout the throughout this community

10:24:57

session in our open in the lch so we we

10:25:01

are going to use those entire concept

10:25:03

over here now uh for that basically what

10:25:06

I'm going to do step by step I'm going

10:25:08

to write it down each and everything so

10:25:10

first of all I am going to import each

10:25:12

and everything in a single shot right so

10:25:15

here uh you can see I have imported all

10:25:17

the statement so this Trace back and all

10:25:20

I'm going to remove it from here which I

10:25:21

already did it this is also I already

10:25:23

imported now let me remove this also and

10:25:26

here uh just chat open a also I already

10:25:29

imported now uh here this open a prompt

10:25:32

template l CH sequential and this get

10:25:36

open a call back this is very important

10:25:39

uh this is very important class which I

10:25:41

imported over here uh I will show you

10:25:43

the name I will show you the use of this

10:25:45

particular class this C openi call back

10:25:48

in a very detailed way because it's

10:25:49

going to be very very important right so

10:25:52

far I haven't discussed about it I

10:25:53

discussed about the sequential chain I

10:25:55

discussed about the llm chain I discuss

10:25:57

about the promt template but I I haven't

10:25:59

discussed about this get openi call back

10:26:02

so now let me import import all the

10:26:04

statements over here so you can see we

10:26:07

are able to import it and yeah it is

10:26:10

done now we already created a object of

10:26:13

this chat open Ai and we are able to get

10:26:16

my llm by using this open AI API till

10:26:20

here I think everything is fine

10:26:22

everything is clear now let's move to

10:26:24

the next one now just tell me guys if we

10:26:26

are talking about so here what I can do

10:26:29

let me open my pen and let me ask a few

10:26:33

questions to all of you so here uh what

10:26:35

I'm doing uh just a

10:26:44

second yeah so here uh just uh let me

10:26:48

ask a few question so let's say we have

10:26:50

imported the llm means uh we are able to

10:26:53

access my llm this uh GPD model by using

10:26:56

this uh open AI or API by using this L

10:26:59

chain framework now to this llm what I

10:27:02

will do what I will pass to this llm

10:27:03

tell me so to llm to this particular llm

10:27:06

I will pass my uh prompt right I will I

10:27:09

will pass my input prom so here actually

10:27:12

what I will have to do I will have to

10:27:14

design my input promt right what I will

10:27:17

have to do guys tell me I will have to

10:27:18

design my input prompt and here as a

10:27:22

output what I will get tell me as a

10:27:24

output also I will get a prompt right so

10:27:26

here what I will have to do I will have

10:27:29

to design my input and output prom right

10:27:33

so so whatever my whatever will my input

10:27:35

so that particular prompt and here

10:27:37

whatever will be my output that a

10:27:39

particular prompt got it now let's try

10:27:41

to design my input prompt and let's try

10:27:43

to design the response as well then in

10:27:45

which format I will get the response so

10:27:48

here initially I clarified this thing

10:27:51

the project is going to be a McQ

10:27:53

generator right I am going to generate

10:27:56

McQ McQ right whatever topic whatever uh

10:28:00

subject I will give to my uh GPT model

10:28:03

so So based on that particular subject

10:28:05

based on that particular uh like based

10:28:07

on that particular text is going to

10:28:10

generate a McQ so let's say I'm giving

10:28:12

my paragraph I'm I'm giving one

10:28:14

paragraph to my GPT model So based on

10:28:17

that particular paragraph let's say I

10:28:19

given a paragraph related to our data

10:28:21

science uh okay I I I given one a PDF

10:28:24

file or text file or whatever file to my

10:28:26

GPT model so in that inside that like

10:28:28

you have a paragraphs you have a data So

10:28:30

based on that data is going to generate

10:28:33

a mcqs right so let me do one thing so

10:28:36

here uh first of all let me design my

10:28:38

prompt so here what I'm going to do guys

10:28:40

I'm going to design my prompt by using

10:28:42

this a prompt template I think you

10:28:44

already know about the prompt template

10:28:46

in my previous class I already clarify

10:28:49

the uh the concept of the prompt

10:28:51

template if you don't know then please

10:28:52

go and check with the previous session

10:28:54

so here what I'm going to do guys here

10:28:56

I'm going to Define my prompt template

10:28:58

so just wait uh let me copy and paste

10:29:00

the code because already I written this

10:29:03

uh like a single single line so let me

10:29:05

copy and paste and I'm going to explain

10:29:06

you so here my prompt is what so here my

10:29:10

prompt inside the prompt actually you

10:29:11

will find out in the prompt template you

10:29:13

will find out two things first is a

10:29:15

input variable and the second is

10:29:17

template right so here you can see as a

10:29:20

template I given this particular

10:29:21

variable now to this particular variable

10:29:23

I have to pass some sort of a text right

10:29:26

some sort of a like a template and all I

10:29:28

will pass it just wait right so here is

10:29:30

my template variable and I will pass my

10:29:32

template over here here I'm not going to

10:29:34

write it down directly here I'm going to

10:29:35

pass it to my variable and that variable

10:29:38

I I'm passing inside my prompt template

10:29:40

right now in an input variable you can

10:29:42

see we have a couple of we have a couple

10:29:45

of variable we have couple of parameter

10:29:47

the first one is text the second one is

10:29:49

a number the third one is a subject the

10:29:52

fourth one is a tone and the fifth one

10:29:55

is a response J so we have a five

10:29:59

variable inside my input variable in my

10:30:02

previous classes uh I shown you this

10:30:04

prompt template along with the uh simple

10:30:06

input variable along with the one input

10:30:08

variable right now here inside this one

10:30:10

I have written five input variable and

10:30:13

here I'm going to Define my template now

10:30:15

let's see what will be my template so

10:30:17

from here basically I'm going to copy

10:30:19

the template and let me paste it over

10:30:21

here so I'm saying to my chat GPT so I'm

10:30:24

saying to my chat GPT that uh you are

10:30:27

expert McQ maker right so I'm giving my

10:30:30

a text so on whatever text I want to

10:30:33

generate an McQ I'm passing a text over

10:30:36

here right and I'm saying to my chat GPT

10:30:38

that you are an expert McQ maker given

10:30:41

the abob text so whatever text we have

10:30:43

given to you it's your job by using this

10:30:46

particular text it's your job to create

10:30:48

a quiz of number so how many quiz you

10:30:51

want to create so five quiz six quiz

10:30:53

seven quiz eight quiz you can pass a

10:30:55

number over here so 5 six seven quiz

10:30:57

eight quiz so you can pass the number

10:30:59

and here uh you need to create a five

10:31:01

multiple let's say I'm writing number is

10:31:03

equal to five so five multiple choice

10:31:05

question for the subject now whatever

10:31:07

subject we are going to pass over here

10:31:09

in tone so tone means what tone actually

10:31:12

it is defining a difficulty level so

10:31:14

here if tone is simple so it is going to

10:31:16

generate a five simple McQ question if

10:31:19

tone is uh intermediate so it is going

10:31:22

to generate five intermediate question

10:31:24

if tone is difficult it's going to

10:31:26

generate five difficult in five

10:31:29

difficult McQ question got it now here

10:31:32

I'm saying make sure the question are

10:31:34

not repeated and check all the question

10:31:37

to be confirming the text as well so

10:31:39

each and everything I'm telling to my

10:31:41

GPD right so make sure to format your

10:31:44

response like so here actually I have to

10:31:46

for I have to pass the format also here

10:31:49

I'm going to pass here I have to pass

10:31:51

the format also like in which format you

10:31:53

have to generate a quiz now let me give

10:31:56

you the format now let me show you the

10:31:57

format so uh which format actually I

10:32:00

have designed over here so here what I'm

10:32:02

going to do I'm giving you the format

10:32:04

the format basically which uh I have

10:32:06

designed so let me show you the response

10:32:09

format now guys this is the response

10:32:11

format just just see over here see so

10:32:14

response or it's my response format so

10:32:16

here I'm saying uh like there is my McQ

10:32:19

multiple here I have written first okay

10:32:21

this my first mean like it's a number

10:32:23

itself that's it now here I'm seeing McQ

10:32:25

multiple choice question now here is a

10:32:27

option that uh you have a four Option 1

10:32:30

2 3 4 and here basically I will be

10:32:33

getting my correct answer so it is this

10:32:35

one this one actually this is my first

10:32:37

McQ along with the number along with a

10:32:40

question along with the number this is

10:32:42

my first McQ first McQ now here will be

10:32:45

my McQ now here will be my all the

10:32:47

options and here will be my correct

10:32:49

answer right so this is my response

10:32:52

format and here is my template basically

10:32:55

which I'm passing to my GPT model and

10:32:58

here uh I'm going to create my prompt

10:33:01

template that's it by using this

10:33:02

particular template and these are the

10:33:05

these are the variable which user is

10:33:09

going to pass right which user is going

10:33:11

to pass these are the variable now let

10:33:14

me do one thing let me run it and here

10:33:17

you can see we are able to create a like

10:33:19

temp we have like written a template and

10:33:22

this is what this is my prompt template

10:33:24

which I created that's it I think this

10:33:26

is fine now here uh yes once it is done

10:33:30

uh like uh my template and all basically

10:33:32

it will be created that is fine now

10:33:34

after that what I'm going to do I'm

10:33:35

going to create the chain right I think

10:33:38

you already know about the chain llm

10:33:40

chain I I explain you the concept of the

10:33:42

llm chain that why we use llm chain we

10:33:45

use llm chain for connecting a several

10:33:48

component so here as of now I just have

10:33:51

two component first is llm and the

10:33:53

second is prompt so I'm going to connect

10:33:55

both component all together and for that

10:33:58

I'm going to use llm chain so let's try

10:34:01

to use the llm chain and and here I have

10:34:03

already written the code let me copy and

10:34:05

paste it over here and so this is what

10:34:08

guys this is my uh like this is my uh

10:34:11

like llm chain so here I'm passing my

10:34:13

llm model with whatever model I took by

10:34:15

using the open API and here is what here

10:34:18

is my prompt so prompt is what so quiz

10:34:21

generation prompt so the prompt which I

10:34:23

have created by using this particular

10:34:25

template and by using this particular

10:34:28

response right in this format basically

10:34:30

I want a response now this is what guys

10:34:33

this is the llm chain all the concept

10:34:36

see whatever I have we have learned so

10:34:38

far I'm going to use all those concept

10:34:41

for creating this a particular project

10:34:43

right so so at least you can understand

10:34:46

that where we are using uh like those

10:34:49

Concept in a real time right so here is

10:34:52

what here is my question now let me run

10:34:53

it and here I have created my question

10:34:56

that is fine now guys just tell me uh

10:34:59

here uh I'm creating my quiz right so

10:35:04

here I'm creating my quiz now here

10:35:06

actually see I created a quiz but this

10:35:09

quiz is correct or not the basically in

10:35:12

the at the end you can see in the format

10:35:14

I have written this correct answer I

10:35:16

want a correct answer from it so after

10:35:18

analyzing a quiz actually I want a

10:35:21

correct answer so for that also I have

10:35:23

defined one more template now let me

10:35:26

show you that template so what I did

10:35:28

actually let me show you the template

10:35:31

two which I have created uh so here I

10:35:34

have created the second template now in

10:35:36

the second template you will find out uh

10:35:38

just a second let me copy all the like

10:35:42

thing over here and see this is what

10:35:45

guys this is my second template now here

10:35:47

I'm seeing here I'm saying actually uh

10:35:50

you are an expert English grammarian and

10:35:53

writer I'm telling to my chat jpd I'm

10:35:55

telling mypd actually so given a

10:35:57

multiple choice quiz for this particular

10:35:59

subject right this particular subject

10:36:02

now you need to evaluate the complexity

10:36:05

of the question and give a complexity

10:36:07

analysis of the quiz right give that

10:36:10

complexity analysis of the quiz only use

10:36:13

at Max 50 words for complexity if the

10:36:16

quiz is not at for the quantitive and

10:36:19

the analytic ability of the student

10:36:22

update the quiz update the quiz question

10:36:24

which needs to be changed and change the

10:36:26

tone such as uh such that it perfectly

10:36:29

fits to the student ability so here I

10:36:32

have written so here actually see here

10:36:34

I'm passing my quiz whatever quiz

10:36:36

basically I'm generating so in this

10:36:38

second template I have written that uh I

10:36:41

have written the like prompt regarding

10:36:43

to the evaluation regarding to the quiz

10:36:46

evaluation whatever quiz I am going to

10:36:48

generate right first I will generate and

10:36:51

then I will evaluate it here in the

10:36:53

second prompt now let me run it and here

10:36:56

I'm going to create my one more chain so

10:36:59

here I'm going to create uh so here

10:37:01

basically uh before create cre a chain

10:37:03

basically uh let me create just a second

10:37:06

so here uh what I'm going to do I'm

10:37:07

going to create my template so here in

10:37:10

the template you will find out only two

10:37:11

variable first is subject and the second

10:37:13

is quiz this two variable it is coming

10:37:16

from the user side I will show you how

10:37:18

like it is coming from the user side and

10:37:20

how user will be passing once we'll be

10:37:22

creating a end to end application got it

10:37:25

now here we have a quiz evaluation

10:37:27

prompt and this is what this is my

10:37:29

second prompt and now what I will do

10:37:30

regarding this prompt also I will create

10:37:33

my chain right so here uh here is my

10:37:36

quiz chain now I'm going to create one

10:37:37

more chain that's going to be a quiz

10:37:40

evaluation chain so let me uh like uh

10:37:43

copy this particular code step by step I

10:37:46

have written each and everything and

10:37:47

that is what I'm going to show you so

10:37:49

here is what guys here is my review

10:37:51

chain right so in this one I'm passing

10:37:53

my llm I'm passing my quiz Evolution

10:37:55

prompt and here output key is What so

10:37:58

whatever output I'm getting as a review

10:38:00

so here I'm going to collect it inside

10:38:02

this particular variable and verbos is

10:38:04

equal to True means what means whatever

10:38:07

ex means during the execution whatever

10:38:09

is happening now each and everything I

10:38:11

will be able to find out on my screen

10:38:14

itself that's the meaning of verbos is

10:38:16

equal to two that's it now here if I'm

10:38:17

running this review a chain so I have

10:38:20

created two chain now now after creating

10:38:23

this th I have created First Chain quiz

10:38:25

chain I created second chain review

10:38:27

chain now I'm going to connect both

10:38:30

chain right by using sequential chain so

10:38:34

the same concept I taught you in my

10:38:36

previous session so first I created one

10:38:38

chain where I'm going to add two

10:38:40

component llm and my uh prompt I have

10:38:43

created second chain and now I'm going

10:38:45

to collect both chain right both Chain

10:38:47

by using the sequential uh by using the

10:38:50

simple sequential chain now here what

10:38:52

I'm going to do so here already I have

10:38:54

imported this thing if you look into my

10:38:56

import statement so I have already

10:38:58

imported this sequential chain now let

10:39:01

me create a object object of this

10:39:03

sequential chain and then uh I'm going

10:39:06

to write it down the both name over here

10:39:08

so here what I'm going to do so let me

10:39:11

uh create object of this sequential

10:39:14

chain now so here guys you can see we

10:39:16

have a sequential chain and to this

10:39:19

sequential chain I'm passing the quiz

10:39:20

chain I'm generating a quiz and I'm

10:39:23

passing to my review chain right so from

10:39:26

here I'm generating a quiz and I'm

10:39:27

passing to my review chain and these all

10:39:30

are my input variable and these all are

10:39:32

my output variable and verbos is equal

10:39:34

to True right clear so here I'm going to

10:39:38

create a object of this same sequential

10:39:41

chain I hope till here everything is

10:39:43

fine everything is clear to all of you

10:39:46

please do let me know I use the uh

10:39:49

previous Concepts only I haven't I

10:39:52

haven't taught you anything new uh I use

10:39:55

the previous concept whatever I taught

10:39:57

you in my previous classes so please do

10:40:00

let me know if this uh part is clear to

10:40:02

all of you yes or

10:40:04

no it's very easy very simple don't

10:40:07

worry at the end I will revise all the

10:40:09

concepts uh whatever I'm using here

10:40:12

whatever I'm writing over here but first

10:40:13

tell me is it clear or not this

10:40:23

one if you can write it down the chat I

10:40:25

think that would be great you can hit

10:40:27

the like button you can let me know in

10:40:29

the chat so please do it guys uh I'm

10:40:33

waiting for a

10:40:39

reply because after uh this one the

10:40:41

climax will come and in that like we are

10:40:44

going to create a quizz and all whatever

10:40:47

is

10:41:01

there clear clear clear yes or

10:41:19

no yes saan your understanding is

10:41:21

correct first combining two template

10:41:23

using llm chain and then two H chains we

10:41:26

are going to combine by using the

10:41:28

sequential chain

10:41:31

okay

10:41:56

okay now uh I think till here everything

10:41:58

is fine everything is clear now let's

10:42:00

see how we are going to gener a quiz

10:42:02

from here after giving this many of

10:42:05

things after doing this many of things

10:42:08

so we are able to uh we are able to like

10:42:13

uh here you can see we are able to

10:42:15

create a sequential chain now the next

10:42:17

thing is what here actually what I want

10:42:20

guys tell me I want a text I want a data

10:42:23

so if you have a data in PDF you can

10:42:25

load the PDF if you have a data in txt

10:42:28

file you can load the txt file right if

10:42:31

you have data in some other file you can

10:42:33

load the data from there from anywhere

10:42:35

right so first you will have to provide

10:42:37

a text you will have to provide a data

10:42:39

on top of that data you are going to

10:42:43

create or you are going to generate a

10:42:45

quiz right so let me do one thing here

10:42:48

I'm going to create uh I'm going to

10:42:51

create one file the file name is going

10:42:53

to be uh wait I'm going to create one

10:42:56

file the file name is going to be

10:42:58

data.txt so data.txt

10:43:02

now what I'm going to do here uh I'm

10:43:04

going to open my Google and from there

10:43:07

uh I'm going to copy and paste some sort

10:43:09

of a text so let's say I'm searching

10:43:11

about the machine learning machine

10:43:15

learning machine learning so here I'm

10:43:18

going to search about the machine

10:43:19

learning now here uh is what here is my

10:43:23

machine learning now from here what I'm

10:43:25

going to do so here I'm going to take

10:43:28

all the data for this one right so I

10:43:30

took this particular data I'm copy I'm

10:43:33

going to copy it and let me paste it

10:43:35

over here where I'm going to paste I'm

10:43:37

going to paste in my data.txt so this is

10:43:40

the complete data which I have pasted

10:43:41

over here you can check it you can

10:43:43

reveal this file in your folder so click

10:43:45

on reveal in file explorer you will find

10:43:48

out this particular file uh this

10:43:50

data.txt right just open it and here is

10:43:54

your data which I copy and paste it from

10:43:56

the uh like Google itself from the

10:43:58

Wikipedia right great now let me close

10:44:01

it and here here is what here is your

10:44:03

data now do one thing let's uh do one

10:44:05

thing so let's try to read this

10:44:07

particular data so here what I'm going

10:44:09

to do so here uh let me open my file

10:44:13

ipynb file and here I'm going to read

10:44:16

this particular data so for reading a

10:44:18

data actually we have a we have a like a

10:44:22

code so let me write it down the code

10:44:24

over here so I'm writing over here you

10:44:26

need to open this file in a read mode

10:44:29

and just read the data in this

10:44:30

particular variable now here I need to

10:44:32

provide the file path so for providing a

10:44:34

file path let me write it down here file

10:44:37

underscore path and here uh R means what

10:44:40

R means read it and there I'm giving my

10:44:43

absolute path so here I'm passing the

10:44:46

complete path of the file so this is the

10:44:48

file path guys which I have given or

10:44:51

which I have written over here now let

10:44:52

me run it and let me check with the file

10:44:54

path that I got it or not so here what I

10:44:57

can do I can uh check with the file

10:45:00

underscore path now let me run it and

10:45:04

see guys this is what this is my file

10:45:05

path now I'm uh running this particular

10:45:08

code and here you will find out inside

10:45:10

the text what I got I got my data so

10:45:14

here is what here inside my text you

10:45:15

will find out you uh we have the entire

10:45:18

data now let me print it let me keep

10:45:20

this text variable inside the print

10:45:23

method so see guys I got the entire data

10:45:26

so whatever data I kept it inside my

10:45:27

file inside my txt file so you can see

10:45:30

all the data over here itself got it now

10:45:33

after that what I will do see now there

10:45:35

is a crucial part and there you will

10:45:37

find out the new thing right and one

10:45:39

more thing let me do one more thing over

10:45:40

here so see I created a response I

10:45:43

created a response here is what guys

10:45:45

tell me here is my response now this

10:45:48

response actually it's a

10:45:50

dictionary this is what this is a

10:45:52

dictionary right this one now over here

10:45:55

if I want to convert into a Json

10:45:57

serializer so for that there is a method

10:46:00

json. terms and here actually I'm

10:46:03

passing this dictionary now why I'm

10:46:05

doing it so here if I want to serialize

10:46:07

the python dictionary into a Json format

10:46:10

so here U into a Json format is string

10:46:12

so that's for that's why for that only

10:46:14

I'm going to call this particular method

10:46:16

json. dumps right so here uh I'm going

10:46:19

to call this json. Dums and here you

10:46:21

will be able to find out I'm going to

10:46:22

convert this a particular dictionary

10:46:24

this python dictionary into Json format

10:46:27

his string right this is fine this is

10:46:29

clear to all of you we got a text we got

10:46:31

this dictionary and we got a chain now

10:46:35

my final step will come into the picture

10:46:38

now let me show you my final step so

10:46:41

over here uh my final step is this one

10:46:44

now just just be careful guys and after

10:46:47

that my response will be coming and I

10:46:50

will be able to generate my output so

10:46:53

here guys see uh in the final response

10:46:56

you will find out that we are going to

10:46:58

call this get open Ai call back right

10:47:01

right this is a new thing for all of you

10:47:03

and here I have already imported this

10:47:06

get open Ai call back if you will look

10:47:08

into the import statement here a from

10:47:10

blanchin do callback get open call back

10:47:14

so here you will find out I'm U like

10:47:16

calling a same thing I'm calling this

10:47:18

get open Ai call back right now inside

10:47:21

this get open a call back you will find

10:47:23

out that we are going to call our

10:47:25

generative evaluated generate generate

10:47:27

evaluate change so this is the same

10:47:28

thing basically uh the same variable

10:47:30

over here you can see this one uh like

10:47:33

after creating after creating this is

10:47:35

the object actually generate uh generate

10:47:38

evaluate chain this is what tell me this

10:47:39

is the object object basically which I'm

10:47:41

keeping over here sequential chain is a

10:47:43

class right where I'm passing this

10:47:44

particular argument and this is what

10:47:46

this is my object this one generate

10:47:48

evaluate chain now I'm calling this

10:47:49

particular object over here this one

10:47:51

right this this particular object I'm

10:47:53

calling over here this is fine this is

10:47:55

fine this you are able to understand and

10:47:58

here we are getting a response after

10:47:59

calling but what is the meaning of this

10:48:01

C open Ai call back why we are using it

10:48:04

so just see over here I have written

10:48:06

something over here how to set up token

10:48:09

uses tracking in L chain so if you want

10:48:12

to understand the token uses if you want

10:48:15

to track your tokens and all input token

10:48:18

output token your pricing each and

10:48:20

everything each and everything you will

10:48:22

get by using this get openi call bag you

10:48:25

can check it by using this link which I

10:48:27

kept it over here here is a

10:48:29

documentation link so let me copy and

10:48:31

paste it over here over the browser and

10:48:34

here actually you will find out a

10:48:35

complete detail about this G openi call

10:48:39

back so let me show you so here is

10:48:41

tracking token uses so whatever number

10:48:43

of uh token you are going to use what

10:48:45

will be the pricing input token number

10:48:48

output token number everything you will

10:48:50

get it over here by using this get openi

10:48:53

call back right so just see over here we

10:48:55

are going to import it we are going to

10:48:56

create our llm we are going to got get

10:48:59

we are going to get our llm over here

10:49:01

and here we are going to call this

10:49:02

invoke method and there is my result now

10:49:05

if I'm going to print the CV so here you

10:49:07

will get the entire detail regarding the

10:49:09

token let me show you in terms of my

10:49:12

code right so whatever code and all

10:49:14

whatever like project I'm going to

10:49:16

create regarding that now before that

10:49:19

just see over here uh generate evaluate

10:49:23

chain this is what this is my object now

10:49:26

here if you will look into this

10:49:27

particular object so we are we have a

10:49:29

couple of input variable the first input

10:49:32

variable is text that is the same thing

10:49:34

the text itself right text you know

10:49:36

right which one uh what is the text like

10:49:38

whatever uh which one this text actually

10:49:41

so whatever uh like uh data right we are

10:49:45

passing for generating a McQ right on

10:49:47

whatever data we want to generate McQ

10:49:49

this this this takes actually now here

10:49:51

is a number how many McQ you want to

10:49:54

generate subject tone simple Simplicity

10:49:57

hard intermediate and here is what here

10:50:00

is a uh like request response so I will

10:50:03

have to mention everything over here

10:50:05

inside this variable so json. dumps

10:50:08

already we did it text we already did it

10:50:10

now let me Define this number subject

10:50:13

and tone so here let me take it as a a

10:50:16

variable so here guys you will see that

10:50:19

we have a number we have a subject and

10:50:21

we have a tone so number how many uh

10:50:23

quiz you want to generate I want to

10:50:25

generate five quiz here subject let's

10:50:28

say subject is machine learning let me

10:50:29

change the subject I'm going to keep as

10:50:31

a machine learning so here the subject

10:50:33

name is machine learning now uh here

10:50:37

Stone actually tone let's say it's a

10:50:39

simple one simple McQ I want just like a

10:50:42

simple McQ now if I will uh like run it

10:50:45

so here I have initialized my variable

10:50:47

now guys if I will run this one now you

10:50:50

will find out that everything I'm going

10:50:53

to get in my response itself so let me

10:50:55

run it and see so it is running and guys

10:50:58

over here you can see this is still it

10:51:02

is running and it will take some time

10:51:04

because it is evaluating each and

10:51:06

everything in back end whatever template

10:51:08

whatever prompts I have given and based

10:51:10

on that it will generate a response it

10:51:13

will generate a McQ so just wait for

10:51:15

some time and it is working working

10:51:28

working yeah now it is done guys see we

10:51:31

we got a response and inside this

10:51:32

response I have everything but before

10:51:35

showing you the response let me show you

10:51:37

something over here so here what I'm

10:51:39

going to do here I'm going to show you

10:51:40

the number of tokens number of tokens uh

10:51:43

input tokens output tokens and the

10:51:46

complete cost right so here what I'm

10:51:48

going to do let me copy the code uh

10:51:51

which I already written and it's a

10:51:52

simple like lines and all I'm just

10:51:54

copying pasting because I don't want to

10:51:57

waste the time okay because if I'm

10:51:59

writing it from scratch it it takes

10:52:01

takes a time right so here uh I'm saying

10:52:03

total number of tokens input token plus

10:52:06

output token now here prompt token and

10:52:08

prompt completion mean this is the input

10:52:10

token and this is the output token and

10:52:12

this is complete number of token and

10:52:14

here there is a total cost now if I will

10:52:16

run it guys so here you will find out

10:52:18

that I this is my total number of token

10:52:20

this is my input token this is my output

10:52:23

token and this is the cost and it is in

10:52:25

dollar so I'm able to track each and

10:52:27

everything by using this uh open a call

10:52:30

back getting my point now let's try to

10:52:33

get a response so let's try to uh get a

10:52:36

response from here uh so let's try to uh

10:52:39

get a quizzes and all so first of all

10:52:41

let me show you the response so if I'm

10:52:42

going to print the response now so you

10:52:45

will find out uh it's nothing it's the

10:52:47

uh dictionary itself right so inside the

10:52:50

dictionary uh you have uh different

10:52:52

different key and value now in this

10:52:54

dictionary you will find out one key

10:52:56

quiz right so if I'm going to write it

10:52:58

down here so here if I'm going to write

10:53:00

it down response. response. getet quiz

10:53:04

so if I'm going to write down here

10:53:05

response. getet quiz now see guys here

10:53:08

I'm able to get my quiz here I'm able to

10:53:11

get my quiz right so what I'm going to

10:53:13

do now I'm going to keep it inside my

10:53:15

variable my variable is what quiz this

10:53:18

is what this is my quiz right now what

10:53:20

I'm going to do here I'm going to write

10:53:21

it down Json json. load right Json do

10:53:26

loads and here I'm passing my quiz q i

10:53:29

now once I will write down like this so

10:53:32

you will find out my all the quiz so

10:53:34

here this is my first quiz and it is in

10:53:36

the same format it is in the same format

10:53:39

the response format which I have defined

10:53:41

so this is my first quiz and here is McQ

10:53:44

who coined the term machine learning so

10:53:47

Donald have Arthur Samuel Samuel Walter

10:53:51

pittz and Warren mlo right so here there

10:53:54

is a correct answer now here the second

10:53:56

quiz what was the earliest machine

10:53:58

learning model introduced by the Arthur

10:54:00

Samuel so speech recognization image

10:54:03

classification so you can see guys your

10:54:05

entire quiz over here whatever number I

10:54:08

have given I have given five number I'm

10:54:10

able to generate a five quiz from the uh

10:54:13

from the GPT model by giving a correct

10:54:15

prompt and by giving a correct uh like

10:54:18

response format so there is uh you just

10:54:21

uh required a python over here that's it

10:54:24

nothing apart from that and you will be

10:54:26

able to create the project a project

10:54:28

according to your requirement and this

10:54:30

type of project you can integrate

10:54:32

everywhere let's say uh uh like in a

10:54:35

dashboard itself in your dashboard you

10:54:36

will find out the quizzes and the

10:54:38

assignment so you can automate that

10:54:40

project uh that process you can generate

10:54:42

a quizzes and all from here uh right and

10:54:45

then you can append it inside uh the

10:54:47

dashboard and all so uh like something

10:54:49

like that you can make a real-time

10:54:50

connectivity I think you are getting my

10:54:52

point now let's uh look into the uh let

10:54:55

let's try to create a data frame by

10:54:57

using this uh dictionary so for that

10:55:00

what I'm going to do so here uh I'm

10:55:02

going to create a data frame uh just a

10:55:05

second uh first of all let me keep

10:55:07

everything inside the list so for that I

10:55:10

already written one code so here is the

10:55:12

code guys uh here I'm going to create uh

10:55:15

let me do one thing Let Me Keep It Quiz

10:55:17

only so here is what here is my list and

10:55:20

inside this list we have our items means

10:55:22

uh my quiz and my uh basically value

10:55:25

okay means my options now here actually

10:55:27

I'm going to keep it in a particular

10:55:29

format whatever string I'm going to to

10:55:31

be collect from here I'm going to join

10:55:32

in by using this pipe and here I'm going

10:55:35

to append it everything now let me run

10:55:37

it and you will get a better

10:55:39

understanding so if I'm going to run it

10:55:40

now see uh so it is giving me St Str

10:55:43

object has no uh attribute

10:55:46

items what is the issue over here okay

10:55:49

so just wait uh let me keep it over here

10:55:52

inside the quiz itself and

10:55:55

now I think it is fine so just a second

10:56:00

mm

10:56:01

mhm yeah now is fine so if I'm going to

10:56:04

show you this quiz table data now now

10:56:06

you will get all the thing over here so

10:56:09

yeah now I got each and everything in a

10:56:11

list and see every value every option we

10:56:15

are going to segregate by using this

10:56:17

pipe and for that only I have written

10:56:18

this code once you will go through it

10:56:20

you will be getting it now I can convert

10:56:22

it into a data frame so here uh let me

10:56:25

convert this uh thing this particular

10:56:28

thing in into a data frame so here if

10:56:29

I'm going to write it down

10:56:31

PD do data Frame data frame and here I'm

10:56:36

going to say that okay I'm going to uh

10:56:40

open the parenthesis and

10:56:44

[Music]

10:56:45

then yeah so here guys see this is my

10:56:48

McQ means there is my question here is

10:56:51

my choices there is four choices and

10:56:54

here is a correct answer now let me keep

10:56:56

this thing in my uh variable that is

10:56:59

going to be a quiz and and now let me

10:57:01

convert this uh data frame as a CSV file

10:57:05

so here I'm going to convert this data

10:57:08

this uh quiz actually into a CSV file so

10:57:10

quiz do 2or CSV and here I can write it

10:57:15

down the name and the name is going to

10:57:17

be a machine learning quiz so machine uh

10:57:22

machine

10:57:23

learning. CSV right machine learning.

10:57:26

CSV index is equal to false index is

10:57:29

equal to false now if I will run it guys

10:57:32

see in my current uh directory in my uh

10:57:36

like current local directory you will

10:57:38

find out this CSV file now let me open

10:57:40

the CSV file and here you can see my

10:57:43

quiz I just given the number of quiz how

10:57:45

many number of quiz I want uh see uh if

10:57:48

you will look into the code now now you

10:57:50

will be getting that uh this this number

10:57:53

actually this this thing basically which

10:57:54

I will I was providing to my um like

10:57:57

object this one number of quiz sub

10:58:00

object and toone so this is the only

10:58:03

thing which I want from my user and for

10:58:06

this one only I'm going to create my web

10:58:09

application as of now I shown you the

10:58:11

simple implementation in the python

10:58:13

notebook in ipb itself now in tomorrow's

10:58:16

class what I'm going to do so here I

10:58:18

have created the folder the folder name

10:58:19

is what SRC folder and inside that I

10:58:22

have a McQ generator now each and every

10:58:24

line of code I'm going to write it down

10:58:27

my py file I'm going to create a modular

10:58:29

coding I I'm going to write down the

10:58:31

modular coding here and then finally we

10:58:33

are going to create a web API right web

10:58:36

API and uh here U like yes by using the

10:58:40

B API you just need to pass this

10:58:43

particular value number of quiz you just

10:58:45

need to pass this 3 to four value you

10:58:48

need to pass the text this particular

10:58:49

text you need to pass the number of

10:58:51

quizzes subject and the tone that's it

10:58:55

and you uh and after that once you will

10:58:58

hit the button so the qu will be in your

10:59:01

hand this

10:59:03

one got it yes or no tell me guys so how

10:59:06

is a project uh did you like this tell

10:59:10

me do you like this Jupiter

10:59:11

implementation yes or no tell me guys

10:59:18

fast do you have any any like uh any um

10:59:23

that doubts and all so please do let me

10:59:25

know I will be clarify that and uh don't

10:59:29

worry you won't face any sort of issue

10:59:31

so whatever step I followed just

10:59:33

followed those step and try to do this

10:59:35

uh um this notebook implementation at

10:59:38

least and tomorrow we'll convert this

10:59:40

notebook implementation into an end to

10:59:42

end project so let me give you this code

10:59:45

now so here I can uh add it this file

10:59:48

this file and this file also so I added

10:59:51

this three file now let me write down

10:59:54

the message all files updated updated

10:59:58

okay so just a second all file

11:00:04

updated and here let me commit it and

11:00:07

sync the changes so now guys just check

11:00:11

with the GitHub you will get the uh

11:00:14

files and all right let me show you the

11:00:16

GitHub now and here is my

11:00:27

GitHub so guys uh just check with the G

11:00:31

here you will find out the CSV file

11:00:33

quizzes and all uh and here see quizzes

11:00:37

Which I generated by using the GPT and

11:00:40

here actually there is a ipv file where

11:00:43

you'll find out the entire

11:00:45

code

11:00:51

okay yes it is generating a quiz from

11:00:53

the text itself so let's say if you are

11:00:55

giving this part let's say any different

11:00:57

text so let me do one thing let me give

11:01:00

the different text over

11:01:02

here uh so just a second I'm going to

11:01:05

generate a different text

11:01:07

now uh so any topic uh uh any topic

11:01:11

basically anything you can uh like

11:01:13

search over here let's say you are going

11:01:15

to search about the biology so

11:01:18

biology uh Wikipedia so just search

11:01:22

about the biology and here open

11:01:25

the like Wikipedia page copy it from

11:01:29

here copy it as of now and just keep it

11:01:32

over here inside the text inside your

11:01:35

txt file now see we'll automate this

11:01:37

particular process so you don't need to

11:01:39

paste it like this you just need to uh

11:01:41

give your documentation to your

11:01:43

streamlet application or to your flask

11:01:45

application or Jango application we'll

11:01:47

automate that particular process don't

11:01:48

worry and even we can automate like many

11:01:51

uh instead of providing this particular

11:01:53

text and all right no need to provide

11:01:55

this text by writing directly by writing

11:01:57

the name also we can generate a quiz

11:01:59

okay that is all also possible that is

11:02:01

also possible as of now I'm giving my

11:02:03

text and based on that see this is the

11:02:05

biology text right now what I can do I

11:02:08

can just need to open my uh IP VB here

11:02:11

and after that I just need to load this

11:02:13

text so here I'm going to load my text

11:02:16

this one and I'm going to change my

11:02:18

subject so instead of this machine

11:02:20

learning I'm writing here

11:02:23

biology right I have written biology

11:02:25

over here let me run it so here I got uh

11:02:27

the biology text this is the biology

11:02:29

text and uh yes uh I think now

11:02:32

everything is same this is fine this is

11:02:34

fine now let me run it so here if I'm

11:02:37

going to run it so now it is generating

11:02:39

mcqs from those particular text whatever

11:02:42

text I have given regarding the biology

11:02:43

and all so it is taking that text and it

11:02:46

is generating a uh mcqs and all so it

11:02:48

will take some time let it

11:02:50

run and then you can save uh this file

11:02:53

over

11:02:54

here so now it is done uh it is getting

11:02:58

we are getting some issues

11:03:01

incorrect API key

11:03:06

provided okay it is saying incorrect API

11:03:09

key provided I think some issues there

11:03:10

with the API key but yeah the process

11:03:12

will be same right I will check with the

11:03:13

API key issues what is this uh now see

11:03:16

guys uh I think you got my point you got

11:03:19

the like concept and you got about the

11:03:22

project also and today we are going to

11:03:25

create in2 and one and we'll try to

11:03:27

deploy it also so don't miss tomorrow's

11:03:29

session tomorrow's class uh great so I

11:03:32

think we can start with today's session

11:03:35

uh now in today's session uh again uh

11:03:37

we'll uh try to complete our project

11:03:39

itself so in previous class uh we have

11:03:42

started our uh end to end project uh in

11:03:45

that I have explain you the uh Jupiter

11:03:48

implementation so we did the entire

11:03:50

project setup and after that uh we did

11:03:52

the we implemented our jupyter notebook

11:03:55

now in today's session we are going to

11:03:57

create we are going to write it on the

11:03:58

modular coding modular code and there we

11:04:01

are going to create a several file and

11:04:04

uh I will show you how you can create a

11:04:06

different different file in a different

11:04:07

different folder and then how you can

11:04:09

create your streamlit application and if

11:04:12

uh time will permit so definitely we'll

11:04:14

try to deploy it also and for the

11:04:16

deployment we're going to use

11:04:18

AWS okay so uh don't worry I will write

11:04:22

it down like uh each and every line in

11:04:24

front of you only and uh and I will

11:04:26

clarify the agenda but before that uh

11:04:29

let me show you the resources and all so

11:04:31

where you will find where you can find

11:04:33

it out all the resources so for that uh

11:04:36

let me go through with the Inon website

11:04:39

and here you can search generative AI so

11:04:43

just search about this generative Ai and

11:04:45

there you will get the dashboard so here

11:04:47

we have two dashboard one for the Hindi

11:04:50

and the second for the English so just

11:04:52

click on this English uh this uh this

11:04:54

particular dashboard and here click on

11:04:56

this go to the course so uh let's say if

11:04:59

you are enrolling for first time if you

11:05:00

are opening first time then it will ask

11:05:02

you for the enroll uh for the enrollment

11:05:04

and uh you no need to pay anything it's

11:05:07

completely free so you can enroll to

11:05:09

this particular dashboard and you can

11:05:11

open it so let me open the dashboard so

11:05:14

here is my dashboard guys uh you can see

11:05:16

all the recording we have updated all

11:05:18

the recording whatever thing I have

11:05:20

covered so let me uh show you the

11:05:23

resources as well I think day six

11:05:25

recording is not available over here so

11:05:28

don't worry it will be up uploaded along

11:05:30

with the recording you will uh find out

11:05:32

the assignment and the quizzes also and

11:05:35

where you will find out the resources so

11:05:37

let's check with the day five so uh here

11:05:40

in this uh video right so once uh you

11:05:42

will click on the video uh so here you

11:05:45

will get a different different option

11:05:46

related to the video so just click on

11:05:49

this resource section and here you will

11:05:51

find out all the resources so whatever

11:05:53

thing I'm discussing in the class itself

11:05:56

uh whatever uh like code and all

11:05:58

whatever I'm writing here so uh I'm

11:06:00

going to uh I'm going to upload each and

11:06:02

everything here inside this resource

11:06:04

section so from here itself from the

11:06:06

resource section you can download it got

11:06:09

it yes or

11:06:16

no great so from here you will get the

11:06:20

resources and all and yes U videos is

11:06:23

available over here recorded videos is

11:06:25

available over here and apart from that

11:06:27

you will find out over the ion YouTube

11:06:29

channel so just go through with the Inon

11:06:31

YouTube channel U and there uh go inside

11:06:34

the live section there you will find out

11:06:36

all the recorded video so let me show

11:06:38

you that so visit the Inon uh YouTube

11:06:41

channel and here click on the live

11:06:44

section this one so you will find out

11:06:46

all the videos all the like lecture or

11:06:49

the live lecture which I uh took so far

11:06:52

and here is a day six lecture where I

11:06:54

have started with a project so in this

11:06:57

lecture till day five actually I have

11:06:59

complet completed the Lin first I

11:07:01

started from the introduction then I

11:07:03

went to the open a and then I uh started

11:07:06

with the different different concept of

11:07:08

the Lang and then I move to this uh

11:07:10

particular project the project uh which

11:07:12

I have started that was the McQ

11:07:15

generator by using open a and the Len

11:07:18

chain so here uh you can see I have uh I

11:07:21

shown you that how to do a complete

11:07:24

project setup and even I shown you how

11:07:27

you can push it over the GitHub and all

11:07:29

how you can insize the gate each and

11:07:31

everything I shown you over here and

11:07:33

then uh I shown you the uh Jupiter

11:07:35

notebook implementation so just go

11:07:37

through with this particular video there

11:07:39

you will find out uh like each and

11:07:42

everything uh now uh what we can do we

11:07:44

can start with the remaining part of the

11:07:46

project so here in this uh particular

11:07:49

project so we have created a several

11:07:52

folder now in front of you only I'm

11:07:54

going to create few more file and there

11:07:57

I will be writing my code and finally

11:08:00

we'll try to create a web application

11:08:02

and if time will permit so definitely we

11:08:04

are going to deploy it also so the

11:08:07

agenda is clear to all of you yes or no

11:08:09

please uh do let me know in the chat

11:08:11

please do confirm in the

11:08:21

chat

11:08:28

yes

11:08:32

how long this course is going to be so

11:08:34

the course uh I I have planned two more

11:08:37

end to project so I have to take few

11:08:40

Advanced concept like uh Vector database

11:08:42

R and few open source model and after

11:08:46

that I have planned two more end to end

11:08:48

project so you can assume that uh like

11:08:52

more 8 to 10

11:08:54

days got it so um I I will take two more

11:08:58

end to end project and this is just a

11:08:59

basic project actually after completing

11:09:01

all the concepts and all I taught you

11:09:04

this one but yeah after that I will

11:09:06

complete one project along with the

11:09:08

flask API and I thought one more project

11:09:10

along with the vector database R concept

11:09:13

and the fast

11:09:15

API

11:09:23

okay great so let's uh begin with the

11:09:26

project and here uh what I can do

11:09:30

so just a second just allow me a

11:09:53

minute okay so I already given you this

11:09:55

particular project and if you want this

11:09:57

project uh this project actually so from

11:10:00

where you can get it uh let me show you

11:10:02

so this uh project already I have

11:10:05

uploaded on my GitHub so just uh try to

11:10:07

go through with my GitHub and there you

11:10:09

will find out this particular project

11:10:11

and for that what you need to do just

11:10:13

open your Google and search Sunny Savita

11:10:16

GitHub okay so open your Google and

11:10:19

search Sunny Savita GitHub and after

11:10:22

that you will find out my GitHub so just

11:10:24

click on that uh click on my GitHub and

11:10:26

here go inside the repository here

11:10:28

inside the reposit

11:10:30

and click on this very first link this

11:10:32

McQ generator so just open this one and

11:10:35

here you will find out this particular

11:10:38

project so whatever I'm uh doing

11:10:39

whatever I'm uh whatever code and all

11:10:42

I'm writing I'm pushing in my this

11:10:44

repository so I'm giving you this

11:10:45

repository in the chat section if you

11:10:47

are able to click click on it so that is

11:10:50

fine otherwise you can search over the

11:10:52

Google and directly you will find out

11:10:54

this repository in my uh repository

11:10:57

section got it so from from here itself

11:11:00

you can download the project so you can

11:11:02

download it or you can clone it anything

11:11:04

is fine now uh let's start with the

11:11:07

remaining part of the project now here

11:11:09

guys see I created a couple of uh folder

11:11:12

I have created couple of like files but

11:11:14

let's try to uh uh do something more

11:11:16

over here so as I told you this uh

11:11:19

project is going to be end to end so

11:11:21

here actually see I created the ipv file

11:11:24

so each and every experiment I performed

11:11:26

over here so I I return like some sort

11:11:29

of a line of code here and then uh I

11:11:32

called my openi API and then I generated

11:11:34

the mcqs and all here I have stored

11:11:36

inside my CSV each and everything I did

11:11:39

in my previous class now if I want to

11:11:41

convert this project if I want to uh

11:11:44

like uh convert this project into an end

11:11:46

to end project so for that uh I will

11:11:49

have to create few more file over here

11:11:51

so here guys if you will look into this

11:11:53

SRC folder so here I have created one

11:11:56

folder that is what that is an McQ

11:11:57

generator now inside this McQ generator

11:12:00

I'm going to create few more file so you

11:12:02

can do along with me if you have

11:12:04

completed till here so uh here actually

11:12:07

you can see uh like uh whatever thing I

11:12:10

have done in my previous session so you

11:12:12

can find out each and everything over

11:12:13

here if you have completed till here

11:12:15

then you can proceed along with me now

11:12:18

what I can do so here uh let me create a

11:12:21

few file inside this McQ folder inside

11:12:24

this McQ generator the first file which

11:12:27

I'm going to create over here that's

11:12:28

going to be a logger file so here let me

11:12:32

create the logger file logger py because

11:12:35

each and everything uh let's say

11:12:37

whatever code I'm running and uh

11:12:39

whatever thing I'm going to execute

11:12:41

inside my project so I'm going to log

11:12:43

each and everything so for that this

11:12:45

logger file is very much important so

11:12:47

here I'm going to Define my logging

11:12:49

object and directly I will import this

11:12:51

logging object in any other file and

11:12:54

then directly I'm going to uh like save

11:12:57

the logs and all so I will show you how

11:12:59

to do that first of all let's try to

11:13:01

create the folders so here uh let's try

11:13:03

to create the files and all so here I

11:13:05

have created my logger file logger dopy

11:13:07

inside this McQ generator folder now

11:13:10

after that you need to create one more

11:13:12

file over here the file is going to be a

11:13:14

utils file so here uh let me write it

11:13:18

down the utils.py now what is this util

11:13:21

file why we should use this utils file

11:13:24

actually this utils file is a helper

11:13:26

file so whatever helper function is

11:13:28

there whatever helper function and

11:13:30

method is there so each and everything

11:13:32

I'm going to write it down over here

11:13:34

itself got it so what what is the use of

11:13:36

this utils file so it's a utility file

11:13:39

it's a helper file so what is a what

11:13:41

whatever helping function and all

11:13:43

whatever I have inside my code so each

11:13:45

and everything I'm going to write it

11:13:47

down over here itself now uh one more

11:13:50

file I'm going to create inside this

11:13:52

folder inside this McQ generator and the

11:13:54

file is going to be McQ generator itself

11:13:57

so inside this particular file I'm going

11:13:59

to write it down my entire code got it

11:14:02

now here I'm going to create one file

11:14:04

the file name is going to be a

11:14:07

McQ generator so here is the file name

11:14:11

McQ generator. py so I have created

11:14:14

three file inside my McQ folder inside

11:14:16

my McQ generator folder so the first

11:14:18

file logger file the second file is a

11:14:20

utils file and the third file McQ

11:14:22

generator. py5 fine so I hope till here

11:14:26

everything is fine everything is clear

11:14:28

now let me create few more file now in

11:14:31

the root directory itself I'm going to

11:14:33

create one more file that's going to be

11:14:34

a response response. Json I will tell

11:14:38

you what is the use of this response.

11:14:40

Json because yesterday uh in the

11:14:42

previous class uh if you will uh let me

11:14:44

show you this ipb itself so here I have

11:14:46

written one response here you can see we

11:14:48

have uh I have written this response G

11:14:51

and inside this response G I have Define

11:14:54

uh the response basically in which

11:14:55

format uh like uh the response should be

11:14:58

generated so here I have defined the

11:15:01

response Json now uh the same thing I'm

11:15:03

going to Define inside the Json file and

11:15:06

I will tell you what is the importance

11:15:08

of that so if I want to create a Json

11:15:10

file so for that uh what I need to do I

11:15:13

no need to do anything so here uh click

11:15:15

on this new file and after that uh write

11:15:17

it down here response uh response do

11:15:21

Json response. Json now here you can see

11:15:25

this is what this is my Json file so uh

11:15:29

till now I have created four file the

11:15:31

first file was the logger McQ generator

11:15:33

utils.py and apart from that one more

11:15:36

file that's going to be a response. Json

11:15:38

and this file will be in a uh will be in

11:15:42

a root directory this one response. Json

11:15:45

I think till now everything is fine okay

11:15:47

where I have created it uh let me check

11:15:51

once I think I have created inside this

11:15:54

experiment no need to worry just uh drag

11:15:58

and drop here

11:15:59

yeah so now I got it in my root

11:16:02

directory yeah so here is what here is

11:16:04

my response dojon now let me create one

11:16:08

more file over here and the file is

11:16:09

going to be a streamlit app so actually

11:16:12

I'm going to create my web app by using

11:16:14

the stream l so here I'm going to uh

11:16:16

create one more file and the file is

11:16:18

going to be a stream L and that two you

11:16:21

need to create in a root directed itself

11:16:23

in a root folder itself so here I'm

11:16:25

going to write down stream s e a m

11:16:28

stream lit uh

11:16:31

app.py so this is what this is my file

11:16:33

now let me keep this L as a small one

11:16:37

yeah now it is fine so streamlit do

11:16:40

streamlit app.py so these many file I

11:16:43

have created and now I think it is like

11:16:46

enough now what I can do I can give you

11:16:49

like this complete folder structure so

11:16:51

for that U like I can commit from here

11:16:53

itself uh so let me add all the files

11:16:55

from here I'm going to add all the

11:16:57

changes whatever I have done done inside

11:16:59

my code and I told you how to do that uh

11:17:02

in the previous class I explain you each

11:17:03

and everything regarding the git and all

11:17:05

so if you will go through with my

11:17:06

previous uh session so you will get to

11:17:08

know the uh like you will get uh you

11:17:11

will get the idea that how to like uh

11:17:13

how to uh create a repository and all

11:17:15

how to publish from here itself how to

11:17:17

publish a public repository each and

11:17:19

everything I have discussed in my

11:17:21

previous session now uh here you can see

11:17:24

I have added all the changes now I just

11:17:26

need to commit it in my staging area and

11:17:29

then I will push it in my GitHub so here

11:17:31

I can write down that uh I updated

11:17:34

updated the

11:17:36

folder updated the folder structure so

11:17:41

now what I can do I can commit it and

11:17:43

here I can sync the changes and then

11:17:54

okay yeah so now let me show you did I

11:17:56

get all the files and all here so here

11:17:59

guys you can see I got all the files

11:18:01

like streamlit app streamlit app.py and

11:18:05

here in the SRC you will find out this

11:18:07

uh in the McQ generator you'll find out

11:18:09

this McQ generator. py logger py

11:18:11

utils.py so each and everything uh you

11:18:15

can uh you can see over here inside my

11:18:18

repository itself so I hope guys you got

11:18:21

this entire code yes or no this entire

11:18:24

file now again let me give you inside

11:18:26

the chat uh or else what you can do you

11:18:29

can search over the Google as well so

11:18:31

directly you will get it tell me guys uh

11:18:34

till here everything is fine uh can we

11:18:36

start with the code and

11:18:39

all please uh do let me know in the

11:18:53

chat I given you this uh link inside the

11:18:56

chat I hope uh you are able to click it

11:18:58

otherwise directly check with the Google

11:19:00

you will get this

11:19:04

project Raab please check with my GitHub

11:19:07

repository check with a just search

11:19:09

about my username this s Savita Sun

11:19:13

Savita GitHub and then you will get my

11:19:15

GitHub and then from U from there itself

11:19:18

you can download this particular

11:19:23

code front end and all we are going to

11:19:26

handle by using this stream lead so

11:19:28

stream will handle everything we don't

11:19:30

no need to like create a front end

11:19:32

separately uh in the next project I will

11:19:35

show you that once I will use the

11:19:36

flask maybe with the fast API I will

11:19:39

show you the uh front end part as well

11:19:41

but here uh if I'm using this stream L

11:19:44

then front end is not

11:19:57

required

11:20:00

yeah you can use any ID even you can use

11:20:02

the U Inon lab also so from next project

11:20:05

onwards we are going to use the in

11:20:07

neural lab yesterday actually I did the

11:20:09

entire setup in my uh local vs code only

11:20:12

so that's why I'm continuing from here

11:20:14

itself but uh from next project onwards

11:20:17

I'm going to use the neurol lab so U I

11:20:20

think uh no need to set up in your local

11:20:22

uh directly you can launch the lab and

11:20:24

whatever experiments and all or whatever

11:20:27

project uh like you have uh you can

11:20:29

create over there itself

11:20:49

okay if you're getting any error

11:20:51

relative to the API key then try to

11:20:53

generate a new API key and don't use my

11:20:56

API key okay

11:21:02

because after the class anyhow I will

11:21:03

delete it so yeah don't use my API key

11:21:07

uh use your API key try to generate your

11:21:09

own API key from the open a i shown you

11:21:12

how to do that so go through the uh

11:21:15

openi website and from there itself you

11:21:18

can generate an openi key so if you're

11:21:21

liking the session guys then please uh

11:21:23

hit the like

11:21:27

button and and yes I think now we can

11:21:31

start with the coding so if you will

11:21:33

look into the project so here I have

11:21:35

created a various folder so I have

11:21:38

started from this uh logger if you will

11:21:41

look into this McQ generator so I've

11:21:44

created a couple of file the first file

11:21:46

was the logger the second file was the

11:21:47

utils file and the third file was the

11:21:49

McQ generator now here uh no need to

11:21:52

write it down the separate code for the

11:21:55

separate code for the front end and all

11:21:57

this stream lit will take care of it

11:21:59

this stream late will take care of it we

11:22:01

can create a basic BB application just

11:22:04

to test our API and all so no need to

11:22:06

write it down the code for the front end

11:22:08

and all now guys uh what we can do here

11:22:10

so let's try to uh write it down the

11:22:13

code for the logging so here I'm going

11:22:16

to write down the code for the loging

11:22:17

now why the uh logging is required so

11:22:20

see whenever we are going to execute a

11:22:22

code so in the code actually we have a

11:22:24

various step we have a various files we

11:22:27

have a various method function classes

11:22:29

and all right and each and every

11:22:31

function has been defined for the

11:22:32

particular purpose so let's say uh if

11:22:34

I'm going to write it down any sort of a

11:22:36

function inside the utils file or maybe

11:22:38

McQ generator so the function which I'm

11:22:40

going to create or which I'm going to

11:22:42

Define I'm going to create it for the uh

11:22:44

for the like Define purpose for a

11:22:46

particular purpose right so uh if I if

11:22:48

you want to log that uh information like

11:22:51

so let's say this a function is going to

11:22:53

execute and after the execution like

11:22:55

what you are getting or maybe after the

11:22:57

let's say you have completed the

11:22:59

execution now you want to save that

11:23:01

particular information software okay I

11:23:03

have completed this particular step I

11:23:05

have executed this particular function

11:23:06

or method so that information you can

11:23:09

log somewhere and there this logging

11:23:11

comes into a picture so always make sure

11:23:13

whenever you are going to create any

11:23:15

sort of a project uh whether you are

11:23:18

doing a development code development

11:23:20

machine learning related development or

11:23:21

whe whether you are going to write it

11:23:23

down a code in a gener project or

11:23:26

anywhere this loger exception you and

11:23:28

all this uh this particular files and

11:23:31

folder will remain same it's a part of

11:23:33

the infrastructure got it now here uh

11:23:36

let me write it down the code inside

11:23:38

this logger do py file so here uh let me

11:23:42

import the logging first of all so here

11:23:44

I'm going to write it down import import

11:23:47

login now uh here I have imported the

11:23:50

login then after uh I'm going to import

11:23:53

the OS and the third module which I'm

11:23:56

going to be import over here that's

11:23:57

going to be a date time so from date

11:23:59

time and here I'm going to write it down

11:24:02

import date time so these three import

11:24:05

statement this three statement I have

11:24:07

imported the first one is a loging the

11:24:10

second one is a OS and the third one is

11:24:12

a date Tye now let's try to create our

11:24:15

logger file so for that uh what I'm

11:24:17

going to do so here I have written one

11:24:19

expression now let me show you how my

11:24:22

logger file will be looking like so guys

11:24:24

here is my logger file here is my log

11:24:27

file actually and inside this file I'm

11:24:30

going to log each and every information

11:24:32

right so just try to uh look into this

11:24:35

particular file so here what I'm going

11:24:36

to do see here I'm going to collect my

11:24:39

uh the real uh date time so by using

11:24:42

this date time do now I'm going to uh I

11:24:45

I I will be getting the real date time

11:24:48

now I'm uh calling this particular

11:24:49

method St strf time so I'm formating

11:24:52

this particular time whatever date and

11:24:54

time which uh which we are getting U and

11:24:56

this is the real date time okay okay if

11:24:58

I'm going to call it um as of now right

11:25:00

so let me show you you can perform each

11:25:02

and every thing each and every

11:25:04

experiment inside this experiment uh

11:25:06

inside this uh particular notebook So

11:25:09

Yesterday only I have created so you can

11:25:11

create it and you can perform like

11:25:13

whatever experiments you want to do

11:25:15

before putting into the pipeline now

11:25:17

what I can do here I can copy this uh

11:25:19

code from here now let me copy it and

11:25:22

let me show you that what I will be

11:25:23

getting from here so this small small

11:25:25

experiment you can do inside your

11:25:27

Jupiter notebook now from uh so here

11:25:30

actually I need to import the date time

11:25:32

so from date time what I'm going to do

11:25:34

I'm going to import the date time itself

11:25:37

so from date time import date time now

11:25:41

uh let me do one thing let me run it and

11:25:44

here you will find out the uh the

11:25:46

current date and time now if you want to

11:25:49

formate it uh so here uh for that

11:25:51

actually we have a method so you can

11:25:54

call this method St strf time now let me

11:25:57

call this particular method

11:25:58

and then let's see what you will be

11:26:00

getting over there so I'm going to copy

11:26:02

it and let me paste it over here now you

11:26:06

will find out that I'm getting a date

11:26:09

time in a particular format so here is

11:26:11

month day year Edge means are minute and

11:26:15

second now what I'm going to do so this

11:26:18

will be the file name this will be my

11:26:20

file name and here I'm going to put do

11:26:22

log so do log is what do log is a

11:26:25

extension so this is going to my file

11:26:27

name and with that easily I can identify

11:26:29

that at which particular time I have

11:26:32

executed my code getting my point so

11:26:35

that's why I'm writing this name I'm

11:26:37

giving this name to my log file and this

11:26:40

this will be what this will be my uh

11:26:41

this current uh date and time will be my

11:26:43

name of the log file and what is the

11:26:46

meaning of the do log do log is nothing

11:26:48

it's a extension so here uh you will see

11:26:51

inside this uh logger file so this is

11:26:53

what this is the name of the file uh by

11:26:56

using this particular Name by seeing

11:26:57

this name I can easily understand that

11:27:00

at at which time I have executed my

11:27:03

pipeline right so according to that I

11:27:05

can collect the logs now here you will

11:27:07

find out this is what this is my file

11:27:09

name so I created a loog file and after

11:27:12

that guys what I will do so after that

11:27:14

let me create the path as well so where

11:27:17

I'm going to store my log so for that

11:27:20

also I have written couple of line and

11:27:22

this two line actually I'm using for

11:27:25

saving my log so in which directory I'm

11:27:28

going to save my log okay now here I'm

11:27:31

going to call this method os. path.

11:27:34

jooin os. getcwd means what so os. get

11:27:38

CWD means get current working directory

11:27:42

so as of now um in I am in this a

11:27:44

particular directory let me show you so

11:27:46

let me open my terminal and here you

11:27:48

will find out that I'm in this a

11:27:51

particular directory so I'm in C user

11:27:54

Sunny McQ generator so this is what this

11:27:57

is my folder name so this is my

11:27:58

directory path as of now I'm working in

11:28:00

this uh directory so by using this

11:28:04

particular method os. get CW you will

11:28:07

get the current working directory and

11:28:09

here is what here you are going to write

11:28:12

down this log so it is going to combine

11:28:14

this both path all right it is going to

11:28:16

combine this both path so in a current

11:28:18

working directory you are going to

11:28:20

create one more folder the folder name

11:28:22

is going to be a log and this is going

11:28:24

to be your path now you will pass this

11:28:26

path to your make directory meth method.

11:28:29

make directory so what it will do so it

11:28:30

will create a folder so here is your

11:28:33

file name here is your folder along with

11:28:36

the path where it will be available and

11:28:38

here you are going to create that

11:28:40

particular folder after giving a path

11:28:43

right I hope this three line is clear to

11:28:45

all of you now what I can do now inside

11:28:48

this folder what I will do guys tell me

11:28:50

now inside this folder I will now inside

11:28:53

this folder I will create my log file

11:28:56

the file basically the name uh which I

11:28:59

have uh like given over here which I'm

11:29:01

trying to generate from here so now in

11:29:04

this particular folder inside the loog

11:29:06

folder I'm going to create mylog file so

11:29:10

let me do uh this thing and here you can

11:29:12

see os. paath join now here is what here

11:29:16

is my lock path this this particular

11:29:18

path lock path where uh like we have a

11:29:21

lock folder this logs folder and inside

11:29:24

that I'm going to create this dolog file

11:29:27

now now after that let me create a

11:29:30

object for this loging so here I'm going

11:29:32

to call this loging now now let me copy

11:29:35

and paste uh inside that I need to write

11:29:39

couple of thing inside this logging

11:29:41

method inside this logging function now

11:29:44

let me show you that what all thing we

11:29:46

are going to write it down inside this

11:29:48

particular method so here I have already

11:29:50

written the parameter that what all

11:29:52

parameter which we need to pass over

11:29:54

here the parameter is going to be a very

11:29:56

very easy so the first parameter is

11:29:58

going to be a uh label so actually we

11:30:01

have a different different label of the

11:30:03

loging so here I'm going to mention this

11:30:06

info label so loging doino this this is

11:30:09

going to be my label actually we have if

11:30:11

you will look into the uh logging

11:30:13

documentation so P just just type python

11:30:16

logger so there you will find out a

11:30:17

documentation and just look into the

11:30:19

label so there you will find out a

11:30:21

various label regarding this logging so

11:30:23

from where you want to so from uh which

11:30:26

particular label you want to log your

11:30:28

information so here I'm mentioning this

11:30:31

uh info so info till info and above the

11:30:34

info it is going to capture all the

11:30:36

information it is not going to capture

11:30:38

the information below the info right so

11:30:41

let's say if we have let me let me show

11:30:42

you the label of this uh logging so you

11:30:45

can search about the python logger so

11:30:48

let me write it down over here python

11:30:50

logger and here uh let me search it and

11:30:54

let me open the documentation and here

11:30:57

you will find out the different

11:30:59

different label of the logging so just a

11:31:03

second let me show you that

11:31:06

[Music]

11:31:26

and

11:31:30

uh label they haven't given over here

11:31:32

let me search directly python loger

11:31:43

label yeah so these are the label

11:31:46

actually so nonset and debug information

11:31:50

warning is there error is there and

11:31:52

critical is there so we have uh how many

11:31:55

labels we have six label actually so

11:31:58

info so we are going to log all the

11:32:00

information from here okay so we are

11:32:02

going to write it down the label label

11:32:04

is equal to logging doino and from here

11:32:07

onwards we are going to capture all the

11:32:09

information so information warning error

11:32:12

and critical we are not going to capture

11:32:15

this two information debug and nonset I

11:32:18

think this part is clear to all of you

11:32:20

that what is a label now here you can

11:32:23

see we have a like a label and apart

11:32:25

from that I have mentioned the file path

11:32:27

so this two thing is clear to all of you

11:32:30

now let's talk about this format so what

11:32:32

is this format actually so in the inside

11:32:34

the format you will find out I'm going

11:32:36

to mention a various parameter so first

11:32:39

parameter which I have mentioned that is

11:32:40

going to be a ASD time uh that's going

11:32:43

to be a current time now line number at

11:32:46

which line number we are going to log

11:32:47

the information then we have a name then

11:32:50

label name and then we have a message so

11:32:53

we are going to log a various parameter

11:32:55

now let me run it and then you will get

11:32:57

a a clear-cut idea that how the thing is

11:33:00

working so here is my logger file and by

11:33:02

using this particular file I'm going to

11:33:05

capture each and every information

11:33:07

regarding the execution and in between I

11:33:09

will be writing loging doino loging

11:33:11

doino so whatever uh like information I

11:33:13

want to capture so in between in my in

11:33:15

between my execution I will be

11:33:17

mentioning that thing and I will be able

11:33:19

to capture all those information so here

11:33:22

what I can do so if I want to test this

11:33:24

logger file logger py so for that what I

11:33:28

can do here I can write it down this uh

11:33:31

test.py now I'm going to create one file

11:33:34

the file name is what

11:33:36

test.py now here inside this file I'm

11:33:38

going to write it down let's say I'm

11:33:40

going to import this loging first of all

11:33:42

so where this logging is available so if

11:33:44

you will look into this SRC so just go

11:33:47

through with the SRC inside the SRC we

11:33:49

have a McQ generator and inside the McQ

11:33:52

generator you will find out this logger

11:33:54

so you can write it down like this uh

11:33:56

how you will write write it down your

11:33:58

import statement so you will write it

11:33:59

down from SRC do McQ

11:34:03

generator. logger and you are going to

11:34:07

import logging from here from this

11:34:10

particular file so from SRC do McQ

11:34:13

generator. loger import loging now here

11:34:17

I'm going to write it down this a loging

11:34:19

loging doino so here I'm mentioning this

11:34:23

here I'm writing my login. info and let

11:34:25

me write it down something over here so

11:34:27

so hi uh I'm going to I'm going to start

11:34:34

I'm going to start my execution so I'm

11:34:39

going to start my execution now this is

11:34:41

what this is my message which I have

11:34:43

written over here now if I'm going to

11:34:45

run this particular file so let's see uh

11:34:48

will I be able to create the logger or

11:34:50

not so for running this file what I need

11:34:53

to do so first of all uh I need to open

11:34:56

my G bash because either I'm going to

11:34:58

work with my G bash or command line I'm

11:35:00

not going to use this poers cell uh

11:35:02

because it gives uh some sort of issues

11:35:04

so I'm not going to use it now here what

11:35:07

I can do guys I first of all I need to

11:35:09

activate the environment so what is the

11:35:11

name of my environment my name of my

11:35:13

environment name is EnV so for

11:35:16

activating the environment I just need

11:35:18

to write it down here Source activate

11:35:21

and do/ EnV now here is what guys here

11:35:24

is my environment so EnV is my

11:35:26

environment which I have activated now

11:35:29

you can check that all the libraries is

11:35:31

there or not all the thing uh we have

11:35:33

upload we have installed or not inside

11:35:35

this particular environment you can list

11:35:37

all the import statement so for that

11:35:40

there is a command pip list so just run

11:35:42

this particular command pip list and

11:35:44

here you will find out all the library

11:35:46

all the library basically which we have

11:35:48

installed and along with all the library

11:35:51

along with all the packages you will

11:35:52

find out my local package as well and

11:35:55

the name of the local p and the name of

11:35:58

the local package is what McQ generator

11:36:01

so here guys this is the path where this

11:36:03

package is available inside my directory

11:36:05

inside my system and here you can see

11:36:08

this is what this is the package name

11:36:10

and how to install this package in my

11:36:12

previous class I have clearly explained

11:36:14

you that how to install this package

11:36:16

inside the current virtual environment

11:36:19

so for that either you can mention this

11:36:21

Hy e do inside the re. txt or else you

11:36:25

can use the setup. y file now let's try

11:36:28

to execute the test.py file and let's

11:36:32

see will I be able to create the logger

11:36:34

or not so here what I'm going to do here

11:36:36

I'm going to write down my python python

11:36:40

test.py and here you can see it is

11:36:42

saying that modu object is not callable

11:36:46

but yeah I able to create my logger and

11:36:49

inside this logger I don't have the uh I

11:36:52

don't have the logger uh I don't have a

11:36:55

logger log file actually so let's see uh

11:36:58

what mistake we have done over here

11:37:00

inside this uh inside this uh logger py

11:37:04

so let me check with the logger py and

11:37:08

here is saying that uh loging label

11:37:11

loging

11:37:13

doino um module okay so actually I

11:37:16

haven't mentioned this uh I haven't

11:37:18

called one method over here the method

11:37:20

name is going to be a loging do basic

11:37:23

info so basic configure actually so I

11:37:26

missed uh that particular method now let

11:37:28

me copy it and here I'm going to call it

11:37:31

so my method name is going to be a basic

11:37:33

configure so here is my method guys uh

11:37:36

which I have copied now so let me do one

11:37:39

thing let me remove it now everything is

11:37:42

perfect so let me remove this part

11:37:45

also yeah so here guys you can see my

11:37:48

method name is what login. basic config

11:37:51

this is my method and now I hope

11:37:54

everything will work fine so what I can

11:37:56

do do I can uh delete this particular

11:37:59

module log mod sorry I can delete with

11:38:02

this particular folder log folder and

11:38:05

again I can run it so here let me clear

11:38:07

the screen and let's see this time it

11:38:10

will be working or not so I'm executing

11:38:12

Python test.py and now you can see I'm

11:38:16

able to uh run or I'm able to execute

11:38:19

this particular file now just look into

11:38:21

this log file and here uh log folder and

11:38:24

inside this you will find out this uh

11:38:26

particular file so just see the name

11:38:28

just see the name of this file the file

11:38:31

name is uh this is the date current date

11:38:34

12

11:38:35

1223 and here is a Time 347 and this is

11:38:38

a second actually and do log do log is

11:38:41

What DOT log is a extension now just

11:38:43

look into the information that uh what

11:38:46

information we are going to capture over

11:38:47

here so here this is my current date

11:38:50

time and here is my root actually root

11:38:53

uh uh and here you will find out the

11:38:55

information this is the information now

11:38:57

this is my message so in whatever for

11:38:59

see whatever format I have mentioned

11:39:01

over here inside this format inside this

11:39:04

basic config you can see in a similar

11:39:06

format we are going to capture the

11:39:09

information so just look into the format

11:39:11

so here is a current time here is a line

11:39:13

number here is a name so name is what

11:39:16

name is a root I haven't defined any

11:39:18

specific name so it's taking as a root

11:39:20

line number U at which line actually uh

11:39:23

I have mentioned this loging logging

11:39:25

doino inside this test.py file so you

11:39:28

can see at line number three so yes I'm

11:39:30

able to capture line number three also

11:39:32

now here is a logging information uh

11:39:35

actually logging label that's going to

11:39:36

be information and here is my final

11:39:39

message so this particular information

11:39:42

I'm going to log and in between I can

11:39:44

mention this log uh like wherever I want

11:39:47

to do wherever I want to mention it and

11:39:50

then I will be uh log the information in

11:39:53

this particular file I hope this logger

11:39:55

is clear to all of you please do let me

11:39:58

know in the chat uh please write down

11:40:00

the chat if logger part is clear then I

11:40:02

will proceed with the next

11:40:25

concept

11:41:18

okay so great I think uh this part is

11:41:20

clear to all of you how to create a log

11:41:22

and all and how many of you you are

11:41:24

implementing along with me uh how many

11:41:27

of you you are doing along with

11:41:43

me great so what I can do here I can uh

11:41:46

push this changes to my GitHub and then

11:41:49

I will show you how you can do the

11:41:50

entire setup in a lab also so before

11:41:53

writing the further code uh so what I

11:41:55

will do I will uh Lo the same repository

11:41:57

in the lab in the neuro lab and I will

11:41:59

show you how you can execute each and

11:42:01

everything over there also okay so first

11:42:04

of all let me commit it uh let me do it

11:42:07

over

11:42:08

here I'm going to add all the files just

11:42:12

a second yeah it is done now here I can

11:42:16

write it on the message I created a

11:42:20

logger I created a

11:42:23

loger now let me commit it and uh here

11:42:30

okay a few more fil is remaining just a

11:42:35

second now

11:42:55

this

11:42:59

yeah so here you can see so I created a

11:43:02

log and you can see my log folder and

11:43:04

here is my log file now guys you can do

11:43:07

one more thing uh let's say if you are

11:43:09

not able to set up this project inside

11:43:11

the local see yesterday I started with

11:43:13

my local setup and all so that's why I'm

11:43:15

continuing uh here itself U but yeah

11:43:18

from next uh class onwards I'm going to

11:43:21

uh I'm going to shift uh this projects

11:43:23

and all on my uh lab itself so what you

11:43:26

can do so just uh open the inal lab and

11:43:30

after opening the inal lab let me show

11:43:31

you how you can U like clone this

11:43:34

particular project in the lab itself how

11:43:36

you can execute this uh this this entire

11:43:39

project actually in the lab itself

11:43:41

directly from the GitHub from here

11:43:43

itself so what I can do let me open the

11:43:46

lab and here uh first of all let me give

11:43:48

you the GitHub link so what I'm doing

11:43:50

I'm going to pass it inside the chat and

11:43:54

here is my GitHub link now guys what you

11:43:56

need to do see uh here uh how you can

11:43:59

open the lab so after open the Inon

11:44:02

website you just need to click on this

11:44:04

neurol lab so just click on this neural

11:44:07

lab and it will redirect uh to you on

11:44:09

this particular page so this is the

11:44:11

homepage of the lab I neural lab now

11:44:13

click on this start your lab so once you

11:44:16

will click on that here you will find

11:44:18

out of various option so big data data

11:44:21

analytics data science programming web

11:44:22

development so whatever you want to do

11:44:25

now let's say if I'm clicking on this

11:44:27

data science now here also you will find

11:44:29

out of various option so K is there Dash

11:44:32

is there Jango is there flask is there

11:44:35

Jupiter py toch my SQL python there are

11:44:38

so many option you will get it now here

11:44:40

I'm using this cond as of now so I'm not

11:44:43

going to create my application in flask

11:44:45

so I'm not using this dedicated uh lab

11:44:48

okay this one uh I can use it if I'm

11:44:50

going to create my application in flas

11:44:52

Jupiter for the Jupiter only means here

11:44:55

you will be able to launch the Jupiter

11:44:56

this for the pyto this for the Python

11:44:58

Programming this for my SQL with python

11:45:00

so already you will get a like extension

11:45:03

and all here itself inside the lab it

11:45:05

has been configured in that particular

11:45:07

way now let me open this cond and here

11:45:10

what you can do so start your lab and

11:45:12

here you can give the name so here you

11:45:14

can write it down the name let's say I'm

11:45:16

going to write down the name McQ gen

11:45:18

project so this is what this is the name

11:45:22

of the project now here uh what I will

11:45:25

do let me write down the comp name McQ

11:45:27

generator project and it is asking to me

11:45:29

do you want to clone any GitHub

11:45:31

repository so I would say yes I want to

11:45:33

do that so it is asking to me a URL so

11:45:37

uh like just just give your url just

11:45:39

paste your url so here what you can do

11:45:41

you can give uh this particular URL see

11:45:44

here I have uploaded the my code

11:45:47

actually here I have uploaded uh the

11:45:49

entire code on my GitHub repository so

11:45:51

first what you need to do either you can

11:45:53

Fork it or else you can uh like clone

11:45:56

this particular repository and then you

11:45:58

can upload inside your repository right

11:46:00

so as of now this code actually it is

11:46:03

available in my repository I have

11:46:04

created the repository McQ generator and

11:46:07

here you will find out the entire code

11:46:09

now in your case what you need to do you

11:46:11

need to upload the upload the same code

11:46:13

in your repository and that URL you need

11:46:16

to pass okay that particular URL

11:46:19

basically you're going to pass so here

11:46:21

what I can do I can copy this URL I can

11:46:23

copy this https URL just copy it from

11:46:26

from here and pass it over here inside

11:46:29

this enter repository URL now uh let me

11:46:32

pass it and here you can see guys this

11:46:34

is what this is My URL now proceed so

11:46:37

once you will proceed so it will take

11:46:38

some time for the launching and my

11:46:40

entire code will be available inside

11:46:43

this particular lab so just wait uh it

11:46:46

is fetching the entire code from the

11:46:48

GitHub and yes now it is going to launch

11:46:53

it see guys see uh so here you will find

11:46:56

out the entire code see this is what

11:46:58

this is my entire code whatever code

11:47:00

whatever development I'm going to do uh

11:47:02

I I I'm doing basically uh which is

11:47:04

available in my GitHub now uh what you

11:47:06

can do see uh here let me show you so

11:47:10

sttp github.com now this same thing

11:47:13

actually you can see in your vs code

11:47:15

here itself in your vs uh in your GitHub

11:47:17

also so if I'm writing over here dab.com

11:47:20

instead of this uh github.com it is not

11:47:24

there I think I need to press dot just a

11:47:28

second yeah GitHub do

11:47:34

Deb see guys so this actually this vs

11:47:38

code has been provided by the GitHub

11:47:40

right this this one this uh which you

11:47:41

can see over here you just need to press

11:47:43

dot in your um like once you need to

11:47:46

open your repository and press the dot

11:47:48

so here you will get this vs code so in

11:47:50

the same way actually see we are

11:47:52

providing you this a particular lab now

11:47:54

whatever thing now whatever thing thing

11:47:56

actually we are doing in a local in our

11:47:58

local actually this one this is what

11:48:00

this is my local setup right so whatever

11:48:02

code and all I'm executing I'm doing in

11:48:04

my local but let's say you have a

11:48:06

dependency issue you are not able to

11:48:08

write it on the code in your local

11:48:09

system your system is very slow you

11:48:11

don't have that that much of

11:48:12

configuration your system is lagging or

11:48:15

if you're are installing or downloading

11:48:17

any sort of a library is giving you the

11:48:18

error so any type of issue so for that

11:48:22

there is a one solution the solution is

11:48:24

neural lab uh for so that uh you don't

11:48:27

need to download or install anything you

11:48:28

just need to visit the uron website

11:48:31

after visiting the uron website click on

11:48:33

the neural lab after clicking on the

11:48:35

neural lab there is a various option you

11:48:37

just need to select only one according

11:48:39

to your requirement and then pass your

11:48:42

GitHub URL there or maybe if you don't

11:48:44

want to pass it don't pass it directly

11:48:46

launch your lab it will be launching the

11:48:48

blank lab in that case and there

11:48:51

actually in that particular workspace

11:48:53

you can create your own project so that

11:48:56

that's uh that thing actually I'm going

11:48:57

to do from my next class onwards and

11:48:59

here you can see uh this is what guys

11:49:01

this is my project the same project I

11:49:03

have open in my uh the same project I

11:49:06

have open in my neural lab now let me

11:49:08

open the terminal and here is what here

11:49:11

is my terminal this is what this is my

11:49:13

terminal uh are you doing it guys are

11:49:15

you doing along with me please do let me

11:49:17

know in the chat if you are able to open

11:49:20

this Nero lab and if you are if if you

11:49:22

migrated your project to this nuro lab

11:49:25

here is my GitHub so you will find out

11:49:26

the uh entire project entire code in my

11:49:29

GitHub itself you can Fork it you can uh

11:49:32

clone it whatever you want to do you can

11:49:34

do from here uh we are not going to use

11:49:37

Google collab uh we are going to use the

11:49:39

neural lab see Google Google collab it

11:49:41

will just give you the notebook instance

11:49:44

right so but here actually this lab is

11:49:46

for the end to development so you can do

11:49:48

end to development over

11:49:50

here got it are you doing it please uh

11:49:53

do let me know yes uh Google collab you

11:49:55

can think it's a like a neural lab but

11:49:57

it is for the an development and it is

11:49:59

giving you like like lots of

11:50:07

functionality great so this is what guys

11:50:10

this is my uh project which I migrated

11:50:12

to my neural lab now here see this is my

11:50:15

base environment so in my base

11:50:17

environment I can uh install this

11:50:20

requirements or I can create the virtual

11:50:22

environment also so for creating a

11:50:24

virtual environment the command will

11:50:26

same so let me create a virtual

11:50:27

environment over here and let's see we

11:50:28

are able to do it or not so for creating

11:50:31

a virtual environment by using the cond

11:50:33

there is a command the command is going

11:50:34

to be cond cond and here cond create

11:50:39

hyphen p and here you need to write it

11:50:41

on the virtual environment name so my

11:50:44

virtual environment name is going to be

11:50:45

uh let's say I'm I can write any name

11:50:47

over here uh ENB vnb your name my name

11:50:50

or whatever now here the command is

11:50:52

Conta create hyphen PB and uh then you

11:50:56

need to mention the python version in

11:50:57

whatever version actually uh with

11:51:00

whatever version you want to create a

11:51:01

virtual environment so here I'm

11:51:03

mentioning python is equal to 3.8 now

11:51:06

hyphen y okay so this is my entire

11:51:08

command cond create hyphen

11:51:10

PB python is equal to 3.8 hyphen y now

11:51:14

as soon as I will hit enter so you can

11:51:16

see it is creating a virtual

11:51:19

environment in my local workspace so

11:51:22

let's

11:51:24

see

11:51:32

yeah so it has created a virtual

11:51:33

environment in my local workspace so

11:51:36

just just look into the workspace here

11:51:38

left hand side and here is your complete

11:51:41

virtual environment now if you want to

11:51:43

activate this virtual environment so for

11:51:45

that there is a simple command you just

11:51:47

need to write it down this Source

11:51:49

activate dot means what dot means

11:51:51

current working directory or current

11:51:53

work working space do/ andv now as soon

11:51:57

as you will hit enter so you can see

11:51:59

over here that I have launched my

11:52:01

virtual environment successfully so this

11:52:03

is what guys this is my virtual

11:52:04

environment this one EnV EnV is what EnV

11:52:07

is my virtual environment and here you

11:52:09

can see this virtual environment left

11:52:11

hand side right now what I will do here

11:52:14

I will install my re requirement. txt so

11:52:17

whatever requirement is there U

11:52:19

regarding this particular project I'm

11:52:20

going to install those requirement

11:52:23

inside my virtual environment now here

11:52:25

is a very simple command for installing

11:52:27

the requirements uh whatever like

11:52:30

requirements I have mentioned inside the

11:52:31

requir not txt and before that let me

11:52:34

check uh what all uh what all packages

11:52:36

we have inside this virtual environment

11:52:38

so for listing all the package there is

11:52:40

a command the command name is what the

11:52:42

command name is PIP list so let me hit

11:52:44

enter after writing this command pip

11:52:46

list so here you can see we are able to

11:52:48

list all the packages whatever is there

11:52:50

inside this virtual environment now uh

11:52:53

let me write it down here pip install

11:52:55

pip install hyph R requirement. txt so

11:53:00

now let's see uh are we able to install

11:53:03

yes we are able to install this

11:53:04

requirement inside the current virtual

11:53:06

environment so are you doing it guys

11:53:09

please do let me know in the chat if you

11:53:10

are following this instruction if you

11:53:13

want to set up the same project if you

11:53:15

want to set up the same project in your

11:53:17

neural lab so here I'm giving you the

11:53:19

all the step uh that uh whatever you

11:53:21

have to do so first you need to sign up

11:53:24

uh sign in actually you need uh you need

11:53:26

to open the neuro lab and after that go

11:53:29

inside the start your lab there's a

11:53:31

option right hand side you will find out

11:53:33

and there you will find out the data

11:53:34

science inside the data science there is

11:53:36

a cond so just click on the cond and

11:53:38

immediately you will be able to you will

11:53:40

be able to launch your lab if you have

11:53:42

kept your entire code in your GitHub

11:53:43

then directly pass your URL and then uh

11:53:47

like launch your lab that's

11:53:54

it

11:53:59

okay so I think it is done yeah so I

11:54:03

install all the requirements over here

11:54:06

now first I can check that uh my require

11:54:09

whatever like packages I have installed

11:54:11

it is working or not so here itself you

11:54:13

can launch the python terminal and here

11:54:16

you can see the environment python

11:54:17

version

11:54:18

3.8.8 and here if I'm going to write it

11:54:21

down import of Leng chain so let's see

11:54:24

it is working or not c i yes my Lang

11:54:27

chain is working now let me clear uh

11:54:30

okay and here if I'm writing this Panda

11:54:33

so import P

11:54:34

PD so yes this is also working now

11:54:38

everything is fine everything seems fine

11:54:41

let me exit from here and what I can do

11:54:44

now so here I have created the logger so

11:54:47

if you will look into this uh SRC folder

11:54:50

inside the SRC folder we have this McQ

11:54:53

generator and inside this McQ generator

11:54:55

we have have this logger now try to test

11:54:57

uh this logger so it is working or not

11:55:00

over here so for that what I can do I

11:55:02

can run my test.py file so what I can do

11:55:06

here I can change the message and my

11:55:09

message is now I now I'm

11:55:14

using now I am using neurol lab neuro

11:55:19

lab so there is my message uh the

11:55:21

message is now I'm using neurolab and

11:55:23

let's uh execute this particular file

11:55:27

python python

11:55:31

test.py so if I will hit enter now let

11:55:36

me check with the log folder yes uh so

11:55:38

we are able to create this file and yes

11:55:41

we are able to log the information also

11:55:45

I hope this thing is clear to all of you

11:55:47

how to log the information in all yes or

11:55:50

no so the same thing which I was doing

11:55:53

in my local now I'm easily able to do in

11:55:56

my lab

11:56:00

also oh yes we can change the theme also

11:56:03

and for changing a theme there is a

11:56:06

option let me

11:56:11

check okay I think here you I will get

11:56:13

the

11:56:17

option command pallet color theme

11:56:20

yeah so light is there now Dark theme

11:56:26

yep so here you can see I have changed

11:56:29

my theme also now if I if I want to zoom

11:56:32

in then I can do that

11:56:35

also just

11:56:38

wait it is in my browser now so let me

11:56:41

Zoom my

11:56:44

browser yeah I think now it is

11:56:53

perfect so guys uh if you are able to

11:56:57

follow me till here so please do let me

11:56:59

know in the chat then I will proceed

11:57:01

with a

11:57:02

further uh execution further code and

11:57:16

all yeah you can upload your code over

11:57:19

the GitHub and then you can clone this

11:57:21

GitHub over here or else if you haven't

11:57:24

created any GitHub then directly you can

11:57:26

launch the lab and uh then you can

11:57:28

connect to your GitHub from here also

11:57:30

from the lab so that setup I will show

11:57:32

you in my next class uh so in my next

11:57:34

class when I will start with a new

11:57:36

project so that I there I will show you

11:57:38

if you are opening the blank neuro lab

11:57:40

then how you can connect that neural lab

11:57:42

with your GitHub got it even you can

11:57:45

upload your code here also directly so

11:57:48

just do the right click and maybe here

11:57:49

you will find out the upload option see

11:57:51

this one so just do the right click on

11:57:53

this workspace over here here um

11:57:56

anywhere in the uh and then you will

11:57:58

find out this upload option so just

11:58:00

click on the upload and here also you

11:58:02

can upload your file maybe you won't get

11:58:05

the folder option but yeah if you want

11:58:07

to upload anything over here let's say

11:58:09

data set or any any any file from the

11:58:11

local system you can directly uh upload

11:58:15

from here so just do the right click and

11:58:17

here is upload option and then upload

11:58:20

your file that's

11:58:22

it great so I believe that uh everyone

11:58:24

is a able to follow me till here now

11:58:26

let's proceed with the further code so

11:58:29

we have created a logger now it's time

11:58:31

to write it down the code for the McQ

11:58:34

generation so here I have created a file

11:58:36

the file name is what McQ generator. py

11:58:39

now uh before this one uh let me show

11:58:42

you one more file this ipynb file which

11:58:44

I have created in my previous class now

11:58:47

here I have written the entire code of

11:58:49

the open a for the Lang CH and all so uh

11:58:52

directly from here itself I'm going to

11:58:54

copy the code because already I have

11:58:55

written it and uh yes I'm not going to

11:58:58

write it down again so from here itself

11:59:00

from the ipbb itself I'm going to copy

11:59:03

and paste now uh there is my McQ

11:59:05

generator. py file so at the first place

11:59:07

what I need to do guys I need to uh at

11:59:10

the first place I need to import the

11:59:12

statement so let me import all the

11:59:14

statement whatever statement is required

11:59:16

for this project so here I have imported

11:59:20

all the statement the first one is OS

11:59:22

Json Trace bag is there pandas is there

11:59:25

load. ENB is there now read file get

11:59:27

file I will tell you uh like uh why I

11:59:30

have written this read file get file so

11:59:32

once I will explain you the U tools and

11:59:34

here is loging so from where I'm going

11:59:36

to import the login I'm going to import

11:59:38

from this SRC see here uh I haven't

11:59:41

mention the SRC so let me mention the

11:59:43

SRC SRC Dot and here also let me write

11:59:47

it on the SRC dot because uh I created

11:59:50

uh like one more hierarchy actually this

11:59:52

McQ generator folder it is available

11:59:54

inside this

11:59:55

SRC uh now I think this is fine now

11:59:59

let's look into this particular import

12:00:01

statement so here I'm going to import

12:00:03

this Chad open Ai and then promt

12:00:05

template llm chain and this sequential

12:00:08

chain already I have explained you the

12:00:10

meaning of this different different uh

12:00:12

Imports that why we use this chat open

12:00:15

why we use this prom template llm CH and

12:00:17

this SQL uh and this like sequential

12:00:20

check now uh what I can do here I can

12:00:23

import my ID uh so actually I created my

12:00:27

key openi key so let me import that

12:00:29

openi key over here and then only I will

12:00:32

be able to hit to my API so for that

12:00:34

here I'm going to uh write it here I'm

12:00:37

going to call this a

12:00:39

load. EnV I told you why we use it uh if

12:00:43

I want to if I want to if I want to

12:00:46

create or if I want to keep my uh

12:00:49

environment variable locally in my local

12:00:51

folder in my local workspace so for that

12:00:54

only we create this

12:00:56

load. uh load. EnV uh now over here see

12:01:01

if I'm going to call this method if if

12:01:03

I'm running this method so actually it

12:01:05

will look uh to this EnV file so it will

12:01:09

it will try to find out the EnV file

12:01:11

inside the current workspace now uh here

12:01:14

what I can do I can create this EnV file

12:01:17

so here I'm writing down uh do EnV so

12:01:21

here is my file the file name is what

12:01:23

the file name is do EnV so as soon as I

12:01:26

am running this

12:01:27

load. EnV so in back end actually it

12:01:31

will try to search about this particular

12:01:33

file so whatever variable whatever

12:01:35

information I'm going to keep over here

12:01:38

right whatever information whatever like

12:01:41

variable I'm going to create over here

12:01:42

so it will try to fetch from here wait

12:01:45

let me show you how so uh what I can do

12:01:48

now let me keep my key over here this uh

12:01:52

like API key open API key I'm going to

12:01:55

keep it over here inside this now what I

12:01:58

can do now let me write down the further

12:02:01

code so here uh once I will uh load this

12:02:04

dot environment now here what I will do

12:02:07

guys here I'm going to uh write down

12:02:09

this dot get EnV so get environment

12:02:12

variable so os. get En EnV and here

12:02:16

inside this particular method I on uh

12:02:19

like I will call it so I will mention

12:02:20

the name of this uh key so what is the

12:02:23

name of the key so the name of the key

12:02:25

is open a API key so let me pass it over

12:02:28

here this open API key now what I can do

12:02:31

I can keep it inside the variable and my

12:02:33

variable is going to be key now here

12:02:35

what I'm doing guys I'm uh extracting my

12:02:38

key I collecting my key by running this

12:02:40

particular code by learning this

12:02:42

particular line now uh here what I can

12:02:45

do I can comment it out also so let me

12:02:48

comment this particular thing I already

12:02:50

WR the commment let me copy and paste so

12:02:53

here what I'm saying load the

12:02:54

environment with variable from the EnV

12:02:56

file and here access the environment

12:02:58

variable just like you would uh with OS

12:03:01

environment so here you can see we are

12:03:04

able to do it now let me follow the

12:03:06

further step so after collecting the API

12:03:10

key now what I will do I will call my

12:03:13

open AI API for that we have a method

12:03:16

the method name is chat open AI now let

12:03:18

me call it and here let me show you that

12:03:21

what all parameter we are going to pass

12:03:23

while I'm calling this chat open AI so

12:03:26

here you can see uh we are going to

12:03:28

create a object of this chat open Ai and

12:03:31

inside this one we are going to pass

12:03:33

couple of parameter the first parameter

12:03:34

is a key itself because without key we

12:03:37

cannot call the API and we won't be able

12:03:39

to uh get the model so here is what here

12:03:42

is my API key now here is what here is

12:03:44

my model name so this is the model which

12:03:46

I'm going to use there are various model

12:03:48

GPD 3.5 turbo or different different

12:03:51

type of model you can go and check uh

12:03:53

this uh I have already shown you in my

12:03:55

previous session in my Open Session if

12:03:57

you don't know about it you can go and

12:03:59

check with my previous session now here

12:04:01

is a temperature so temperature is just

12:04:03

for the creativity if I want to so

12:04:05

whenever I'm going whenever I'm calling

12:04:07

my llm model so uh like whatever

12:04:10

responses I'm generating so that will be

12:04:13

a more creative if I'm mentioning uh if

12:04:15

I'm writing the different different

12:04:17

value of the temperature the temperature

12:04:18

value from start from 0o to two so two

12:04:21

means uh very creative zero means not at

12:04:25

all it won't be a creative right so

12:04:28

actually zero means it will give you the

12:04:29

straightforward answer and two means it

12:04:31

will give you the highly creative answer

12:04:33

all it so between that I can set any

12:04:36

sort of a value over here and according

12:04:37

to that I will get the answer I will get

12:04:39

a response so here you can see we have

12:04:43

uh I'm able to call by API and I'm able

12:04:45

to like U I'm able to get my model also

12:04:48

now after that what I will do guys see I

12:04:50

told you what I need to do I need to

12:04:52

create my template I need to create my

12:04:55

prompt template so here I'm going to

12:04:57

create my prompt template now let me

12:04:59

show you my uh template actually how it

12:05:01

looks like so here is my template in my

12:05:03

previous class itself I have shown you

12:05:06

this thing I have explained you this

12:05:07

thing now here you will find out couple

12:05:09

of uh like variable also so variable

12:05:13

like this number is there subject is

12:05:15

there right we have tone we have n and

12:05:18

this number so in between actually

12:05:20

whatever thing you can see inside this

12:05:22

curly braces that is representing a

12:05:24

varable table now uh here what I'm going

12:05:26

to do I'm going to create my input

12:05:28

prompt I'm going to and this is what

12:05:30

this is the template from the input

12:05:31

prompt this is the template for the

12:05:33

input prompt now here is what tell me

12:05:35

guys here is my uh like a template for

12:05:37

the input prompt now what I can do I can

12:05:41

uh show you the prompt template and then

12:05:42

I will explain you what is the meaning

12:05:44

of uh this particular thing right this a

12:05:47

particular template why I have written

12:05:48

it again I will try to explain you even

12:05:50

though I have explained you this thing

12:05:51

in my previous class but again I will go

12:05:53

through with that so here you can see

12:05:55

guys we have a prompt template right so

12:05:58

what we have tell me we have a prompt

12:06:00

template and regarding uh see uh we have

12:06:03

uh two variable inside this prompt

12:06:05

template first variable is a input

12:06:07

variable and the second variable is a

12:06:09

template itself this one this one which

12:06:11

I have defined over here now whenever we

12:06:13

are talking about llm right so as I told

12:06:16

you whenever we are talking about the

12:06:17

llm so we have two type of prompt so the

12:06:20

first one actually first one is called

12:06:22

input prompt and the second one is

12:06:25

actually it is called output prompt

12:06:26

right so prompt is nothing it's a

12:06:28

sentence itself uh it's a collection of

12:06:30

the words it's a collection of the

12:06:32

tokens right now here you can see we

12:06:34

have a template and this is what this is

12:06:36

my template the template is nothing so

12:06:38

this prompt is nothing actually it is uh

12:06:40

guiding to my uh it is guiding to my

12:06:42

model is guiding to my GPT model GP we

12:06:45

are using the GPT model now right so

12:06:47

based on this particular prompt only is

12:06:49

going to generate the answer so we have

12:06:51

actually two type of prompts so we are

12:06:53

talking about the prompt actually so

12:06:55

measly you will find out two type of

12:06:56

prompt so the first prompt first type of

12:06:58

prompt actually is called a zero short

12:07:00

prompt zero short prompt there we are

12:07:02

not going to mention any sort of a

12:07:04

context we are directly asking a

12:07:06

question to my llm model the second type

12:07:09

of prompt is called the second type of

12:07:11

prompt is called few short prompt few

12:07:14

short prompt so what is the meaning of

12:07:16

the few short prompt so few short prompt

12:07:18

is nothing there we are giving uh some

12:07:20

sort of a direction actually some sort

12:07:22

of a direction or some sort of an

12:07:23

instruction in inside the prompt itself

12:07:26

so this typee of prompt actually is

12:07:27

called a few short of prompting now here

12:07:30

we are giving an instruction to our llm

12:07:32

based on this particular prompt now here

12:07:34

you can see uh this is what this is my

12:07:37

template uh and here I need to mention

12:07:40

this particular template over here and

12:07:42

this is what this is my input variable

12:07:44

right this is what this is my input

12:07:45

variable now we have H five input

12:07:48

variable so one is text so whatever text

12:07:51

on whatever text actually I want to

12:07:52

generate McQ so that particular text I'm

12:07:55

going to pass over here uh means

12:07:56

basically based on the text itself I'm

12:07:58

going to generate an McQ now there is a

12:08:00

number of McQ there is a grade okay so

12:08:03

to which grade actually uh the student

12:08:06

belong now here is a tone tone means

12:08:08

simplicity so means different different

12:08:11

label of the quizzes so simple quiz or

12:08:14

maybe hard quiz intermediate quiz and

12:08:16

here is a response Jon so there you will

12:08:18

find out the response and here in a

12:08:20

curly bis actually I have mentioned this

12:08:23

uh like uh I have mentioned this

12:08:25

particular thing this particular

12:08:27

variable now let me do one thing see uh

12:08:29

here I have mentioned the subject and

12:08:31

here I'm writing this grade so let me

12:08:33

change this particular value here I can

12:08:36

write on the subject so now everything

12:08:38

is fine everything is clear so this is

12:08:40

what guys this is my input prompt this

12:08:42

is what what I have created I have

12:08:44

created an input prompt now let me uh

12:08:47

create a chain object so here already

12:08:50

you can see I have like I have imported

12:08:54

my llm chain and why we use this chain

12:08:56

if we want to connect two component so

12:08:58

we first uh at the first place we have a

12:09:01

llm the second one we have a prompt

12:09:02

template if you want to connect both uh

12:09:05

this both component so for that we are

12:09:07

using this llm chain so now let me

12:09:09

create a object for this llm chain and

12:09:13

for creating object for this llm chain

12:09:15

so first of all let me assign to the

12:09:17

variable quiz uh chain and here is this

12:09:21

is what this is my object now in this

12:09:23

particular object I'm going to pass two

12:09:25

value two parameter the first value is

12:09:27

going to be llm itself now here is what

12:09:30

here is my llm which I already called

12:09:32

which I already uh got from here and the

12:09:35

second thing the second value is going

12:09:37

to be a a prompt okay so here I'm going

12:09:40

to be write the prompts and this is what

12:09:43

this is my prompt quiz generation prompt

12:09:45

so here I just need to uh here I just

12:09:48

need to combine two component the first

12:09:50

one is LM and the second one is a prompt

12:09:52

so here is what here is my quiz chain

12:09:54

got it so this is the first chain

12:09:56

actually which I have created and this

12:09:58

each and everything each and every uh

12:10:01

like uh thing actually I have explained

12:10:03

you in my previous classes even in my uh

12:10:06

like yesterday's class now guys see

12:10:08

whatever um output I will get after

12:10:11

generating a quiz from here from the

12:10:12

template so that thing I'm going to keep

12:10:15

inside my uh inside my variable and the

12:10:18

variable is going to be let me write

12:10:20

down the variable over here so the

12:10:21

variable is going to be output uncore ke

12:10:24

is equal to and here let me write down

12:10:26

the quiz so here I'm going to collect

12:10:29

all the output inside this quiz inside

12:10:32

this a particular variable now let me

12:10:34

mention one more parameter the parameter

12:10:36

is going to be a barbos so what is the

12:10:38

meaning of the bbos barbos is nothing if

12:10:40

I want to see the execution whatever

12:10:42

execution is happening if I want to see

12:10:44

on my terminal itself so for that we use

12:10:47

this bbos parameter now let me write it

12:10:50

down here verbos is equal to True veros

12:10:53

is equal to true so here I hope each and

12:10:56

everything is clear whatever I have

12:10:58

explained you uh if it is clear then

12:11:00

please do let me know in the chat are

12:11:03

you following me are you following me

12:11:05

guys tell me guys fast yes or

12:11:11

no what was the command for creating a

12:11:13

virtual environment so let me give you

12:11:15

the command for creating a virtual

12:11:17

environment cond create hyphone p and

12:11:20

virtual environment name p EnV and here

12:11:24

uh python version python

12:11:26

3.8 and here hyph y so this is the

12:11:30

command uh which you can use for

12:11:31

creating a virtual environment I given

12:11:34

you the chat you can copy from

12:11:40

there tell me guys first so if you are

12:11:44

uh able to follow me till here then uh

12:11:47

please write down the chat and if you

12:11:49

are liking the uh if you liking the

12:11:51

content if you are liking the class then

12:11:53

please please hit the like button

12:11:57

also if you have any uh sort of a doubt

12:12:00

any type of doubt you can mention in the

12:12:02

chat section you can uh tell me your

12:12:04

doubt I will try to solve that

12:12:06

particular doubt and then I will move

12:12:09

forward please tell me guys I'm waiting

12:12:11

for your reply so yes chat is open for

12:12:14

all of you please hit the like button

12:12:16

please ask your doubt and if everything

12:12:19

is done uh then please say yes at least

12:12:50

okay so let's move forward

12:13:05

great so here uh you can see this is

12:13:08

what this is my first template which I'm

12:13:09

passing to my model now at the second

12:13:13

place what I need to do so I I'm going

12:13:14

to create one more template for

12:13:16

evaluating this quiz so whatever quizzes

12:13:19

and all uh basically we are going to

12:13:21

generate so I want to evaluate a

12:13:24

particular quiz now for evaluating the

12:13:27

quiz here I'm going to create a one more

12:13:29

template U Already I did it if you will

12:13:31

look into my in uh this if you look into

12:13:33

my ipnb file so yesterday itself I have

12:13:37

I had created this uh like different

12:13:39

different prompts and all so this was my

12:13:41

first template this is my first prompt

12:13:43

and this was my second one for checking

12:13:44

the quizzes and all so whatever quiz and

12:13:46

all which we are going to generate and

12:13:48

here is a template now let me copy it

12:13:50

from here and let me paste it down so

12:13:53

where I'm going to paste it I'm going to

12:13:55

paste it over here inside my McQ

12:13:58

generator. py now this is going to my

12:14:00

second template so let me keep it in a

12:14:02

small letter itself so here I'm going to

12:14:05

copy it and this is going to be my

12:14:08

second template this one so just just

12:14:10

read this particular template that what

12:14:12

we are saying here I'm saying to my

12:14:14

model that you are an expert English

12:14:17

grammar grammarian and writer given a

12:14:19

multiple choice question for this

12:14:21

particular subject whatever subject I'm

12:14:22

going to mention let's say data science

12:14:24

AI machine learning so here I'm saying

12:14:26

that you need to evaluate the complexity

12:14:28

of the question and give a complete

12:14:30

analysis of the quiz only use uh Max 50

12:14:34

words so 50 words for the complexity

12:14:36

analysis if the quiz is not at p with

12:14:39

the cognitive and analytic abilities of

12:14:41

the student then update the quiz

12:14:43

question which needs to be changed and

12:14:46

change the tone such that is perfectly

12:14:48

fits to the student ability now here

12:14:51

here is basically here I have a quiz so

12:14:54

uh which one this is this this quiz so

12:14:56

this quiz actually I'm getting from here

12:14:58

so whatever output I'm getting after the

12:15:00

first after this uh after the first

12:15:03

template so whatever uh like prompt I'm

12:15:05

passing to my llm this first one so

12:15:07

whatever output I'm getting I'm going to

12:15:09

keep inside this quiz variable and that

12:15:12

uh this variable I'm passing over here

12:15:14

and based on this uh like quizzes and

12:15:16

all right so based on this particular

12:15:18

prompt we have a prompt and we have a

12:15:20

quizzes now is going to check it's going

12:15:23

to evaluate each and everything is going

12:15:25

to check the complexity grammar each and

12:15:28

everything is going to check over here

12:15:29

so this is the additional prompt of

12:15:31

which I have written over here now guys

12:15:33

after that what I will do so here I'm

12:15:35

going to Define my uh prompt template so

12:15:39

let me do it uh let me Define my prompt

12:15:41

template and my prompt template name is

12:15:44

going to be a review chain so let me

12:15:46

take it from here and this is what guys

12:15:49

tell me this is my uh like second chain

12:15:52

right so here I have created first llm

12:15:55

chain and the name was quiz chain here I

12:15:57

have created one more llm chain and the

12:15:59

name is what the name is uh this one

12:16:02

review chain right and here is what here

12:16:04

is my prompt so prompt is going to be a

12:16:06

quiz evaluation prompt sorry uh let me

12:16:08

Define The Prompt uh before this one so

12:16:11

here what I can do let me copy the code

12:16:14

from The Prompt so this is the small

12:16:16

small code and all so already I have

12:16:18

written it even yesterday in my ipbb

12:16:20

file I kept all the code right so you

12:16:23

can go and check with my gith repository

12:16:24

you will find out the entire code

12:16:26

because yesterday I written from scratch

12:16:28

and I have explained you each and

12:16:30

everything so today I'm I'm not going to

12:16:32

write it down here again um I'm just

12:16:34

going to copy and paste and I believe if

12:16:36

you have seen my previous session that

12:16:38

definitely you will be able to

12:16:40

understand it now what I can do so here

12:16:42

I can write down this quiz evaluation

12:16:44

prompt so we have this quiz evaluation

12:16:46

prompt and here is my prompt template

12:16:48

where what I'm doing guys tell me where

12:16:50

is my uh input variable these are my

12:16:53

input variable subject and quiz which

12:16:55

you will find out over here subject and

12:16:57

the second one is what the second one is

12:16:59

quiz now here I'm going to pass my

12:17:01

template and the name of the template is

12:17:02

what template 2 so let me mention it

12:17:05

over here let me write it down the

12:17:06

template 2 so here is what here is my

12:17:08

quiz evaluation prom and there is what

12:17:11

there is my chain which I have created

12:17:13

by using two component the first one is

12:17:16

llm itself and the second is what the

12:17:18

second is quiz evaluation prompt right

12:17:21

and here whatever output uh we are

12:17:24

getting so that output I'm going to keep

12:17:26

or I'm going to collect inside this

12:17:29

review variable right so just just try

12:17:31

to understand how the thing is working

12:17:33

it is very very simple if your python if

12:17:36

if you know the python if your python

12:17:38

Basics is clear the definitely you can

12:17:40

understand uh this particular code got

12:17:42

it now here we have written bubos is

12:17:44

equal to true so this is what this is my

12:17:46

review chain uh which I have created now

12:17:49

after that what I will do see I have to

12:17:52

combine this both chain the first is a

12:17:55

review chain and the second one is what

12:17:57

the second one is a quiz chain so for

12:17:59

combining the both chain what I can do

12:18:01

so here I can create object of the

12:18:04

sequential chain right so now what I'm

12:18:06

going to do guys here I'm going to

12:18:08

create object of the sequential chain uh

12:18:11

just a wait now let me create a object

12:18:14

of the sequential chain and here is a

12:18:17

object of the sequential chain this one

12:18:20

now already I have imported the

12:18:21

sequential chain this one this one L

12:18:23

chain do change the sequential chain now

12:18:25

here see we are going to create a object

12:18:27

and what we are going to write down here

12:18:29

we are going to define or we are going

12:18:31

to write down the both name both chains

12:18:33

first one is quiz chain and the second

12:18:35

one is a review chain now we are going

12:18:38

to connect everything all together here

12:18:41

is and we are passing to this chain

12:18:43

parameter now there is my input variable

12:18:45

so these are input variable if you will

12:18:48

look into the prompt if you will look

12:18:50

into the prompt template there you will

12:18:52

find out of various input variable

12:18:54

various input variable which I'm going

12:18:56

to take from the user side I told you I

12:18:58

I explained you this thing in my

12:19:00

previous classes just go and check with

12:19:01

that now here is what here is my output

12:19:04

variable so one output I'm going to

12:19:06

collect inside this quiz and the second

12:19:08

output I'm going to collect inside this

12:19:10

review and here verbos is equal to True

12:19:14

verbos equal to True means what whatever

12:19:16

execution is happening in back so each

12:19:18

and every execution the detail of the

12:19:20

execution I will get onto my uh screen

12:19:23

itself right so that's the meaning of

12:19:25

the verbos is equal to true now this

12:19:28

part is clear to all of you so we have a

12:19:30

completed till here means uh we are able

12:19:33

to call my API we are able to create we

12:19:36

are able to call my API we are able to

12:19:38

create a prom template and here we are

12:19:40

able to create the chains now after this

12:19:43

what I have to do see here in between

12:19:46

you can mention the uh log also you can

12:19:48

create uh we have created a loger now

12:19:50

you can write down log logging doino and

12:19:53

here you can collect all the information

12:19:55

in a single file itself so whenever uh

12:19:58

we are going to execute it so yes the

12:20:00

loging U the log loging doino U

12:20:03

basically logger file also is going to

12:20:04

be execute and it's going to collect

12:20:06

each and every information inside the

12:20:08

dolog file got it now here uh this McQ

12:20:12

generator is done now uh in the previous

12:20:16

session uh actually what I did so over

12:20:19

here uh if you will look into that so

12:20:21

open eyes find this uh temp template and

12:20:23

all everything is fine now just look

12:20:25

into this ipynb after creating the chain

12:20:28

actually we were calling this particular

12:20:30

method right so uh the method name the

12:20:33

method name was what get open a

12:20:35

callbacks now why we use this U Get open

12:20:38

a callback because if you want to keep a

12:20:41

track of uh of the token right how many

12:20:44

tokens is being used inside throughout

12:20:46

the execution means uh let's say uh I'm

12:20:49

passing a prompt input prompt I'm

12:20:50

getting an output prompt so throughout

12:20:52

this process how many tokens is being

12:20:55

generated so that all the thing I can

12:20:57

keep track by using this get open I call

12:21:00

back and inside this one I'm calling I'm

12:21:02

I'm I'm creating a object of this

12:21:04

generative evalution chain itself so

12:21:07

this is the one generative evalution

12:21:08

chain and we are passing a different

12:21:10

different value now where I'm going to

12:21:12

do this particular thing see main code I

12:21:15

have written inside the McQ generator.

12:21:17

py now rest of the code whatever uh like

12:21:21

utility code is there whatever helper

12:21:23

code is there I'm going to write it down

12:21:25

inside this utils.py so here I'm going

12:21:29

to write down the entire code which is a

12:21:31

helper one right I'm not going to mesh

12:21:33

up my uh McQ generator file itself okay

12:21:36

so here if I'm going to write it down

12:21:38

like each and everything it is going to

12:21:39

be a very clumsy so I'm not going to

12:21:41

write down anything now over here uh

12:21:43

till here everything is fine maybe so

12:21:46

yes uh we have created a chain now

12:21:48

inside the utils.py file let's see what

12:21:51

all thing we have to like like uh we

12:21:54

have to mention so the first thing first

12:21:55

of all let me write down the import

12:21:57

statement all the import statements so

12:21:59

the first one is uh OS the second is pi

12:22:01

PDF 2 the third one is going to be a

12:22:04

Json and the fourth is a trace back so

12:22:06

these are the import statement which I'm

12:22:07

going to write down here now here what I

12:22:10

will do guys see uh what I want I want a

12:22:14

data right I want a data so for that

12:22:17

actually uh I have defined two method so

12:22:20

let me copy and paste all the method now

12:22:22

just second I'm going to copy this two

12:22:25

method and I'm going to paste it over

12:22:27

here so here actually we have two method

12:22:29

just just look into this method I I will

12:22:31

tell you that uh uh why we should use it

12:22:34

how we are going to use it so just a

12:22:37

second yeah so here we have two method

12:22:39

the first is going to be a read file and

12:22:41

the second is going to be a get table

12:22:43

data so there is two helper function

12:22:46

which we are going to Define over here

12:22:48

right now just look into this read file

12:22:51

so this read file actually this this

12:22:53

particular method we are using for

12:22:55

reading the file right for reading the

12:22:57

file whatever file we are going to pass

12:22:59

actually so here actually I have written

12:23:01

a code regarding two particular files so

12:23:03

the first one regarding the PDF file and

12:23:05

the second one respect to uh text files

12:23:08

right so here I'm going to mention this

12:23:10

P pdf.pdf file reader here we are

12:23:12

passing file here we are getting file

12:23:14

and here we are extracting all the data

12:23:16

from the file itself in which variable

12:23:18

in this text variable now here if you

12:23:21

will look into this uh this particular

12:23:23

code right inside this LF blog you'll

12:23:26

find out file. name. ends with. txt so

12:23:29

if my file is a txt one so I'm going to

12:23:31

call I'm going to read this particular

12:23:33

file and I'm going to keep all the

12:23:34

information in my VAR so here from here

12:23:37

basically I'm going to return all the

12:23:38

information right got it now here just

12:23:41

see this one so the second method G

12:23:44

table data so why we are using this

12:23:46

method G table data in my previous class

12:23:49

if you will look into this uh IP VB file

12:23:52

so where is the ipb file let me open it

12:23:54

once more time so McQ do iyb file just

12:23:57

scroll down till last so here actually I

12:24:00

was getting a data I was getting my McQ

12:24:02

now if you want to convert those McQ in

12:24:06

a data frame so for that see this my

12:24:08

this is my McQ which I was getting now

12:24:10

if you want to convert this McQ in a

12:24:12

data frame so for that actually we are

12:24:14

using this a particular code this one

12:24:17

this this particular code which I have

12:24:19

written inside the utils.py so here I'm

12:24:22

not going to mention everything in a

12:24:23

single file instead of that I have

12:24:25

divided a task right so whatever thing

12:24:27

is required whatever is a main code main

12:24:30

script I have written over here inside

12:24:31

this McQ generator whatever like helping

12:24:33

function and all like uh like this

12:24:35

reading file reading and all or this get

12:24:38

uh data as a table and all right so I

12:24:40

have mentioned over here inside this U

12:24:42

and already I have created a logger so

12:24:44

there I am going to Define my uh there

12:24:47

basically I have defined my logger so I

12:24:49

believe until here everything is fine

12:24:51

everything is clear to all of you please

12:24:53

do let me know in the chat now one more

12:24:55

step is there one more step is remaining

12:24:57

now finally we'll create our application

12:24:59

our streamlet application and then I

12:25:01

will show you how to run it so first of

12:25:03

all tell me if uh till here everything

12:25:06

is fine everything is

12:25:12

clear try to generate a new API key if

12:25:15

you are getting any sort of error

12:25:17

related to your API key delete it

12:25:19

immediately and uh generate a new API

12:25:22

keyy tell me guys fast

12:25:25

I'm like up for the doubts and question

12:25:27

so yes you can ask me and then I will

12:25:30

proceed with the forther uh

12:25:35

thing please increase the font size I

12:25:38

think it is visible to all of you now

12:25:40

let me increase few more just

12:25:44

wait ah I think now it is

12:25:49

fine what is a trace bag Trace bag

12:25:52

actually it's a inbuilt function wait I

12:25:54

will show you what Trace back does uh

12:25:57

wait I will write down the code here

12:25:59

itself inside my McQ IP

12:26:02

nv5 if you have any type of Doubt any

12:26:04

sort of a doubt then please do let me

12:26:05

know please write down the chat uh I

12:26:08

will try to solve your doubt and then I

12:26:10

will proceed

12:26:19

further no you no need to pay anything

12:26:21

uh if you're using this neurol lab it is

12:26:23

completely free uh just try to launch it

12:26:26

again I think uh you can launch

12:26:39

it yeah we can create a new template

12:26:41

file also that is also fine but here we

12:26:43

just have two templates so that's why I

12:26:45

have written it inside my P file itself

12:26:48

inside my python file but uh not an

12:26:51

issue like you you can create a template

12:26:53

file and there you can keep the all the

12:26:55

templates and from there itself you can

12:27:13

read We are following you but needs to

12:27:15

revision from yeah definitely revision

12:27:17

is required could you open the logging

12:27:20

file whether it contains any log or not

12:27:23

so here is a logging file and here we

12:27:26

have two log file. log just open the

12:27:28

file and here see we have a

12:27:30

log I test it now I test it from here

12:27:33

test.py so yes I'm able to see the

12:27:50

log yeah so I think uh we can start now

12:27:54

uh yeah so I think we have done almost

12:27:57

all the thing now the next thing is what

12:28:00

I need to create a streamlet

12:28:02

application I think uh see uh regarding

12:28:05

the code and all everything is fine

12:28:07

everything is clear whatever I did in my

12:28:09

previous session I I'm doing the same

12:28:11

thing over here I just kept in my uh py5

12:28:15

that's it now see guys this uh project

12:28:17

is uh actually it's a first project so

12:28:20

that's why I kept I kept it uh I kept I

12:28:23

kept it as a simple one only but uh from

12:28:25

next class onwards uh I'm going to use

12:28:28

few more files and folder inside the

12:28:31

like project itself so the architecture

12:28:32

which I'm going to make so it's going to

12:28:35

be a little more complicated okay so

12:28:38

this is fine this is clear now let's do

12:28:40

one thing let's try to create okay

12:28:41

response. Json is already there now let

12:28:43

me keep the response over here inside

12:28:46

this uh file inside this response. Json

12:28:48

and after that what I will do so I will

12:28:51

create my stream application so there is

12:28:54

my response in which particular format I

12:28:56

want a response so I kept it inside the

12:28:59

response. Json so this is what this is

12:29:01

the format which I want here is McQ

12:29:03

question here is answer and here is a

12:29:05

correct answer so in this particular

12:29:08

format actually I want a response from

12:29:10

my GPT model now this is this is what

12:29:13

this is a response. Json now let me open

12:29:15

this stream lit uh app.py file and here

12:29:19

I'm going to write it down the code now

12:29:21

first of all let me import the statement

12:29:23

all the statement so there is all the

12:29:25

statement basically uh here what I'm

12:29:27

going to do so these are the statement

12:29:29

which you already know now this is the

12:29:30

statement read file get file from where

12:29:32

from the utils itself now see I created

12:29:35

uh like one more hierarchy so here uh

12:29:38

let me write down the SRC so wherever

12:29:40

you are able to find out this McQ

12:29:42

generator just write down the SRC in

12:29:43

front of that so uh here you can see we

12:29:46

have I have written this SRC McQ

12:29:48

generator. utils and inside that we have

12:29:50

this read files get table data you can

12:29:53

check it you can run it and it is

12:29:55

working fine or not so definitely uh you

12:29:59

can do it for that uh let me write down

12:30:01

this SRC McQ generator. log. loging now

12:30:05

here if I want to check this file so I

12:30:07

can write it down

12:30:09

one okay so here what I can do I can run

12:30:12

it in front of you let me clear it first

12:30:14

of all and here let me write down python

12:30:18

python uh streamlet

12:30:21

app.py so Python steamate

12:30:24

app.py and if I'm running it so it is

12:30:27

saying that this module is not available

12:30:30

McQ generator let me check with the

12:30:32

spelling is correct or not so the

12:30:34

spelling is

12:30:36

McQ generator g n Okay g n and here see

12:30:42

guys the spelling is wrong so here I

12:30:43

need to write down the correct spelling

12:30:45

so this will be g e n e so this is the

12:30:48

spelling of the generator G NE e

12:30:50

generator and here also G G NE so this

12:30:53

is going to be generator now let's see

12:30:55

it is working fine or not now for that

12:30:57

python streamate app.py so let me run it

12:31:02

and module name SRC McQ generator not

12:31:06

there so where it is at line number nine

12:31:10

so line number line SRC McQ generator

12:31:15

import generative evaluate chain so here

12:31:18

we have SRC McQ generator is there

12:31:21

inside this McQ generator this is the

12:31:24

file so McQ g e n e again the spelling

12:31:28

is wrong let me correct it uh let's see

12:31:31

it is working or not so here I'm going

12:31:34

to write on python stream tab.

12:31:39

py SRC McQ generator

12:31:44

utils so McQ G

12:31:47

NE McQ g

12:31:50

n r a is correct now right so why it is

12:31:55

giving me this error SRC McQ generator

12:31:58

do utils SRC McQ generator do utils

12:32:03

import read file and get table

12:32:08

data no modu SRC McQ

12:32:13

generator I WR something wrong

12:32:17

here McQ generator g e n e r

12:32:23

it's fine now I S

12:32:28

see just a second so here is fine

12:32:33

now what I can do let me install this

12:32:37

setup.py so

12:32:40

python setup.py

12:32:45

install because in my local system

12:32:48

everything was working fine I moved to

12:32:51

entire project project to this Nero lab

12:32:53

that's why I need to check it

12:32:56

first okay now let's

12:33:06

see

12:33:08

mCP P the

12:33:12

spelling I need to save it first what so

12:33:16

okay I think the file is

12:33:18

different uh McQ generator. py line

12:33:21

number 6 this

12:33:23

one line number six yes so the spelling

12:33:27

is

12:33:30

wrong now it is perfect I

12:33:42

believe right package rapper prompts

12:33:45

extra field not

12:33:47

permitted what is the issue

12:33:51

here

12:33:57

modle name McQ

12:34:01

generator this is fine this is I have

12:34:03

solved now stream lit line number nine

12:34:08

there is line number

12:34:18

line

12:34:21

okay

12:34:22

great now I think everything is fine I

12:34:24

just need to pass the parameter over

12:34:26

here but this uh logging statement and

12:34:28

all everything is working fine over here

12:34:31

see if I'm going to uh comment it down

12:34:33

this one so I will be able to import it

12:34:37

python stre late app. yeah now

12:34:39

everything is working fine so I was

12:34:41

getting the error because I need to pass

12:34:43

the parameter to this particular uh like

12:34:46

class okay to this particular object

12:34:49

that's why uh it is giving me uh it is

12:34:51

giving me I show so yes I'm able to

12:34:54

import all the statement I was just

12:34:56

checking actually because I migrated

12:34:58

this project to my neural lab in my

12:35:00

local I already tested and yesterday

12:35:03

actually I shown you that but yeah I

12:35:05

migrated to my uh to this uh neurol lab

12:35:09

so that's why I was running it and now

12:35:11

everything is working fine so let's try

12:35:13

to create a stream streamlit application

12:35:16

so here what I can do so for creating a

12:35:18

streamate application uh this is the UT

12:35:21

statement which I have imported now the

12:35:23

first thing the first at the first place

12:35:25

I need to load this uh response right so

12:35:28

here what I'm going to do here I'm going

12:35:30

to load this response so for loading the

12:35:32

response actually see what I'm going to

12:35:34

do I'm going to read the Json file the

12:35:36

Json basically which I've created now

12:35:38

let me do the right click and from here

12:35:40

from here itself uh like from this uh

12:35:42

neuro lab itself from the local

12:35:44

workspace I'm going to copy my path

12:35:46

right so because this is my local path

12:35:48

actually this one that you can see over

12:35:49

here the Json path now from here itself

12:35:52

I'm going to copy my path so copy path

12:35:54

and paste it over here right paste it

12:35:56

over here this particular value now let

12:35:59

me paste it and this is what guys this

12:36:01

is my path right and here my Json file

12:36:04

is available now uh what I will do I

12:36:07

will read this Json and here you'll find

12:36:09

out your Json response Json right in

12:36:12

whatever like in whatever like Json

12:36:15

whatever Json basically we have defined

12:36:17

whatever response method we have defined

12:36:19

in that particular like way only is

12:36:21

going to data output now uh I have

12:36:24

loaded the file I have loaded the Jon

12:36:25

file now next thing what I need to do

12:36:27

here so see a step by step I'm going to

12:36:30

show you everything or let me copy

12:36:32

everything each and everything in a

12:36:33

single shot and then I can uh explain

12:36:37

you right so here see what thing I'm

12:36:39

going to do over here Ive already done

12:36:41

the code now let me is explain you one

12:36:44

by one so this is the first line this

12:36:45

one st. Title St means what ST means

12:36:49

streamlink here you can see this one s

12:36:52

isans what streamlit and why we use

12:36:53

streamlit for creating a web application

12:36:56

right if you want to create a web

12:36:57

application for for that we use this

12:37:00

stream L and generally we use it uh for

12:37:02

creating a rapid web application like we

12:37:05

want to test our machine learning code

12:37:07

like okay so we don't want to write it

12:37:09

on the like long templates and all we

12:37:11

don't want to create API by using Jango

12:37:13

or flas so simply we can create a web

12:37:16

app a small web app by using this stream

12:37:17

lead and yes we can test our code we can

12:37:20

test our application now here uh you can

12:37:23

see this is the title which will be

12:37:24

visible on top of my screen now here you

12:37:27

can see we are going to create a form

12:37:29

actually inside this stream lit we have

12:37:30

a several thing right so what I will do

12:37:33

I will create a short tutorial on top of

12:37:35

this stream lit and I will upload over

12:37:36

the Inon YouTube channel so from there

12:37:38

you can learn the streamlit from scratch

12:37:40

as of now I'm not going into the deep

12:37:42

that what all method what all function

12:37:44

it is having I'm just WR whatever thing

12:37:46

was required over here and that is what

12:37:48

I'm going to explain you got it now here

12:37:50

see we have this streamlit st. form and

12:37:53

here actually I'm mentioning user input

12:37:56

right now I'm asking about the file so

12:37:58

actually I'm asking about the file you

12:38:00

need to upload a file and based on a

12:38:02

file only uh I'm going to generate a

12:38:05

mcqs now here you can see number of

12:38:08

input so how many uh how many mcqs you

12:38:11

want to generate so here McQ count now

12:38:14

here McQ subject so like on which

12:38:17

subject you want to generate McQ so here

12:38:20

you will pass the subject now here is a

12:38:22

input text input means here you are

12:38:24

asking uh you want to keep it simple

12:38:27

intermediate or the hardest one so here

12:38:30

I'm uh setting the tone tone of the mcqs

12:38:33

tone of the quiz now here what I'm doing

12:38:36

here I'm giving a button so here I'm

12:38:38

written St St is for the stream late.

12:38:42

formore submit uncore button and here

12:38:45

you can see create McQ this is what this

12:38:47

is my message that's it nothing else so

12:38:49

after that you can see I I have written

12:38:52

a further code so this is what this is

12:38:53

what guys tell me this is my form and

12:38:55

inside form actually I have defined the

12:38:57

entire template the entire UI so I have

12:39:00

created a form s. form s. form means

12:39:03

what stream li. form and here I'm asking

12:39:06

to the user input so this first input

12:39:08

regarding the file means on whatever

12:39:11

like data we want to generate our mcqs

12:39:14

here you will find out a number of mcqs

12:39:16

here the subject of the McQ here the

12:39:19

tone of the McQ whether it's going to be

12:39:21

a difficult simple or intermediate and

12:39:24

here I have added the button the button

12:39:26

is nothing I'm going to submit this form

12:39:29

so the message B by default message you

12:39:31

can see over here that is what there is

12:39:33

a create McQ that's it so this is what

12:39:35

this is my form now after that I will

12:39:38

write my main code main code over here

12:39:41

see uh just just look into this

12:39:43

particular variable upload file right

12:39:45

this this varable upload file right and

12:39:48

here I'm getting McQ count subject tone

12:39:50

and button now here see this is what

12:39:52

this is a respon just look into this

12:39:54

particular variable because this is

12:39:55

required very much this very much

12:39:58

required over here now I'm saying over

12:40:00

here if button and upload file is not

12:40:03

none okay and McQ count and subject and

12:40:06

this this thing is not none then what I

12:40:08

need to do so here I'm writing this st.

12:40:12

spinner it will be loading right and

12:40:14

here see I'm uh reading this text file

12:40:17

whatever uploaded file I got and how I

12:40:19

can reading it how I am reading this

12:40:20

particular file so for that I already WR

12:40:23

the method inside the utils file

12:40:24

utils.py so here I'm calling this method

12:40:27

upload see uh let me show you this uh

12:40:30

read file right read file and here you

12:40:33

can see St um the stream. file uploader

12:40:36

so here I get it I got the uploaded file

12:40:39

now what I'm going to do here I'm uh

12:40:41

keeping this file over here upload file

12:40:43

and I'm giving to this read file right

12:40:45

and this read file I already defined

12:40:47

inside my utils.py this one see getting

12:40:52

my point yes or no now if I have a PDF

12:40:54

file then definitely I will be able to

12:40:56

read if I have a text file then

12:40:57

definitely I will be able to read so

12:40:59

let's see if you're giving any other

12:41:00

extensions so according to that you can

12:41:02

mention the logic you can write down the

12:41:04

code over here itself inside the read

12:41:06

file now see guys here inside the stream

12:41:09

app.py so this is what this is the read

12:41:12

U we are calling this read file and here

12:41:14

I'm getting this text okay this is fine

12:41:16

now again I'm going to call this I'm

12:41:18

going to call this uh get open call back

12:41:21

if you have attended my previous session

12:41:23

definitely you must be aware about this

12:41:24

particular function this particular

12:41:26

method in very detailed way I have

12:41:28

explained you this thing get openi call

12:41:31

back now after that you can see we are

12:41:34

going finally we are going to call our

12:41:36

object so here is my object generate

12:41:39

evaluate chain and here we are going to

12:41:41

pass a various parameter so the first

12:41:43

one is a text so here I'm getting text

12:41:46

McQ count or from the user I'm getting

12:41:48

McQ count here is what here is a subject

12:41:50

tone and here is my Json response

12:41:54

everything I am getting over here you

12:41:57

can see you can see over here guys this

12:41:59

one now we are getting it and after that

12:42:03

uh this is fine now in the else actually

12:42:06

I have written something so you can see

12:42:08

uh whatever number of token prompt and

12:42:10

all I can I can print it actually this

12:42:12

this particular thing right so inside

12:42:15

this else block try accept and else so

12:42:18

inside this else block we I have written

12:42:20

this particular thing now any now this

12:42:22

lse blog will run after this accept so

12:42:25

yes you can see this is the thing which

12:42:27

we have written now what we are going to

12:42:29

do over here we are going to convert our

12:42:30

data into the uh we are going to convert

12:42:33

our data into our data frame so here

12:42:36

actually this is the code see whatever

12:42:38

data we are getting now so we are going

12:42:40

to convert this data into a data frame

12:42:42

this one and after that like yeah uh we

12:42:45

are going to end it this particular code

12:42:48

and once I will run it so each and

12:42:50

everything will be clarified to all of

12:42:52

you now what I can do I can run it and

12:42:55

then again I can come to this particular

12:42:57

code uh where again I can explain you

12:43:01

the bottom part but yeah just look over

12:43:03

here uh it is just printing the tokens

12:43:06

and all now here we are getting a

12:43:07

response and d means uh if is response

12:43:11

as a DI actually this this particular

12:43:12

response now what I will do here I will

12:43:14

call this response doget quiz I will be

12:43:17

getting the quizzes from there yesterday

12:43:18

I run this particular function this quiz

12:43:21

and after that I'm passing to this get

12:43:23

table data the function which I defined

12:43:25

inside the utility and it is going to

12:43:27

return return me this table data which

12:43:29

I'm passing to my data Frame pd. data

12:43:31

frame and I will be getting the data

12:43:34

frame over here and you can save it also

12:43:36

so yesterday actually I saved this uh

12:43:38

mcqs and all over here inside this

12:43:40

experiment folder but you can save it

12:43:42

you can save this data in the form of

12:43:44

CSV file right now what I can do I can

12:43:47

run it so here uh for running this

12:43:49

particular application I just need to

12:43:52

run it let me I just need to write it

12:43:54

down one command let me uh give you that

12:43:56

command here stream lit streamlit app

12:44:00

sorry streamlit run and here I need to

12:44:03

pass the here I need to write down the

12:44:05

file name so streamlit run and then

12:44:08

streamlit app.py soam lit streamlit

12:44:14

app.py okay so this is the file where I

12:44:17

have defined where I have created my

12:44:18

streamlit application so streamlit run

12:44:20

is stream lit uh app.py now as soon as I

12:44:24

will hit enter let's see it is working

12:44:26

or

12:44:27

not so it is saying streamlit does not

12:44:32

exist I WR a wrong spelling okay

12:44:35

streamlit app fine so a will be a

12:44:39

Capital One a a yeah now it's

12:44:45

fine so see uh my application is running

12:44:49

now if you want to run this application

12:44:51

ation so for that just copy this URL and

12:44:54

then paste it over

12:44:57

here and here guys what you need to do

12:45:00

just remove till till here this one just

12:45:03

remove this up part okay just keep till

12:45:05

app and then put the colon and from here

12:45:09

just take the host uh this

12:45:11

8501 sorry Port actually this one so

12:45:14

just see if you clicking on this one now

12:45:16

it is not going to run because it is a

12:45:19

uh like it's a local host

12:45:21

right now uh actually my lab is running

12:45:24

on this particular URL Somewhere over

12:45:26

the cloud Somewhere over the server so

12:45:28

till here I have copied the URL now put

12:45:30

the colon and pass this particular port

12:45:33

number

12:45:33

8501 so here I'm writing 85 01 and if I

12:45:38

will hit enter so let's see whether I'm

12:45:41

getting my app or not so it is not

12:45:45

giving me the app let me

12:45:49

check it 501 yes it is correct let me

12:45:53

check with this link uh but I think it

12:45:56

is not going to

12:46:04

[Music]

12:46:06

work are you follow me guys tell me are

12:46:08

you follow me till

12:46:16

here this is not giving me a URL

12:46:25

when view stream

12:46:30

browser

12:46:31

8501 right so this is a

12:46:49

URL

12:47:09

oh no it is not running just a second

12:47:12

let me check with my Chrome it is

12:47:13

working or

12:47:19

not

12:47:31

so if I'm passing over here this

12:47:34

particular URL now let

12:47:37

me put the colon

12:47:41

8501 uh let's hit the

12:47:49

enter

12:48:03

no it is not running but yeah my my

12:48:06

server is up uh here you can see my

12:48:09

streamlit server is

12:48:19

up

12:48:22

streamlit server is running on this

12:48:23

particular Port

12:48:26

8501

12:48:28

851 it's a by default Port of the

12:48:31

streamlet actually let me change the

12:48:34

port just a second let me check

12:48:38

uh

12:48:49

I'm

12:49:12

okay let's do one thing let's try to run

12:49:15

on a different

12:49:17

port so here what I can do uh I can

12:49:21

mention the port just a second I can

12:49:23

mention a different port

12:49:26

number let be clear first of all I'm

12:49:29

here Pyon stream lit run uh stream lit

12:49:34

run and there is my app and then hyph

12:49:37

iPhone hyph iPhone server and dobard so

12:49:42

let's run out

12:49:45

8080 if I will hit enter now let's see

12:49:49

it is running on on this 80 8 0

12:49:54

[Music]

12:49:58

so it is running on this

12:50:01

8080 now let's check over here what I

12:50:05

can do I can take this particular

12:50:09

URL let me remove here

12:50:17

8080 yeah here it is working fine see

12:50:21

I'm getting my

12:50:22

application uh before uh it was not

12:50:25

working with 8501 but it is giving to

12:50:29

me not a complete

12:50:32

one why is so just the

12:50:38

second is there something

12:50:49

wrong

12:50:52

so guys see on 8080 my app is working

12:50:56

fine this one I'm getting it but

12:51:00

uh it should give me a homepage

12:51:04

now the form basically which I have

12:51:07

created over here this

12:51:09

one title also I'm not getting Let me

12:51:13

refresh it

12:51:16

once no SD form user input this this is

12:51:20

everything is

12:51:28

fine no no no guys I'm not getting it

12:51:32

let wait let me take a different port

12:51:34

over

12:51:49

here

12:51:58

it's getting a stuck here actually let

12:52:00

me check with the Chrome is giving me a

12:52:04

same issue or

12:52:19

what's

12:52:34

no guys see it is giving me a issue this

12:52:37

particular URL I don't know what is the

12:52:39

issue there's a issue with the code

12:52:42

or there is a issue with the stream

12:52:46

R because I can see my code is fine and

12:52:50

uh I just I checked it before right

12:52:52

before the class

12:52:54

also and it was

12:53:00

working uh not an issue what I can do I

12:53:03

can show you this thing in my local as

12:53:05

of now and then tomorrow I will tell you

12:53:08

that uh why it is giving me such issue I

12:53:10

I will check okay so as of now see

12:53:13

everything is working fine maybe I'm

12:53:15

able to get the URL also but

12:53:18

uh with 8 5 01 it was not giving me

12:53:21

anything but with 5,000 or with any

12:53:23

other Port it is giving me this type of

12:53:25

page now let me check the same thing in

12:53:28

the local it is uh working or not right

12:53:31

so just take it just take this

12:53:34

particular code and paste it over here

12:53:36

inside the local means this is my local

12:53:38

environment right now inside this

12:53:41

streamlit app.py I pasted my code now

12:53:46

inside the SRC we have H utils so let me

12:53:49

put the code inside the utils also so

12:53:52

from here itself I'm going to copy and

12:53:54

paste let me copy and paste from the

12:53:58

utils this one and

12:54:02

here this is my local

12:54:04

utils and let me paste inside the McQ

12:54:07

generator is not there let me put inside

12:54:10

the McQ generator

12:54:12

also here is my McQ generator so this is

12:54:17

my McQ fine so logar is there McQ

12:54:21

generator is there and utils is there

12:54:24

now streamlit is there everything is

12:54:28

fine now let's run it so for running

12:54:31

this application here is a command

12:54:34

stream SD stream

12:54:38

lit

12:54:41

run SD stream lit

12:54:48

app. stream lit app. P1 now if I will

12:54:53

hit enter let's see it is working or

12:54:57

not yeah it is

12:55:08

working okay so here it is giving me one

12:55:10

error the error is

12:55:17

what PR required type missing prom extra

12:55:21

field

12:55:31

type quiz

12:55:33

[Music]

12:55:35

barbos just a second guys let me check

12:55:38

the

12:55:42

issue we uh to validation

12:55:49

error evaluation

12:55:51

chain yeah this is

12:55:56

fine

12:56:03

commed line number five Sunny stream L

12:56:06

app

12:56:13

okay McQ line number

12:56:17

242 McQ generator line number

12:56:23

42 okay boms output key is equal to

12:56:29

quiz okay

12:56:31

file load I think here we have some

12:56:48

issue okay so I I think I'm getting some

12:56:51

issue over here maybe it's a python

12:56:54

related issue let me check where I'm

12:56:56

running it I activated my

12:57:15

environment rank chain

12:57:18

0.348

12:57:23

uh just a second so let me fix it don't

12:57:26

worry it till be

12:57:39

working so let's

12:57:48

it

12:58:31

yeah so now it is working and here you

12:58:34

can see guys see uh this is the code and

12:58:38

uh yeah it is working fine on this

12:58:41

particular URL and it is uh the project

12:58:45

B actually I'm running in my local

12:58:47

itself in neuro lab also it is giving me

12:58:50

a issue maybe there is some code issue

12:58:52

uh which I tested in the local I will

12:58:54

have to check because I was copy and

12:58:56

pasting maybe in between I miss some

12:58:58

line or I'm getting the issue because of

12:59:01

the version uh basically the python

12:59:02

version which I'm using now here uh you

12:59:05

can see see uh my app will look like

12:59:08

this the app which we have created now

12:59:11

here you have to upload the file uh the

12:59:13

file basically U on whatever file you

12:59:17

want to generate a McQ and here you need

12:59:20

to write down the number of McQ so let's

12:59:22

say you want to generate 5 10 15 20

12:59:25

whatever number of mcqs now here you

12:59:27

need to insert the subject and here

12:59:30

complexity label by default the

12:59:32

complexity label will be a simple one

12:59:34

right now let me browse some file and

12:59:36

let me show you that how the McQ will be

12:59:39

generated and how the output will be

12:59:41

visible to all of you so here what I can

12:59:44

do I can go through with my project

12:59:46

itself because already I kept one data

12:59:49

file over there there one txt file now

12:59:51

let me import the txt file from there

12:59:55

and here is what here is my project in

12:59:57

my local system just a

13:00:02

second McQ generator and here is data

13:00:06

open so this is the data guys which I

13:00:08

uploaded over here now after that how

13:00:10

many McQ you want to generate so here is

13:00:13

what here is five now here is a subject

13:00:15

let's say the subject was the machine

13:00:17

learning so here let me check what was

13:00:20

the data inside the file here so here

13:00:23

the data which I had actually so let me

13:00:27

check with the

13:00:28

data it was the biology uh which

13:00:31

yesterday actually I collected inside

13:00:33

the file so the data was the biology

13:00:36

data now how many what was the like

13:00:39

complexity of the quiz the quiz you are

13:00:41

generating so here I want to keep it

13:00:42

simple you can write as simple also but

13:00:44

by default it will be a simple only now

13:00:46

if I'm clicking on this create McQ so it

13:00:49

will will uh directly give me the mcqs

13:00:51

now over here is giving me error let me

13:00:54

check what is the error yeah API key

13:00:57

error so let me keep the correct API key

13:01:00

over here

13:01:01

because the API key which I'm

13:01:05

using just a

13:01:08

second yeah now it is fine and now let's

13:01:11

do one

13:01:13

thing okay server is up and here let me

13:01:18

refresh it

13:01:30

yeah it is working fine now browse the

13:01:33

file a data just upload the data here

13:01:37

the number of quiz you can say 5 6 10

13:01:40

subject is what subject is

13:01:43

biology uh b i o l o z and here the

13:01:47

complexity label is going to be a simple

13:01:49

then create

13:01:51

mcqs now just wait for some time and it

13:01:54

will create a McQ so just

13:02:00

wait yeah it is running now and it got

13:02:03

the response

13:02:13

also yeah so here you can see uh we are

13:02:16

able to generate mcqs so mcqs is which

13:02:19

of the following is a unifying theme in

13:02:21

a biology so these are the like uh you

13:02:24

can see these are the options and which

13:02:26

data I have use I have used a biology

13:02:28

data so I can show you this particular

13:02:30

data in the local itself so let me show

13:02:32

you if you will look into this

13:02:34

particular folder So Yesterday itself I

13:02:36

collected a data inside this uh txt file

13:02:40

so this is the file inside that from the

13:02:42

Wikipedia I took the data in front of

13:02:43

you only and here you can see the data

13:02:46

you can uh pass any PDF or any txt file

13:02:50

and based on that per subject based on

13:02:52

that per data you can generate a McQ and

13:02:54

here you can see the McQ and this is the

13:02:57

like review the review actually right so

13:03:00

uh we were evaluating the quizzes after

13:03:02

generating a quizzes right so we have

13:03:03

seted the limit in uh 50 wordss you have

13:03:06

to evaluate the U the quizzes whatever

13:03:09

quizzes basically we are going to

13:03:10

generate so here you will see the review

13:03:11

also on top of the UI so each and

13:03:14

everything you will see uh inside the

13:03:17

like uh inside the like front end itself

13:03:21

here uh basically which we are using and

13:03:24

if whatever number you are giving let's

13:03:25

say 5 6 7 8 91 that many quizzes you

13:03:29

will be able to generate now see uh

13:03:31

before I was running this code in my

13:03:34

local now let me show you both of the

13:03:36

code so this was the code actually I was

13:03:38

running in the local but uh it was

13:03:40

giving me some sort of a issue uh don't

13:03:43

know it was related to the maybe uh this

13:03:47

library and all so see before the

13:03:50

session itself I was testing with my uh

13:03:52

same application actually uh like this

13:03:55

is the same application only with uh

13:03:57

with this particular application I was

13:03:59

testing so I just run this one in front

13:04:01

of you and I shown you how the output

13:04:02

and all it will be looking like maybe uh

13:04:05

in this uh application there is

13:04:06

something wrong uh with respect to the

13:04:08

library and the version or maybe I have

13:04:10

uh given some wrong line and all I will

13:04:12

have to debug it and the same I will uh

13:04:15

I will uh like uh I will run inside the

13:04:17

neural lab also but not today in

13:04:19

tomorrow session and right after that I

13:04:21

will deploy it but I just see I just

13:04:24

want to show you the how the UI it looks

13:04:26

like so here actually uh I run this

13:04:29

particular application in front of you

13:04:30

the same application the McQ application

13:04:32

itself which I was I have created now

13:04:35

how this looks like how the UI and all

13:04:37

looks how the UI and all it looks like

13:04:39

each and everything you can see over

13:04:41

here and this is a by default Port where

13:04:43

my streamlet application is running so

13:04:46

8501 right so whenever you are running

13:04:48

your streamlit application so by default

13:04:50

it will be running on this 8501 flask

13:04:54

always take 5,000 port and this

13:04:56

streamlit always take this 8501 Port

13:04:59

right so don't uh do a mistake over here

13:05:01

if you are running this application now

13:05:03

how the answer will be looking like so

13:05:04

it will looking like in the form of

13:05:06

table and each and every code I have

13:05:08

mentioned over here if you will go and

13:05:10

check right inside the stimulate

13:05:11

application now if you will look into

13:05:13

the code so it will be more clear to all

13:05:15

of you right so just looking into the

13:05:18

code so here I'm say

13:05:19

okay so this is the parameter basically

13:05:21

which I'm going to print over here on

13:05:23

top of the terminal and after that you

13:05:25

can see I have mentioned one if

13:05:26

condition so whatever response and the

13:05:28

Dig right so is is response type is d i

13:05:31

I'm saying yes so what you need to do in

13:05:33

that case you need to exted the quiz

13:05:35

then you need to pass this quiz to your

13:05:37

get table data so from there you will

13:05:39

get a table data now you are going to

13:05:41

convert into a table and you are going

13:05:43

to display that uh like you're going to

13:05:46

dis see you are going to convert this

13:05:47

table into a data frame and you are

13:05:49

going to display it on top of the steam

13:05:52

lit on top of the Steam on top of the

13:05:54

basically uh UI so here uh this is the

13:05:57

code this is the code actually this this

13:05:59

one which you can see this one so

13:06:00

display the review in a text box as well

13:06:04

so here I'm going to display the output

13:06:06

on top of the UI by using this

13:06:08

particular code this particular line and

13:06:09

rest of the code is a simple python code

13:06:11

which I already explained you got it so

13:06:14

this is the complete application now

13:06:16

don't worry in tomorrow session uh

13:06:19

again I will run it I just need to run

13:06:21

it okay and again I will see I shown you

13:06:24

the setup of the neural lab but in

13:06:27

neural lab also I will run it and

13:06:29

whatever project I'm going to build from

13:06:31

now onwards I will be building in the

13:06:33

neural lab itself so you can practice

13:06:35

with the neurol lab and yeah tomorrow

13:06:38

will be the deployment day and along

13:06:39

with that I will explain you the concept

13:06:41

of the vector databases so we'll try to

13:06:44

discuss the vector database that what is

13:06:46

a vector database and uh uh will try to

13:06:49

understand the pine cone I will explain

13:06:51

you the the pine cone actually how to uh

13:06:54

like use that pine cone how to create a

13:06:56

API key of the pine cone and how to

13:07:00

store the embeddings and all what is the

13:07:01

difference between normal databases and

13:07:04

Vector based databases each and

13:07:06

everything we're going to discuss in

13:07:07

tomorrow's class in tomorrow's session

13:07:10

okay and yes deployment I think it will

13:07:12

take half an hour not more than 45

13:07:15

minute we are going to deploy it on over

13:07:17

the AWS and and I'm going to use the ec2

13:07:21

instance uh I will show you along with

13:07:23

the docker also so after creating a

13:07:25

Docker image that how you can deploy

13:07:27

that Docker image over the ec2 that

13:07:29

process also I will show you regarding

13:07:31

this particular application and yes

13:07:33

right after that we'll start with the

13:07:35

vector databases and uh then couple of

13:07:38

Open Source model like Google pom is

13:07:41

there Falcon is there or Jurassic is

13:07:43

there so I will take one class for that

13:07:45

and finally uh we'll start with more

13:07:48

advanced project so one or two uh like

13:07:51

other project actually which I have

13:07:53

planned for all of you so uh with not

13:07:55

with steam lit this is just a basic

13:07:58

project which I shown you along with the

13:07:59

flask and fast API also so um yeah stay

13:08:03

tuned with us subscribe the channel like

13:08:05

the hit the like button also if you're

13:08:07

liking the content and if you are

13:08:09

getting any sort of a issue then uh you

13:08:11

can you can write on the inside the

13:08:13

comment I'm monitoring each and every

13:08:15

comment immediately I will reply to you

13:08:17

uh resources wise you can check with the

13:08:19

dashboard and uh yes video will be

13:08:22

available over the dashboard as well as

13:08:23

on a YouTube channel so you can uh watch

13:08:26

on a both platform got it so how was the

13:08:30

session guys uh are you able to run it

13:08:33

or not don't worry I give you the

13:08:35

complete code in a resource section from

13:08:36

there itself you can download it here is

13:08:38

my GitHub so here in the GitHub itself

13:08:41

uh where is my GitHub where is my GitHub

13:08:43

so this is my G so here itself I will

13:08:45

upload all the code just uh forkit star

13:08:48

it or or just keep it with yourself okay

13:08:51

my just keep my username so from here

13:08:53

itself you can download the entire code

13:08:55

and don't worry the same link will be

13:08:57

available in my resource section also

13:08:59

got it yes or no tell me guys fast

13:09:02

yes fine now uh here guys uh this is my

13:09:06

project now first of all let me show you

13:09:08

how this a project looks like um let me

13:09:10

run this particular project so for

13:09:12

running this project let me write it

13:09:13

down here uh let me clear the screen

13:09:16

okay now here let me write it down

13:09:19

streamlit s r e a m streamlit run and

13:09:23

here then I need to provide a streamlit

13:09:25

file so streamlit dopy streamlit run

13:09:29

streamlit app.py this is my file name

13:09:32

now as soon as I will hit enter so my

13:09:34

application will be running so here uh

13:09:38

guys you can see my application is

13:09:40

running just a second yeah so my

13:09:43

application is running and this is my

13:09:45

application just a second just uh wait

13:09:48

yeah so this is my application guys now

13:09:51

here you will find out we have a

13:09:52

different different option so here you

13:09:55

can upload your file and based on that

13:09:57

data based on your uh based on that

13:09:59

specific file you can generate a McQ you

13:10:02

can provide a number like how many mcqs

13:10:04

you want to generate here is a subject

13:10:06

so whatever uh subject is there related

13:10:08

to the data related to the file you can

13:10:10

write on the subject and here is a

13:10:12

complexity label so you would like to

13:10:14

keep it simple hard or intermediate so

13:10:17

let's try to upload one file over here

13:10:19

so here already I I kept one file

13:10:22

data.txt in my previous class only I

13:10:24

shown you that now let me show you what

13:10:26

we have inside this particular file so

13:10:28

once you will open this data.txt uh so

13:10:32

here actually this uh test.txt data.txt

13:10:35

data.txt basically is what it was my in

13:10:38

my another folder so I can take anyone

13:10:40

or from anywhere I can take the data

13:10:42

file so let's do one thing let's try to

13:10:44

create one file okay from scratch data

13:10:46

file and that to I'm going to create on

13:10:48

my desktop so here uh let me create on

13:10:51

new and here is my txt documentation now

13:10:55

inside this particular file I'm going to

13:10:57

paste my data so let's open the Google

13:11:00

and here search about the AI so let me

13:11:03

open my Google and let me search about

13:11:06

the artificial intelligence now here I

13:11:09

will get a article related to artificial

13:11:12

intelligence let's say I'm opening this

13:11:15

Wikipedia and I'm going to copy the

13:11:17

article from the uh from the Wikipedia

13:11:21

itself now I copied this article and I'm

13:11:23

going to keep it inside my desktop

13:11:26

inside my text one right now I can save

13:11:28

it also so let me save as uh let me save

13:11:31

as as

13:11:32

a AI document right so AI doc so this is

13:11:37

what this is my document which I saved

13:11:39

now let's say if you have any sort of a

13:11:41

information inside your text file inside

13:11:43

your PDF so you can upload it over here

13:11:46

so let me show you where you can upload

13:11:48

you can upload lo you can pass it to my

13:11:50

application now just click on the browse

13:11:52

file and take a data from the desktop

13:11:55

and here already I have this AI doc now

13:11:58

open it and here guys you can see my

13:12:00

file has updated now you can give the

13:12:03

number of McQ now how many McQ you would

13:12:06

like to generate so let's say I want to

13:12:07

generate five McQ so here I'm giving

13:12:10

number five so you can increase or you

13:12:12

can decreas also from here itself now

13:12:14

you need to provide a subject so here

13:12:16

I'm writing artificial art artificial

13:12:19

intelligence right artificial

13:12:21

intelligence so here is what here is my

13:12:24

subject okay so here is a restriction of

13:12:25

the word so let me keep it like this in

13:12:30

G and C so I can increase actually I can

13:12:33

increase from the back end or otherwise

13:12:34

I can write it down like this AI right

13:12:36

so AI is fine my subject is what AI in a

13:12:39

short form I have written it from back

13:12:40

end actually I have given this

13:12:42

restriction you can check with my

13:12:43

streamlet file there I have already

13:12:44

mentioned I can increase the number and

13:12:46

then it's going to take like more than

13:12:48

20 words right 20 character actually now

13:12:51

here I can provide the label so here the

13:12:53

label is going to be a simple right I'm

13:12:55

just going to create a simple uh simple

13:12:58

McQ simple five McQ now once I will

13:13:00

click on this create McQ so you can see

13:13:03

my model uh is running in backend and

13:13:06

here it will give you the answer so

13:13:08

let's wait for some time and yes it will

13:13:10

give me the

13:13:16

answer yes Vector database Al Al will be

13:13:18

covered in a live

13:13:28

class yeah so if we are talking about

13:13:30

the prerequisite right so I got one

13:13:32

question actually so the prerequisite

13:13:34

for the generative AI course is nothing

13:13:36

just a python if you have basic

13:13:38

understanding of the Python so just look

13:13:40

into the project see guys here I'm able

13:13:42

to generate a question so here I'm able

13:13:44

to generate an McQ just just look into

13:13:46

the McQ so uh it's a sens ible only

13:13:49

right so what is the field of the study

13:13:50

that develop and studies intelligent

13:13:52

machine so here it has given you the

13:13:54

various option like artificial

13:13:56

intelligence machine learning computer

13:13:58

science robotics now this is the second

13:14:00

one which of the following is a example

13:14:02

of AI technology used in a self-driving

13:14:05

car so it is giving you the various

13:14:07

option right so uh chat GPT bimo right

13:14:11

Vio or YouTube Google search so like it

13:14:15

is a sensible one and here you will find

13:14:16

out the a correct answer so it is giving

13:14:19

you the correct answer and it is

13:14:20

evaluating the quizzes quiz also so here

13:14:22

you can see the quiz evaluation now uh

13:14:25

one question basically I got and it's a

13:14:27

good one so uh what is a prerequisite uh

13:14:30

if you want to if you want to start with

13:14:32

the generative AI so the just just look

13:14:34

into the project guys what I have used

13:14:37

over here just tell me if you have a

13:14:39

basic knowledge of the Python if you

13:14:41

just have a basic knowledge of the

13:14:43

development so yeah um you can enroll

13:14:46

into the generative a and even if you

13:14:48

don't don't know about the python then

13:14:49

don't worry our pre-recorded session of

13:14:52

the Python will be available over the

13:14:54

dashboard from starting to end and apart

13:14:57

from that like you can see regarding the

13:14:58

development each and everything we are

13:15:00

going to teach you in a live class

13:15:02

itself from various skch from folder

13:15:04

creation to deployment right so we are

13:15:06

creating a folder in a class itself in a

13:15:08

live session and we are doing a live

13:15:10

coding in front of you and after develop

13:15:13

after developing our application we are

13:15:15

deploying it also so from starting to

13:15:18

Advance right so from scratch to advance

13:15:20

everything we are doing in a live class

13:15:22

and the prerequisite is just a p just

13:15:24

just python okay so don't worry about

13:15:27

the uh this uh prerequisite and all

13:15:29

already like uh the python and all will

13:15:31

be available over there you can learn

13:15:34

that first if you don't know and then

13:15:36

you can proceed with the further thing

13:15:38

right now here you can see this is the

13:15:41

application which I'm able to create now

13:15:43

what I want to do I want to deploy this

13:15:44

application over the cloud right now

13:15:46

here guys see this is the first

13:15:48

application and many people are beginner

13:15:50

one right and they don't know about the

13:15:52

advanced concept Advanced mlops concept

13:15:55

Advanced devops concept cicd and all so

13:15:58

let's try to keep it simple let's try to

13:16:00

deploy it over the ews there I'm not

13:16:02

going to use a cicd concept in my next

13:16:05

project I will show you how you can uh

13:16:07

use the cicd a concept how you can uh

13:16:10

create a like continuous integration

13:16:12

continu deployment Pipeline and how you

13:16:14

can deploy the application and even I

13:16:15

will include the docker also here I'm

13:16:17

keeping simple simply I'm creating a

13:16:20

server on top of my AWS machine and

13:16:22

there I'm going to deploy my application

13:16:24

so let's see how we can do it so for

13:16:27

that guys see the first thing what you

13:16:29

need to do so the first thing you need

13:16:30

to create your account on AWS the

13:16:33

application we are going to deploy we

13:16:35

are going to deploy on AWS so here what

13:16:39

we are going to do guys tell me so here

13:16:40

we need to create account on AWS now

13:16:44

here you require a credit card debit

13:16:46

card actually AWS does not ask you the

13:16:48

credit card it ask it you can add the

13:16:50

debit card also and it won't charge you

13:16:53

anything directly right so believe me it

13:16:54

won't charge you anything first it will

13:16:56

ask you first it will tell you then this

13:16:58

this this much of will like you have

13:17:00

generated and like you can wave off also

13:17:03

right or in the worst case you can

13:17:04

delete the account so it won't like harm

13:17:06

you it won't deduct any sort of a money

13:17:08

from the account now the first thing

13:17:10

which is required that is the AWS now

13:17:12

here in the AWS we are going to use the

13:17:15

ec2 server for deploying our application

13:17:18

so first we'll try to configure the ec2

13:17:20

server and here uh for uh in ec2

13:17:23

actually we are going to use the Ubuntu

13:17:26

machine right Ubuntu machine so that is

13:17:28

the first thing basically which is

13:17:30

required for the deployment now the

13:17:31

second thing which is required that is a

13:17:33

GitHub so just make sure that you have

13:17:36

kept your project over the GitHub so

13:17:38

what I'm going to do I'm going to upload

13:17:39

my project over the GitHub I'm going to

13:17:42

create a repository which I already did

13:17:44

right I have like I have I have done in

13:17:47

my previous session itself so there

13:17:48

itself in my repository itself I have

13:17:50

kept my project I have uploaded my

13:17:52

project right so the first thing which

13:17:54

is required which is a AWS the second

13:17:56

thing which is required that is a GitHub

13:17:58

that's it right so let me show you how

13:18:01

to do how to deploy this application

13:18:03

over the adws how to deploy this

13:18:05

application or the ec2 instant where I'm

13:18:08

going to use this Ubuntu Server right

13:18:10

now uh GitHub so first of all let me

13:18:13

give you the GitHub so at least you can

13:18:16

follow me uh throughout this deployment

13:18:18

process and here we have to run couple

13:18:20

of command so I will give you those

13:18:22

command also so at least you can run

13:18:25

inside your uh instance inside your

13:18:27

server right so here guys what I'm going

13:18:29

to do I'm giving you this GitHub link

13:18:31

just a second I'm going to paste inside

13:18:33

the chat if you're not able to click on

13:18:36

this link right so what you can do you

13:18:38

can uh go through with the Google uh you

13:18:40

can open the Google and you can search

13:18:41

about s Savita GitHub so there you will

13:18:43

get my GitHub ID and there just go

13:18:46

inside my Repository and open this

13:18:48

project open this gen AI project this

13:18:51

gen AI so now guys see I already kept my

13:18:54

project on my GitHub if you don't know

13:18:55

about the GitHub and all then you must

13:18:57

uh uh visit my previous session there I

13:19:00

have discussed each and everything from

13:19:02

scratch I'm not going to repeat those

13:19:03

things otherwise we won't to Able we

13:19:06

won't be able to cover the further thing

13:19:07

further concept now here is what here is

13:19:11

my uh here is my project right so I

13:19:14

believe guys you all have you all kept

13:19:16

the project in a GitHub itself you can

13:19:18

uh download it from here as a jib you

13:19:20

can clone it inside your repository

13:19:22

everything is fine for me now but at

13:19:25

least the project should be uh inside

13:19:27

your system and then you need to upload

13:19:29

in your GitHub right so this is my

13:19:31

GitHub if you are opening it guys so

13:19:32

this is my GitHub right so uh now what

13:19:35

you need to do see if you're are going

13:19:36

to Fork it that will also work okay that

13:19:38

also you can do but the best thing what

13:19:40

you can do just download it and keep

13:19:42

inside your GitHub because uh whenever

13:19:44

you are going to deploy it now so you're

13:19:46

not deploying from my GitHub you are

13:19:47

deploy from your GitHub so the project

13:19:49

should be available over there because

13:19:51

you will have to clone it now you will

13:19:52

have to clone it right now uh here uh

13:19:55

let me show you the ec2 instance right

13:19:57

so how the ec2 instance uh looks like

13:19:59

and all so the first thing guys what you

13:20:01

need to do so I'm uh starting from very

13:20:04

scratch no need to worry about it so

13:20:06

just search about the EC tool so just

13:20:08

open your uh AWS now let me show you

13:20:11

about the AWS also um if you don't know

13:20:14

about the AWS so here go open your

13:20:18

Google and search AWS login so just

13:20:20

simply search AWS login now here you

13:20:23

will get a link so uh not this one

13:20:25

actually this aws.amazon.com just open

13:20:28

this aws.amazon.com just click on that

13:20:32

and here guys here you'll find out your

13:20:34

AWS right now it is asking to you uh

13:20:37

would you like to create the account or

13:20:39

you want to login so what I want to do I

13:20:41

want to login because I already created

13:20:44

an account and creating account is not a

13:20:46

difficult task on a WS it's very easy

13:20:49

it's very simple you just need to

13:20:51

provide your detail over here whatever

13:20:54

they are asking and simply create the

13:20:56

account and it will accept your debit

13:20:58

card also if you have enabled the

13:21:00

international payment into your debit

13:21:02

card so definitely you can add on over

13:21:05

here and it won't charge anything first

13:21:07

it will ask to you and you if you will

13:21:09

approve then only it's going to cut it

13:21:11

down cut down the payment but don't

13:21:13

worry we can weev off also I will show

13:21:15

you how you can weev off your money and

13:21:16

you can delete the account if uh like

13:21:19

you have launched so many instances and

13:21:22

you generated like too long bill now

13:21:24

here you can see this is what uh like

13:21:26

this is a creating step like if you want

13:21:28

to create an account now just click on

13:21:30

the sign in Just click on the sign in

13:21:32

and after clicking on the sign in right

13:21:34

so here uh I already signed in so here

13:21:37

it is giving me the homepage now guys uh

13:21:40

what you can do so here you can search

13:21:42

the ec2 instant just go inside this

13:21:44

search box and here search the ec2 right

13:21:47

right ec2 now click on this ec2 so after

13:21:51

clicking on this ec2 right so it will

13:21:53

give you the various this is the

13:21:55

interface this is the home interface

13:21:57

right of the ec2 so here it will give

13:21:59

you the various options so no need to do

13:22:02

anything just CL click on this launch

13:22:04

instance right just just click on this

13:22:06

launch instance so here after clicking

13:22:08

in the launch instance it will give you

13:22:10

one form right you just need to fill up

13:22:12

this form and you will be able to launch

13:22:14

your instance so you just need to

13:22:16

provide some details over here and

13:22:18

that's it so tell me guys how many

13:22:20

people are following me please write

13:22:22

down the chat and let me look into the

13:22:24

doubt

13:22:27

also so how much long this free

13:22:29

generative AI boot camp will be so this

13:22:31

a free generative AI boot camp uh like

13:22:35

uh we are going to continue till next

13:22:38

week so this week and the next week

13:22:41

right so there is couple of concept

13:22:43

which we need to discuss and couple of

13:22:45

project as well so one basic project one

13:22:47

advanced project and like few more

13:22:52

concept do we need to learn ML and NLP

13:22:55

learning for Gen VI please advise no ML

13:22:58

and NLP is not see let's say there's

13:23:01

different different kind of person so

13:23:03

let's say if you're are beginner right

13:23:05

and who don't know anything let's say

13:23:07

who don't know anything and the person

13:23:09

who want to start from the generative AI

13:23:11

so for that person I already told you if

13:23:13

you have a basic understanding of the

13:23:16

Python then definitely you can start

13:23:18

with the generative AI right so by

13:23:20

learning the generative AI definitely

13:23:22

you will be familiar with the basics of

13:23:24

ml NLP and all automatically you will

13:23:26

learn that but let's say there is one

13:23:28

more person who is familiar with the ml

13:23:31

statistic basics of ML and all right so

13:23:34

yes the this is like a good thing he

13:23:37

knows about the basics so definitely he

13:23:39

can start with the generative a now

13:23:40

there is one person who knows everything

13:23:42

who knows about the ml DL NLP so that is

13:23:46

well and good means um nothing can be

13:23:48

better right so definitely the person uh

13:23:51

can start with a generative AI so in

13:23:53

every case you can start with a

13:23:55

generative AI there you just required a

13:23:57

python knowledge and if you are if you

13:24:00

have a knowledge of the mlop if you have

13:24:03

a knowledge of the NLP DL ml so yeah

13:24:06

your understanding will be much clear

13:24:07

over there getting my point so for every

13:24:10

person the scenario is different so just

13:24:12

think about your scenario but I would

13:24:15

tell you that in every case in every

13:24:17

scenario you can go with a generative AI

13:24:20

right even non-technical person can

13:24:21

enroll who don't know about anything

13:24:24

right anything about the programming and

13:24:25

theend

13:24:35

okay so guys uh how's the session so far

13:24:38

are you enjoying it tell me did you open

13:24:40

this AWS page if you have any doubt you

13:24:42

can ask me in the chat and then I will

13:24:45

proceed

13:24:46

further

13:25:07

do we cover any mlops topic yeah we are

13:25:09

using the mlops concept only now tool

13:25:11

wise yes we can use the tool so we can

13:25:14

use DVC ml flow or different different

13:25:16

tools like yeah we going to use Docker G

13:25:18

already we are using right so uh

13:25:21

whatever is required according to the

13:25:22

infrastructure and all definitely we can

13:25:24

use it right and don't worry in the

13:25:26

upcoming project we'll show you that

13:25:31

also yes you will get a python video

13:25:34

over the

13:25:35

dashboard yes uh Amrit fine so I hope uh

13:25:40

here you can see uh like here I have the

13:25:43

ec2 so here I have click on the ec2 and

13:25:46

I click on the launch instance now here

13:25:49

you just need to provide the name so if

13:25:51

you like just provide the name any name

13:25:53

over here so here I'm saying McQ

13:25:55

generator right so here I'm writing McQ

13:25:58

generator this is the name of my uh

13:26:00

instance now once you will uh scroll

13:26:03

down so here you will get a option uh

13:26:05

like here they have provided you a

13:26:06

different different machine right so

13:26:08

they have provided their own machine own

13:26:10

Linux system Amazon Linux they they are

13:26:13

providing you the Macos they're

13:26:15

providing you the Ubuntu Windows right

13:26:17

redit is there so different different

13:26:19

like variant different different variant

13:26:21

you will find out of the Linux and even

13:26:22

Windows server is there so here we are

13:26:25

going to select this Ubuntu right so

13:26:28

here we are going to select this Ubuntu

13:26:29

so just click on this Ubuntu after

13:26:32

clicking on this Ubuntu so here it is

13:26:35

giving you the free tire but uh here my

13:26:38

application actually I I cannot I cannot

13:26:41

take a chance I'm not using the free

13:26:43

tire over here so as of now what I'm

13:26:46

going to do I'm taking taking any larger

13:26:48

instance so here okay so free tire is

13:26:51

fine now what I can do yeah free tire

13:26:54

Let It Be Free Tire okay so uh how to

13:26:56

select the major instance let me show

13:26:58

you that so here is the architecture so

13:27:00

keep it as it is and keep it uh like

13:27:02

free tire this one now here guys just

13:27:05

just see free tire eligible just just

13:27:07

click on that just just click on this

13:27:09

drop down right and here instead of the

13:27:11

t2 micro just select anything right

13:27:13

apart from this T2 micro you can select

13:27:15

uh either this small

13:27:17

or you can select this medium or large

13:27:19

so here I'm going to select this large

13:27:21

one because as of now I don't want to

13:27:22

take any uh chance so let's say if I'm

13:27:25

selecting this medium or maybe small so

13:27:27

maybe uh with this particular system my

13:27:30

uh like this app is not going to be

13:27:32

launched or maybe if I'm installing the

13:27:34

requ txt and all it is giving me some

13:27:36

sort of error I'm not going to take any

13:27:38

chance and here I'm selecting this T2

13:27:40

large but guys uh you can select U like

13:27:43

this uh small one also and the medium

13:27:45

one also right but in my case I'm I'm

13:27:47

taking this large where it is giving me

13:27:49

where it is giving me this uh 8 GB

13:27:51

memory and here you can see the pricing

13:27:53

and all but don't worry after the uh

13:27:55

like after the session I will stop the

13:27:58

instance right I will show you how to

13:27:59

stop the instance now after selecting

13:28:02

this instance okay after selecting the

13:28:04

instance type what you need to do here

13:28:06

you need to create a new pair right so

13:28:08

create a new key pair so here for

13:28:11

creating a new pair so once you once you

13:28:14

will click on that it will ask the name

13:28:16

right so here I'm giving the name so

13:28:18

let's say the name is what uh McQ ke

13:28:21

right so McQ key and here uh generate

13:28:23

this a pem file right private key file

13:28:26

format if you want to do SS or if you

13:28:28

want to connect the this machine by

13:28:31

using the puty or by using the SS so

13:28:34

here this a key will help you right here

13:28:36

this key will help you now create the

13:28:38

key pair and it will ask you for the

13:28:39

download so yes download it somewhere

13:28:42

inside your system so I'm going to save

13:28:44

it and I am done now you did two three

13:28:47

things first you selected this ubu

13:28:49

machine the second you selected this

13:28:51

instance type and the third one you

13:28:53

created the pair over here that's it now

13:28:56

keep rest uh see here one more thing uh

13:28:59

the fourth one actually you just need to

13:29:00

click on this one right so just just

13:29:02

click on this one just allow HTTP https

13:29:05

and HTTP traffic also and keep it

13:29:08

anywhere not no need to provide the

13:29:10

specific IP address over here keep it

13:29:13

00000000 it's a global one and keep it

13:29:15

anywhere uh you won't face any sort of a

13:29:18

issue right so now guys this is done and

13:29:21

one more thing I can do over here is

13:29:23

asking to me a storage so I can increase

13:29:25

the storage as well so instead of the

13:29:27

eight I am going to take let's say 16

13:29:29

right so here is my storage right so

13:29:32

here is my storage and I hope now

13:29:34

everything is fine I just fill up the

13:29:36

form and once I will click on this

13:29:39

launch instance so it will be launching

13:29:41

my instance so are you doing along with

13:29:44

me are you launching the instance tell

13:29:46

me guys now see guys it has launched the

13:29:48

instance now once I will click on this

13:29:50

one uh so it will show me the instance

13:29:53

and here the status is pending as of

13:30:02

now tell me guys uh are you doing it

13:30:05

along with me are you writing are you

13:30:08

doing are you deploying see I have

13:30:10

already given you the code I already

13:30:11

given you the GitHub you just need to

13:30:13

download it and keep it inside your

13:30:14

GitHub and then you can follow the steps

13:30:17

I'm going very slow and don't worry I

13:30:19

will give you all the step in a document

13:30:21

format

13:30:44

also yeah so let me refresh it and let

13:30:47

me check it is working or not yeah it is

13:30:49

running now so see guys my status is

13:30:53

running right instant state is running

13:30:55

now just click on this ID just uh click

13:30:57

on this ID and here click on this

13:31:00

connect button right so what you need to

13:31:02

do here tell me guys so once uh so click

13:31:04

on the ID click on the instance ID and

13:31:06

click on this connect button after that

13:31:09

here it will give you the uh like option

13:31:11

so here again uh like it will give you

13:31:13

it will ask you for the connect

13:31:14

connection so just click on this connect

13:31:16

and and now your machine has launched so

13:31:20

this is the machine guys this is the

13:31:21

machine which we have launched now we'll

13:31:24

configure this particular machine

13:31:25

according to our requirement right so

13:31:28

this is a machine basically which I got

13:31:30

from the uh AWS side which I launch over

13:31:33

here now I will configure it right so

13:31:36

for configuring this machine I have to

13:31:38

run few step so the first step which I'm

13:31:41

going to run over here the step is Pudo

13:31:44

AP update right so here once I will

13:31:46

write down the the Pudo AP update so my

13:31:48

entire machine will be updated right so

13:31:51

here my machine is getting update and

13:31:53

don't worry I will give you all this

13:31:54

command I will keep it inside the GitHub

13:31:56

itself uh so let me do it first of all

13:31:59

let me show you and then I will provide

13:32:01

you the command right so here guys you

13:32:04

can see I have updated the machine or

13:32:06

what I can do I can open the txt and

13:32:08

there itself I can write it down so all

13:32:10

the commands which whatever I'm running

13:32:12

now the First Command which i r that is

13:32:15

that is what that is a suit sudo AP

13:32:17

update so that was a command which I ran

13:32:20

now after that I will run one more

13:32:21

command uh so here on the terminal

13:32:23

itself I'm going to run one more command

13:32:25

that's going to be a Pudo Pudo a AP iph

13:32:30

G update so this is a second Command

13:32:32

right sudo AP hyen G this is nothing

13:32:34

this is just a package manager right so

13:32:36

this AP AP G so I'm updating it uh the

13:32:39

machine so here now everything is up to

13:32:41

date so sudo AP update and sudo AP

13:32:44

hyphen get update now let me write it

13:32:46

down here this two command so the next

13:32:49

one was sudo AP hyphone G update right

13:32:54

so this is the second command now the

13:32:56

third command which I'm going to write

13:32:57

it down here that's going to be a pseudo

13:32:59

up AP upgrade okay upgrade upgrade

13:33:03

hyphen y right so this is the third

13:33:05

command which I need to run Pudo AP

13:33:09

upgrade hyphen y now let me open the

13:33:11

machine and here I'm writing Pudo AP

13:33:15

upgrade gde upgrade hyphen y right so

13:33:20

here you can see my um like machine is

13:33:23

getting upgraded so this three command

13:33:26

which whatever I have written over here

13:33:27

you need to run it on your terminal for

13:33:29

updating your machine right so yes it is

13:33:33

running let's wait for some

13:33:36

time yeah still it is running and it

13:33:39

will take some

13:33:42

time here is a command guys this one if

13:33:45

you have launched the system uh if if

13:33:46

you have launched the machine so you can

13:33:48

execute this three command sud sudo AP

13:33:51

update sud sudo AP hyphen get update sud

13:33:54

sudo APD upgrade hyphen y

13:34:00

right great so here my machine is

13:34:04

updating and it will take some time

13:34:07

until if you have any question anything

13:34:09

you can ask

13:34:15

me

13:34:52

yeah so here actually I just need to hit

13:34:54

the enter if you're getting this uh

13:34:55

warning so just hit enter and again you

13:34:58

need to hit enter over here right so

13:34:59

once you will hit enter it will be

13:35:01

updating it so what's the meaning of

13:35:03

this three command so just look into the

13:35:05

command what we are going to do I'm

13:35:06

saying Pudo Pudo means for the root user

13:35:08

APD update right so APD is a package

13:35:10

manager and what we are going to do we

13:35:12

are going to update our machine by using

13:35:14

this up package manager right so here we

13:35:16

are going to update and upgrade each and

13:35:18

everything uh inside this particular

13:35:21

machine and now everything is done now

13:35:23

we have updated our machine here you can

13:35:26

see we have updated our machine now I

13:35:28

have to install something here right I

13:35:30

have to install something over here now

13:35:32

for that again we have a command the

13:35:34

command is going to be pseudo AP install

13:35:38

right pseudo a install I'm going to

13:35:41

install this git I'm going to install

13:35:43

the curl right I'm going to install this

13:35:46

unip

13:35:47

and here I'm going to install this tar

13:35:50

make right and here I'm going to install

13:35:53

this sud sudo Bim Bim is what it's a

13:35:57

editor right now here does w get so

13:36:00

these are the thing these are the like

13:36:02

uh these are the thing basically these

13:36:05

are the software we are going to install

13:36:07

by using this sudo APD install we are

13:36:09

going to install this git call unip tar

13:36:13

make and this Bim editor and here is W

13:36:16

get now once I will write down this

13:36:18

hyphen y so here you can see everything

13:36:20

is getting installed over here now here

13:36:24

everything is done so now if it is

13:36:28

giving you this particular uh window so

13:36:30

you just need to hit enter and let me do

13:36:33

one thing let meit enter yeah here also

13:36:36

and yeah it is fine so it is done guys

13:36:38

now let me check one more time let me

13:36:41

copy and paste over here the same

13:36:43

command and I'm checking everything is

13:36:45

done or not

13:36:47

yeah everything is done see here right

13:36:49

this is giving me already the newest

13:36:50

version newest version newest version

13:36:52

right now see guys my machine is ready I

13:36:54

have updated the machine I have

13:36:57

installed every software whatever is

13:36:59

required now what I will do here I will

13:37:01

clone my repository right so here is my

13:37:04

repository guys this one so here

13:37:06

actually I kept the application the

13:37:08

entire application whatever application

13:37:10

I'm running inside my system now you

13:37:13

just need to clone this repository over

13:37:15

there on top of that server right so

13:37:17

here is my ec2 instance and here if you

13:37:19

will write it down this get clone right

13:37:22

and just provide the link right just

13:37:24

provide the link of your repository now

13:37:26

here guys see uh here is a repository

13:37:29

link and hit the enter so it will be it

13:37:32

will clone your repository and you can

13:37:34

check it also so just just type this LS

13:37:36

and here you can see this is your

13:37:38

repository now you will write CD here CD

13:37:41

means what change directory so just

13:37:43

write CD and check uh with this

13:37:45

particular Repository so here guys you

13:37:47

can see I'm inside this folder I'm

13:37:50

inside my repository now WR LS so here

13:37:53

you will find out out all the file so

13:37:56

here we have a response streamlit

13:37:58

experiment means one folder McQ

13:38:00

generator my main file here you can see

13:38:03

require. txt setup.py and test.py and

13:38:06

test.txt so I have the entire file now

13:38:10

guys see uh here actually we have we are

13:38:12

using the openi API if you look into the

13:38:15

EnV envir in file so here actually what

13:38:18

I'm doing I am creating one variable the

13:38:20

variable name is what open a API key but

13:38:23

here one we have an issue right so what

13:38:25

is the issue you cannot upload you

13:38:28

cannot upload this open AI API key you

13:38:32

cannot upload this open a API key on

13:38:36

GitHub right if you're going to update

13:38:38

it so automatically it will delete right

13:38:41

so this open actually don't know like

13:38:43

what type of codee they have written so

13:38:45

if you're going to upload this uh like

13:38:47

this key on any uh repository okay in

13:38:50

any public repository automatically they

13:38:52

will detect it and they will delete it

13:38:55

right so actually we cannot upload this

13:38:57

particular folder this EnV folder on my

13:39:00

GitHub right so there is a issue there

13:39:02

is a issue so what I will do here so I'm

13:39:05

going to create the EnV folder EnV file

13:39:08

over here itself in my machine so for

13:39:10

creating a file there is a command the

13:39:12

command is what don't worry I will give

13:39:14

you all the command first let me show

13:39:15

you first let me run it so here is a

13:39:17

command the command is touch right so

13:39:19

here if I will write it on this touch

13:39:21

and here if I will write en EnV do EnV

13:39:24

so you can see uh let me show you so

13:39:26

here I have created this EnV file right

13:39:29

so it is not visible let me show you

13:39:30

with ls hyph a it is a hidden actually

13:39:33

this do file actually it's a hidden file

13:39:35

now you will find out this EnV yes we

13:39:38

have this EnV file now what I will do I

13:39:40

will open this file by using the vi

13:39:43

editor VI or VI editor so once I will

13:39:45

write down this VI and here I will write

13:39:47

down this do e and V now here guys see I

13:39:50

have opened this file now after opening

13:39:53

this file you just need to press insert

13:39:55

right in your keyboard there's a button

13:39:57

the button name is insert just press the

13:39:59

insert now you can insert anything over

13:40:01

here now what I'm going to do so here

13:40:03

actually in my local I have my openi key

13:40:06

just copy the key from here and keep it

13:40:09

inside your en so let me do it uh let me

13:40:12

directly paste it over here after copy

13:40:13

see guys so here open I key and I pasted

13:40:16

it now after that what you need to do

13:40:18

you just need to press escape button so

13:40:20

press the escape button it will be saved

13:40:22

now if you want to come out from here so

13:40:24

for that you just need to press the

13:40:26

colon colon and WQ so here you can see

13:40:30

uh like in the bottom bottom left bottom

13:40:33

so there I written cool and WQ now hit

13:40:35

the enter and you will be out from the

13:40:38

vi editor right so here I created a file

13:40:41

the file name was EnV and inside that I

13:40:43

kept my open key now now if I will write

13:40:46

this cat Dov so here you can see

13:40:50

whatever content is there inside the EnV

13:40:53

file I am able to see on my terminal

13:40:55

right so open a API key and this is what

13:40:57

this is my API key now guys what I will

13:41:00

do here I will install all the

13:41:02

requirements into my machine so here we

13:41:04

have a requir txt file so what I will do

13:41:06

here I will write a simple command and

13:41:08

see guys if you are using Linux machine

13:41:11

if you're using Mac OS so instead of

13:41:13

writing pip or instead of writing python

13:41:15

you all you must uh uh you must write

13:41:18

over here pip 3 right so here what I'm

13:41:20

going to do I'm going to write down pip

13:41:21

3 pip 3 uh install pip 3 install hyphen

13:41:25

R require. txt right so this is my file

13:41:28

name now I'm installing all the

13:41:30

requirement in my machine so here once I

13:41:32

will hit enter so here you can see uh

13:41:35

okay it is asking sudo AP install Python

13:41:38

3 fine guys so I forgot to install

13:41:41

python over here it is giving me a

13:41:43

command see as soon as I've return this

13:41:45

P inst install hyphen ar. txd it is

13:41:47

giving me an issue it is giving me an

13:41:48

error that pip 3 not found because I

13:41:51

forgot to run one command here the

13:41:53

command was for installing the python so

13:41:56

let me write it down over here Pudo Pudo

13:41:59

AP Pudo AP install so here I'm writing

13:42:03

sudo AP

13:42:05

install and after installation after

13:42:08

install what I will write I will write

13:42:10

python python and Python 3 Hy pip okay

13:42:15

okay so this is the command which you

13:42:17

need to write it down Pudo APD install

13:42:19

Python 3 hyen pip so once you will hit

13:42:22

enter now here you can see now here you

13:42:25

can see we are able to install the

13:42:28

requirement so yes we are going to

13:42:30

install this python now once I will

13:42:32

press yes here so now I'm uh able to

13:42:36

install it and it is installing in my

13:42:44

system

13:42:54

yeah so if you getting this warning just

13:42:56

press enter and here also now everything

13:42:59

is done so see guys uh here is what here

13:43:02

is my complete python which I downloaded

13:43:06

in my system which I installed now let

13:43:09

me do one thing here what I can do on my

13:43:11

machine itself I can install the

13:43:13

requirement file so for that let me

13:43:15

clear it first of all and here I'm

13:43:17

writing pip install iphr requirement.

13:43:20

txt now let's see okay pip install the

13:43:26

command is PIP

13:43:33

install inss

13:43:37

install I think now it is

13:43:40

perfect

13:43:44

yeah so see I installing all the

13:43:46

requirements over

13:43:53

here what is the issue we faced

13:43:55

yesterday on top of the neural lab there

13:43:57

was not the issue actually if you will

13:43:59

use my updated code right so I updated

13:44:02

everything over there so uh like it will

13:44:04

be running the issue basically it was

13:44:06

the uh regarding dependency maybe it

13:44:09

took python 3.8.0 because of that only

13:44:12

it was giving me the library issue but

13:44:14

if you are using uh now just do one

13:44:16

thing use equal to equal to sign over

13:44:18

there pip install sorry cond create

13:44:20

hyphen uh cond create hyphen P

13:44:23

environment name python equal to equal

13:44:24

to 3.8 so it will take 3.8.8 right so it

13:44:28

won't give you any such of uh any any

13:44:30

issues and all right now here guys see I

13:44:32

have installed the require. txt now what

13:44:34

I will do here I will run my application

13:44:38

right after setting up the machine after

13:44:40

installing the python after installing

13:44:42

the requirements and all now here what I

13:44:44

will do I will be writing stre stream

13:44:45

late right so let let me give you the

13:44:47

command there is a specific command for

13:44:49

that now here is the command so let me

13:44:53

copy this command and let me paste it

13:44:56

over here so this is the command guys

13:44:57

don't worry I will give you all the

13:44:59

commands and I will revise this thing uh

13:45:01

then I will give you that so here is a

13:45:03

command Python 3 hyphen M streamlit run

13:45:06

and here I need to provide my file name

13:45:09

I'm removing this app.py and here I'm

13:45:11

going to write down streamlit app.py

13:45:14

right so here is a like file name

13:45:16

streamlit app.py so this is the complete

13:45:19

Command Python 3 hyphen M streamlit run

13:45:22

streamlit

13:45:24

app.py right so let me hit enter now and

13:45:27

here you can see my application is

13:45:29

running now how you can access this

13:45:32

application so for that let me show you

13:45:35

so just go through with your instance

13:45:36

right now here is the instance here you

13:45:38

will find out the public IP address

13:45:41

right so here you can see this public IP

13:45:43

address just just copy this address and

13:45:45

here just open your browser and um then

13:45:49

paste your address after copying this

13:45:50

address copy this U public IP address

13:45:53

and uh put the colon and here you need

13:45:56

to mention the port number so by default

13:45:58

actually this uh this one this

13:46:00

application ring on

13:46:03

8501 right on 8501 now if I will hit

13:46:07

enter will I be able to run it no

13:46:10

actually we haven't configured this

13:46:12

particular port number right so what I

13:46:15

need to do here let me open my

13:46:17

application now here just go inside this

13:46:21

security right and uh here just a wait

13:46:25

so let me go

13:46:27

back ec2 instance here is a

13:46:33

instance

13:46:36

yeah now open the instance by clicking

13:46:39

on the ID now here guys you will find

13:46:42

out

13:46:43

so this inbound rule let me show you

13:46:46

that inbound

13:46:58

rule yeah so here just click on the

13:47:00

security group right and after that you

13:47:02

will find out the uh this particular

13:47:05

rule so just click on this edit inbound

13:47:08

rule this one after Security Group

13:47:10

Security Group info and addit inbound

13:47:12

Rule now here add rule right now just

13:47:15

keep it custom TCP and here you need to

13:47:17

write it down your port number so your

13:47:19

port number is what

13:47:21

8501 and then keep it custom and click

13:47:25

on this uh just select this one anywhere

13:47:28

only now everything is done so here you

13:47:30

need to keep it custom TCP then uh give

13:47:33

your port number here and keep it

13:47:35

anywhere that's it right now save the

13:47:37

rules that's it okay and uh let me do

13:47:40

one thing I think uh this is running so

13:47:44

let me first press press control+ C and

13:47:46

again I can run this particular

13:47:47

application so yeah now it's perfect uh

13:47:51

so just go through with your application

13:47:53

here and here itself you will find out

13:47:58

the here itself you will find out the IP

13:48:02

address so let me open the IP address

13:48:03

just a

13:48:06

second instance running now this is your

13:48:09

instance McQ generator click on that and

13:48:14

here is your IP this one 52 this one

13:48:17

this is your IP right 52.

13:48:19

20414 and 155 now copy this ID and paste

13:48:23

it over here in your browser so now let

13:48:26

me check 155 yeah it is correct so just

13:48:30

uh press the colum and give 8501 now

13:48:33

once you will hit enter so you will be

13:48:35

able to find out your application over

13:48:37

here just a second it is running let's

13:48:43

see yeah so here guys you can can see I

13:48:46

have deployed the application and now

13:48:47

you all can access this particular

13:48:49

application I'm giving you inside the

13:48:51

chat and try to generate the try to

13:48:55

generate the mcqs from here now let me

13:48:58

do it I'm giving you this particular

13:49:00

link inside the chat just click on that

13:49:02

and try to generate it now here if I'm

13:49:05

clicking on this browse file now it is

13:49:07

asking to me it is asking me about the

13:49:09

file so here I'm giving this a do just

13:49:12

open it and give the number of cues

13:49:14

let's say I want to generate four mcqs

13:49:17

here uh write the subject name so my

13:49:19

subject is going to be Ai and here write

13:49:22

the simple and then create McQ and it is

13:49:27

loading here you can see guys it is

13:49:30

loading now see let's see it is able to

13:49:32

generate or

13:49:35

not are you doing it guys along with me

13:49:38

have you uh like run any sort of a

13:49:40

command don't worry let me give you all

13:49:42

the command at a single place and then

13:49:44

you can check you can run inside your

13:49:46

system I will give you 2 minute of time

13:49:48

yeah so here you can see I'm able to

13:49:50

generate a quiz so what is the field of

13:49:52

study that develops and study

13:49:54

intelligence Machin so these are the

13:49:56

choices and here is the answer right

13:49:59

whatever correct answer is there now

13:50:01

review is also their review about the

13:50:04

McQ now click on this uh so just just go

13:50:07

through with this URL and you also can

13:50:10

generate now someone is asking me sir

13:50:12

how we can save it right for saving the

13:50:14

code prods for saving this McQ in a PDF

13:50:17

file in a CSV file so already I shown

13:50:20

you the code in my previous lecture if

13:50:22

you will go inside the ipynb file so

13:50:25

here I already kept the code so this is

13:50:27

what this is what my code actually uh

13:50:30

where is where it is where it is uh just

13:50:32

a second just a second yeah so here was

13:50:35

the code actually I converted into a

13:50:36

data frame and here I converting into a

13:50:39

CSV file now see uh I'm converting into

13:50:42

a CSV file but you can convert the CSV

13:50:44

file into a PDF

13:50:45

or you can uh generate a direct PDF from

13:50:49

here also right you just need to look

13:50:50

into that and you can append this same

13:50:53

functionality inside your end to

13:50:55

application also so if you you you can

13:50:57

give one option over there download

13:50:59

option so whatever McQ you are getting

13:51:01

now on top of your steamate application

13:51:04

here itself see uh here uh whatever uh

13:51:07

mcqs you are able to see over here right

13:51:09

so you can provide one button over here

13:51:11

right hand side download button so once

13:51:13

the person will click on the download

13:51:15

down the script will be running in a

13:51:16

back end and you can download this McQ

13:51:19

in a CSV file or in the form of uh PDF

13:51:22

right so this you can take as assignment

13:51:24

where you can append one button one

13:51:26

download button and you can write it

13:51:29

down the code write it down the

13:51:30

functionality okay in a in a python

13:51:32

actually you can uh like you can create

13:51:34

one file or maybe inside that streamlet

13:51:37

itself you can uh like append this

13:51:39

download functionality right you can you

13:51:41

can append this download over there and

13:51:43

whenever someone is hitting the download

13:51:45

this all the mcqs will be downloaded in

13:51:47

the form of CSV right so just take it as

13:51:50

a assignment and try to do it and you

13:51:52

can send it to me on my mail ID or maybe

13:51:55

on my uh yeah so you can uh ping uh you

13:51:59

can ping me on my LinkedIn and you can

13:52:01

post it over the LinkedIn also right so

13:52:03

after creating this if you are going to

13:52:05

post it over the LinkedIn I think that

13:52:07

that is well and good so uh and uh yeah

13:52:10

so let's say this is your first end

13:52:12

project and let's say first time if you

13:52:15

learning the generative definitely you

13:52:16

should uh you must share the knowledge

13:52:19

over the LinkedIn as well so you can uh

13:52:21

post it over there and you can tag me

13:52:23

and all you can tag the Inon I think

13:52:26

that would be fine now uh here see we

13:52:29

are able to create the application we

13:52:31

are able to deploy it I haven't shown

13:52:33

you the cicd one I this is the manual

13:52:35

approach which I shown you I kept the

13:52:37

cicd for the next project I can show you

13:52:39

here also I don't have any issue I can

13:52:41

write it on the workflow I can deploy

13:52:43

the application that not going to be

13:52:45

difficult but as a beginner first you

13:52:46

should adapt the like basic approach you

13:52:49

should understand the server and all and

13:52:51

uh you should be familiar with the AWS

13:52:53

and then in the next project we are

13:52:55

going to do it from scratch right so I

13:52:57

will show you the complete cicd and yeah

13:53:00

definitely in our course uh we have

13:53:02

included so many projects so there uh we

13:53:05

are going to deploy it over the

13:53:06

different different platform AWS a your

13:53:09

gcp and we are going to use AWS ECR okay

13:53:14

or this AWS ec2 app Runner and this uh

13:53:18

like different different services like

13:53:20

elastic code commit uh elastic be stall

13:53:23

code commit even uh Lambda function

13:53:25

right so different different uh thing

13:53:27

different different Services of the AWS

13:53:30

we are going to use and we'll show you

13:53:31

how uh you can create or and an

13:53:34

application in how you can create a

13:53:36

production production based pipeline

13:53:38

right so this thing is clear

13:53:42

now if uh it is clear then definitely we

13:53:45

can move to the next topic but before

13:53:48

that let me give you all the command

13:53:49

which is required and let me keep

13:53:52

everything inside this uh txt itself so

13:53:57

see the first thing what you need to do

13:53:58

guys for deploying this

13:54:00

application first login to AWS so first

13:54:05

login to the

13:54:07

AWS and here I'm giving you the link of

13:54:10

the AWS so you can uh login with that

13:54:13

particular link M just a

13:54:18

second AWS login now let me give you the

13:54:23

link of the

13:54:25

AWS

13:54:27

yeah so here first you need to uh log to

13:54:30

the aw the second what you need to do

13:54:32

guys you need to like launch the ec2

13:54:35

instance so search about the ec2

13:54:39

instance search about the ec2 instance

13:54:43

now after search searching the ec2

13:54:45

instance what you need to do the third

13:54:47

place uh you need to you need to

13:54:50

configure configure the ubu machine

13:54:53

ubu ubu

13:54:56

machine machine right so that's the

13:54:59

third thing now fourth one actually what

13:55:01

you need to do after configure the one

13:55:03

to machine launch the instance right

13:55:05

launch the instance that's the fourth

13:55:07

step after launching the instance what

13:55:10

you will do after launching the one two

13:55:11

instance so you need to update this by

13:55:13

using a different command so I will give

13:55:15

you all those command three command I

13:55:18

have already written over here let me

13:55:19

write it down the uh further command so

13:55:22

here is the thing update the update the

13:55:26

machine right so update the machine and

13:55:28

here is all the command let me give you

13:55:30

forur command uh here is upgrade now

13:55:34

this is going to be a next

13:55:36

one and here there is going to be next

13:55:39

you need to clone your GitHub repository

13:55:42

and after that there is a next command

13:55:45

so sud sudo AP install this is the next

13:55:49

now here uh pip install regard. txt and

13:55:53

here this is going to be a next command

13:55:56

for running your application so if you

13:55:59

want to run the application now here is

13:56:01

a command and the app name is what

13:56:04

stream

13:56:05

St stream

13:56:09

lit app right so this is the command

13:56:12

which you need to run right and then

13:56:14

finally

13:56:15

copy the IP and huh uh then what you

13:56:17

need to do guys you need to add the

13:56:19

environment file EnV file also so for

13:56:22

adding that uh there is a command let me

13:56:25

write it down over here if you want to

13:56:29

add open AI API key so here the first

13:56:34

thing

13:56:36

create create Dov file Dov file new

13:56:41

server right so create do EnV file in

13:56:45

your server now here after creating this

13:56:49

EnV file how will you will create it by

13:56:50

using this particular command touch. EnV

13:56:54

now here what you will do you will

13:56:56

insert you will press insert so press

13:56:58

insert insert and then write it uh no

13:57:02

after creating that you need to open it

13:57:04

and actually by using the vi editor so

13:57:05

VI and that WR Dov then you need to

13:57:09

write it down some command so press

13:57:11

insert from your keyboard and after that

13:57:14

after pressing the insert you have to

13:57:15

write it down something so copy your API

13:57:18

key and paste it

13:57:20

there and paste it there the next one

13:57:24

actually the next is going to be so

13:57:27

after the copy you need to save it so

13:57:29

press escape and then colon WQ so colon

13:57:34

WQ and hit enter right so hit enter so

13:57:38

that's going to be a step now after

13:57:40

adding the API key what you need to do

13:57:43

so yeah this will be done then uh this

13:57:47

is the step for adding the API key now

13:57:49

yeah inbound rule so go with your

13:57:51

security go with your security and add

13:57:57

the inbound rule right so here actually

13:58:01

you need to add the inbound rule there

13:58:03

add the

13:58:05

port add the port 85 01 right this one

13:58:10

so this is the complete detail of the

13:58:11

deployment which I have written over

13:58:13

here now let me copy it and let me paste

13:58:15

it over here inside your inside my

13:58:17

GitHub itself so here is my readme file

13:58:21

uh I don't have readme file so don't

13:58:23

worry I can edit create a new

13:58:28

file my file name is what

13:58:32

readme.md just readme.md and

13:58:43

here

13:58:52

yeah so this is the entire command which

13:58:54

I kept over here now let me click on the

13:58:56

commit

13:58:57

changes and here I'm going to commit so

13:59:01

see guys this is the entire process for

13:59:03

the deployment okay now let me give you

13:59:06

this link so you all can do

13:59:09

it inside your

13:59:13

system so this is the link guys uh which

13:59:16

uh where I kept all the steps you can

13:59:19

follow it and you can deploy your first

13:59:21

and to and uh first application

13:59:24

basically now tell me yes this file will

13:59:27

be available inside the notes don't

13:59:28

worry don't worry about it

13:59:32

so let me check with more

13:59:36

doubts this uh file you will get inside

13:59:38

the dashboard see this is a dashboard

13:59:40

guys this is a like Genera VI dashboard

13:59:43

now again I can give you this link

13:59:45

inside the chat and already you can see

13:59:48

my team has updated right so inside the

13:59:50

chat if you will check with the pin

13:59:51

command so my team has updated the link

13:59:54

of the dashboard right and just go

13:59:56

through the Inon platform just just

13:59:58

search about the Inon okay just open

14:00:00

your Google search about the Inon and

14:00:01

this is the homepage now here in the

14:00:04

courses there is a section Community

14:00:07

program so just click on the community

14:00:09

program and here itself you will find

14:00:11

out the category so just click on this

14:00:13

generative AI so there you will find out

14:00:15

all the dashboard so here you just need

14:00:17

to click on the English one uh here we

14:00:19

have a Hindi dashboard as well I'm

14:00:20

taking the same lecture and On Hindi

14:00:22

YouTube channel so yeah we we have a

14:00:24

Hindi dashboard now here is a English

14:00:27

dashboard and this is a community

14:00:29

session of the machine learning so each

14:00:31

and everything you can find out over the

14:00:33

Inon platform let me give you the uh

14:00:36

this particular link so that you can log

14:00:39

in if you are new guys so that uh so

14:00:42

please try to log in on this I own

14:00:54

portal how how we can apply llm for

14:00:58

business inside chat like interacting

14:01:00

with DB and perform complex computation

14:01:02

task yeah that only we are going to

14:01:04

discuss now so we'll talk about that how

14:01:07

we can uh like create a complex

14:01:10

application here the foundation I think

14:01:12

the foundation is clear to all of you

14:01:14

now we'll come to the advanced part

14:01:17

where we'll include the databases where

14:01:19

we'll try to create few more application

14:01:21

like chatbot and all and yeah that thing

14:01:25

will be clarified to all of you just

14:01:27

wait for some

14:01:31

time so tell me guys how's the session

14:01:34

so far do you like it so please hit the

14:01:36

like button if you are liking the

14:01:37

session

14:01:41

uh and please do let me know in the chat

14:01:44

also how's the session so far because we

14:01:47

have completed a one phase now we are

14:01:50

entering into the second

14:01:52

phase yeah waiting for a reply so please

14:01:56

write it down the

14:02:13

chat

14:02:36

you are not getting any link

14:02:40

uh linkwise don't worry my team will

14:02:43

give you that give uh that particular

14:02:45

link inside the chat itself if I'm not

14:02:47

able to paste it then but I past it

14:02:50

actually I I can see here in my

14:03:02

chat here we have already pinned one

14:03:05

comment just just look into the Pinn

14:03:07

comment so there you will find out a

14:03:09

dashboard and you can navigate the

14:03:10

entire dashboard and all entire website

14:03:12

from there itself so just check with the

14:03:14

pin

14:03:25

comment so deependra has given to me

14:03:28

this uh IP and this uh Port so let me

14:03:32

check it is working or not he's saying

14:03:34

sir I'm following you and this is my IP

14:03:38

and my port

14:03:42

actually no see it's a wrong I think

14:03:45

just check once thein I think uh there

14:03:49

is just like uh in IP V4 actually we

14:03:53

have a four segment now so just look

14:03:55

into your IP I think you pasted a wrong

14:03:57

one see this is the

14:04:00

correct

14:04:12

right great

14:04:14

so let's start uh with the next topic

14:04:17

and that's going to be a vector database

14:04:20

so we have completed a one phase of this

14:04:23

uh Community session now it's a second

14:04:25

phase of this community session where we

14:04:27

going to start from the vector databases

14:04:29

and then we'll try to do few more

14:04:32

advanced uh like we'll try to solve few

14:04:34

more advanced use cases so the first

14:04:37

thing is basically what is a vector

14:04:39

databases so how many of you know about

14:04:41

the vector guys tell me do do you have a

14:04:44

basic idea about the vector what is a

14:04:46

vector and uh have you learned in

14:04:49

machine learning in

14:05:12

statistic great so I think uh we can

14:05:15

start just allow me a

14:05:34

minute great so let's start with the

14:05:36

vector database few people are saying

14:05:38

they know about the vector databases and

14:05:40

the vector is nothing they have learned

14:05:42

in a mathematic they have learned in NLP

14:05:45

and all so uh let's try to understand

14:05:47

the fundamental of the vector and the

14:05:49

fundamental of the vector databases so

14:05:52

if we talk if we talking about this

14:05:54

Vector database so here you will find

14:05:56

out that so we have a data right so this

14:05:59

data actually we are going to convert

14:06:02

into a vectors so Vector is nothing just

14:06:04

a set of numbers right it's just a set

14:06:07

of number geometrically I will explain

14:06:09

about the vector in a lit term also I

14:06:11

will about I will explain about this

14:06:13

vector

14:06:14

now here you can see this Vector

14:06:15

actually we are going to store somewhere

14:06:17

and that is called a vector database

14:06:20

right so we have a data we are going to

14:06:22

convert that data into a vectors and

14:06:25

then uh basically this Vector we are

14:06:27

going to store somewhere now here you

14:06:29

can see one specific term the term is

14:06:32

called Vector database now apart from

14:06:34

that like we have other database also

14:06:36

like SQL base database right we have no

14:06:39

SQL databases so why we are not using

14:06:42

those databases for storing the

14:06:44

embedding for storing this data what is

14:06:47

a disadvantage if directly we are

14:06:49

storing this data into this SQL based

14:06:52

SQL based database or maybe in no SQL

14:06:55

database so what will be the

14:06:57

disadvantage why we are converting this

14:06:59

data into our vectors and then we are

14:07:02

storing inside the vector databases so

14:07:04

first of all we need to understand this

14:07:06

a particular this this problem statement

14:07:09

now uh for that what I can do let me

14:07:12

move into the slide itself and here I

14:07:15

have kept those uh thing now first of

14:07:18

all uh let me uh show you that what all

14:07:20

thing we are going to learn inside this

14:07:22

Vector database so if we talking about

14:07:24

the vector database so we're going to

14:07:25

talk about what is a vector database why

14:07:27

we need it what is the need of this

14:07:30

Vector database how this Vector database

14:07:32

is how will this Vector database work

14:07:34

use cases of the vector databases some

14:07:37

widely used Vector database that of like

14:07:39

different different databases we have

14:07:41

now so we'll try to understand the use

14:07:44

of those Vector database will understand

14:07:47

the Practical demo as well practical

14:07:49

demo using Python and Lang chain so uh

14:07:52

yes we are going to create an

14:07:53

application there we are going to use

14:07:55

different different Vector databases

14:07:57

like pine cone and web chroma DV there

14:08:00

are a couple of name and more than uh

14:08:03

like uh this one actually three so we

14:08:06

have other databases also one from the

14:08:08

open a side so we'll talk about each and

14:08:11

every database here so uh here guys you

14:08:13

can see uh what we are going to learn so

14:08:15

already I clarifi the agenda now see uh

14:08:18

what is a vector database so a vector

14:08:20

database is a data Bas used for storing

14:08:23

high dimension vectors such as word

14:08:25

iding or image aming right so either we

14:08:28

can store images or we can store in in

14:08:32

the form of we can store the images or

14:08:35

we can store the text right so directly

14:08:38

we are not storing over here we are

14:08:40

storing in the form of Ming so first of

14:08:43

all we'll try try to understand the

14:08:44

meaning of embedding over here right so

14:08:46

what is the meaning of the embedding

14:08:48

which I have written now what I can do I

14:08:51

can open my uh Blackboard and here I can

14:08:53

explain you the meaning of the embedding

14:08:56

which I was talking about so guys see

14:08:58

whenever we are talking about Vector so

14:09:01

let let me write it down the few thing

14:09:02

over here so let's say uh here I'm

14:09:05

writing one number right so here I'm

14:09:07

writing let's say uh two so what is this

14:09:09

two tell me so if I'm writing two over

14:09:12

here so this is what this is the scale

14:09:13

scal value right this is the scalar

14:09:15

value now uh here if I'm going to write

14:09:17

it down let's say uh something else

14:09:20

let's say 100 so this is what this is

14:09:21

also a scalar value right it's a single

14:09:24

value it's a scalar value now if you if

14:09:26

you want to like uh showcase this value

14:09:29

in a geometrical in a geometry right in

14:09:31

terms of geometry so what I will do I

14:09:33

will uh create the axis so here let's

14:09:34

say this is what this is my Axis and

14:09:36

here somewhere actually my value will be

14:09:38

available this data so here let's say

14:09:41

there is a two there is a 100 something

14:09:43

like that now uh here this is called the

14:09:46

single value actually it is called the

14:09:47

scalar value now if we are talking about

14:09:50

the vector so what is a ve Vector so

14:09:52

before explaining the vector actually

14:09:54

let me uh talk about so here I can give

14:09:57

you one uh example so what I can do here

14:10:00

just a second let me draw the AIS so

14:10:03

here I'm going to draw the first AIS

14:10:05

this is my first AIS and here is my

14:10:08

second now let me take this particular

14:10:11

Arrow just a second yeah so this is what

14:10:14

this is my first AIS this one and here

14:10:17

is what here is my second AIS right now

14:10:20

let's say uh here what I'm doing so I'm

14:10:23

uh anting this thing this AIS with the

14:10:27

uh direction right so this is my North

14:10:31

this one and here this is going to be my

14:10:36

South right this is my South Direction

14:10:39

now here is what here is my East and

14:10:42

this is what this is my West right so

14:10:44

this is my East and here is what here is

14:10:47

my West Direction right now let's say

14:10:50

one person is here right so this one

14:10:53

person basically one person is here

14:10:55

right now how you will see uh let me

14:10:58

show you one thing so let's say one

14:11:00

person is going in this particular

14:11:02

direction from here to here right so

14:11:04

let's say one person is going here here

14:11:06

here here here let's say there is some

14:11:07

sort of a magnitude right so let's say

14:11:09

the person is uh uh person is walking

14:11:12

around 5 km right so this person is

14:11:14

walking 5 km in which direction in East

14:11:18

direction right so person is walking 5

14:11:20

km in each dire in each Direction so

14:11:23

here we have a magnitude magnitude along

14:11:26

with that we have a direction right so

14:11:28

along with that we have a Direction so

14:11:30

what is the definition of the vector so

14:11:32

Vector in the vector actually we have a

14:11:34

scalar value and along with the scalar

14:11:36

value will be having a direction also

14:11:39

right so this is what this is my

14:11:40

magnitude and here is what here is my

14:11:42

direction the direction is e East now

14:11:44

let's say if I'm going in this

14:11:46

particular direction so from here from

14:11:48

my origin this is my origin right now

14:11:51

from here I'm going in this particular

14:11:52

direction let's say I'm going to travel

14:11:54

4 kilm right 4 km so here I can say that

14:11:58

I traveled 4 km 4 km in North direction

14:12:02

right so this is what this is my

14:12:04

magnitude and here is what here is my

14:12:06

direction right now let's say the person

14:12:08

is going over here the person is here

14:12:10

basically here here right so how you

14:12:13

will calculate it right so how you will

14:12:15

calculate the distance so simply I can

14:12:17

do it by using the Pythagoras Theorem so

14:12:19

what I will do if I want to calculate a

14:12:21

distance from my origin to this

14:12:23

particular point so what I will do I

14:12:25

will uh like uh I will do it by using

14:12:28

the Pythagoras thorum now here uh you

14:12:31

will find out see this is what this is

14:12:33

my 5 kilm and here is what here is my 4

14:12:36

km this is my 4 km now uh this is what

14:12:39

this is my 4 km this one this this

14:12:41

particular which I took from here and

14:12:42

here actually tell me guys what will be

14:12:44

the distance from here to here so here I

14:12:46

will simply use the Pythagoras Theorem

14:12:48

this is going to be a 5² + 4² is equal

14:12:52

to how much tell me 25 + 25 + 9 so sorry

14:12:57

25 + 16 so here actually we'll be having

14:13:00

a 16 now 25 + 16 how much U 35 and 41

14:13:06

iting right so underscore 41 now here

14:13:10

actually this is the magnitude of the

14:13:13

person means from here to here now if we

14:13:15

are talking about the direction right so

14:13:17

what will be the direction of this

14:13:19

person so here I can write it down like

14:13:21

this underscore underscore 41 and here I

14:13:25

can write it down this northeast right

14:13:28

Northeast Direction so this is what guys

14:13:30

tell me this is my Vector in 2D so this

14:13:33

is a vector in 1D this is a vector in 2D

14:13:36

right so this is a vector in 1D this one

14:13:39

this is also a vector in 1D and here you

14:13:41

can see this is what this is a vector in

14:13:43

2D now here you can see this is what

14:13:45

this is my magnitude magnitude of the

14:13:48

vector and here is what here is a

14:13:50

direction actually this is what this is

14:13:52

the direction now you can see the

14:13:53

direction any now let's try to

14:13:56

understand this thing with our X and Y

14:13:58

right so tell me guys this uh example is

14:14:00

clear to all of you because I'm coming

14:14:02

to the embedding and I I will explain

14:14:04

you the embedding but before that the

14:14:06

vector concept should be clear right if

14:14:09

uh and if you are not going to

14:14:10

understand the vector so definitely

14:14:11

won't be understand the concept the

14:14:14

embedding tell me guys this thing is

14:14:16

clear to all of you are you getting the

14:14:19

concept of the vector here which I drawn

14:14:22

which I uh

14:14:30

clarify tell me guys fast I'm waiting

14:14:32

for your reply if you can write on the

14:14:34

chat so that would be great and then I

14:14:37

will proceed

14:14:42

further

14:14:49

yes the vector definition is clear to

14:14:53

all of

14:15:03

you great now here see let's try to

14:15:06

understand the same concept by using the

14:15:08

XY AIS so here what I'm going to do I'm

14:15:11

going to draw the axis let's say this is

14:15:13

my x-axis right and here is what here is

14:15:16

my Y axis this one is what this one is

14:15:18

my Y axis right this one now see uh what

14:15:22

I can do just a second let me draw it

14:15:24

one more time this is my y AIS now uh

14:15:28

let me unoted this one so here is the X

14:15:32

and here is what here is a y so this is

14:15:36

my x one and this is my X y1 right so

14:15:39

this is a negative this is representing

14:15:40

a negative and this is also negative

14:15:41

coordinate now see guys here uh let's

14:15:46

say uh there is one point right at this

14:15:49

particular location this is what this is

14:15:51

my point right now will be having some

14:15:55

coordinate regarding this point tell me

14:15:57

x and y coordinate yes or no tell me yes

14:16:01

so this coordinate actually this X and Y

14:16:04

right in this 2D space right in this 2D

14:16:07

space actually this coordinate is

14:16:09

nothing this is a vector right this is

14:16:12

the vector so if I want to represent

14:16:15

right so if if I want see this is what

14:16:17

this is my point in 2D in two Dimension

14:16:19

space now from here to here there will

14:16:22

be having some magnitude right so it is

14:16:24

having some magnitude from here from

14:16:27

Orizon to to this particular point so

14:16:30

this magnitude plus this is what guys

14:16:33

tell me this is the direction the

14:16:34

direction which I shown you over here by

14:16:37

using this north east west and by using

14:16:40

this uh like north south east west right

14:16:43

so here now instead of that I'm taking

14:16:45

this X and Y just just look over here

14:16:47

this is what this is my point and from

14:16:49

origin to this particular Point actually

14:16:51

we have some magnitude right so there is

14:16:54

a distance and here is what guys tell me

14:16:57

this is a this is what this is the

14:16:58

direction this is a Direction X and Y so

14:17:01

let's say let's say what I can do over

14:17:03

here so this x and y coordinate I'm

14:17:04

assuming that this x is around I think

14:17:07

five and this Y is around let's say four

14:17:11

so here I can write it down I can

14:17:12

represent I can represent this

14:17:15

particular Point like this I can write

14:17:16

it down over here five and four and this

14:17:19

is nothing this is my Vector so in

14:17:22

mathematics what is a vector so in

14:17:23

mathematics magnitude magnitude along

14:17:27

with the direction right along with the

14:17:29

direction now how we represent this a

14:17:32

particular Vector technically so simply

14:17:35

if I'm writing like this uh like if I'm

14:17:37

writing like this X and Y right and

14:17:40

whatever value we have of the X and and

14:17:42

Y so this is what this is nothing this

14:17:44

is my vector and it's a 2d

14:17:46

representation of the vector now let's

14:17:49

say in my Vector I have I'm having X Y

14:17:52

and Z let's say I'm having this three

14:17:54

thing x y z so this's a vector in 3D

14:17:58

space right this is the vector in 3D

14:18:00

space now instead of this one let's say

14:18:01

if I'm writing uh X1 here I'm writing X2

14:18:05

here I'm writing X3 and up to xn so here

14:18:08

I'm saying it's a vector in N Dimension

14:18:12

space what is this guys tell me it's a

14:18:14

vector in and dimension space now the

14:18:17

term Vector is clear to all of you what

14:18:19

is a scalar what is a vector and how to

14:18:22

represent this Vector it's a

14:18:23

representation of the vector right and I

14:18:26

started from here from this a particular

14:18:28

direction and I clarify clarify this

14:18:31

thing over here right so how to

14:18:33

represent the N Dimension Vector so this

14:18:35

is this X and Y is nothing it's a 2d

14:18:37

representation of the vector this XY Z

14:18:39

is nothing it's a 3D representation of

14:18:41

the vector and this this is nothing this

14:18:43

is the and dimensional representation of

14:18:46

the vector clear I think this part is

14:18:49

clear to all of you now I'm coming to

14:18:51

the next one here actually we are

14:18:54

talking about the iding now what is this

14:18:56

embedding so let's talk about this

14:18:59

embedding let me write it down here the

14:19:02

name is embedding okay now see guys

14:19:06

whenever we are talking about a model

14:19:09

right so here actually as a

14:19:10

model I'm using the llm model which

14:19:14

model U I'm using the large language

14:19:17

model llm means what large language

14:19:19

model there are several large language

14:19:21

model from open a from hugging face from

14:19:23

Google meta and all right you'll find

14:19:26

out that now here actually I need to

14:19:28

provide a data to this a particular

14:19:31

model right let's say there is what

14:19:33

there is my data which I'm going to

14:19:35

provide to my

14:19:37

model right now actually see this model

14:19:40

is nothing it just done

14:19:43

mathematical equations right

14:19:45

mathematical

14:19:47

equations so we are talking about the

14:19:49

llm model so this llm model this large

14:19:52

language model actually they are using a

14:19:55

Transformer architecture they are using

14:19:57

Transformer architecture as a base

14:20:00

architecture which architecture

14:20:01

Transformer architecture as a base

14:20:03

architecture so here in the Transformer

14:20:05

architecture we have two things one is

14:20:07

encoder and the second one is called

14:20:10

decoder right now just think about this

14:20:12

encoder and decoder here actually what

14:20:14

we are doing tell me here actually see

14:20:17

we have a attention mechanism we have a

14:20:20

neural network right we have a

14:20:23

normalization so these all are nothing

14:20:26

this is just a mathematical equations

14:20:28

right ma mathematical operations we are

14:20:31

going to perform now here the data let's

14:20:33

say we are passing a text

14:20:34

data right if are passing this text data

14:20:37

to my model so my equation actually they

14:20:40

won't adapt this text Data directly ly

14:20:43

they won't adapt actually this text Data

14:20:45

directly right they won't be adapting it

14:20:48

actually this text data now uh in

14:20:50

between actually what I I will do so in

14:20:53

between I will encode it what I will do

14:20:56

guys tell me I will encode this data

14:20:58

right so what I will do I will encode

14:21:01

this particular data now what is the

14:21:03

meaning of encode so here in between

14:21:05

actually I will perform the encoding now

14:21:08

we have a various ways of encoding the

14:21:10

data encoding is nothing it's just a

14:21:13

numerical representation right it's just

14:21:15

a numerical representation of the data

14:21:18

right numerical representation of the

14:21:21

data now we have two ways for encoding

14:21:23

the data one is without so here uh the

14:21:28

one is without without DL right which is

14:21:33

simple frequency based method and the

14:21:36

second is one with DL right with deep

14:21:41

learning so we talking about without

14:21:43

deep learning so there are couple of

14:21:45

methods for encoding the data right so

14:21:48

the first method which I can write it

14:21:50

down over here that is I think you

14:21:52

already knows know about this particular

14:21:54

method the first method is a document

14:21:57

Matrix document Matrix right so uh we

14:22:01

create a document Matrix the second one

14:22:04

the second method that is one that is

14:22:06

called T tfidf method right so by using

14:22:08

this TF IDF method also you can do the

14:22:11

encoding so document Matrix is there

14:22:13

this is also called like uh bag of words

14:22:16

right bag of words now here you will

14:22:19

find out the the third one let's say n g

14:22:22

is

14:22:24

there and the fourth one let me write it

14:22:27

down here tfid is there andram is there

14:22:30

document Matrix is there here you will

14:22:33

find out one hot en coding right so this

14:22:36

is also a technique now one more

14:22:39

technique is the integer

14:22:41

encoding integer and coding so this is

14:22:45

actually uh like uh this is a without

14:22:49

deep learning I converting a data into a

14:22:52

so without deep learning I'm going to

14:22:54

converting a data into a numeric uh I I

14:22:56

creating a data into a u uh like I'm

14:23:00

showing the data in a numeric U I'm

14:23:01

doing a numeric I'm showing a numeric

14:23:03

representation actually right so here we

14:23:05

have a document Matrix DF IDF engram one

14:23:08

encoding and integer encoding now there

14:23:10

are several there are some disadvantage

14:23:13

of this particular technique then I will

14:23:15

come to this with DL okay let me write

14:23:17

down the name also like with DL

14:23:18

technique so here you will find out word

14:23:20

to back right word to back is there

14:23:23

which is very famous technique the

14:23:25

second technique uh which has been prop

14:23:27

proposed by the Facebook site that is a

14:23:30

fast text now the third one you will

14:23:33

find out that a Elmo right Elmo now here

14:23:38

uh the fourth

14:23:39

one what to back is there fast Tex is

14:23:42

there Elmo is there even BT is there by

14:23:45

using the B and and coding we can do

14:23:48

that right so DL based technique now

14:23:50

there is one more technique that is

14:23:52

called this one glove Vector so actually

14:23:55

glove is not DL based it's a metric

14:23:59

Matrix factorization based right so

14:24:02

Matrix factorization it's a matrix

14:24:05

factorization uh

14:24:07

method right so this glove Vector now we

14:24:10

have so many technique for encoding data

14:24:12

right now here if we are talking about

14:24:15

this uh this particular technique where

14:24:18

we are just like talking about the

14:24:20

frequency of the data so there are

14:24:22

several disadvantage of this right so

14:24:24

definitely we are going to convert our

14:24:26

data right from uh text to numeric uh

14:24:30

text to numeric value right we are doing

14:24:33

it by using this particular method but

14:24:35

here are several disadvantage the first

14:24:37

disadvantage actually which I can write

14:24:38

it down over here that is what that is a

14:24:41

uh like by using this technique right so

14:24:45

at we we are by using this particular

14:24:47

Technique we are ending up with the

14:24:49

sparse Matrix right so we are ending up

14:24:52

with the sparse Matrix what is the

14:24:54

meaning of the sparse Matrix so in the

14:24:56

sparse Matrix you will find out there

14:24:58

are more number of zero there is less

14:25:01

information right so that is called a

14:25:03

sparse Matrix now the second is what

14:25:05

this is here actually you won't be

14:25:07

preserve your context right so here

14:25:10

actually you won't be able to preserve

14:25:12

context now you this this embedding this

14:25:15

this number this a numeric

14:25:16

representation basically which you are

14:25:18

getting of your data this is meaningless

14:25:21

right this is meaningless so here this

14:25:23

is going to be a meaningless and you

14:25:25

won't be able to preserve any sort of a

14:25:27

context right so if you are going to

14:25:30

convert your data right if you are going

14:25:32

to convert your uh data into a numeric

14:25:36

value by using this particular technique

14:25:39

I'm not going to I'm not going into

14:25:41

depth actually I I can show you the uh

14:25:43

how to calculate and all but as of now

14:25:45

I'm just giving you the overview

14:25:47

advantage and disadvantage so by using

14:25:49

this technique there is these U there is

14:25:51

a different different like disadvantage

14:25:53

of it there is two major disadvantage

14:25:54

which I have highlighted one is sparse

14:25:56

metrix and the second one is context

14:25:59

contextless right so meaningless there

14:26:01

is no there won't be any such meaning

14:26:03

actually whatever vector and the numeric

14:26:07

value which you are going to generate

14:26:08

right now over here see if we are

14:26:11

talking about our data let's say we are

14:26:13

talking about the text here is a what

14:26:16

here is a text so text is nothing

14:26:18

actually here it's a collection of

14:26:20

sentence right sentences now it's a

14:26:23

collection of the phrases don't worry I

14:26:25

will show you each and everything

14:26:26

practically by using the python and here

14:26:29

in the sentence phrases actually you

14:26:31

this is the collection of words or

14:26:33

tokens this is called word or it is

14:26:35

called a tokens right fine now whenever

14:26:38

we create whenever we perform this uh

14:26:41

particular when whenever we use this

14:26:42

particular technique so how we do that

14:26:45

so let's say we have a data right we

14:26:47

have a text so from that particular text

14:26:49

what we do we generate a vocabulary

14:26:51

right so we create our vocabulary and

14:26:54

here let's say first what we what we do

14:26:56

we create the vocabulary uh I hope the

14:26:59

spelling is correct so we create our

14:27:01

vocabulary and by using this vocabulary

14:27:04

we perform the end coding right we

14:27:07

perform the end coding so here we have a

14:27:10

sentence we have a text we have a data

14:27:12

now by using this data data after

14:27:14

cleaning and all so we perform the

14:27:16

cleaning so here we perform the cleaning

14:27:19

and whatever data and all which I get

14:27:21

and uh we collect the data we we we call

14:27:25

it as a we call it vocabulary actually

14:27:28

and by using this vocabulary we create

14:27:30

the end coding right we create the end

14:27:32

coding now over here see uh okay this is

14:27:36

fine but here I shown you that we have a

14:27:38

several disadvantage now um like there

14:27:42

was several disadvantage of this

14:27:43

particular technique and the major

14:27:45

disadvantage was uh contextless okay

14:27:48

contextless or meaningless because of

14:27:51

that actually we were not able to retain

14:27:52

the information so here a few more

14:27:56

technique came into the picture this

14:27:58

word two back actually it's a very

14:27:59

famous technique this one okay is the

14:28:02

old one also it's a famous one also now

14:28:05

here the um the concept came into the

14:28:07

picture the concept name was iding right

14:28:10

so here see we were having the

14:28:12

disadvantage inside this particular

14:28:14

technique now the concept came into the

14:28:16

P picture the concept was the iding

14:28:19

concept so here what was the embedding

14:28:22

concept so embedding also it's a numeric

14:28:25

representation of the data so let's say

14:28:27

we have a data now this data actually if

14:28:30

I'm going to represent numerically so

14:28:32

that is nothing that my embedding right

14:28:34

so this embeding is nothing actually

14:28:36

this was the vector right this is what

14:28:39

this is a vector and what is a vector

14:28:41

vector is nothing thing it's a a set of

14:28:43

numbers right so we talking about the

14:28:45

vector it is a set of number and how to

14:28:47

showcase the vector how to represent the

14:28:49

vector I already told you we represent

14:28:51

the vector in this uh square bracket

14:28:53

right technically if I have to represent

14:28:55

the vector I represent like this and

14:28:57

mathematically if I calculate it so yes

14:28:59

so we talk about the direction plus

14:29:02

magnitude so here m means what magnitude

14:29:04

plus Direction so that is what that is a

14:29:06

vector so we have a embedding so this

14:29:09

embedding concept came into the picture

14:29:11

now here also we are representing a data

14:29:13

in terms of numeric value but the way

14:29:16

was little different right so here

14:29:19

actually we were able to achieve two

14:29:21

things first one actually we are able to

14:29:23

achieve the dense Vector right we are

14:29:26

creating a dense vector and the second

14:29:28

thing was the second thing was we were

14:29:31

able to uh like sustain the meaning also

14:29:34

so context full right context so

14:29:39

context te X context full meaning right

14:29:44

context full or meaningful meaningful

14:29:48

right so we are able to achieve this two

14:29:51

thing by using this embedding now let's

14:29:53

try to understand this embedding by

14:29:55

using this word to back so here again

14:29:58

I'm not giving you too much detail

14:30:00

regarding this embedding and all U

14:30:01

regarding this word embedding es uh esip

14:30:04

gr right or CBO method scheme gra method

14:30:08

right so there are different different

14:30:09

method we have inside the word itself

14:30:11

but here uh let me give you the high

14:30:13

level overview that how it was working

14:30:16

why I'm doing that because the next

14:30:18

concept is directly related to the

14:30:20

embedding only if you're not able to get

14:30:22

it uh if uh this Basics uh if the basics

14:30:26

won't be clear here that definitely you

14:30:28

will face a several issues so that's why

14:30:30

first I'm clarifying this a basic thing

14:30:33

so tell me guys are you getting it right

14:30:35

so whatever I'm trying to explain over

14:30:37

here regarding the vector embedding data

14:30:40

different different technique of the

14:30:41

embedding so are you getting my point

14:30:44

yes or no tell

14:30:47

me are you able to understand the

14:30:51

concept if you are getting it if you are

14:30:53

able to understand that please hit the

14:30:55

like button please let me know in the

14:31:10

chat

14:31:30

yes tell me so I think people are

14:31:33

writing now yes

14:31:40

great okay

14:31:42

fine so we are having the concept of the

14:31:45

word to back now let's try to understand

14:31:47

this embedding right now here uh what I

14:31:50

can do I can give you one one example so

14:31:53

let's say here is my sentence right so

14:31:55

here I can give you one example actually

14:31:58

so by using that you will be able to

14:32:00

understand the meaning of the spark and

14:32:02

the dense vector and you will be able to

14:32:04

understand why we are not able to

14:32:05

sustain the uh context also right so the

14:32:09

example is very very simple let's say

14:32:11

here I'm writing my my name is sunny

14:32:16

right so here I'm writing my name is

14:32:18

sunny now the next one is what let's say

14:32:20

here I'm writing sunny sunny is a data

14:32:25

scientist and here I'm writing Sunny is

14:32:29

working Sunny is working for I neuron

14:32:33

right so Sunny is working for I neuron

14:32:36

so first thing what I will do so the

14:32:39

first thing basically I will generate my

14:32:41

Bo vocabulary right vocabulary so for

14:32:44

generating a vocabulary uh so here I

14:32:46

will find out the unique words so there

14:32:48

is my first word second word third word

14:32:51

fourth word fifth word sixth word right

14:32:55

now here A S 8 n so here what I will do

14:32:58

I will create my vocabulary so in my

14:33:01

vocabulary I'll be having nine words so

14:33:04

one is my one is name you can remove the

14:33:06

unnecessary words and all by uh using

14:33:09

the text cleaning techniques so here my

14:33:12

name is sunny so this is my fourth word

14:33:15

now here is a data science right now

14:33:20

here word word and for and here we have

14:33:24

a i neuron right here we have a i neuron

14:33:27

so these are my vocabulary 1 2 3 4 5 6 7

14:33:33

8 9 right now let's say I want to create

14:33:36

a one hot and coded Vector one hot and

14:33:40

coded vector for this a particular

14:33:43

sentence for which sentence guys tell me

14:33:45

so I want to create it for this a

14:33:47

particular sentence for the first

14:33:48

sentence now if I want to represent the

14:33:51

my inside this sentence what I will do

14:33:54

here so here for my I will write it down

14:33:56

the one and for rest of the value I will

14:33:59

write down the 0o so 0 0 0 5 6 7 8 9 so

14:34:06

this is the representation of my first

14:34:08

word then I will write down the second

14:34:10

word so here is name so here for the

14:34:12

name actually there is 0 1 0 0 0 right 0

14:34:18

6 7 8 9 so this is my second word like

14:34:23

like this there will be my third word so

14:34:25

here let's say this is my third word so

14:34:27

the third word 0 0 1 0 0 0 0 5 uh 4 5 6

14:34:35

7 8 9 and here is what here is my fourth

14:34:38

word so fourth word is sunny so 0 0

14:34:42

uh 0 1 0 0 so 1 2 3 4 5 6 7 8 9 so this

14:34:49

is a this is my one sentence actually

14:34:51

this is my first sentence which I

14:34:53

uncoded which I uncoded so let me write

14:34:56

it down over here this is what guys tell

14:34:57

be this first sentence which I encoded

14:35:00

by using the what hot encoder now see

14:35:03

guys how much sparse this is so how much

14:35:06

sparse this is right and here there is

14:35:08

lots of zero and this might a

14:35:11

contextless in a longterm sentence right

14:35:15

it might be a meaningless so here is a

14:35:17

example of the one H and gon and

14:35:20

whatever techniques you will find out

14:35:22

yes a tfidf is a better one even Google

14:35:25

was using this technique for a long time

14:35:27

now it uh replace this tfidf technique

14:35:31

by this embedding one only because this

14:35:33

tfidf it's it's a research of the Google

14:35:35

right document Matrix it also work in a

14:35:38

similar way like this one hot encoding

14:35:41

somehow right so somehow it works with a

14:35:45

one hot n coding right this uh document

14:35:48

Matrix now we have TF IDF TF IDF is a

14:35:51

better one NR is also there I will talk

14:35:54

about the NR and here is a integer n

14:35:56

coding so we U like code this value with

14:36:00

the integer number right now here is the

14:36:02

example of the one hot and coding now I

14:36:05

will explain you the concept of the

14:36:07

embedding by using this word to back

14:36:10

that how this word to back is working so

14:36:13

tell me guys is it clear to all of you

14:36:16

so far yes or

14:36:19

no think it is fine so just a

14:36:40

second

14:36:47

great so I hope uh this still here

14:36:50

everything is fine everything is clear

14:36:52

and uh just a

14:36:57

second yeah it is uh clear now yeah

14:37:02

great so let's talk about this word to

14:37:05

I'm not going into the detail of word to

14:37:06

back I'm just trying to explain the

14:37:08

concept of the embedding only here right

14:37:11

so how it was working so here guys if we

14:37:13

are talking about the word to bag see

14:37:16

let me do one thing over here what I can

14:37:18

do I can uh Show You by using the

14:37:21

example one

14:37:24

example right so see let's say we have

14:37:28

some data right so let's say we have

14:37:30

some data and from that particular data

14:37:33

what I did I created my vocabulary this

14:37:36

data is nothing it's a text data right

14:37:38

it's a text data and from this

14:37:40

particular particular data I'm going to

14:37:42

create my vocabulary right so let's say

14:37:45

this is what this is my data and here uh

14:37:49

this is what this is my data data in the

14:37:51

data basically you'll find out the

14:37:53

vocabulary so we are going to generate

14:37:54

our vocabulary so here will be my some

14:37:56

words and all now see if we are talking

14:37:59

about the embedding now inside the

14:38:01

embedding what we are going to do so we

14:38:04

are going to create some features right

14:38:07

so the first thing actually the first

14:38:09

thing is what the first thing we are

14:38:11

going to create the vocab and second

14:38:13

thing is what we are going to create a

14:38:16

features right features from this VAB

14:38:19

okay we are going to create a feature

14:38:21

from this book app now let me give you

14:38:24

one example that how the feature and the

14:38:26

book app looks like so there is one

14:38:29

famous example very famous example let

14:38:31

me write it down over here so let's say

14:38:33

there is my book app which I'm going to

14:38:35

write it down over here uh in the book

14:38:37

app let's say we have some data and from

14:38:39

there I I have extracted this book right

14:38:41

vocabulary so in the vocab actually we

14:38:43

have some value let's say there is a

14:38:45

king right let's say there is a queen

14:38:47

this is very famous example that example

14:38:50

only I'm going to write it down over

14:38:51

here that uh we have a king queen we

14:38:55

have a man right we have a woman and we

14:38:59

have one more word let's say we have a

14:39:00

monkey over here right so this is a like

14:39:04

wab actually which I have extracted from

14:39:06

where from my data itself right you can

14:39:08

assume that we have a data this is what

14:39:10

this is my vocab

14:39:11

now here actually you will find out some

14:39:13

feature right so my feature is what let

14:39:16

me write down the feature also so the

14:39:18

first feature actually uh that is what

14:39:20

that is a gender right so here the first

14:39:23

feature is what the first feature is a

14:39:25

gender the second feature which I'm

14:39:28

going to write it down over here that is

14:39:29

what that is a weth right the third

14:39:32

feature which I'm going to write it down

14:39:34

here that is going to be a power right

14:39:36

the fourth feature is going to be a

14:39:38

weight right weight and the third fifth

14:39:41

feature is going to be a speak now see

14:39:44

this vocab right and this feature right

14:39:48

so everything is being done by the

14:39:51

neural network itself neural network

14:39:54

will automatically take care of it right

14:39:56

so actually we have to pass this uh bab

14:40:00

and it will automatically look into the

14:40:03

features right this particular feature

14:40:05

actually the feature which I have

14:40:07

written so here what I will do I will

14:40:09

create my data in such a way there we'll

14:40:12

be having a vocabulary and we'll be

14:40:14

having a neural network we'll be passing

14:40:17

that to my vocabulary and my feature

14:40:19

will be create and in between basically

14:40:21

whatever Vector I'm going to generate

14:40:24

that Vector itself is going to be my

14:40:25

embedding right so here how the vector

14:40:28

looks like so this is the high level

14:40:30

representation of that mathematical so

14:40:33

whatever complex mathematics is there

14:40:35

now it's a high level representation of

14:40:37

that that's it now here let's say we

14:40:40

have a king we have a queen we have a

14:40:42

man woman and monkey this is my

14:40:44

vocabulary and this is my uh feature now

14:40:47

here see guys we are going to assign a

14:40:50

weight right to this particular vocab

14:40:53

right we are going to assign a weight

14:40:55

the weight value will be from 0 to 1

14:40:58

right so here I'm saying King King is

14:41:00

having a Zender right so here I'm saying

14:41:03

yes it is having a Zender means one now

14:41:05

Queen is also having a Zender right so

14:41:08

here actually uh what I'm say say king

14:41:11

is having a Zender now Queen is also

14:41:13

having a Zender right uh here I can

14:41:16

write it down the one now here I can

14:41:18

write male also so you can say uh let's

14:41:22

say the gender is going to be male

14:41:23

female so you can specify you can

14:41:26

specify let's say if the gender is going

14:41:28

to be male over here this one now in

14:41:30

that case what you will say so for King

14:41:32

actually you will write it down one

14:41:34

right so here let's say the gender is

14:41:36

specified that is male so what you will

14:41:38

do for the king you will write it on the

14:41:40

one and and for the queen you will write

14:41:41

down the zero right here the men yes it

14:41:44

is one woman actually it's a zero and

14:41:47

monkey let's say it's a one right I'm

14:41:48

talking about the monkey it's a male one

14:41:50

now if we are talking about the wealth

14:41:52

right so again I will provide some sort

14:41:54

of a number over here see to the

14:41:56

vocabulary I will assign some number

14:41:59

based on my feature okay so wealth yes

14:42:02

King is having wealth so here what I

14:42:03

will do I will assign one now Queen is

14:42:05

also having wealth so I will assign one

14:42:07

over here now if we are talking about

14:42:09

the men so Men actually it's not a king

14:42:14

right so men is not a king so they it

14:42:16

might have a wealth or it might not have

14:42:18

a wealth right so here I'm not going to

14:42:20

assign a one so between this 0 to one I

14:42:24

can assign any value this is going to

14:42:25

work as a weight right so here I can

14:42:27

assign 0.5 over here this woman also

14:42:31

same right so it is having a less wealth

14:42:32

compared to men let's say 0.4 and monkey

14:42:35

is not having any sort of a wealth so

14:42:37

here I'm going to write down the zero

14:42:39

now if we talking talking about the

14:42:41

power so definitely King is having a

14:42:42

power Queen is also having a power but

14:42:45

maybe less than to this King so here let

14:42:47

me write down let's say 0.8 now here

14:42:50

let's say this man is having a power

14:42:52

let's say it's having very less power

14:42:53

0.2 this woman is having a power let's

14:42:56

say 0.2 and monkey is not having any

14:42:59

power now if we are talking about the

14:43:01

weight definitely King is having a

14:43:03

weight 0.8 now let's say woman this

14:43:06

queen actually it's a more than this

14:43:08

King in terms of weight so here I write

14:43:10

down the 0.9 men also is having a weight

14:43:13

right say uh is having 0.7 and this is

14:43:16

0.8 and monkeys also some weight let's

14:43:19

say

14:43:20

0.5 right so to this vocab based on this

14:43:24

feature I'm going to assign some sort of

14:43:26

a numbers right and here let's say speak

14:43:29

so yes King can speak Queen can speak

14:43:31

man also can speak now here woman can

14:43:34

also speak but monkey cannot speak so

14:43:36

here is a zero so now you will see that

14:43:39

this is my first Vector see this is the

14:43:42

vector of the King right this is the

14:43:44

vector of the king so here I'm

14:43:46

representing the King by using this

14:43:48

particular Vector now if we are talking

14:43:50

about the woman so here is a vector of

14:43:53

the woman guys this one sorry this is a

14:43:55

vector of the queen this this particular

14:43:57

Vector now if we are talking about the

14:43:59

vector for the main this is the vector

14:44:01

of the main I'm going to represent main

14:44:03

by using this particular Vector now just

14:44:06

look into this example where I was

14:44:09

representing Sun by using this Vector

14:44:12

now compare this vector and this type of

14:44:15

vector see this Vector is actually this

14:44:18

Vector is dense Vector right this Vector

14:44:22

actually it's a dense vector and it is

14:44:24

having more meaning right it is having

14:44:27

more meaning it's not a meaningless it's

14:44:29

having a meaning which I have uh which I

14:44:32

can uh basically uh it is having a

14:44:36

meaning which I can prove it also now

14:44:38

this Vector whatever Vector I have

14:44:39

designed over here it's a 5D Vector it's

14:44:41

a five dimension Vector right now guys

14:44:44

see I told you uh about the two

14:44:47

Dimension Vector now let's say here uh

14:44:50

if I'm going to draw the two Dimension

14:44:52

Vector so this is my two Dimension

14:44:54

Vector this one and how to represent

14:44:56

this vector by using this x value and Y

14:44:59

value now if I'm writing about the king

14:45:02

let's say this is what this is my king

14:45:04

right so here how to represent the king

14:45:07

Now 1 1 1 0.8 and 1 so here is what here

14:45:11

is my king Vector now tell me guys this

14:45:14

King Vector actually it is in five

14:45:17

Dimensions so we cannot draw it like

14:45:20

this we cannot draw it like this so see

14:45:23

the word to W model the word to W model

14:45:26

which Google has strained it was a model

14:45:28

from the Google right so this Google has

14:45:30

Stained this particular model on a news

14:45:33

article on a Google news article and

14:45:36

actually uh the vector they have created

14:45:39

the vector Vector which they have

14:45:41

created over there the vector size was

14:45:43

the 300 Dimension right so the vector

14:45:47

size was the 300 Dimension so here I

14:45:49

have just given you the Glimpse right

14:45:51

with a few vocabulary and the feature

14:45:54

now here uh if you will look into the

14:45:56

real word to model which you can

14:45:58

download from thei or maybe from any NLP

14:46:01

Library like nltk and all so the

14:46:04

dimension you will find out of each

14:46:05

Vector which is going to be a 300 right

14:46:08

which is going to be a 300

14:46:10

so this is called embedding now here

14:46:13

here guys see whenever we are talking

14:46:16

about whenever we are talking about

14:46:17

neural network so in a neural network

14:46:19

what we are going to do so in that

14:46:21

actually we have three layer one is a

14:46:24

input layer the second is called a

14:46:27

hidden layer the third is called a

14:46:28

output layer so here actually what is

14:46:30

happening see we are passing a input we

14:46:33

are passing input now what we are

14:46:35

passing over here what we are passing to

14:46:38

this uh what we are passing to this

14:46:40

neural network so here actually we are

14:46:42

passing this a particular feature right

14:46:45

this a particular feature so we are

14:46:47

passing this particular feature and we

14:46:48

are assigning some weight and at the end

14:46:51

actually at the end at this particular

14:46:53

layer in the output layer whatever

14:46:55

Vector I will get right whatever Vector

14:46:57

I will get in the output layer so that

14:46:59

itself is called is going to be my

14:47:01

embedding right here I have given you

14:47:03

the high level overview how the bend how

14:47:05

the embedding is going to be generated

14:47:07

but the same process is going to be Auto

14:47:10

by using this neural network and here

14:47:13

what feature we are passing which

14:47:15

feature we are passing so what I will do

14:47:17

I will create one recording right for

14:47:19

the word to back along with the python

14:47:21

implementation there I will show you uh

14:47:24

like how this word to back is working in

14:47:27

actually actually right so here U yeah

14:47:30

this is all about the embedding so

14:47:32

embedding is nothing it just a vector

14:47:35

and what is a vector you already knows

14:47:37

about the vector so here you can see I

14:47:39

clearly given you the explanation about

14:47:40

the vector so what is a 1D Vector what

14:47:43

is a 2d vector and if here let's say we

14:47:45

are going to write down the five value

14:47:47

right so that is a vector in a five

14:47:49

dimension so we cannot draw the five

14:47:51

dimension that's why I'm not able to

14:47:53

show you that a 5D Vector but yeah if we

14:47:56

are going to represent it let's say uh

14:47:58

here what I'm going to do so let's say

14:48:01

if I want to represent this five as of

14:48:03

now just going to draw it in 2D itself

14:48:06

so let's say this is my king Vector this

14:48:08

is my king Vector now this King Vector

14:48:10

will be near to this queen vector and

14:48:12

this monkey Vector actually it will be

14:48:14

far from this king and queen now this

14:48:17

king and queen so this man and woman

14:48:19

right so this is what this is my king

14:48:21

and this is my queen now here let's say

14:48:23

this will be my a main vector and this

14:48:25

is what this is my woman Vector so this

14:48:27

will be near to each other this king and

14:48:30

queen Vector will be near to each other

14:48:32

and here this monkey Vector will be far

14:48:34

from each other and here let's see if

14:48:37

I'm going to uh what I'm going to do

14:48:39

guys so here let's say I'm going to uh

14:48:41

substract this king from this queen and

14:48:45

we are going to add something let's say

14:48:48

men right so just just look uh just see

14:48:51

what you will be getting after doing uh

14:48:53

this much of like calculation over here

14:48:56

right so you can subtract the vector

14:48:58

from each other you can add it and you

14:49:00

can make a new meaning over there right

14:49:02

so the new meaning also will be a vector

14:49:04

which will be representing some sort of

14:49:06

a information right so here is all about

14:49:09

the word embed and all so I just given

14:49:11

you the introduction because I want to

14:49:13

make a foundation as strong as much and

14:49:16

here uh you can see why we need Vector

14:49:19

database here uh there are different

14:49:21

different uh database name here is a

14:49:23

example basically which I'm showing so

14:49:26

in tomorrow's session I will continue

14:49:28

with this particular slide and then

14:49:30

directly I will move to the Practical

14:49:32

implementation where we are going to

14:49:34

talk about a two database so initially I

14:49:37

will start from this chroma and this

14:49:40

vient right oh sorry this spine cone so

14:49:42

first I will try to discuss this coma

14:49:44

and the spine cone and if time will

14:49:46

permit then I will come to this F also

14:49:48

this F is a uh this F actually it's a

14:49:52

vector database of the meta AI Facebook

14:49:54

AI so yes definitely two database we're

14:49:57

going to discuss in the class itself

14:49:59

chroma and pine cone and there what we

14:50:01

are going to do we are going to store

14:50:03

iming and you got to know about the Ming

14:50:05

guys Ming is nothing it's just a vector

14:50:08

it's just a number which is having some

14:50:10

semantic meaning and how we are going to

14:50:13

do that we are going to create a feature

14:50:15

which we are passing to our neural

14:50:17

network and some uh like mechanism is

14:50:20

there and based on that we are going to

14:50:23

uh generate the vector so tell me guys

14:50:26

did you like the session whatever I

14:50:28

explain you over here did you understand

14:50:30

each and everything how much you would

14:50:32

like to rate the session if you liking

14:50:33

the session if you're liking the content

14:50:35

which I'm showing you in depth so please

14:50:37

hit the like button please support

14:50:39

support the channel so it motivates to

14:50:42

me also and please write your answer in

14:50:44

the chat if you're liking the session if

14:50:46

you're liking the content and even the

14:50:48

explanation

14:50:54

also tell me I'm waiting for your reply

14:50:57

so please uh tell me guys uh write it

14:51:00

down in the

14:51:03

chat yes did you learn something new did

14:51:06

you understand uh whatever I have

14:51:08

explained you that deployment all and

14:51:10

the what Vector databases and uh here uh

14:51:13

you will find out the session after the

14:51:17

uh like see here is a session guys on

14:51:19

top of the dashboard so just enroll to

14:51:22

the dashboard here is my dashboard this

14:51:24

one just enroll to the dashboard and uh

14:51:27

you'll find out the session over here

14:51:28

itself and even along with the resources

14:51:31

this handwritten resources and all

14:51:33

everything will be over here and uh yeah

14:51:36

and subscribe the on YouTube channel we

14:51:38

are uh all the thing is getting updated

14:51:42

and here uh the recording also will be

14:51:55

here great so fine I think now we can

14:51:58

conclude it so today we have talked

14:52:00

about the deployment and the vector

14:52:04

database okay just go through the

14:52:06

dashboard and download it then to check

14:52:09

with the so this assignment and all so

14:52:11

just click on the assignment and uh try

14:52:13

to solve this assignment and then you

14:52:15

can submit it also after solving it so

14:52:18

let me show you how the assignment and

14:52:19

all it look

14:52:25

like this

14:52:30

one yeah so here is assignment guys see

14:52:33

you can okay so you here on itself you

14:52:35

can write down the answer uh whatever

14:52:38

questions of we have given you and then

14:52:40

you can submit it directly okay great so

14:52:43

I think we can start with the session

14:52:46

and in today's session we'll be talking

14:52:48

about the vector database so we'll

14:52:50

Implement also we'll discuss about the

14:52:52

pine cone database Vector database I

14:52:55

will show you how to do setup how to do

14:52:57

setup of the pine cone database and uh I

14:53:00

will try to create a small bot also and

14:53:04

in the next class I will show you how

14:53:06

you can Implement end to endend

14:53:07

chatboard got it so we'll discuss two

14:53:11

Vector database in today's session I

14:53:13

will be talking about the pine cone and

14:53:15

in the next class we will be talking

14:53:17

about the chroma DV so so there is two

14:53:21

database which I'm going to talk about

14:53:23

and we'll try to discuss the concept of

14:53:25

the embeding and all and I will show you

14:53:27

how you can uh generate the API key

14:53:29

regarding the pine cone how to create an

14:53:31

index how to create a cluster each and

14:53:34

everything we'll talk about in today's

14:53:35

session so so far I discussed so many

14:53:39

thing in this community Series so first

14:53:41

of all let me show you all those thing

14:53:44

so for that guys what you need to do you

14:53:46

need to go through with the Inon website

14:53:49

and here you need to uh go inside this

14:53:52

course section just click on this course

14:53:54

section and here you will find out this

14:53:56

community program so just click on this

14:53:59

community program there are various uh

14:54:01

option you will find out like DSA

14:54:03

generative AI machine learning and SQL

14:54:07

so just click on this generative Ai and

14:54:09

here here we have a dashboard for the

14:54:11

generative AI now there you will find

14:54:14

out two dashboard one is for Hindi and

14:54:16

the second is for English uh so just

14:54:19

click on the dashboard now here uh you

14:54:22

need to sign in first so after sign in

14:54:24

actually uh first need to sign up if you

14:54:27

are new on this portal and then you need

14:54:29

to login and finally you can enroll

14:54:32

inside the course so this is completely

14:54:34

free we are not charging anything for

14:54:36

this particular course now here I

14:54:39

already enrad inside this course so here

14:54:41

I just need to click on this uh go to

14:54:43

course so here uh guys uh let me show

14:54:47

you the dashboard this is the dashboard

14:54:50

so so far I covered uh eight sessions so

14:54:54

far I discussed like so many thing and I

14:54:57

this is Day N actually and here you can

14:55:00

see the till day 8 and yesterday I

14:55:04

talked about the vector database I

14:55:05

talked about the deployment as well if

14:55:07

you will go and check with this

14:55:08

particular session so I discuss about

14:55:11

the deployment as well in the initial in

14:55:14

the initial class and after that I move

14:55:16

to the vector database there I explain

14:55:19

you the theoretical concept regarding

14:55:21

the vector vector databases and all I

14:55:24

talked about the embedding and now in

14:55:26

today's class we going to implement all

14:55:28

those things so here uh just click on

14:55:31

the resource section you will find out

14:55:32

the resources actually here u u okay I

14:55:35

already shared the resources so in some

14:55:37

time uh it will be available a over here

14:55:40

but if you want the project if you want

14:55:41

the resources so uh for that you can

14:55:44

visit my GitHub also there I uploaded my

14:55:47

uh there I uploaded the project the

14:55:50

project which I have implemented and all

14:55:52

the steps regarding the project so how

14:55:54

to deploy that and also each and

14:55:56

everything I have written over here

14:55:58

inside the readme file so let me show

14:56:01

you that where it is uh the

14:56:05

AI yeah this one so just uh go ahead

14:56:09

with this particular uh go ahead with

14:56:12

this particular link this particular

14:56:13

project so here you just need to search

14:56:16

s Savita giab there you will find out

14:56:18

all the repository you will get my

14:56:20

repository uh and then uh just go ahead

14:56:23

with this generative AI this is your

14:56:25

project and there is all the steps

14:56:27

regarding the deployment and all don't

14:56:29

worry in sometime it will be available

14:56:31

in the resource section also so I

14:56:32

already share with my team and they will

14:56:35

be uploading inside the resource section

14:56:38

got it now here uh see uh this is all

14:56:41

about the deployment but apart from that

14:56:43

I talked about the vector databases now

14:56:46

Vector database wise I have discussed

14:56:49

the theoretical stuff only so what is a

14:56:51

vector how the vector database Works

14:56:54

what is the meaning of the embedding

14:56:56

what is the pros and cons of the

14:56:57

embedding and the uh like different

14:56:59

different encoding technique each and

14:57:01

everything I talked about over here now

14:57:04

in today's class we'll see the

14:57:06

implementation of it uh apart from this

14:57:09

apart from this uh okay so here is

14:57:12

dashboard now apart from this resources

14:57:15

and the lecture you will find out the

14:57:16

quizzes and the assignment also and

14:57:18

after completing this course so which we

14:57:20

are going to complete soon because this

14:57:22

is just a foundation course so we are uh

14:57:25

we'll be taking uh four to five more

14:57:27

classes and after completing this course

14:57:29

you can generate a certificate from here

14:57:31

so just click on this particular option

14:57:33

and you can gener generate the

14:57:35

certificate after completing this course

14:57:38

right so you will get get a certificate

14:57:39

for the foundation generative AI uh so

14:57:42

this is the name of this course and

14:57:44

apart from this one uh so apart from

14:57:46

this basic course you will find out one

14:57:49

more course over the Inon platform so

14:57:51

for that uh just go inside the course

14:57:54

section right here itself and uh let me

14:57:57

show you just uh click on this

14:57:59

generative a right so once you will uh

14:58:01

go with the course and here you will

14:58:03

click on the generative AI now inside

14:58:06

that right inside that you will find out

14:58:09

on the paid course right which we are

14:58:11

going to launch next month next month

14:58:14

from 14th January onwards so our first

14:58:17

class will be on 14th January onwards

14:58:19

and here you'll find out like we are

14:58:20

giving you the discount and all so 40%

14:58:23

discount is there and uh the price is as

14:58:26

of now 6,000 you can talk about talk

14:58:28

with our sales team and all they will

14:58:30

give you the detail uh they will give

14:58:32

you the complete detail regarding this

14:58:34

particular course now the timing will be

14:58:36

from 10: to 1:00 p.m. IST in morning

14:58:39

morning and here after the time after

14:58:41

the like class we have a doubt session

14:58:43

also which is going from 1 to 2 not 1 to

14:58:46

2 basically so until we are not going to

14:58:49

solve all the doubts and all so

14:58:50

definitely we'll be uh we'll be taking

14:58:53

the doubts okay and that will be the

14:58:55

live doubt session only where you can

14:58:57

interact with the mentor whoever taking

14:58:59

class at that particular time means um

14:59:01

in a live class itself so yeah

14:59:03

definitely you can ask the doubts in a

14:59:05

live doubt session right after the class

14:59:08

now this course duration is around 5

14:59:10

month and the mode will be in English uh

14:59:13

okay so the date basically we have

14:59:14

modified uh so the date is going to be

14:59:16

uh this course is going to be start from

14:59:18

20th of June right now apart from that

14:59:21

you will find out the instructor so here

14:59:23

is the instructor of this course Chris

14:59:25

sir sudhansu sir me and buy so these

14:59:29

four will be your Mentor who is going to

14:59:31

take this entire course and now here you

14:59:33

will find out the curriculum also so

14:59:36

this is the curriculum which we have

14:59:37

divided into several mod modules so you

14:59:39

can go through with the curriculum we

14:59:41

have covered each and every each and

14:59:43

everything which is like industry

14:59:45

relevant and from basic to advance we

14:59:48

are covering each and everything about

14:59:49

the generative AI embeddings or a large

14:59:52

language model different different

14:59:54

Frameworks open source model fine tuning

14:59:57

and apart from that U like there are so

15:00:00

many things security comp compliances

15:00:02

and all which you're going to talk about

15:00:03

after creating a project uh evaluation

15:00:06

matrixes of llm each and everything what

15:00:08

whatever required on the industry level

15:00:11

uh whenever you are going to work on any

15:00:12

sort of a use case on any sort of a

15:00:14

project which we are going to discuss

15:00:16

over here right so here you can uh go

15:00:18

with the website you can check about the

15:00:20

curriculum and if you uh want something

15:00:24

if you have any sort of a query you can

15:00:25

directly ask me you can connect with the

15:00:27

sales team they will be clarifying it

15:00:30

now this is all about the uh course

15:00:33

right so I hope guys uh you have seen on

15:00:36

this particular course now coming to the

15:00:38

the YouTube channel so uh where you will

15:00:41

find out all the video apart from the

15:00:43

dashboard so here let me show you let me

15:00:46

search over the in neuron so this live

15:00:49

is going on and here uh see guys uh once

15:00:53

you will click on the uron YouTube

15:00:55

channel uh go inside the live section

15:00:57

there you will find out all the

15:00:59

recordings uh like whatever uh we have

15:01:01

discussed so far inside this community

15:01:03

session so it is in a live section you

15:01:06

can go and check and you can uh learn

15:01:08

from here also and if you want a detail

15:01:11

so each and every detail we have kept

15:01:13

inside the description so once you will

15:01:16

check with the description of this video

15:01:18

you will find out all the details over

15:01:21

here right so I hope uh this is clear to

15:01:24

all of you now if you have any question

15:01:26

you can ask me and then we'll start with

15:01:28

today's

15:01:36

topic so how work llm with insight and

15:01:39

complex calculation on business data so

15:01:42

definitely we're going to talk about it

15:01:44

in our uh project right so there will

15:01:46

solve a different different use cases

15:01:48

and all here uh actually I shown you

15:01:51

that how to call the API how to read the

15:01:53

models and we have solved one basic

15:01:56

problem statement that is McQ generator

15:01:58

so uh business wise organization wise

15:02:02

specific uh use cases wise also we can

15:02:05

use this uh like llms and all and

15:02:07

definitely be talking about in our

15:02:09

different project in our other project

15:02:12

and there will'll try to discuss more

15:02:13

about use cases more use cases basically

15:02:15

use cases application and their domains

15:02:33

okay which one will be good for the

15:02:35

streaming data Vector so as of now we

15:02:37

going to talk about the Vector database

15:02:39

and right after that I will discuss

15:02:41

about more Vector databases and the

15:02:43

graph databases also right so as of now

15:02:46

uh the vector databases actually it is

15:02:49

good right and I will give you the

15:02:50

comparison and all uh while I will teach

15:02:52

you that so don't worry just uh be in

15:02:55

the class everything I will be clarify

15:02:57

here itself in the live class

15:03:00

okay so if you have any sort of a doubt

15:03:03

guys you can ask me you can ask me in

15:03:05

the chat I uh up for the questions and

15:03:08

the

15:03:11

s how to design the prompts and all so

15:03:14

guys here if you will see uh if you will

15:03:16

look into my session which uh where I

15:03:18

have discussed I think each and

15:03:20

everything right so on a foundation

15:03:22

level so there I uh took a uh like a few

15:03:26

specific time for The Prompt also right

15:03:28

so how to design The Prompt what is the

15:03:30

meaning of the different different

15:03:31

prompt how to construct The Prompt what

15:03:33

is a a few short prompting what is a uh

15:03:36

like zero short prompting each and

15:03:38

everything I have discussed inside my

15:03:39

session now how to uh design The Prompt

15:03:43

so you will definitely will get it once

15:03:45

you will go through with my session so

15:03:47

uh I would request to all of you if you

15:03:49

haven't attended my session and if you

15:03:51

are asking any question related to The

15:03:53

Prompt LMS and all so first visit my

15:03:56

session and then automatically this all

15:03:58

the doubts will be clarified

15:04:07

okay

15:04:09

how organization has hesitant to adopt

15:04:11

generative AI so just go and check with

15:04:12

my first session uh where I have

15:04:15

discussed the detail introduction of a

15:04:17

generative AI why the organization

15:04:20

should use the generative AI what is the

15:04:22

pros and cons if we are going to train

15:04:24

any model from scratch if you are using

15:04:27

any pre-trained model which has been uh

15:04:29

trained on a huge amount of data how we

15:04:32

can reduce the cost and how we can get

15:04:34

Effectiveness each and everything you

15:04:36

will get it in my first session so

15:04:38

please please check with the day one

15:04:40

after this session and there I discuss

15:04:42

everything regarding to regarding to

15:04:44

this generative

15:04:45

AI

15:04:52

okay great so now I think uh we can

15:04:57

start with

15:04:58

the yeah we are going to discuss about

15:05:01

the chat interaction also chat

15:05:02

interaction with the database and in

15:05:04

today's class itself in today's session

15:05:06

itself I will show you this thing got it

15:05:08

so finally let's start with the session

15:05:10

let's start with the topic now the topic

15:05:13

is what the topic is a vector database

15:05:15

don't worry guys here the project will

15:05:17

be available here inside the resource

15:05:19

section if you will uh check with the

15:05:21

day eight so uh there uh I will give my

15:05:23

GitHub link I already Shar with the team

15:05:25

and within a uh like uh within few

15:05:28

minutes they will upload it over there

15:05:30

got it now uh let's start with the

15:05:32

session uh so today actually we're going

15:05:34

to discuss about the vector databases

15:05:36

yesterday I given you the introduction

15:05:38

of this Vector database now let's see

15:05:40

how does it work now uh if you will look

15:05:43

into this slide so here I have mentioned

15:05:46

each and everything that what all thing

15:05:48

you're going to learn so what is a

15:05:49

vector database why we need Vector

15:05:51

database how Vector database work use

15:05:55

cases of the vector database widely used

15:05:57

Vector database right and practical demo

15:06:00

using Python and lenion and there we are

15:06:03

going to use open AI as well so these

15:06:06

are the thing basically which we need to

15:06:09

understand related to this Vector

15:06:11

databases and yesterday I already given

15:06:13

you the introduction about it so here I

15:06:16

I have written each and everything on

15:06:18

top of the Blackboard and I try to

15:06:20

explain you that how this Vector

15:06:22

database works right so there are like

15:06:24

so many technique okay so Vector means

15:06:26

what Vector I here I explain you what's

15:06:28

the meaning of the vector in a layment

15:06:30

term and there I have explained you

15:06:32

about here I have explained you about

15:06:33

the vector right so how to uh Define the

15:06:36

vector how to write the vector it's

15:06:38

nothing just a set of value and how to

15:06:40

write it down so we we write it down u

15:06:43

in a square bracket right so here

15:06:45

actually see this is what this is my

15:06:46

Vector which I have written so there

15:06:48

might be a column Vector row Vector each

15:06:51

and everything I discussed in my

15:06:52

previous session right now after that I

15:06:55

talked about the encoding so let's say

15:06:57

we have a data and that data we want to

15:06:59

pass to my model now uh here uh in

15:07:02

between actually we'll have to perform

15:07:04

the encoding of the data because we

15:07:06

directly cannot pass the data to my

15:07:08

model right text we cannot pass to my

15:07:10

model because model is nothing just a

15:07:12

mathematical uh equations so uh yes

15:07:15

definitely it won't be able to uh like

15:07:18

calculate something by using uh those

15:07:21

Text data so definitely we'll have to

15:07:23

convert those data into a numbers so for

15:07:26

that we have a different different

15:07:27

techniques if we are talking about deep

15:07:29

learning so where we have a two

15:07:31

technique right so first is without deep

15:07:33

learning the second is with the Deep

15:07:34

learning now in the without deep

15:07:36

learning you will find out like

15:07:38

there are so many Tech so many like

15:07:40

techniques so here I have written couple

15:07:42

of which is very very famous like

15:07:44

document metrics TF IDF NR one hot end

15:07:47

coding and integer end coding which we

15:07:49

generally use while we are doing a end

15:07:52

coding and here right hand side I have

15:07:54

written a technique which work along

15:07:56

with the neural network so word to is

15:07:58

there fast Tex is there Elmo is there b

15:08:00

is there Transformer itself is there

15:08:03

right glove Vector is there but it's not

15:08:05

a dbased technique I told you that it's

15:08:07

a metrix vector ition based technique so

15:08:10

here I'm not going to uh explain you the

15:08:12

mathematics behind uh such techniques

15:08:15

whatever I have written over here uh

15:08:17

here I'm just giving you the Glimpse I'm

15:08:19

just uh talking about the vectors I'm

15:08:21

just talking about the embedding that's

15:08:23

why I given you this overview got it

15:08:25

because uh if I'm going into the

15:08:27

mathematics so uh only one week will be

15:08:30

required for this and coding techniques

15:08:32

for the word Ting and all uh along with

15:08:34

the implementation so here I'm just

15:08:36

giving you the overview and trying to

15:08:38

explain you the meaning of the embedding

15:08:41

and vectors so if I was talking about

15:08:44

the uh like here I was talking about

15:08:47

here the uh disadvantage of this uh

15:08:50

frequency based technique which we are

15:08:52

using without uh DL means without neural

15:08:55

network so here actually see this was

15:08:58

the disadvantage of this particular

15:09:01

technique so first was the sparse metric

15:09:03

if we are using any such metrics right

15:09:05

so any such technique like document

15:09:07

metrics DF IDF andr one hot encoding or

15:09:11

integer encoding so they actually uh we

15:09:15

are going to generate a sparse Matrix

15:09:17

but let's say we are not going to

15:09:18

generate a sparse Matrix but in a long

15:09:21

time we are not able to sustain a

15:09:23

context it is going to be a contextless

15:09:25

or meaningless okay now here uh it's

15:09:28

going to be a contextless or it's going

15:09:30

to be a meaningless uh this particular

15:09:32

technique so that's why this edding

15:09:34

concept came into the picture it is also

15:09:36

a vector but it's a dense Vector right

15:09:39

and the uh way of generating this Vector

15:09:41

is little bit different compared to this

15:09:44

technique now here actually we are using

15:09:46

a neural network we are going to design

15:09:48

our data in such a way so uh we are

15:09:51

having two column one is a uh like uh

15:09:54

independent column and one is a target

15:09:56

column and then we are passing that

15:09:58

particular data to my model and

15:10:00

automatically it is generating so

15:10:03

automatically it is generating a vector

15:10:05

right so how it is doing that how it is

15:10:08

going to create a like independent

15:10:10

column and how it is going to create a

15:10:12

text uh this target column so that's a

15:10:15

like uh uh itself U like uh there is a

15:10:18

separate process for that and definitely

15:10:21

uh I will uh record one video for that

15:10:23

uh like one end to end video for the

15:10:25

hand coding techniques and all and I

15:10:26

will put over the Inon YouTube channel

15:10:28

so you can go and check in uh detail

15:10:30

right so there I will I will be writing

15:10:32

all the mathematical equations and all

15:10:34

as of now just giving you the intution

15:10:36

so here I given you the intu intution

15:10:38

one high level intuition how this uh

15:10:41

techniques is working this award

15:10:42

embedding technique so here is the

15:10:44

sparse metrix or sparse sparse Matrix

15:10:48

which I have created so uh here you can

15:10:50

see this is what this is my data so from

15:10:52

this particular data I want to I will

15:10:55

generate the vocabulary and based on so

15:10:58

this let's say this is what this is my

15:10:59

vocabulary over here now from that

15:11:01

particular vocabulary I'm going to

15:11:03

generate my Vector so here I given you

15:11:05

the example of the one h encoded vector

15:11:09

and you can see here this is very sparse

15:11:11

Vector right this is very sparse Vector

15:11:13

which I have generated regarding this

15:11:15

particular document regarding this

15:11:17

particular sentence right now if we are

15:11:19

talking about the word embedding now how

15:11:21

it is generating a vectors right how it

15:11:24

is generating a vectors regarding the

15:11:25

data so see let's say we have a data and

15:11:28

from that data I'm going to create a

15:11:30

vocabulary and from those vocabulary I'm

15:11:33

going to create a features so here let's

15:11:35

say this is what this is my vocabulary

15:11:37

and this is what this is the feature so

15:11:38

we'll assign the value between 0 to one

15:11:41

to each and to each and every vocabulary

15:11:44

based on a feature so here you can see

15:11:46

uh I'm talking about the king so King is

15:11:48

having a gender yes so here is one Queen

15:11:51

is having a gender so she's U she's

15:11:53

female actually so here is a zero I'm

15:11:55

talking about the male here so man is

15:11:57

one woman is zero monkey is one so like

15:12:00

this uh I will be giving a number and

15:12:02

this is what this is my one vector this

15:12:05

is my one vector which is representing

15:12:07

this King based on this particular

15:12:09

feature now if here if you will look

15:12:11

into this particular Vector so this is a

15:12:13

dense Vector right which is having so

15:12:16

many information compared to this Vector

15:12:19

which is a sparse one right and where we

15:12:21

are not able to sustain any sort of a

15:12:23

context so this is what this is called a

15:12:26

word embedding now uh if we are talking

15:12:28

about a word embedding technique so it

15:12:30

has been invented by the Google and they

15:12:32

have trained the neural network on a

15:12:34

huge amount of data that was the Google

15:12:37

new news article right so uh the model

15:12:41

basically which they have trained if you

15:12:42

will look into the model if you will

15:12:43

download the model so there you will

15:12:45

find out a vector which is having a 300

15:12:48

dimension in every Vector actually they

15:12:51

have a 300 Dimension so you can use the

15:12:54

pre-train embedding you can use the

15:12:56

pre-train embedding if you are going to

15:12:58

trainum model uh so you can pass the

15:13:00

data to that particular model and

15:13:02

automatically it will generate a aming

15:13:04

based on a pre-trade model or else you

15:13:06

can create your own m meding as well

15:13:08

both thing is possible so in our case

15:13:11

actually we are going to use open Ming

15:13:13

so I will show you how to use open AI

15:13:16

eding open AI also is having one uh

15:13:19

class so edding class by using that we

15:13:22

can uh generate a embedding so whatever

15:13:25

data we have we can pass to that

15:13:26

particular model and we can generate a

15:13:29

embedding right so don't worry I will

15:13:31

show you that how to generate a

15:13:32

embedding from the openi class from the

15:13:34

openi model and here is just a glimpse

15:13:37

of the word aming which I shown in my

15:13:39

previous lecture so I hope till here

15:13:42

everything is fine everything is clear

15:13:44

now let's move to the vector database

15:13:47

tell me guys everything is fine

15:13:49

everything is clear yes or

15:13:56

no yes it is possible to read Excel

15:13:59

using Lenin without any data loss yes it

15:14:02

is possible we can read the Excel and I

15:14:04

think I shown you how to load the

15:14:06

documents just uh check with the

15:14:08

documentation they already given you the

15:14:10

code snippet use that uh particular

15:14:12

snippet okay code

15:14:21

snippet can change timing for the paid

15:14:24

AI course evening um I think the course

15:14:28

timing is in morning I will have to

15:14:31

check with my team related to that so

15:14:34

yeah if there will be any sort of a

15:14:35

changes then definitely uh like you will

15:14:38

get to know about it okay and I will

15:14:41

update

15:14:46

you tell me guys uh till here everything

15:14:49

was fine so can we start with A New

15:14:52

Concept now because here I I have

15:14:54

explained you something regarding to

15:14:56

this Vector database and then only I

15:14:58

will move to the uh then only I will

15:15:00

move to the Practical

15:15:06

implementation

15:15:19

great so let's start with the session

15:15:21

now so here in this PDF you can see uh I

15:15:24

written something that what is a vector

15:15:26

database now first of all let me open my

15:15:30

open oh just a

15:15:36

second

15:15:43

great now here you can see guys uh I was

15:15:46

I'm talking about that what is a vector

15:15:48

database now a vector database is a

15:15:52

database used for storing high dimension

15:15:55

Vector such as word embedding or image

15:15:58

embedding so we can convert our text

15:16:00

Data into embeddings even we can convert

15:16:03

our image data also into the embedding

15:16:05

and this embedding is nothing it is a

15:16:07

vector so it's a vector actually and it

15:16:10

is not a twood dimension vector or one

15:16:13

dimension vector or three dimension

15:16:14

Vector it's a high dimension Vector as I

15:16:17

told you uh I was talking about this

15:16:19

word aming word two B actually this is a

15:16:22

model this uh word to back has been

15:16:24

trained by the Google and this trained

15:16:26

by the Google on a news article right on

15:16:29

a news article and uh they have

15:16:31

generated the embedding from those

15:16:34

particular data from that particular

15:16:35

data and the embedding size was 300 so

15:16:39

actually see the vector which they were

15:16:41

generating the size was the 300 over

15:16:44

there so here we talking about the word

15:16:46

embedding so it is nothing it is just a

15:16:48

vector and it's a high dimension Vector

15:16:51

right so the size can be anything over

15:16:53

here so once I will show you this open a

15:16:55

vector open a uh like open a Ming Vector

15:17:00

so the size of the open a aming vector

15:17:02

around 1,600 right so there you will

15:17:05

find out a 1,600 value inside one vector

15:17:09

right okay so yeah and even over here

15:17:12

see I'm I'm talking about the word

15:17:13

embedding so it is not related to the

15:17:15

text Data it is related to the image

15:17:17

data also means regarding the image data

15:17:20

also we can generate a Ming and yes it

15:17:22

is possible so over here you can see so

15:17:25

this is a dog images PDF whatever

15:17:28

document we have so related to that

15:17:30

particular document we can generate a

15:17:32

embedding and this is nothing this is a

15:17:35

vector which is and what is a vector

15:17:37

tell me the vector is nothing it's a set

15:17:39

of value and which we are going to store

15:17:41

somewhere in our Vector database now

15:17:44

here if we are talking about the vector

15:17:46

database so there is two term one is

15:17:48

Vector and the second is database so

15:17:50

this database actually it's a very

15:17:52

common term which we like I think we all

15:17:55

knows about this database so uh if we

15:17:57

are talking about this database so

15:17:59

during our uh like during our semester

15:18:03

or during our college or maybe if you

15:18:06

are working in an industry so definitely

15:18:07

once in a while we interact with this

15:18:09

database right so if we are talking

15:18:11

about the database so there you will

15:18:12

find out two type of database so the

15:18:14

first database is called SQL based

15:18:16

database and the second type of database

15:18:19

is called No SQL database right so where

15:18:22

we don't have to write it down the SQL

15:18:24

where we don't need to create any sort

15:18:25

of a schema a pre defined schema so that

15:18:28

comes under inside the no SQL database

15:18:30

and there we have a different different

15:18:32

type of the databases like key value

15:18:35

pair graph based database and document

15:18:38

based database right so there is a

15:18:40

different different type we have of the

15:18:43

inside the no SQL database and here we

15:18:45

are talking about the SQL based database

15:18:47

so there you will find out only one type

15:18:49

where we can store our data in the form

15:18:52

of in the form of predefined SCH schema

15:18:54

in the form of table in the form of row

15:18:56

and columns right now what is this ve

15:18:58

Vector database so Vector database

15:19:00

actually see uh if we are talking about

15:19:02

the database so definitely some uh

15:19:04

server will be required for the

15:19:06

computation and all right and we are

15:19:08

talking about the database definitely

15:19:10

some space will be required for storing

15:19:12

something if we are if we are installing

15:19:14

the my SQL in our local system so have

15:19:17

you seen that we are installing the

15:19:18

MySQL server and it is getting uh it it

15:19:21

is occupying some sort of a spaces also

15:19:24

in our system right for storing the uh

15:19:26

data in the form of physical file The

15:19:28

Logical view is a table but yeah in the

15:19:30

back end actually storing our data in

15:19:32

some physical format so here see uh we

15:19:35

have a database so definitely some

15:19:37

computation will be required and memory

15:19:39

also will be required uh so here uh we

15:19:43

are talking about specifically this

15:19:45

Vector database so we are storing a

15:19:47

vector now so how this database this

15:19:50

Vector database is different from the

15:19:51

SQL and no SQ database now let's try to

15:19:54

look into that and we'll try to

15:19:56

understand the differences differences

15:19:58

between this uh like SQL no equal and

15:20:02

this Vector database and why we should

15:20:04

use this database why we should use this

15:20:06

Vector database

15:20:07

uh why we should not use this SQL and no

15:20:09

SQL database we'll try to understand

15:20:11

that also so first of all let me do one

15:20:13

thing let me move to the next slide and

15:20:15

uh let me explain you so here you uh I

15:20:18

have written that why we need a vector

15:20:20

database see over 80 to 85 person data

15:20:23

which is there in the world as of now so

15:20:25

there is a unstructured data now what

15:20:28

comes inside this unstructured data so

15:20:30

unstructured data means the data

15:20:31

basically which is not a structure one

15:20:33

like images okay so we have a images we

15:20:37

have a videos videos is nothing just the

15:20:39

collection of images collection of the

15:20:41

frames uh so uh if you heard about this

15:20:44

FPS frame per second that is nothing

15:20:47

that's a uh mejor uh measurement unit of

15:20:50

this videos okay in 1 second how many

15:20:53

frame is getting processed so uh here uh

15:20:55

we are talking about the images so the

15:20:57

image data actually comes under this

15:20:59

unstructured data where we have a pixel

15:21:02

right pixel which uh we are going to

15:21:05

form in the which we are going to

15:21:07

collect in the form of grid right so

15:21:09

pixel value usually will find out from 0

15:21:11

to 255 got it so that is what there is

15:21:14

an images right there is the images now

15:21:17

if we talking about the unstructured

15:21:18

data is text Data the text which I'm

15:21:21

writing that also comes inside this

15:21:23

unstructured data Text data is there

15:21:25

voice data is there right so voice is

15:21:28

there text is there images there videos

15:21:30

is there so this is called unstructured

15:21:32

data and most of the data which you will

15:21:34

find out uh like uh which you will find

15:21:37

out in today's world in today's era so

15:21:40

that is a unstructured one only on a

15:21:42

different different platform like

15:21:43

Facebook Instagram what we are doing we

15:21:45

are uploading a videos we are uploading

15:21:47

the images we are uploading the reads

15:21:49

this that whatever right so this

15:21:51

platform this application are taking a

15:21:53

data uh so we are uploading a like

15:21:56

different different type of uh like data

15:21:58

right like images videos and all those

15:22:01

are called unstructured Data so I hope

15:22:03

you got a clear-cut idea regarding this

15:22:05

unstructured data now let's move to the

15:22:07

next slide that why I have written over

15:22:09

here so if we talking about the uh SQL

15:22:12

based data or relational data or

15:22:13

traditional data so here is some example

15:22:16

which is like uh uh which is a very

15:22:18

famous database dbms actually MySQL is

15:22:21

there post gr is there SQL light is

15:22:23

there Oracle is there right there are

15:22:25

different different relational data

15:22:26

wayase you will find out uh which we

15:22:28

have learned once in a while means u in

15:22:31

our College days in our like uh in the

15:22:34

organization itself in the company

15:22:35

itself right or or during the training

15:22:38

so we have interacted with this

15:22:39

relational database and this traditional

15:22:41

database and we have seen the SQL also

15:22:44

like how the cql works how to write it

15:22:46

on the syntax and all in a SQL so we

15:22:48

know we all know about the basics of the

15:22:50

SQL right if we are talking the relation

15:22:52

datab with so we usually write the SQL

15:22:54

query over there right for interacting

15:22:56

with this relational databases now here

15:22:59

uh I think you got to know the idea that

15:23:01

what is a relational database and here

15:23:03

we have a problem problem related to the

15:23:05

data the most of the datab basically

15:23:07

that is the unstructured data now just

15:23:09

see over here let's say uh if we are

15:23:11

going to store this data if we are going

15:23:13

to store if we are going to store this a

15:23:16

particular data like images videos and

15:23:18

all inside the vector database right so

15:23:22

uh not inside the vector database First

15:23:24

Let Me Explain you inside the first let

15:23:26

me tell you that inside the uh this

15:23:29

traditional database or inside the

15:23:31

relational database so what will happen

15:23:33

see so let's say here we have a

15:23:36

traditional datab datase like my SQL and

15:23:38

here if I'm going to store the image

15:23:40

inside the my SQL all right we have a

15:23:43

image and that particular image I'm

15:23:45

going to install or I'm going to save

15:23:47

inside the my SQL now guys see

15:23:50

definitely I can do that I will be able

15:23:52

to do that I will be able to save the

15:23:54

image so it is having this capability

15:23:57

where we can uh store the binary object

15:24:00

so uh there is one way actually we can

15:24:02

convert this particular image in a vs4

15:24:04

string vs4 string and I can see save it

15:24:07

but here guys see if we are going to

15:24:09

save this particular image if we are

15:24:11

going to save this particular image

15:24:12

inside the uh traditional database so

15:24:15

here I will have to define a schema

15:24:18

right I will have to Define one schema

15:24:21

there uh let's say if I'm going to store

15:24:23

this image directly so we won't be able

15:24:26

to get it now so this image belong to

15:24:29

cat dog or which dog actually so if you

15:24:32

will look into this dog so this dog is

15:24:34

specifically is having some property

15:24:37

right so this dog is specifically having

15:24:39

some property some let's say this a dog

15:24:41

belong to this particular breed that

15:24:43

particular breed right now this um dog

15:24:45

is a yellow brown or black something

15:24:48

like that so this dog itself is having

15:24:51

some property so if we are going to

15:24:52

store this data directly in my SQL in

15:24:56

that case let's say we are not passing

15:24:58

any sort of a label any any anything

15:25:00

over here right regarding this

15:25:01

particular dog or directly we are going

15:25:03

to store this dog okay dog image inside

15:25:06

my my SQL now over here let's say I have

15:25:08

converted into a b bs4 string or let's

15:25:11

say I have just converted into a binary

15:25:12

object uh so in that case I won't be

15:25:15

able to identify it I won't be able to

15:25:17

identify it this is the first problem

15:25:19

the second problem basically so if you

15:25:22

want to identify it so for that

15:25:23

basically we'll have to create a proper

15:25:25

schema so schema in case so let's say

15:25:28

there is a image of the dog right there

15:25:29

is a image of the dog then there is a

15:25:31

color of the dog then there will be a

15:25:34

breed of the dog right and there will be

15:25:36

a lab label means this is the dog or

15:25:38

let's say there's a cat something like

15:25:40

that so if we are going to store this

15:25:42

type of data in my SQL definitely I can

15:25:45

do that but here is some problems we

15:25:48

have first problem right if we are

15:25:50

directly storing it so definitely we

15:25:52

won't be able to identify it right so

15:25:54

whether it's a dog cat or whatsoever the

15:25:57

second thing we'll have to define a

15:25:59

proper schema and the third thing is

15:26:01

what so we'll have to define a proper

15:26:03

schema where we'll be having a different

15:26:05

different variable now the third thing

15:26:06

is what so here actually see uh this SQL

15:26:10

database let's say we are going to store

15:26:12

it over there now uh whenever we talk

15:26:15

about the text or images with respect to

15:26:18

this uh generative AI or llms actually

15:26:21

we have to perform an operation that is

15:26:24

called similarity search right

15:26:26

similarity search so I will show you

15:26:29

what is this particular operation

15:26:30

similarity search actually see whenever

15:26:33

we are going to uh store this data this

15:26:36

dog image inside the traditional

15:26:38

database inside the relational database

15:26:41

so the first problem which occur related

15:26:42

to the identification if we are going to

15:26:44

create a better schema that is also fine

15:26:47

but we want we we cannot perform this

15:26:49

similarity search actually means B let's

15:26:52

say there is a dog now I want to find

15:26:54

out the dog which is having a similar

15:26:58

property right which is having a similar

15:27:00

property like this dog so it is not

15:27:03

possible in my SQL database right in in

15:27:06

like traditional database or in

15:27:08

relational database right so this

15:27:10

similarity search or this query actually

15:27:13

this will be a very very difficult if we

15:27:15

are if we are going to query right after

15:27:17

storing a data based on some property

15:27:20

it's going to be a very very difficult

15:27:22

so that's why we don't use this

15:27:24

relational database and the same problem

15:27:27

occur with the no SQL database also

15:27:30

there also we can store the data we can

15:27:31

store the Ming okay so we can use so I

15:27:35

think today itself Chris has uploaded

15:27:37

one video regarding the cassendra where

15:27:38

we can store the embedding right we can

15:27:41

do that but this Vector database which

15:27:43

specifically designed for the like this

15:27:46

edding and all so this gives you the

15:27:48

better result compared to that right

15:27:51

somehow we are able to achieve this

15:27:53

thing means we are able to uh pass the

15:27:56

label to the particular object whatever

15:27:58

we are storing and we are able to search

15:28:00

also right based on a similarity we are

15:28:03

able to make a query we are able to

15:28:04

perform the query but actually it is not

15:28:07

that much efficient right whatever we

15:28:10

want so for that only this Vector

15:28:13

database has been designed I hope you

15:28:15

got a problem and you are getting my

15:28:17

point that uh why we are not storing

15:28:19

this data inside the relational database

15:28:22

got it now let's come to the next point

15:28:25

and the thing will be more clear to all

15:28:27

of you the next part over here if we are

15:28:29

talking about the image so image looks

15:28:31

like this only so where we have a three

15:28:34

channel so the first one is a uh R then

15:28:37

second is G the third one is blue means

15:28:39

B so this is RGB means this colorful

15:28:43

image actually it is having a three

15:28:45

channel the first is called R the second

15:28:47

is called G that is green and the third

15:28:48

is called Blue right now uh here yes

15:28:52

definitely if you want to perform the

15:28:54

Ming right so here if you want to per if

15:28:56

you want to perform the Ming we can do

15:28:58

it by using uh so here we can use uh

15:29:02

like different different embedding

15:29:03

technique as I told you word to back

15:29:05

Elmo or any pre-train embedding like uh

15:29:08

which is uh available over the open a

15:29:10

right which is available over the

15:29:12

hugging phase so any embedding a model

15:29:14

we can download and we can pass our

15:29:17

object to that particular model right

15:29:19

and based on a a training on uh like on

15:29:23

whatever way basically it has been

15:29:24

trained so it will give you the

15:29:26

embedding right maybe you are not able

15:29:28

to get this particular point but once I

15:29:30

will show you right once I will do it in

15:29:32

a python definitely you will be able to

15:29:35

understand so what I'm trying to say

15:29:36

over here you can perform the embedding

15:29:38

related any unstructured object so here

15:29:40

you can see we have a text we have a

15:29:42

audio we have a image image embedding is

15:29:45

also possible means we are going to

15:29:47

convert images into a vector now here

15:29:50

what I'm going to do so here I'm going

15:29:51

to download any pre-train model any

15:29:54

pre-train embedding model and yes by

15:29:57

using that particular model we can

15:29:59

convert our data into a vectors we can

15:30:02

perform the embedding I hope this part

15:30:05

is getting clear to all of you so

15:30:07

whether we have a image or text or voice

15:30:10

we just need to download the model

15:30:12

pre-trained model and based on that we

15:30:15

will be able to generate an embedding if

15:30:16

you want to train your own model right

15:30:19

if you want to train your own model that

15:30:21

is also possible that is also possible

15:30:23

or let's say if you don't want to train

15:30:25

your own model you just want to

15:30:26

fine-tune the pre-train model that is

15:30:28

also possible so everything is possible

15:30:31

there is a three possibility first is

15:30:33

what first is a you can directly use the

15:30:35

train model

15:30:37

the second is what second is fine tuning

15:30:40

all right fine tuning and the third is

15:30:43

what third is training from scratch so

15:30:45

here let me write it down the third one

15:30:47

third is nothing third is training from

15:30:49

scratch right everything is possible

15:30:51

related to the embedding and here it is

15:30:54

nothing so at the end we are going to

15:30:56

generate a back turn after passing the

15:30:57

object now I hope you got a clearcut

15:31:00

idea now if we are talking about the

15:31:02

embedding see uh what all embedding I

15:31:04

will show you what all U like Tech te

15:31:06

basically uh which uh we have so the

15:31:08

first one we can use this word to bag

15:31:12

right directly we can use this word to

15:31:13

bag for generating Ming the second one

15:31:16

we have the Elmo right we can use the

15:31:18

Elmo and we can generate a Ming right

15:31:22

now the third one basically we have we

15:31:24

have the hugging phas API also in that

15:31:26

also we have a several embedding model

15:31:28

so hugging phas API Now by using this

15:31:31

API hugging face API we can uh we can

15:31:34

download the embedding model model and

15:31:36

we can pass our object to this

15:31:38

particular embedding model and it will

15:31:40

give me the embedding right it will

15:31:41

directly generate the embedding the

15:31:42

fourth one we have this open API so in

15:31:45

the open a API itself so in the open a

15:31:48

itself you will find out the embedding

15:31:51

model right so there also we have a Ming

15:31:54

here also we have a Ming right in a open

15:31:56

a itself so we have a hugging face we

15:31:59

have a Elmo word to bag and various

15:32:01

model here I just written couple of name

15:32:03

or two to three name but we have a

15:32:05

various model if you search over the

15:32:07

Google you'll find out the various way

15:32:09

right to convert your data into a

15:32:11

vectors to convert your your data into a

15:32:13

ambed vector right now here hugging

15:32:16

phase API is also very very popular for

15:32:18

the embedding and all and I will show

15:32:20

you what all models we have right what

15:32:23

all models we have uh inside the hugging

15:32:26

phase actually uh for converting our

15:32:28

data to into the embedding right and

15:32:30

here in today's session we are going to

15:32:32

use this open embedding right we'll be

15:32:35

talking about the open a embedding how

15:32:37

you can uh how you can like get it how

15:32:40

you can access this particular class and

15:32:42

after passing a data how you will be

15:32:44

able to generate the eded vector so each

15:32:47

and everything we're going to discuss in

15:32:48

the live class itself right so I hope

15:32:51

this slide is clear to all of you and

15:32:53

this slide whatever I discuss regarding

15:32:55

this uh uh my SQL and the sorry

15:32:59

regarding this relational database and

15:33:01

the no SQL and the vector database that

15:33:03

part is also clear now here Vector eming

15:33:07

is fine so yes uh we have the vector

15:33:10

database now why we should use it

15:33:12

because uh here actually this similarity

15:33:16

search operation is uh like uh possible

15:33:19

we can perform the similarity search

15:33:20

after storing the vector and all and yes

15:33:24

U now here embedding example so for that

15:33:27

uh I kept some sort of example uh

15:33:30

basically we can uh do the similarity

15:33:32

search by making this cluster and all

15:33:34

there is a this is the mathematical

15:33:36

process actually so Vector this is a 2d

15:33:39

uh this is what this is a 2d example of

15:33:41

the vector aming as I told you now so

15:33:44

what is a vector vector is nothing it's

15:33:46

a set of the value in a like n

15:33:50

Dimensions so here if I'm writing here

15:33:52

if I have written two value only so it's

15:33:54

a set of uh so actually it is

15:33:56

representing a two Dimension X and Y

15:33:58

right this first value is from the

15:34:00

x-axis the second value five is from the

15:34:02

y- axis now we can do a simility search

15:34:05

uh we can make a cluster actually let's

15:34:07

say this two vectors near to each other

15:34:09

so we can say like they are having some

15:34:12

similarity they this particular Vector

15:34:14

is having some sort of a similarity like

15:34:16

this this also this uh red one also see

15:34:19

here is a vector this first one this

15:34:22

this is my one vector this is my another

15:34:23

Vector this is the third Vector so they

15:34:25

are lying they are near to each other so

15:34:28

here I'm saying yes this Vector is

15:34:29

having some similarity this three Vector

15:34:32

now this one also this also this also

15:34:34

and this one so this Vector is is having

15:34:36

some similarity this green one right

15:34:37

this one so like wise actually what I

15:34:40

can do I can perform this text

15:34:42

similarity option text similarity option

15:34:45

which is like uh which is little hard if

15:34:48

we are going to store a data in my SQL

15:34:51

post gray right or maybe in other

15:34:54

databases so in that case like we won't

15:34:56

be able to see in my square and post gr

15:34:59

relational database it is like really

15:35:01

hard right because we are going to store

15:35:03

up data not in terms of embedding

15:35:06

directly is going to store the object

15:35:07

over there and uh for that only we'll

15:35:10

have to do a we'll have to create a

15:35:11

predefined schema so uh it's going to

15:35:14

little hard over here actually we don't

15:35:15

never use this relational database for

15:35:18

this uh embedding and all okay so it's

15:35:20

not our Perfect Choice yes we can use

15:35:22

the no SQL database uh in the no SQL we

15:35:25

can use the document with database uh or

15:35:28

else what what we can do we can use this

15:35:30

row columnar database that is also

15:35:33

possible like cassendra and all we can

15:35:35

use this uh graph based database right

15:35:38

actually uh graph based database is not

15:35:41

that much successful they also you will

15:35:43

find out some sort of a difficulties in

15:35:45

all I will tell you in further session

15:35:47

but yeah we can use this raw column

15:35:49

database and even the document database

15:35:51

also but yeah the performance is like U

15:35:54

uh it's not that much good and here also

15:35:57

we'll have to label the data and all

15:35:59

directly we can store the embedding uh

15:36:02

but uh here actually along with the

15:36:04

embedding there are so many things means

15:36:06

we have to find out the similarity score

15:36:08

then we have to perform the similarity

15:36:09

search here you can see clearly in the

15:36:12

geometry but mathematically how we can

15:36:14

prove it so for that there are so many

15:36:16

thing which we need to find out so there

15:36:18

will be a similarity score right based

15:36:20

on that similarity score we have to do a

15:36:23

similarity search right similarity

15:36:25

search so this is also there so

15:36:27

similarity score similarity search this

15:36:29

Vector database will give you everything

15:36:31

Vector database will give you the

15:36:33

everything so that's why we directly use

15:36:35

this pre-configured Vector database and

15:36:37

here also like it is running on some

15:36:39

sort of a server and there are also some

15:36:41

computation and all uh which is included

15:36:44

which I let you know right so how to

15:36:45

configure the cluster and all regarding

15:36:47

this Vector database yeah so if we are

15:36:49

going to store the data store this like

15:36:52

embedding in a no SQL database so here

15:36:54

also we'll have to make some

15:36:55

configuration and it is not that much

15:36:57

efficient but this Vector database

15:36:59

actually it is giving us everything

15:37:00

where we just need to store the uh value

15:37:03

we where we just need to store the data

15:37:05

in the form of vector that's it got it

15:37:08

now here uh I hope this part is clear to

15:37:12

all of you this vector embeddings and

15:37:15

all now let me go through with the next

15:37:17

slide so here again uh same thing is

15:37:19

there so we have embeddings so we have a

15:37:21

vectors and along with that there will

15:37:23

be indexing as I told you now so if we

15:37:25

are going to store this data if we are

15:37:27

going to store this particular data

15:37:29

inside the uh no SQL right if we are

15:37:32

going to store this particular data

15:37:34

inside the no SQL databases

15:37:36

again we'll have to make like a some

15:37:38

configuration and all according to the

15:37:40

uh the vector which we are going to

15:37:41

generate we'll have to conclude the

15:37:43

we'll have to write down the indexing

15:37:44

and all and uh maybe we'll have to write

15:37:46

it down the label also to identify this

15:37:48

embedding right so many things is there

15:37:51

but we can do it by using the no SQL now

15:37:54

here uh uh let's uh understand about the

15:37:57

vector databases already I talked about

15:37:59

it and here you can see uh we have a

15:38:02

data which we are going to store inside

15:38:04

the traditional data a vector database

15:38:06

index and store Vector embedding for

15:38:08

faster uh retrievable and similarity

15:38:10

search right so for the faster retrieval

15:38:14

and similarity search we always use this

15:38:16

Vector database instead of the

15:38:18

traditional database we never use this

15:38:20

for storing the vector for restoring the

15:38:23

this vector and all now use cases of the

15:38:25

vector database so here long-term memory

15:38:27

for llm semantics s similarity search

15:38:29

recommendation is that the main thing is

15:38:32

this one only the semantic search and

15:38:33

the similarity search this concept uh

15:38:35

initially this concept has been

15:38:37

introduced by the Google itself if you

15:38:39

search about this Vector database now it

15:38:41

become too much popular after coming

15:38:43

like different different llms and all

15:38:45

and like this type of operation actually

15:38:47

there are like uh you will find out so

15:38:50

many

15:38:51

operation like where you have the

15:38:53

similarity search and the semantic

15:38:55

search semantic meaning and all and

15:38:57

where you have to sustain the long-term

15:38:59

memory right so because of that this

15:39:01

Vector database become too much popular

15:39:04

uh I hope this thing is clear to all of

15:39:06

you about the vector database now we we

15:39:09

have couple of name uh now this Vector

15:39:11

database this F from the openi side

15:39:14

right so you will find out this F over

15:39:16

the openi website actually it's a

15:39:18

research of the meta now here is a webb8

15:39:20

here is a choma DB pine cone is there

15:39:22

redus is also there there are so many

15:39:25

database or so many Vector database you

15:39:27

will getting you will be find you will

15:39:28

be able to find out now uh we are going

15:39:30

to use this Pine con and chroma DV and

15:39:33

will show you the babyit also but uh not

15:39:36

in today's session later on uh after

15:39:38

this uh like chroma and pine con but in

15:39:41

today's class first I will start from

15:39:43

the pine con because it is a little uh

15:39:46

simple compared to this chroma DB and

15:39:48

the we8 if we are talking about this

15:39:50

chroma DB and the we8 it is little uh

15:39:54

tough to configure not tough actually

15:39:56

compared to Pine con it is like little

15:39:57

harder so first we start from the pine

15:40:00

con itself and there we try to build our

15:40:02

small uh U like QA system

15:40:05

okay and here and later on we'll be

15:40:09

talking about this chroma DB and the

15:40:11

vate so let's start uh with

15:40:14

the Practical demo so for that uh what

15:40:18

we can do we can open our neural lab so

15:40:20

guys uh tell me are you ready yes or no

15:40:24

please do let me know the theory

15:40:26

whatever uh part I have discussed

15:40:28

whatever thing I have discussed through

15:40:30

this PP uh those part is clear to all of

15:40:33

you yes or no

15:40:36

again I will come to this one after uh

15:40:39

implementing uh in a python right after

15:40:41

doing the Practical stuff and all and

15:40:43

then again I will try to give you the

15:40:45

revision and then the understanding will

15:40:47

be more concrete to all of you

15:40:51

okay tell me guys fast if uh you will

15:40:55

say yes then I will proceed

15:41:04

further

15:41:40

great so let's start with the Practical

15:41:42

implementation now so here you can see

15:41:45

uh I opened

15:41:46

my uh I opened my uh neurol lab sorry I

15:41:50

opened my U ion website and here you

15:41:52

will find out this neurol lab so just

15:41:54

click on this neurol lab here uh which

15:41:57

you will find out over the website just

15:41:59

go and search the website

15:42:01

ion. and there uh you will find out a

15:42:04

option this neurol lab option just click

15:42:06

on that and here you will get the

15:42:09

interface neuro lab interface so uh what

15:42:12

you need to do guys here after opening

15:42:15

it you need to click on this start your

15:42:17

lab okay so once you will click on this

15:42:20

start your lab there you will find out

15:42:21

of various option like big data data

15:42:24

analytics data science programming web

15:42:26

development and all so here click on

15:42:28

this data science as of now uh like uh

15:42:32

we are working in this particular

15:42:33

segment data science so there you will

15:42:35

find out all the related tool right

15:42:37

whatever is required for the development

15:42:40

so here you will find out all the tool

15:42:42

whatever is uh like related for the

15:42:44

development and uh here we are going to

15:42:47

use this uh here we are going to use

15:42:49

this jupyter lab so just click on this

15:42:51

Jupiter lab after clicking on this data

15:42:53

science just click on this Jupiter lab

15:42:55

and here it will ask you the name you

15:42:57

can uh provide your name also you can

15:42:59

write it down your custom name so the

15:43:01

name uh which I'm going to write it down

15:43:03

over here so Vector database Vector DB

15:43:09

okay now what I will do guys here I

15:43:11

don't want to clone any repositories

15:43:13

like I'm saying no I don't want to do it

15:43:15

and then proceed so first you need to

15:43:17

write down the name and then U like just

15:43:20

select this particular option or no only

15:43:23

just click on that and then launch your

15:43:25

Jupiter instant so here you can see uh

15:43:28

this instance is getting launched

15:43:32

now this instance is getting launched

15:43:34

and and here after launching this

15:43:36

instance you can click on this Python 3

15:43:40

ipy kernel so just click on this

15:43:43

particular option Python 3 ipy kernel

15:43:46

and here you will get the file here you

15:43:48

you will get the Untitled file so you

15:43:50

can do the right click on that okay on

15:43:52

top of this file and you can rename it

15:43:55

so just do the right click on this

15:43:57

particular file untitle do iynb and then

15:44:00

click on this rename now here you can

15:44:02

write down the name so let's say the

15:44:04

name is what Pine con DB Pine con Vector

15:44:07

DB Pine con Vector DB so here is the

15:44:10

name the name is what the name is Pine

15:44:12

con Vector DB now I am ready for my

15:44:16

implementation I hope guys this is

15:44:18

visible to all of you and you can

15:44:20

clearly see this particular jupyter

15:44:21

notebook please do let me know if you

15:44:23

are able to do a

15:44:25

setup if you are able to launch your

15:44:27

jupyter notebook then please do let me

15:44:29

know please write down the chat I am

15:44:31

waiting for your

15:44:33

reply do it guys

15:44:40

fast yes or

15:44:50

no I'm waiting for your

15:44:53

reply if you have done all the setup

15:44:57

entire setup then please do let me know

15:44:59

in the

15:45:03

chat

15:45:07

sir show one more time yes I can show

15:45:10

you one more time so click just open the

15:45:12

neuro lab after opening the neuro lab

15:45:15

here you will find out the option start

15:45:17

your lab and my lab so don't click on

15:45:20

this my lab because if you have already

15:45:22

created a lab then only you will get

15:45:24

your Labs the lab template over here so

15:45:27

here what you can do guys tell me here

15:45:28

you can click on this if you are using

15:45:30

the first time right if you are creating

15:45:32

your left first time or see we are doing

15:45:34

first time now we are launching this

15:45:35

jupyter notebook first time only

15:45:37

throughout this uh throughout this geni

15:45:40

commune session so click on this start

15:45:42

your lab and here you will find out a

15:45:44

different different template so just go

15:45:46

with the data science and here click on

15:45:48

this Jupiter template and then give your

15:45:51

name or keep it by default only click on

15:45:54

no and then proceed that's it that's a

15:45:57

proed of that's that's a process and

15:45:59

it's a very very simple so please do it

15:46:01

guys and let me know then I will uh

15:46:04

writing down the code over

15:46:06

here waiting for your reply if you can

15:46:09

write on the chat I think uh that is

15:46:11

going to be

15:46:21

great and let me share this uh link also

15:46:25

okay I think let me check if I can share

15:46:28

with all of

15:46:28

[Music]

15:46:30

you just a

15:46:33

second

15:46:54

great so now let's start with the

15:46:56

session uh so let's start with the

15:46:58

Practical implementation okay now here

15:47:01

guys you can see so this is what this is

15:47:04

my uh Jupiter lab now I will be writing

15:47:06

the code from scratch and I will show

15:47:08

you like what all whatever thing will be

15:47:10

required so definitely I will show you

15:47:12

in between and even I will show you that

15:47:15

how you can generate an embedding how

15:47:16

you can save it and we'll show you that

15:47:19

how you can uh create a basic QA system

15:47:22

right by using the openi Ming now here

15:47:25

is what so here let's say uh so this is

15:47:28

my blank notebook so first of all I need

15:47:29

to install some Library so I'm I believe

15:47:32

that you are uh doing along with me so

15:47:35

please do it along with me because today

15:47:37

I will go very very slow uh this is

15:47:39

going to be a very important session for

15:47:41

uh further projects the projects which

15:47:43

we are going to do in our upcoming

15:47:45

session so please guys do it along with

15:47:48

me and I will be writing each and every

15:47:50

line each and every code in front of you

15:47:52

only so fine let's start now so here the

15:47:56

first thing which we are going to

15:47:57

install over here that's going to be a

15:47:59

len chin so here I'm going to install

15:48:02

Len chin let me write it down over here

15:48:04

the second thing which we are going to

15:48:06

install over here that's going to be a

15:48:08

pine cone so here let me write it down

15:48:10

pip install pip install pine cone so if

15:48:13

you want to use the pine cone so you

15:48:15

will have to install this pine cone

15:48:17

client right I will come to the pine

15:48:19

cone I will show you the pine con

15:48:21

website also but first let's try to

15:48:24

install this particular module so here

15:48:26

the second thing is what Pine con cone

15:48:27

client c e NT right the next thing which

15:48:30

we are going to install over here that's

15:48:32

going to be a p PDF so here let let me

15:48:34

write it down Pi PDF okay Pi PDF py uh

15:48:40

okay py PDF now the fourth thing which

15:48:43

we are going to install over here that's

15:48:45

going to be a open a so pip install open

15:48:48

a right so pip install open and now

15:48:51

there is one more Library which we need

15:48:52

to install so here I can write it down

15:48:55

pip install uh tick on so let me give

15:48:59

you the name uh tick token so there is a

15:49:03

library tick token so this is the

15:49:05

library which you need to install take

15:49:06

token so actually this library is a

15:49:10

important one if we are going to call

15:49:12

the open a embedding so it's a utility

15:49:15

actually for that particular class for

15:49:17

the embedding class got it now what I

15:49:20

will do here so I will run it and it

15:49:23

will be installing all the packages in

15:49:25

my current workspace so here you can see

15:49:28

guys my all the package is getting

15:49:30

installed so meanwhile I can show you

15:49:32

this Pine con so meanwhile uh I can show

15:49:36

you the pine con uh just a second so

15:49:39

just open your Google and here search

15:49:43

about the pine just write it on the pine

15:49:45

cone p i p i n e c o n e pine cone so

15:49:49

once you will uh click on once you will

15:49:52

like write it on this Pine con and you

15:49:53

will hit enter so here you will find out

15:49:55

the pine con website https www. pinec

15:49:59

con. now click on that now open this

15:50:02

particular website now here guys after

15:50:05

uh clicking on that you'll find out this

15:50:07

a particular interface this is the

15:50:09

interface of the uh this is the

15:50:11

interface of the pine con website so

15:50:14

have you opened it guys tell

15:50:16

me are you installing this uh are you

15:50:19

installing all the library the library

15:50:21

which I have written over here have you

15:50:23

opened this Pine con website because

15:50:25

from here I have to generate the API key

15:50:28

if we are not if we are not going to

15:50:29

generate API key in that case we won't

15:50:32

be able to call this pine cone right so

15:50:35

please uh do let me know if you have

15:50:37

opened

15:50:38

it so is it getting blurred or what so

15:50:42

my screen is blood please do confirm

15:50:44

guys please do let me know because I can

15:50:47

see it is not a blood one it is a clear

15:50:51

uh Crystal Clear actually and I can see

15:50:54

in my screen please do confirm in the

15:50:57

chat guys please write it down the chat

15:50:59

if you have opened this uh pine cone and

15:51:02

if you can clearly see this particular

15:51:04

screen yes or

15:51:07

no great now uh see here this is what

15:51:10

this is my pine cone now what you will

15:51:12

do see if you are uh if you are doing it

15:51:15

first time then you need to sign up what

15:51:17

you need to do you need to sign up so

15:51:19

just click on the click on this sign up

15:51:22

free and here you

15:51:24

can and here you can uh basically you

15:51:28

can uh sign up it will ask you about it

15:51:30

will ask you the email ID username and

15:51:33

it will ask you the like organization

15:51:35

name and all it's a optional one only

15:51:36

you just need to provide your email ID

15:51:38

or you can directly sign up by using

15:51:40

your email ID right you can directly

15:51:43

sign up by using the email ID it is it

15:51:45

is a very simple step just click on the

15:51:47

sign up and uh then sign up by using

15:51:50

your email ID and automatically you will

15:51:52

be login so I already did it over here

15:51:54

you can see I uh did it and this is what

15:51:57

this is a interface which I will uh

15:52:00

which you will get after the sign up

15:52:02

right so first you need to open the

15:52:04

website there you need to sign up right

15:52:07

and after the sign up what you will do

15:52:09

guys tell me after the sign up

15:52:10

automatically you will be log in and

15:52:12

you'll find out this particular page so

15:52:14

if you are doing along with me so yes I

15:52:17

can wait for you you can let me know in

15:52:18

the chat and if you have done till here

15:52:21

then I will proceed tell me guys

15:52:24

first uh waiting for the reply so if you

15:52:27

are hearing me if you are listening to

15:52:28

me then uh please do let me know in the

15:52:33

chat

15:52:55

fine so let's start now here you can see

15:52:57

see guys uh what you need to do

15:53:01

uh here yeah in your case actually it is

15:53:04

saying create the index now let me do

15:53:06

one thing let me delete this index so I

15:53:08

will show you from the starting so how

15:53:10

to create the index and all and what is

15:53:13

the meaning of it so let me delete this

15:53:14

particular index and here guys you can

15:53:17

see I deleted this index now in your

15:53:20

case it is giving you the option for

15:53:21

creating an index actually see if you

15:53:23

are using a free version if you have

15:53:25

created a free version right so in that

15:53:29

case you can only create a single Index

15:53:32

right if you're using a free tire free

15:53:34

tire of this spine cone so in that case

15:53:36

you only can create a single Index right

15:53:41

so now uh the first thing what you need

15:53:43

to do guys so here you need to click on

15:53:45

this API key left hand side you can see

15:53:48

this API key just click on this API key

15:53:51

now once you will click on the API key

15:53:52

so it will give you the option for

15:53:54

creating a API key and one key you will

15:53:56

find it over here by default so they

15:53:59

have given you one key that's a by

15:54:01

default key this one this one actually

15:54:03

this one okay so this is the by default

15:54:05

key which you can see over here uh which

15:54:08

they which everyone will get it right

15:54:11

and now here this is my key which I have

15:54:13

created by clicking on this create API

15:54:16

key got it so here this is my key which

15:54:19

I have created or they will give you the

15:54:21

by default key you can use this also

15:54:22

otherwise you can create a new also both

15:54:25

are fine right so if you have this by

15:54:27

default key now you are well and good

15:54:29

till here right you are fine till here

15:54:31

so tell me guys are you getting this

15:54:34

uh this key AR I think see there is some

15:54:38

problem from your side because I can

15:54:41

clearly see that everything is fine in

15:54:43

my system and uh it is visible to all of

15:54:47

other student so please check from your

15:54:49

side as well it is working fine or not

15:54:51

please check in your phone uh just try

15:54:53

to refresh your system if you getting

15:54:56

the blur

15:54:57

screen because in my screen the feed is

15:55:00

uh fine and I think no one is uh

15:55:04

complaining about it so please check

15:55:07

once yeah so if you are getting a

15:55:10

default key then it is fine so if till

15:55:12

here right if till here you proceed

15:55:15

along with me then it is fine now let's

15:55:17

go back to the code now here is my code

15:55:20

guys here is my code file here is my ipb

15:55:22

file so here guys you can see so I

15:55:25

install this libraries pip install L

15:55:28

chain Pine con Pi PDF open tikon I

15:55:31

installed all the required Library is

15:55:34

over here now let me do one thing let me

15:55:36

write down the further code so here and

15:55:38

the next cell after installing all the

15:55:40

library whatever was there I'm running

15:55:43

this uh like I'm running a further sale

15:55:45

so here guys what I need to do so here

15:55:47

now I'm going to import all the library

15:55:50

so here already I have written the

15:55:51

import statement now let me show you

15:55:54

those import statement here is a import

15:55:55

statement guys so the first import

15:55:57

statement is pi PDF directory loader

15:56:01

this is the first import statement the

15:56:03

second four statement is recursively

15:56:05

character text Splitter from the lenon

15:56:07

itself now the third one open AI

15:56:10

embedding right and the fourth one

15:56:12

you'll find out that's the opener itself

15:56:14

then we are going to import this spine

15:56:17

cone from the vector store which is

15:56:19

there inside the Len chain I'm using Len

15:56:22

chain only and I told you this Len chain

15:56:24

is a wrapper on top of each and every

15:56:27

API right so whatever thing uh see

15:56:31

better like you are if you're going to

15:56:32

build this LM based application if you

15:56:34

are using this Len chain so you will

15:56:37

find out U everything inside the Len

15:56:39

chain it's a wrapper on top of the every

15:56:42

API on most of the API so here you can

15:56:45

see you can import this pine cone from

15:56:47

here itself from the Len chain right so

15:56:49

from Len chain. Vector store and there

15:56:51

is what there is a pine code now Len

15:56:53

chain. llm here is a open a now Len

15:56:56

chain chain here we have a retrieval QA

15:56:59

each and everything will be clarified

15:57:01

once I will write it on the code only

15:57:04

now here you can see Len chen. prompt

15:57:06

and here is what prompt template so you

15:57:08

already know about the prompt template

15:57:10

you already know about the open a you

15:57:12

already know about the pi PDF directory

15:57:15

loader this thing recursive character

15:57:17

text splitter open a embedding and

15:57:20

retrieval QA this thing is a new one so

15:57:22

definitely I will explain you it don't

15:57:24

worry so what I can do here uh let me do

15:57:27

one thing if you are uh doing along with

15:57:29

me I can give you this particular code

15:57:31

and for that I what I can do I can share

15:57:34

this uh Cod share. where I will be uh

15:57:38

writing let me share with all of you

15:57:41

this Cod

15:57:43

share. okay just a

15:57:47

second Cod

15:57:52

share. yeah so here I can copy my entire

15:57:55

code this is the code this is the input

15:57:58

statement and

15:58:02

here and here is what here is my all the

15:58:06

library so which you need to install all

15:58:08

the packages which is which you need to

15:58:10

install now this is

15:58:13

the just wait let me copy it from

15:58:18

here this is the

15:58:20

packages yep it is fine now and this is

15:58:24

the import statement so import

15:58:29

statement and here uh required

15:58:34

package

15:58:36

required package right now let me give

15:58:39

you this particular link so here I'm

15:58:41

giving you this link inside the

15:58:43

chat just wait here it is here is the

15:58:47

session which is going

15:58:49

on now just wait here's the link guys

15:58:52

here's the link of the here's the link

15:58:55

of the Cod share. so please do confirm

15:58:58

did you get it guys yes or no please uh

15:59:01

do let me know inside the chat if you

15:59:03

got this particular link yes or

15:59:07

no I I given you this link inside the

15:59:09

chat so please do

15:59:12

confirm and don't worry my uh team will

15:59:14

also give you that my team will ping you

15:59:18

this

15:59:19

link so inside the chat itself if I'm if

15:59:22

I'm not able to do it just a

15:59:30

second this one

15:59:39

okay so I hope uh it is fine

15:59:42

now yeah so now I hope you got a link

15:59:45

please do let me know in the chat please

15:59:47

do

15:59:49

confirm I'm waiting for a reply and see

15:59:52

guys just copy and paste the code don't

15:59:55

remove from here right don't remove

15:59:57

don't cut it from here just copy and

16:00:00

paste yeah copy the entire code and run

16:00:02

it inside your uh run inside your this

16:00:06

uh IP

16:00:16

VB yeah so I'm waiting uh please do it

16:00:20

and then I will proceed

16:00:31

further yeah this one

16:00:41

okay

16:00:52

proceed yes this uh file will be

16:00:55

available over the

16:00:56

dashboard Vishnu is karma is saying sir

16:00:59

did not get a link I pasted now pasted

16:01:01

inside the chat just look into the chat

16:01:03

live

16:01:04

chat check with your live chat we have

16:01:07

we have given you that inside the chat

16:01:10

itself fine so now let's uh move further

16:01:15

here after installing all the library I

16:01:17

need to import this statement so here

16:01:20

you can see uh I'm able to import this

16:01:23

particular statement okay so I have

16:01:26

imported this particular statement now

16:01:28

guys what I will do here here in this my

16:01:30

in this my local workspace in my uh this

16:01:33

workspace I'm going to create one folder

16:01:36

right so I'm going going to create one

16:01:38

folder and for creating a folder there's

16:01:39

a command mkd so here I'm going to write

16:01:42

it down mkd PDF right so here I'm going

16:01:46

to create one folder the folder name is

16:01:47

going to be a PDF so see guys uh left

16:01:51

hand side if you will look into your

16:01:52

workspace you will find out the PDF

16:01:54

folder now inside this PDF I have to

16:01:57

upload the PDF and from there itself uh

16:02:00

see I can upload the text file or I can

16:02:03

upload the PDF XL CSV so I just required

16:02:06

a data right so I'm showing you this

16:02:08

embedding and all I'm showing you this

16:02:10

embedding and then I will store it then

16:02:12

I will query it so on top of the uh real

16:02:16

time PDF only I'm not going to create

16:02:18

any dummy data over here right so in

16:02:20

front of you only so here let's say h

16:02:22

I'm opening my Google and from here I'm

16:02:25

uh I'm searching about this attention

16:02:27

all your need right so this is the

16:02:29

Transformer research paper so let me

16:02:31

open this research paper and let me me

16:02:33

download it inside my system so here

16:02:35

what I'm going to do guys so here I'm

16:02:37

downloading this a

16:02:40

particular yeah here I'm downloading

16:02:42

this particular research paper inside my

16:02:45

system right so see guys uh what I can

16:02:47

do I can keep the name

16:02:49

Transformer right so this is what this

16:02:51

is my PDF now what I will do guys here

16:02:55

uh let me check the size of this PDF uh

16:02:57

if it is a huge one that definitely my

16:02:59

neurol lab uh won't allow to me let me

16:03:02

check if I'm able to upload it or not

16:03:04

this Transformer in my neural lab so

16:03:06

here what I will do I will click on this

16:03:08

upload button here and I will click on

16:03:12

my Transformer so as soon as I will

16:03:13

click on this I will be able to select

16:03:15

it then open it and here you can see my

16:03:18

neural lab is saying entity is too large

16:03:21

so what I can do here I can compress

16:03:23

this PDF so for that I can use any uh

16:03:26

online compressor so if uh your file

16:03:29

size is little uh huge so in that case

16:03:32

you can compress it if we are going to

16:03:33

upload it inside your neural lab so here

16:03:36

I'm writing about PDF uh

16:03:41

compressor uh so here you can compress

16:03:43

the PDF with any free compressor now

16:03:47

here I'm using this particular uh

16:03:49

website I'm opening my PDF and here it

16:03:52

is giving the recommended compression

16:03:54

now if I will click on the compress

16:03:58

PDF so it got converted into a 137 MB

16:04:02

from 2.11 MB now it is saying to me you

16:04:06

can download it so I'm downloading this

16:04:08

particular PDF and here Transformer

16:04:11

compressor right so I got my compressed

16:04:13

PDF it is very simple step you can open

16:04:16

the Google and you can search about the

16:04:17

PDF compressor if your PDF is too huge

16:04:20

let's say see here we are using a PDF

16:04:22

now for getting a data for collecting a

16:04:23

data right real time data so for that

16:04:27

only uh like I use this PDF compressor

16:04:29

because this neural lab is not

16:04:31

allying okay a file basically which is

16:04:34

having the size around 2 MB 2.11 MB now

16:04:37

let's see we are able to upload it or

16:04:39

not so what I will do here I will use

16:04:41

this Transformer compressed and if I'm

16:04:43

going to upload it or still it is saying

16:04:46

that request entity to larger okay just

16:04:49

wait uh let me compress it again uh

16:04:51

select PDF and here is a compress PDF

16:04:55

because I want to make it a small only

16:04:57

now extreme compressor okay this one

16:05:00

only let's see what will be the size of

16:05:02

it

16:05:04

no just a

16:05:06

second select PDF and here compress

16:05:12

PDF extremely

16:05:16

comparison uh the size is going to be

16:05:18

1.3 MB I don't think this lab will allow

16:05:22

to me just a

16:05:28

second otherwise I will have to use any

16:05:30

other file um this just a second let me

16:05:35

check so it is saying request entity too

16:05:38

large no issue no worry uh see what I

16:05:41

did actually let me show you my download

16:05:43

section so here before the class itself

16:05:46

I have uh I was exploring it and I

16:05:49

downloaded couple of PDF so this was the

16:05:52

PDF actually this was this is a YOLO

16:05:54

research paper so let me show you this

16:05:56

particular PDF this one see this is the

16:05:59

YOLO research paper YOLO V7 okay YOLO V7

16:06:03

as of now I was trying to show you

16:06:06

with attention all your need paper but

16:06:08

it is not allowing because uh the size

16:06:11

is a little huge see the size of this

16:06:13

compressed file 540 KB only now here the

16:06:16

size of this Transformer compress around

16:06:19

1,339 so actually it is not allowing to

16:06:21

me to upload this particular PDF so in

16:06:23

that case what you can do so here uh you

16:06:26

can uh we can use this YOLO V7 paper now

16:06:30

what I'm going to do let me first of all

16:06:31

rename this particular paper okay uh I

16:06:34

will have to close it from here just a

16:06:35

second now let me rename this paper so

16:06:38

here I'm going to write it down YOLO V7

16:06:41

so this is what this is my YOLO V7 paper

16:06:43

and now let me upload it over there

16:06:46

because I want a data and I'm going to

16:06:48

read the PDF and from there itself I am

16:06:50

going to collect my data for converting

16:06:52

into a embeding so now see it we have

16:06:55

uploaded this particular PDF so if your

16:06:57

PDF is uh exceeding exceeding the size

16:07:00

the size is around 1 MB so it won't

16:07:02

allow to you you cannot upload the PDF

16:07:05

in our neural lab so don't worry it will

16:07:07

be solved in our near a future sessions

16:07:11

so our team is working on that and it is

16:07:14

U we are like uh making it more powerful

16:07:17

as well so don't worry many more

16:07:19

functionality will find out over here

16:07:20

itself inside the lab now we got this

16:07:23

YOLO V7 now what I will do guys so here

16:07:26

I'm going to read this PDF so for that

16:07:29

already I'm uh for that basically

16:07:32

already I have imported this particular

16:07:33

class so here I'm uh like passing it I'm

16:07:37

copying and pasting over here and then

16:07:40

here I'm writing PDFs right so once I

16:07:42

will write on the PDFs so see it is

16:07:44

giving me that PDFs is not defined uh

16:07:48

PDFs where is a

16:07:51

PDF okay so actually I will have to pass

16:07:53

in a double code just wait let me take

16:07:56

in a double code yes so I I'm able to

16:07:58

load this PDF actually whatever we have

16:08:01

inside this PDF folder now what I will

16:08:03

do guys here I'm going to write down the

16:08:05

loader so this is what this is my loader

16:08:07

and now what I will do guys so here I

16:08:09

will call loader loader. load right so

16:08:13

by using this particular code I will be

16:08:15

able to read my PDF see this is what

16:08:18

this is my PDF now here I can collect

16:08:21

this data so this is what this is my

16:08:22

data which I'm going to be convert into

16:08:25

a vectors with that I'm going to making

16:08:28

a like embeddings and all and that

16:08:30

embedding I'm going to store inside my

16:08:32

dat database inside my Vector database

16:08:34

which is a pine gon right so now let me

16:08:36

show you this data so here is what guys

16:08:38

here is my data which you can see over

16:08:40

here and it is in a list format list

16:08:43

form so here just press zero so you will

16:08:45

find out all the data entire data

16:08:47

basically uh whatever we have inside the

16:08:50

PDF this is what this is my data right

16:08:52

now here we are able to load the PDF now

16:08:55

guys let me give you this particular

16:08:57

code so at least you all can run inside

16:09:00

your system so just a second

16:09:03

uh here is a code guys this one for

16:09:05

loading the PDF and here we have one

16:09:08

more function that's going to be a data

16:09:10

do load so loader do load actually just

16:09:14

a second let me copy and paste over here

16:09:16

this one so loader and here basically we

16:09:19

have a PDF and we are able to load the

16:09:22

data now uh yes we are able to get a

16:09:25

data now what I will do guys so here I

16:09:28

will perform the uh like a tokenization

16:09:32

right right so here the next step is

16:09:34

going to be a tokenization one let me

16:09:36

show you uh The Next Step so what I'm

16:09:38

going to do let me do one thing let me

16:09:40

copy and paste and here is what here is

16:09:43

my next step basically so just look into

16:09:45

the step what I'm doing here I'm calling

16:09:47

this recursive character text splitter

16:09:51

right and here my chunk size will be 500

16:09:54

and chunk overlap will be 20 right so

16:09:57

just just go through and check over the

16:09:59

Google or what you can do directly you

16:10:01

can copy this particular import

16:10:04

statement open it just just copy it and

16:10:06

open your Google and paste it over there

16:10:09

then you will get the complete

16:10:11

definition of it over here inside the

16:10:12

lench documentation now just look into

16:10:15

that just look into this recover split

16:10:18

by character so this text splitter is

16:10:21

recommended for one for generic text it

16:10:23

is parameterized by list of character it

16:10:26

is trying to splitting one of them in

16:10:28

order to until chunks are small enough

16:10:31

the default list is this one means uh if

16:10:34

it is going to find out any uh character

16:10:36

right so based on this particular

16:10:38

character is going to divide the data

16:10:40

into a tokens this has the effect of

16:10:43

trying to keep all paragraph and the

16:10:46

sentences and the word together as long

16:10:48

as possible and those would generally

16:10:50

seems to be strongest semantically

16:10:52

related piece of text so it is going to

16:10:54

create a tokens it's going to uh split

16:10:57

the text right if we are passing any

16:10:59

sort of a text to this particular method

16:11:01

so definitely going to be splited now

16:11:03

over here see we are going to open this

16:11:05

particular text here is what here is my

16:11:07

data now I'm going to create a I'm going

16:11:09

to import this particular class and here

16:11:11

I'm passing the different different

16:11:13

parameter so there is a chunk size so

16:11:15

set a really small chunk size just to

16:11:17

show so here the chunk size what 100

16:11:19

chunk overlap 20 length function is

16:11:22

length itself and is separator regx is

16:11:24

equal to false right now here uh what I

16:11:27

did so here I call this particular

16:11:29

method create documented and here I'm

16:11:31

going to pass my data so it will be able

16:11:33

to create a chunks it will be able to

16:11:36

create a chunks which is having a size

16:11:38

of 100 and the overlap chunk overlap is

16:11:41

equal to 20 right now let's do one thing

16:11:44

let's try to do it by using R data now

16:11:47

over here you can see we are able to

16:11:50

create a object of it so Rec character

16:11:52

text split chunk size 500 and Chun

16:11:55

overlap is 20 now here I'm going to

16:11:57

create a object of it so here is my

16:11:59

object text splitter and after that guys

16:12:02

what I will do I'm going to call one

16:12:04

method over here so here let me show you

16:12:07

the method this is what this is my

16:12:08

method a text chunks to text splitter.

16:12:12

split document this is what this is my

16:12:14

method and to this particular method I'm

16:12:16

passing my data right to this particular

16:12:19

method I am passing my data now let me

16:12:23

run it and here you can see we have the

16:12:26

chunks of the text so text underscore

16:12:29

chunks now here guys you will see so we

16:12:31

are able to convert our text into a

16:12:35

various chunks now let me show you so

16:12:37

here this is inside the dictionary so

16:12:40

let me do one thing let me first of

16:12:44

all scroll down till

16:12:48

last

16:12:50

okay and here I'm going to pass this

16:12:53

chance now here let me write down the

16:12:55

zero so this is my first chunk right so

16:12:58

we we have approximately 500 tokens

16:13:01

right now of 500 chugs basically we have

16:13:03

created from that and this is the like

16:13:05

first one right now over here what I'm

16:13:08

going to do see uh here I'm going to

16:13:11

write it down the print statement right

16:13:13

so I'm going to pass this value in a

16:13:14

print function and here you will see

16:13:17

that we have a data this is what this is

16:13:18

my data now here textor chunks and in a

16:13:22

square bracket we have a zero now what I

16:13:23

will do I will call this page content

16:13:25

right so pageor content so here guys you

16:13:28

will find out this is what this is my

16:13:30

content right so this is what this is my

16:13:32

first one now let me show you the second

16:13:34

one here is what here is my second one

16:13:36

see uh the uh here if I'm passing first

16:13:39

this is my second one right now this is

16:13:41

what this is my third one right so here

16:13:43

what I can do I can pass two and this is

16:13:45

what this is my third chunk so we are

16:13:48

going to convert or we are going to

16:13:50

divide our data into a chunks right and

16:13:53

this is the first chunk this is the

16:13:55

second chunk now here is a third chunk

16:13:57

this is what this is my chunk actually

16:13:59

and from where from our PDF data

16:14:02

right from our PDF data now if you will

16:14:05

check the length of it so here let me do

16:14:07

one thing let me check the length of

16:14:10

this textor chunks right so here is the

16:14:14

length of text underscore chunks Chu Ms

16:14:19

now you will find out the chunks length

16:14:20

is 152 means total 152 are like

16:14:24

paragraphs you will find out from the

16:14:26

data itself right so the chunks

16:14:28

basically which we are making which we

16:14:30

which we have made are from from the

16:14:32

data itself the data which we have

16:14:34

loaded right so here is what here is my

16:14:36

152 chunks and this is my first second

16:14:38

third now you can print the 152 chunks

16:14:41

as well so here what you can do you can

16:14:43

write it down the

16:14:44

151 actually that will be a 152 chunks

16:14:47

because the index is going to start from

16:14:49

the zero so now let me print it and here

16:14:51

you will find out the last one so former

16:14:54

4 and 2 and object detection in

16:14:57

proceeding the International Conference

16:14:59

or learning representation now if you

16:15:01

want to do it see here uh I did it

16:15:04

randomly means uh if you will look into

16:15:06

the first chunk it is going to stop over

16:15:07

here if you look into the second chunk

16:15:09

it is going to be stop over here but if

16:15:11

you want to do it based on any

16:15:13

requirement right and based on any

16:15:16

meaningful context which uh which is

16:15:18

like required according to your problem

16:15:20

statement so for that you will have to

16:15:22

look into the data you will have to

16:15:23

perform the text preprocessing over

16:15:25

there right and then only you you will

16:15:27

have to put some sort of a logic then

16:15:29

okay if this thing is coming then only

16:15:31

you have to cut the data if this thing

16:15:32

is coming then only you have to cut the

16:15:34

data right so here you will see guys uh

16:15:37

like we are able to create uh like

16:15:40

chunks over here right so um there is uh

16:15:44

total 152 actually now what I will do

16:15:48

after doing this thing uh I have shown

16:15:50

you the chunks and all now let me show

16:15:52

you the next one now what I will do guys

16:15:54

here uh first of all let me uh open the

16:15:58

openi openi API key now here I'm going

16:16:01

to write it down this uh import OS and

16:16:04

here OS do os. getb now here what I'm

16:16:09

passing I'm passing this open API key

16:16:12

right I'm going to set my open API key

16:16:16

so all value will be in a cap so open AI

16:16:21

underscore API underscore key got it now

16:16:24

here I'm going to pass my API key now

16:16:27

let me generate the API ke I think I

16:16:29

already generated it let me copy it from

16:16:30

there itself h let me open the open okay

16:16:34

here it is this one this is the OPI key

16:16:36

now what I can do I can paste it over

16:16:39

here this one so yes I'm able to set my

16:16:43

open AI API key right this is fine okay

16:16:49

now get En the

16:16:52

assignment what is this okay open AI

16:16:56

which I don't want to fetch it actually

16:16:58

I want to set it so there is a different

16:17:01

uh like name in wire e

16:17:04

NV R actually this is the name so I want

16:17:08

to set the like API key in my

16:17:11

environment variable in my system

16:17:13

environment variable so this is the

16:17:15

method got it now this is fine we have

16:17:18

created a chunks and uh everything is

16:17:22

fine now what I will do I will create a

16:17:25

object of the open embeding open emding

16:17:28

class so let me show you what I can do I

16:17:31

can open my my open a let me open the

16:17:34

open a itself just a

16:17:37

second open AI right now here uh just go

16:17:41

with the documentation just just click

16:17:43

on the documentation over

16:17:47

here yeah this is what this is your

16:17:49

documentation just scroll down there you

16:17:51

will find out the embeddings got it now

16:17:54

click on the embeddings here is

16:17:55

embedding now uh what you need to do

16:17:58

guys here you need to import this

16:18:00

embedding okay this this particular

16:18:03

embeddings okay so if if I want to

16:18:05

convert my data into a vectors if I want

16:18:07

to if I want to make it like the vector

16:18:11

actually the context Vector so I I'm

16:18:14

going to use this embedding from the

16:18:16

open a now how I can do that how I can

16:18:19

use it let me show you so for that what

16:18:22

uh you can do so here uh we have a class

16:18:25

direct class actually open I aming which

16:18:27

I which I have imported over here if you

16:18:29

will look into the import statement

16:18:30

right so already I have imported this

16:18:32

thing and where it is let me show you

16:18:35

over here see this one open AI right uh

16:18:38

open AI M okay this one uh where it is

16:18:41

open embedding so from Lang CH actually

16:18:43

we are going to import this openi

16:18:44

embedding now what I can do I can create

16:18:47

a object of it so I'm going to create a

16:18:49

object of the open a embedding and here

16:18:52

what I'm going to do I'm going to keep

16:18:54

this thing inside the embedding itself

16:18:56

so this is what this is my embedding

16:18:58

right open a embedding okay now the next

16:19:01

is what so here I'm going to write it

16:19:03

down I'm going to call one method so the

16:19:05

method is what the method is nothing so

16:19:07

aming dot and here I'm writing idore

16:19:11

query so idore query and here what I

16:19:15

will do guys here I'm going to pass

16:19:16

something so here I'm passing how are

16:19:19

you right so once I will run it so here

16:19:22

I have passed how are you now see it

16:19:24

will generate the embedding for it see

16:19:26

guys it have generated an embedding if

16:19:29

see I told you how it is going to

16:19:31

generate embeding bding it's going to

16:19:32

generate an amb bidding based on a

16:19:34

features right based on a feature so I

16:19:37

told you guys see uh when I was talking

16:19:40

about the word to bag right just a

16:19:42

second when I was talking about the word

16:19:45

to bag when I was talking about the word

16:19:47

to back so actually there was there was

16:19:51

the vector that the size was the vector

16:19:54

of 300 right 300 Dimension now if you

16:19:57

will look into the open AI embedding so

16:19:59

let's check the size of that so so uh

16:20:02

this sentence actually they have

16:20:03

converted into a vector now let's look

16:20:06

into the size that what size I'm getting

16:20:08

or for this particular Vector so over

16:20:10

here I can copy it and what I can do

16:20:13

just a second let me scroll down because

16:20:16

the vector size is very very huge uh

16:20:20

just a wait here is what here is my

16:20:28

embedding

16:20:30

okay

16:20:32

just just wait guys so let me keep it

16:20:34

inside the

16:20:40

variable yeah here it is this one so

16:20:43

what I can do I can directly call this

16:20:44

length function over here so let me show

16:20:47

you the number of embeddings over

16:20:49

here so the number of embedding is 1 53

16:20:53

6 this is the length of the embeded

16:20:56

vector getting my point guys yes or no

16:20:59

so here is my sentence how are you I

16:21:01

given this sentence and based on this

16:21:04

sentence is it has generated one vector

16:21:06

which is the size of the vector is 1 53

16:21:09

6 the size of the vector is 53 6 got it

16:21:14

so I hope this part is clear to all of

16:21:17

you now um I got the vector I got the

16:21:21

length also now let's try to discuss so

16:21:25

here uh we have this open AI right so we

16:21:27

have this open a actually uh we have the

16:21:30

open a API we able to call this open a

16:21:32

embeddings everything is working fine

16:21:34

everything is uh going seamlessly right

16:21:37

now over here this is my data also so we

16:21:39

have a data we have a open a now it's

16:21:41

time to import this pine cone right so

16:21:44

now let's uh like import the pine cone

16:21:47

and whatever embedding we are going to

16:21:49

generate from here so the embedding I'm

16:21:51

going to store in my pine cone Vector

16:21:53

database so for that basically what I'm

16:21:55

going to do here uh here uh the first

16:21:58

thing which I'm going to write it down

16:22:00

that's going to be my Pine one API key

16:22:02

right there is two thing two variable

16:22:04

now what I can do till here I think

16:22:06

everything is fine and please set your

16:22:09

openi key and call the just just create

16:22:12

this model let me give you this uh thing

16:22:14

over here this one so you all can copy

16:22:17

and you all can run along with me and

16:22:20

this is also let me remove it as of now

16:22:23

from here and Yep this is the one now

16:22:27

you need to write it down your own so

16:22:30

here is what here is the open AI key

16:22:34

which you need to set right and the next

16:22:36

one open a embedding and here if you're

16:22:39

going to call it then everything is

16:22:43

going fine right so just a second this

16:22:47

is the length of the ambic now the next

16:22:49

one basically what I can do here I can

16:22:51

give you this particular code also so

16:22:54

okay first of all let me remove this

16:22:56

thing this particular thing and here let

16:22:59

me remove this thing also so fine uh now

16:23:03

it is clear and you can run along with

16:23:05

me so please check out the link this Cod

16:23:08

share. link inside the uh inside the

16:23:11

chat box guys and please try to copy

16:23:13

from there please try to copy this code

16:23:15

from there right now uh see guys uh one

16:23:18

more thing if you are liking the session

16:23:20

then please hit the like button okay

16:23:23

this motivates me a lot and please write

16:23:25

down the comment please be active in the

16:23:27

chat if I'm asking something see I've

16:23:29

seen many people are seeing this this

16:23:30

one many people are watching it in a

16:23:32

live uh in a live mode but they don't

16:23:35

interact actually please be interactive

16:23:38

if you are interacting that definitely I

16:23:39

will also get a motivation I will show

16:23:41

you like two to three more new thing if

16:23:43

you're not doing that in that case um it

16:23:47

will be hard for me also I will stop it

16:23:49

this session by explaining you one or

16:23:51

two concept only if you are asking to me

16:23:53

then basically definitely I will explain

16:23:56

you few more thing few more concept got

16:23:59

it so please be interactive please write

16:24:01

down the chat and please hit the like

16:24:03

button if you're liking the session so

16:24:05

far now guys here what I need to do I

16:24:08

need to set the pine con API key right

16:24:11

Pine con API key so from where you will

16:24:14

get it so just open the pine con website

16:24:16

so here is my pine cone just go inside

16:24:18

the API key and here is my API key so

16:24:21

you can use the default also or you can

16:24:23

create the new also so here I have

16:24:24

created a new one so let me copy this

16:24:26

particular key and let me paste it over

16:24:29

here that is the first thing which I

16:24:30

need to do right the second thing I need

16:24:33

to pass pine cone API environment so

16:24:36

where I will get it where I will find

16:24:37

out this pine cone just click on the

16:24:39

fine code website here is the

16:24:40

environment name just copy this thing

16:24:42

copy this gcp starter and here you can

16:24:45

paste it inside the double code right so

16:24:48

I think both thing is fine now let me

16:24:49

set it okay this is fine this is clear

16:24:53

now guys what I need to do here I need

16:24:54

to import the pine C so here I'm going

16:24:57

to import the pine C yes uh I imported

16:25:01

it not an issue so there is no such

16:25:03

issue with that now here guys what I'm

16:25:05

going to do so I'm going to call one

16:25:09

method and this method is going to be a

16:25:11

very very important so my method name is

16:25:13

what pine cone in it right see guys over

16:25:17

here just just look over here uh this is

16:25:19

not a typical at all what we are going

16:25:21

to do see uh this is the method and

16:25:24

which method we are going to call Pine

16:25:26

con. init so here itself in a pine con

16:25:28

documentation you will find out let me

16:25:30

show you uh just just search over the uh

16:25:32

just click on this document and here is

16:25:35

what here is a pine cone documentation

16:25:38

now just just click on the quick start

16:25:40

uh once you will click on the quick

16:25:42

start now so there you will find out the

16:25:45

like all the thing right so here you

16:25:48

need to import the pine cone here you

16:25:50

need to set or you need to set your API

16:25:53

key and your environment name everything

16:25:55

is here everything over the like website

16:25:58

itself in the documentation itself I'm

16:26:00

taking a reference from the

16:26:01

documentation now the next thing is what

16:26:04

you need to call this init method so let

16:26:06

me do it and let me run it yes this is

16:26:09

done we are able to do it and here I can

16:26:12

give you this code as well inside the

16:26:15

code

16:26:16

share. so this is the code guys which

16:26:19

I'm going to paste and there is what

16:26:21

there is an import statement also which

16:26:23

I'm going to paste over here just a

16:26:26

second so you can copy along with me and

16:26:28

you can run it you can test it because

16:26:30

it is going to be a more interesting now

16:26:33

so this last 20 minutes is a climax of

16:26:35

the session is going to be a more

16:26:37

interesting so just wait for next 20

16:26:39

minute and you will see the magic right

16:26:40

so how efficient it is how like it is

16:26:43

working actually you will find out a

16:26:44

final conclusion over here now we have

16:26:47

initialize it now the next thing we have

16:26:49

to initialize the index name so here is

16:26:51

what here is my index name which I have

16:26:53

to initialize so where I will find out

16:26:55

the index name so just go through with

16:26:59

your pine cone and here click on the

16:27:02

indexes here right so click on the

16:27:05

indexes and click on this create index

16:27:07

see this uh actually this pine cone now

16:27:11

it is running on top of the cloud once

16:27:14

you will search over the uh once you

16:27:15

will search about this pine cone just

16:27:17

let me show you uh search about the pine

16:27:21

cone so open open the website and here

16:27:26

you will find out

16:27:27

that it is working on top of the cloud

16:27:30

so the server basically which is

16:27:32

using Cloud

16:27:38

Server the AWS Ser or a server anything

16:27:42

we can use

16:27:59

okay

16:28:21

uh just a second guys just a second just

16:28:22

a wait uh I think I'm getting some issue

16:28:25

with the connection just allow me a

16:28:28

minute just

16:28:29

wait

16:29:27

yeah now I think it is fine so

16:29:35

yep now it is clear now it is fine so

16:29:37

here guys you can see if we are talking

16:29:39

about if we are talking about this pine

16:29:41

cone right so if we if we are talking

16:29:44

about this pine cone now so this

16:29:46

actually it is being created on top of

16:29:48

the Cloud Server so here they have given

16:29:51

you the entire detail so just check with

16:29:53

the product uh so each and everything

16:29:56

you will get about this pine cone right

16:29:58

and here you will find out that it is

16:30:00

going to fully managed by the AWS server

16:30:03

either you can use AWS or Google or

16:30:06

Azure and here there is a pricing detail

16:30:09

also so you will find out the pricing

16:30:10

detail how much it's going to be charged

16:30:13

for the specific P for the indexes the

16:30:15

index which you are going to create how

16:30:17

you can scale it right everything you

16:30:19

will get it so as of now we are using a

16:30:21

free plan free tire of the spine cone

16:30:24

but it is getting uh it's a chargeable

16:30:26

also so you will see the prices and all

16:30:28

prices is 0.096 per hour 0.111 144r

16:30:32

right this this for the Enterprise the

16:30:34

standard this the like just a free

16:30:36

version of it just just go through with

16:30:39

the website everything you will find out

16:30:41

over there itself now here I have to

16:30:44

create the index name now how I can do

16:30:47

it how I can create the index name so

16:30:49

just click on the index this this

16:30:51

particular index and here it will give

16:30:53

you the option for creating index so

16:30:55

just write it down your name let's say

16:30:57

my index name is testing and here you

16:30:59

need to mention the Dimension right so

16:31:02

just look into the dimension that what

16:31:04

was the dimension over there so let me

16:31:06

uh do one thing let me show you the

16:31:08

dimension of that so for that basically

16:31:11

just scroll up see here 1 1536 so this

16:31:14

was the dimension actually when I

16:31:16

checked uh with the open I'm Ming so

16:31:19

here you will find out that this is the

16:31:20

dimension which I'm getting you you can

16:31:22

check with regarding the other sentences

16:31:24

also so here uh let's say if I'm saying

16:31:26

something whatever uh let me do one

16:31:29

thing let me copy and let me paste it

16:31:31

over here here I'm saying uh I am fine

16:31:34

right hi hi I am fine so this is what

16:31:39

this is my like sentence which I'm

16:31:41

writing over here now you will find out

16:31:42

the embedding and let me show you the

16:31:44

dimension of this particular embedding

16:31:48

now here you will find out the dimension

16:31:50

is around 1 536 it's the same one right

16:31:54

so this Dimension is nothing it's a

16:31:55

feature right so how many feature is

16:31:58

there I I told you now uh when I'm

16:32:01

talking about word to back there is 300

16:32:03

feature I shown you this example just

16:32:06

just look into this particular example

16:32:08

so we this is a vocabulary and we have

16:32:09

five feature by using this five feature

16:32:12

I'm representing my data so here

16:32:15

actually in opena edding there is 1 5 3

16:32:18

six feature by using that they are

16:32:21

representing a data so here the size of

16:32:24

the embedding is going to be 1536 so

16:32:27

what do you need to do guys here you

16:32:29

need to write it down 1 53 6 now it will

16:32:32

ask you about the metrix so what should

16:32:35

be the metrix for the for the simulat

16:32:37

search so here there is a three option

16:32:40

dot product equan and cosine so here I'm

16:32:42

using the cosine because the uh cosine

16:32:45

is a uh like little impactful compared

16:32:47

to this dot product and the ukan right

16:32:50

so here just click on the cosign and

16:32:52

here I'm using the free plan free plan

16:32:55

of the pine cone right so now this is

16:32:58

fine this is clear let's create a index

16:33:00

over here if you are going to click on

16:33:03

this create index so it is creating an

16:33:05

index so index creating file to create

16:33:07

capacitor is okay so I already created

16:33:09

one index now see uh yeah now it is fine

16:33:13

uh it is created and here you can click

16:33:15

on the connect and there this will give

16:33:17

you the all the details and all now this

16:33:20

is what this is my index name testing is

16:33:22

what testing is my index name I hope you

16:33:24

are able to create this index and here

16:33:26

you will get this Green Dot green icon

16:33:30

now what I can do I can pass the name so

16:33:32

here I can write it down the index this

16:33:34

my index name that is what that is a

16:33:36

testing right so here is what here is my

16:33:38

index name that's going to be a testing

16:33:40

now what I will do guys I will run this

16:33:42

particular line This one this uh which I

16:33:45

shown you uh this one pine cone do index

16:33:49

and equal to index so let me copy it and

16:33:52

let me paste it over here let me paste

16:33:55

it over here and here what I need to do

16:33:57

guys tell me here I need to pass my

16:34:00

index name this one right so this this

16:34:02

index name actually I can pass directly

16:34:04

means I can pass this particular name or

16:34:06

I can pass directly also both are fine

16:34:08

right so I believe you are able to set

16:34:10

your index now what I will do guys so

16:34:13

here um just a bit okay so now guys you

16:34:18

need to create an embedding for each uh

16:34:21

text Chunk so let me copy it and let me

16:34:24

paste it over here this one this is

16:34:27

going to be here this one so this is

16:34:29

what this is my markdown actually just

16:34:31

let me write it down like this yes so

16:34:33

now you need to create an embedding for

16:34:35

each chunks okay so this is what this is

16:34:37

my index and now till here everything is

16:34:39

fine right now guys what I will do so I

16:34:41

need to create an embedding right so for

16:34:43

that let me show you the code so here is

16:34:45

the entire code this one this is my

16:34:47

entire code so till here everything is

16:34:49

fine you just need to call this one you

16:34:52

just need to set this one let me give

16:34:54

you this code as well so from here you

16:34:56

can copy from my

16:34:58

uh from my code share. you can copy just

16:35:02

a second just a wait let me give you

16:35:05

this

16:35:05

particular like line of code and here

16:35:08

guys you will find out so now we have to

16:35:10

create an embedding for each of the text

16:35:13

Chunk so whatever uh Chunk we have

16:35:15

created from our PDF I'm going to create

16:35:17

an embedding for that now here I'm

16:35:19

saying from text t. page see I'm taking

16:35:23

a uh text actually uh this is a list now

16:35:27

so here I'm uh using this list

16:35:29

comprehension so so this is my list of

16:35:31

the text junk this is a text which we

16:35:32

are getting now from here we are going

16:35:34

to get a page content what is a page

16:35:36

content I shown you this is a page

16:35:38

contain this

16:35:40

one so I'm using this for Loop and I'm

16:35:43

collecting all the page content over

16:35:45

here and I'm calling this embedding I'm

16:35:47

using this I'm using this embedding

16:35:49

object and here is my index name index

16:35:53

name basically which I'm uh like which I

16:35:55

have created this one okay this is my

16:35:58

index name okay testing is my index name

16:36:00

so three argument we are passing over

16:36:03

here so Pine con from text and this is

16:36:06

what this the three argument which we

16:36:07

are passing over here first is data

16:36:10

first is what first is a data the second

16:36:13

is embedding and the third is what third

16:36:15

is a index name right this one now if I

16:36:18

will run it so over here you will find

16:36:20

out that it is saying embeddings is not

16:36:23

defined okay my name is iding only now

16:36:25

let me keep it iding yeah it is fine and

16:36:28

it is working

16:36:30

so here is clear to all of

16:36:35

you uh guys can you see

16:36:42

my okay so can you see my vs code uh it

16:36:46

is visible to all of you uh just a

16:36:54

[Music]

16:36:59

second now it is visible yes or

16:37:10

no just a second guys just a second let

16:37:13

me check

16:37:24

once wait wait wait wait I'm checking

16:37:26

don't worry don't worry I'm checking

16:37:28

right just just wait just allow me a

16:37:29

minute

16:37:37

yeah yeah wait guys wait I'm checking

16:37:40

just allow me a minute just allow Me 2

16:37:41

minute I'm checking with that now it is

16:37:44

working fine now it is coming to all of

16:37:46

you now can you see my code screen this

16:37:51

one yes or

16:37:57

no don't worry I will repeat it I will

16:38:00

uh revise all the thing don't worry

16:38:02

right just a second just a

16:38:27

wait don't worry I can revive why is the

16:38:30

thing whatever I did over here so just a

16:38:33

second now see uh what I was saying we

16:38:36

have created an index right so till

16:38:38

index I think it was fine now I just

16:38:40

created a embedding for each of the text

16:38:42

Chunk means whatever chunks we have

16:38:44

created now for that I'm going to create

16:38:46

a indexing means I'm going to create a

16:38:48

emitting right now from here actually

16:38:51

see this is my text Chunk this is what

16:38:53

this is my text Chunk one uh like uh uh

16:38:56

basically I'm iterating on top of that

16:38:58

I'm iterating on top of the chunks so

16:39:00

here right now I'm getting the uh like

16:39:02

first chunk and then I'm collecting the

16:39:04

page content similarly you can see over

16:39:06

here this one I'm going to collect a

16:39:08

chunk now I'm going to collect a chunk

16:39:10

Now by using this particular list

16:39:13

comprehension by using this particular

16:39:15

list comprehension I'm going to collect

16:39:16

a chunk now here is my embedding object

16:39:19

which I have passed and here is my index

16:39:21

name which I have created by using the

16:39:23

pine cone website right now just look

16:39:26

into this code share. there I have given

16:39:28

you the entire code till here now let me

16:39:30

give you the last line also which I have

16:39:33

run uh which I have created over here so

16:39:36

here let me give you this particular

16:39:37

line and here is what here is my dog

16:39:39

search this one now guys what I will do

16:39:41

this is what this is my dog search right

16:39:43

now I have to call something first of

16:39:45

all let me show you that what we have

16:39:47

inside this dog search actually you will

16:39:49

find out one object this is what this is

16:39:51

the object right this is what this is

16:39:52

the object see uh here is what here's a

16:39:56

pine code now from text actually what

16:39:58

I'm going to do from text text I'm going

16:40:00

to create a embedding so whatever text

16:40:03

whatever chunks whatever chunks we have

16:40:06

right whatever chunks we have regarding

16:40:08

those particular chunks we are going to

16:40:10

create a embeddings right so here uh you

16:40:13

can see we are going to call Pine Cone

16:40:15

Dot from text and here is what here is

16:40:18

my text and here is my edding right and

16:40:21

here is what here is my index name don't

16:40:23

worry if you are not able to connect I

16:40:24

will give you the quick revision at the

16:40:26

end right first just just look over here

16:40:28

and just see what what is happening over

16:40:30

here right so this is what guys this is

16:40:32

my dog search now what I will do let me

16:40:34

show you the next line Next Step that

16:40:36

what I'm going to do over here okay so

16:40:38

here actually uh I'm going to find out a

16:40:41

s see uh after running this particular

16:40:44

uh statement this Pine cone. fromom text

16:40:47

right so here you are going to generate

16:40:49

an embedding now just look into the

16:40:51

dashboard the dashboard basically which

16:40:53

we have over here uh let me show you so

16:40:56

once you will refresh it now this one so

16:40:58

here you will find out all all the

16:41:00

embeddings all the embeddings from our

16:41:02

PDF from our text right so just wait let

16:41:05

me uh show you that here guys see this

16:41:08

is what this is all the embeddings here

16:41:11

is my uh text which I tokenize which I

16:41:14

converted into a small small phrases and

16:41:17

regarding that here is a embedding this

16:41:19

one just just copy it and check it is a

16:41:22

embedding Vector so this this text

16:41:24

actually we are able to convert into a

16:41:27

embeddings we are able to convert into a

16:41:29

vector vectors and here you will find

16:41:31

out the score also so this is

16:41:33

representing a similarity score right

16:41:36

how much it is similar to other

16:41:37

sentences to other

16:41:40

phrases right here you can see uh this

16:41:43

is what this is my Ming don't don't

16:41:45

worry if you not able to correlate just

16:41:47

wait for some uh just wait for few

16:41:50

minutes I will give you the quick

16:41:51

revision of it right I will give you the

16:41:53

quick revision by writing each and

16:41:54

everything and then definitely you will

16:41:56

be able to get it now here uh you can

16:41:59

see this is what this is my embedding

16:42:01

related to the particular text right and

16:42:03

here what we have we have a score right

16:42:06

related to this particular text we have

16:42:07

a score this is what this is the score

16:42:09

now what I will do so yes we are able to

16:42:12

create an embedding and that embedding

16:42:14

uh here you can see uh like it is

16:42:16

visible you can uh access here also

16:42:19

right by using this dog search uh I will

16:42:22

show you how so first of all let me show

16:42:23

you one example one uh small thing so

16:42:26

what I'm going to do I'm doing a

16:42:28

similarity search now here I'm writing

16:42:30

query actually in the in my query

16:42:32

actually what I'm doing I'm writing uh

16:42:35

one statement and let me do the

16:42:37

similarity search over here so here is

16:42:39

what here is my sentence guys which I

16:42:41

have written over here YOLO V7

16:42:44

outperform which model right so this is

16:42:46

what this is my question this is my

16:42:47

sentence now here is what here is my

16:42:49

query which I'm going to uh which I have

16:42:51

written basically now what I'm going to

16:42:53

do I'm going to find out a similarity

16:42:55

search right so let me do one thing let

16:42:57

me find out the similarity search Now by

16:42:59

using this Vector so here in this

16:43:01

particular object we have all the

16:43:03

vectors now I'm going to call one method

16:43:06

that's going to be a similar to suchar

16:43:08

and here we are going to pass our query

16:43:11

this this particular query which I have

16:43:12

written now let me show you what I will

16:43:14

get over here so here you can see as

16:43:17

soon as I run this particular uh uh like

16:43:20

uh line okay this particular code so in

16:43:22

the docs what you will find out let me

16:43:24

show you so in the docs actually you can

16:43:27

see this is the similarity search right

16:43:29

this is the similarity search basically

16:43:31

which we are able to get but the thing

16:43:33

is over here we are getting in the form

16:43:35

of Vector in the form of numbers it is

16:43:38

not a proper sentences right now let me

16:43:41

show you how we can convert this number

16:43:44

into a sentences right so I hope till

16:43:47

here everything is fine don't worry if

16:43:49

you're not able to correlate if you're

16:43:50

not able to understand once we'll create

16:43:53

a project or right after the session

16:43:55

after this particular session I will

16:43:57

give you the quick recap of it right so

16:43:59

based on that based on the quick recap

16:44:01

you can correlate this particular

16:44:03

implementation and then you can revise

16:44:05

it right and then you can revise each

16:44:07

and everything so over here you can see

16:44:09

this is what this is my embedding this

16:44:11

is my similarity search which I'm able

16:44:13

to generate by using this particular

16:44:15

query now I'm getting a number but I

16:44:18

want a sentence how I can get it let me

16:44:21

show you that also so for that guys what

16:44:24

you need to do uh you need to create a

16:44:27

llm means you need to call the uh uh

16:44:30

like open API so over here uh we have

16:44:33

this open method open a and here I'm

16:44:36

going to create a object of it so yes

16:44:39

definitely I'm able to call my open a

16:44:42

API this one by using by creating this

16:44:44

particular class right so here is what

16:44:47

here is my llm right step by step step

16:44:49

by step I'll try to go ahead don't worry

16:44:51

now what I'm going to do here uh here

16:44:54

actually I'm going to call this

16:44:55

particular method the method name is

16:44:57

what retrieval QA right so this is what

16:45:00

this is my method name retrieval Q QA so

16:45:03

this is a method this uh actually this

16:45:05

class actually this is not a method this

16:45:07

is a class and inside that we have a

16:45:09

method the method name is from chain

16:45:11

type so this is responsible for question

16:45:13

answering if I want to create a question

16:45:16

answer system so here in the open a

16:45:18

itself you'll find out this retrieval QA

16:45:21

right retrieval QA and inside that we

16:45:23

have a method the method name is what

16:45:25

from Chen type so here what we are doing

16:45:28

we are passing this l M we are passing

16:45:30

this chain type is stuff retriever is

16:45:32

dog search do as retriever right this uh

16:45:37

dot s retriever here you will find out

16:45:40

this particular method right don't worry

16:45:41

again I will explain you this particular

16:45:43

part uh first of all let me run it and

16:45:45

let me show you that what I will get

16:45:47

from here so here I'm running it and

16:45:50

here you can see we are able to create

16:45:51

this QA the object of this retrieval QA

16:45:54

right now guys what I will do here let

16:45:56

me write down the query again right so

16:45:59

here is what here is my query this is

16:46:01

what this is my query now what I will do

16:46:03

I'm going to um write down QA do run

16:46:08

right and inside this run I am going to

16:46:11

pass I'm going to pass my uh like query

16:46:16

actually this is what this is my query

16:46:18

and let's see what I will be getting

16:46:19

based on that so here if I will write it

16:46:21

down this Q qa. run and inside my query

16:46:25

so now see guys what I'm getting over

16:46:27

here um see I'm getting a similar see

16:46:31

I'm getting an answer regarding this

16:46:32

particular question I'm getting a

16:46:34

similar search right I'm getting a

16:46:37

similar search over here regarding this

16:46:39

particular question now if I want to

16:46:41

create a QA the small uh QA system so

16:46:45

can I do it definitely we can do it now

16:46:47

let me show you how we'll be able to

16:46:49

create a small QA session over here so

16:46:52

based on the PDF basically the PDF uh

16:46:55

which uh I I'm using uh for the data

16:46:58

right and with that I have generated a

16:47:00

vector I have created an embedding and

16:47:02

now over here you can see we are able to

16:47:04

do the query also here you will find out

16:47:07

so we are able to get it we are able to

16:47:09

uh we are getting this similarity search

16:47:11

in the form of uh numbers in the form of

16:47:13

vector but here once I call this llm

16:47:16

once I call the openi API and here is

16:47:19

what here is my llm so I uh just use

16:47:21

this retrieval QA and there I passed my

16:47:23

llm I passed my uh retriever that's

16:47:27

going to be a uh doc search itself right

16:47:30

doc search itself let me show you what

16:47:31

is this doc search it's the same object

16:47:33

basically where my all the embedding is

16:47:36

stored right so here what I can do I can

16:47:39

show you this uh doc search. as

16:47:42

retriever now see guys here what we have

16:47:44

we have the pine cone actually this is

16:47:47

the vector database openi we are using

16:47:49

openi embedding and here my all the

16:47:52

embedding is stored inside this

16:47:54

particular object right now you can see

16:47:56

over the uh UI also so here is all the

16:47:59

embedding this one right regarding the

16:48:02

data now what I can do see I can create

16:48:04

one small uh QA session U like QA system

16:48:08

over here for that I just need to write

16:48:10

it down the basic uh code so here is my

16:48:14

basic code guys this one so let me

16:48:17

import one module over here that's going

16:48:19

to be a CIS now what I'm saying that uh

16:48:22

here I'm asking about the input so

16:48:24

whenever I'm going to write it down the

16:48:26

exit so it will be exit right in this

16:48:29

condition I have mentioned that but here

16:48:31

if I'm not uh writing down anything

16:48:34

right so here it will be if I'm going to

16:48:36

write down anything apart from this exit

16:48:38

it will be continue and here you can see

16:48:40

what we are doing QA so here we are

16:48:42

passing the query whatever query we are

16:48:44

getting from here and finally we are

16:48:45

printing the answer right finally we are

16:48:48

printing the answer now let me show you

16:48:50

how the thing is running this this

16:48:52

particular thing basically so what I can

16:48:54

do let me run it and here I'm passing my

16:48:57

input prompt so my input let's say I'm

16:49:00

asking about the YOLO what is uh YOLO so

16:49:05

here see based on this particular query

16:49:08

it is giving me an answer it is finding

16:49:09

out the iding it is finding out the

16:49:11

similarity search and it has generated

16:49:13

an answer based on a PDF so this is a

16:49:15

PDF question answering right we are

16:49:17

asking a question from the PDF and based

16:49:21

on an embedding it is able to generate

16:49:23

answer now I think you are able to

16:49:26

correlate it that how the thing is

16:49:27

working I will give you the complete uh

16:49:30

flow right don't worry now here I'm

16:49:32

asking who is

16:49:34

invented who is invented the YOLO right

16:49:38

so this is what this is my question now

16:49:40

let's see so here I got the name I got

16:49:43

the name now uh can you tell me about

16:49:46

the so here what was the accuracy what

16:49:50

was the

16:49:51

accuracy what was the accuracy of the

16:49:54

YOLO right so YOLO 7 uh YOLO V7 now

16:49:59

let's see what I will be getting over

16:50:01

here so here it is saying that YOLO V7

16:50:04

accuracy was

16:50:06

56.8 and here 56.8 AP uh test /d and AP

16:50:12

Min SL value right so the accuracy we

16:50:14

are getting now if I will write down

16:50:16

exit over here so from here I'm going to

16:50:18

exit now right from this question answer

16:50:21

system now guys tell

16:50:27

me

16:50:44

uh yeah now it is perfect uh please

16:50:48

quick uh give me a quick confirmation in

16:50:50

the chat if it is perfect now yeah there

16:50:53

was a issue from the internet side uh

16:50:56

from the system side I don't know what

16:50:58

was the sh screen got a stuck in between

16:51:22

itself okay so let's uh try to revise

16:51:25

this session I can give you quick

16:51:26

revision of that and then uh we can

16:51:29

close the session within 5 minutes right

16:51:32

so here uh guys uh first of all see I'm

16:51:35

using a pine cone and pine gon is what

16:51:38

it's a vector database right so there

16:51:40

are couple of import statement which I

16:51:41

imported now after that see what I want

16:51:44

to do I want to perform the mding right

16:51:48

I want to perform the mding so on top of

16:51:51

the on top of the data only I will I I

16:51:54

I'm going to perform now so I will be

16:51:55

having a data the data is going to be

16:51:57

Text data so from where I'm getting this

16:52:00

data I'm getting this text Data from the

16:52:03

PDF the PDF which we have imported right

16:52:06

the YOLO PDF the YOLO PDF right now here

16:52:09

is what here is my PDF after uh

16:52:12

importing the data what I did right

16:52:14

after that I converted into a chunks by

16:52:17

using this text splitter so here one

16:52:19

chunk size will be approx 500 wordss

16:52:22

right inside one chunk we'll be having

16:52:24

the 500 wordss and chunk overlap I've

16:52:26

given the 20 it's just the score that

16:52:28

how many any uh like words can be

16:52:30

overlap in each and every chunk right

16:52:32

the chunk has been created now this is

16:52:35

going to be a chunk size this is going

16:52:36

to be a overlapping now this value you

16:52:38

will find out the value of this Chun

16:52:39

overlap between 0 to 100 right you can

16:52:41

mention the value according to that so

16:52:43

we have created a several chunks this is

16:52:45

the list basically which I got after the

16:52:47

chunking so here we have total 153 chunk

16:52:51

and the each chunk is having average 500

16:52:53

wats means the size is around 500 over

16:52:55

here got it so this is what this is my

16:52:57

chunk now you will find out the complete

16:53:00

list and here you will find out 152

16:53:02

chunks right from the data I converted

16:53:05

my data into a chunks and there is 152

16:53:07

chunks actually see over here now if you

16:53:10

want to find out the content the data

16:53:12

from each and every chunk so here is a

16:53:14

like way so this is my first Chunk from

16:53:16

that uh like on top of that I'm just

16:53:18

going to be call this particular

16:53:20

attribute page content and there is what

16:53:22

there is my page content there is what

16:53:24

guys there is my page content over here

16:53:26

which you can see now guys uh here uh

16:53:30

you can see this is what this is my page

16:53:32

content now you can uh get uh like page

16:53:35

content and all with respect to each and

16:53:37

every chunk till 152 right over here now

16:53:41

over here I have to set my open AI key

16:53:43

first of all after chunking and all this

16:53:45

is fine now I have to set my openi key

16:53:48

and from there I have to import this

16:53:50

Ming now the size of the mding is 1536

16:53:54

this is based on a feature right so this

16:53:57

is the size of the embedding now this is

16:53:58

fine so first I got the data the second

16:54:02

I have uh imported the open a embedding

16:54:05

the third one I have seted this key

16:54:07

right so here I set the key key Pine con

16:54:11

API key and pine con API environment so

16:54:13

here I have to set two thing the first

16:54:15

is what Pine con API key and the second

16:54:18

is Pine con API environment is after

16:54:21

that you can see over here I'm going to

16:54:22

call this Pine con init now here I'm

16:54:25

going to pass this Pine con API key and

16:54:27

pine con API inv environment right I

16:54:29

have initialized it that's it now here I

16:54:32

have to create an index so for creating

16:54:34

an index just go with a pine con and

16:54:37

here you will get a option to create an

16:54:39

index right you can create a new index

16:54:41

but if you are in a free tire so in that

16:54:43

case you will be able to create only

16:54:45

single Index right and while creating an

16:54:48

index you need to pass a index name you

16:54:51

need to pass a embedding and to search

16:54:53

the method cosine similarity dot product

16:54:56

or maybe some other method is there so

16:54:57

you can select a cosine similarity over

16:54:59

there got it after that guys see so

16:55:02

after that what I did so this is what

16:55:04

this is my index basically this is the

16:55:05

name of the index now what I did here I

16:55:09

called one method Pine con from text and

16:55:12

here is what here is my text and here is

16:55:14

my eding and here is my index

16:55:16

name getting my point then what I'm

16:55:18

going to do I'm going to create a eding

16:55:21

and that I'm going to store inside the

16:55:24

database here here this

16:55:26

one okay so here here I'm storing I'm

16:55:30

here I'm storing my embedding okay here

16:55:33

I'm storing my embedding into my Vector

16:55:35

database at this particular line you can

16:55:37

see over here just just open it and you

16:55:39

will be able to find out the you will be

16:55:42

able to find out the text and the vector

16:55:44

along with that gotting my point now

16:55:47

after that what I'm going to do see here

16:55:49

uh I'm going to query actually here you

16:55:52

will find out the similarity score also

16:55:54

this one right so this is based on a

16:55:56

similarity it is going to a similar not

16:55:58

regarding the other vectors okay so this

16:56:01

is the score which you can see now what

16:56:03

I'm going to do I'm going to find out

16:56:05

the similarity search so here it is

16:56:07

giving me a similarity search but you

16:56:08

will find out it is a vector it is not

16:56:11

giving me a sentence so for that what

16:56:13

I'm going to do here see I'm going to

16:56:15

call my open API and here this is my llm

16:56:19

GPD model text thein whatever model is

16:56:21

there now here is my chain type it's a

16:56:23

stuff means it's a normal one simple

16:56:25

chain okay now here you can see

16:56:27

retriever in in the retriever actually

16:56:29

this is my all the embedding this is my

16:56:32

all the embedding right so here I'm like

16:56:35

calling this method retrieval QA means

16:56:37

here I'm uh like calling here I'm

16:56:39

creating object of this retrieval QA and

16:56:41

there is what there is my method from

16:56:43

chain type this is my model llm model

16:56:46

and here is my embedding all the

16:56:48

embedding from the vector database now

16:56:51

this is what this is my QA right I

16:56:53

created object of QA now here is my

16:56:55

query I'm asking YOLO outperform which

16:56:57

model so here I'm asking YOLO output of

16:57:00

which model if I'm run qa. run and here

16:57:03

is what here is my query it will give me

16:57:04

an answer it will give me answer based

16:57:06

on a similarity search and from where it

16:57:09

is going to from where it is giving me

16:57:11

answer how it is going to search so here

16:57:13

you will find out inside the vector

16:57:15

database we have a score we have a

16:57:18

vector so it is checking with this

16:57:19

particular score and based on a

16:57:21

similarity search based on a cosine

16:57:24

similarity it is giving me answer after

16:57:27

searching okay after searching inside

16:57:29

the vector database which is nothing

16:57:31

which is a pine cone and here you can

16:57:32

see the UI of that where I have stored

16:57:35

the C where I have store the uh like

16:57:37

edding along with the text here you can

16:57:40

see each and everything over the

16:57:41

dashboard itself now let me uh scroll

16:57:44

down and here I have created a simple QA

16:57:47

simple QA system so based on this

16:57:49

particular PDF so you can say uh like QA

16:57:53

uh QA like PDF QA you can you can give

16:57:56

the name uh basically PDF question

16:57:58

answering and all whatever so whatever

16:58:00

PDF you are going to upload or whatever

16:58:01

PDF you are going to so from whatever P

16:58:04

PDF you are going to collect a data

16:58:05

based on that you will be do a question

16:58:07

answering and based on a similarity

16:58:09

score it is finding out a vector and it

16:58:11

is giving you the response and here you

16:58:13

can see it is working fine for me and I

16:58:15

hope it is working for you as well now

16:58:18

everything is clear guys tell me

16:58:20

whatever I have explained over here I

16:58:22

hope it is clear and it is perfect now

16:58:25

now once you will revise it by yourself

16:58:27

once you will run this code by by

16:58:28

yourself definitely you will get each

16:58:30

and everything so I just want a quick

16:58:32

confirmation and then I will conclude

16:58:34

the session

16:58:39

okay tell me guys fast and please hit

16:58:42

the like button also if you like the

16:58:43

session if you like the content and I

16:58:45

have explained you from very scratch

16:58:48

from very starting so please do let me

16:58:50

know did you like it uh now if you are

16:58:53

able to understand then please tell

16:58:56

me sir how the score is decided of the

16:58:59

chunk based on a cosine similarity so we

16:59:02

have a vector and regarding that Vector

16:59:04

we are searching the we are we are like

16:59:06

collecting a cosine similarity we are

16:59:08

finding out a cosine similarity while we

16:59:10

are creating an index at that time we

16:59:12

have uh like defined over there the

16:59:15

vector search will be based on a cosine

16:59:17

similarity so that is a score of the

16:59:19

cosine similarity

16:59:27

okay

16:59:30

it can read all the pages it can read

16:59:32

all the PDF pages and

16:59:35

all you can read like entire PDF

16:59:38

whatever pages is there not even single

16:59:40

all the like pages okay you can check it

16:59:43

you can run it you can take a like PDF

16:59:45

where you have uh 10 to 15 pages and

16:59:47

then uh then like try to uh read the PDF

16:59:50

by using this PDF loader or you can use

16:59:52

any PDF loader I'm not restricting you

16:59:54

to the till this Len CH only any PDF is

16:59:57

there just try to use that particular

16:59:59

PDF loader that's

17:00:06

it great fine uh so I hope you have you

17:00:10

have entire code over here now let me

17:00:11

give you the further code as well after

17:00:13

this a pine cone that whatever I have

17:00:15

written you can directly copy from here

17:00:17

and don't worry my team will give you

17:00:19

the entire file and all in a resource

17:00:20

section it will be uploaded so here is a

17:00:22

code for the QA so let me give you that

17:00:26

uh inside this

17:00:28

code search and apart from that we have

17:00:31

a code for the open all so let me give

17:00:33

you that also so Pine con is fine this

17:00:37

is fine now yeah this is the doc search

17:00:41

which is uh here now let me okay this is

17:00:44

already here so now the next code is

17:00:47

what retriever search this is there okay

17:00:49

similarity search just just check with

17:00:51

that check with the similarity search I

17:00:53

think everything will be fine now the

17:00:56

next is what so next is this uh this

17:01:00

particular method and here is this

17:01:03

particular method now what I can do open

17:01:07

a yep open a is

17:01:10

there and

17:01:16

here okay open AI is there now we have

17:01:21

the next also this is the method and

17:01:24

here you can call this qa. run so let me

17:01:27

give give you this and let me give you

17:01:29

this QA do

17:01:33

run this one so fine I think now

17:01:37

everything is perfect now everything is

17:01:39

clear tomorrow I will teach you one more

17:01:42

Vector database the vector database

17:01:44

concept will uh will more clear to all

17:01:46

of you and then we are going to initiate

17:01:49

one more project that we are going to

17:01:51

continue in our next week uh so from

17:01:54

Monday onwards uh we are going to start

17:01:56

one more project but tomorrow tomorrow I

17:01:58

will explain you one more V Vector

17:02:00

databases and few more topic I will try

17:02:02

to discuss with you and I will discuss

17:02:04

one project idea as well the complete

17:02:07

idea related to that particular project

17:02:09

and from Monday onwards we can start uh

17:02:12

with that particular project and we can

17:02:14

Implement in a live class itself

17:02:19

okay yeah good afternoon good afternoon

17:02:22

to all so today is a today is the day 10

17:02:26

and we have completed day n u actually

17:02:30

so nine lectures successfully related to

17:02:33

this generative AI so we started last

17:02:35

week uh last week on Monday and so far

17:02:39

uh we have completed nine lecture and

17:02:41

today is a is the day 10 so today

17:02:45

actually I will be discussing about few

17:02:46

more uh Advanced topic and then uh next

17:02:50

week we'll try to complete one more

17:02:52

project uh which will be related to the

17:02:55

uh like which will be related to the to

17:02:57

this today's topic this RG and this

17:03:00

Vector database and all so we have

17:03:03

started from very basic and then I came

17:03:05

to the lenen and open and then I discuss

17:03:09

about the hugging phase then uh I

17:03:12

completed one project as well we

17:03:13

deployed also and then uh I came to this

17:03:17

vecta

17:03:18

databases uh so now uh if you are

17:03:21

following me so I have already told you

17:03:24

regarding the dashboard and all so where

17:03:26

you will find out all the dash all the

17:03:28

materials and how to navigate to the

17:03:30

dashboard okay so where you'll find out

17:03:33

the recorded session here in the uh like

17:03:36

uh this is the Inon YouTube channel so

17:03:38

once you will go through with the Inon

17:03:40

YouTube channel so just click on that

17:03:41

click on the Inon YouTube channel here

17:03:44

my live is going on as of now so just

17:03:46

just click on this live section just go

17:03:49

through the live section and here you

17:03:51

will find out all the videos now uh if

17:03:54

you will click on this particular video

17:03:56

where I have discussed about about the

17:03:58

vector databases so in my previous

17:04:00

session I have discussed about the

17:04:02

vector databases I told you that what is

17:04:04

a vector database why why it is required

17:04:06

and then we have created one QA system

17:04:09

also based on the embeding so if you

17:04:11

don't know about it if you have uh if

17:04:14

you haven't seen this uh session so

17:04:15

please go and check there uh your all

17:04:18

the basics will be clarified and once

17:04:20

you will go through with the entire

17:04:22

session all the session if you are

17:04:23

beginner so definitely guys this uh

17:04:26

session is going to help you aot a lot

17:04:28

related to the generative a and all so I

17:04:30

would recommend uh this particular

17:04:32

series to all of you uh because soon we

17:04:35

are going to and and this one and next

17:04:38

week actually so next week we will try

17:04:41

to do one more project that is going to

17:04:42

be end to end project which will be

17:04:44

directly related to this uh Vector

17:04:46

database and all there we are going to

17:04:48

use everything and even we'll introduce

17:04:50

the Llama model in that particular

17:04:52

session in the in the upcoming session

17:04:55

which is going to start from the Monday

17:04:57

today I I'll be stuck with the vector

17:04:58

database itself because there is one

17:05:00

more database which I need to discuss

17:05:02

Then I then only you can make a

17:05:04

differences between uh different

17:05:07

different Vector databases so that's why

17:05:08

I picked one more database that's going

17:05:10

to be a chroma DV so in today's class

17:05:13

we're going to talk about the chroma DV

17:05:15

how chroma DV Works how it is different

17:05:17

from the pine cone and uh on which basis

17:05:20

on which uh like uh on which basis

17:05:23

actually we have to decide that uh what

17:05:26

should be my database for my and project

17:05:28

or for my uh indry ready project so each

17:05:31

and everything we're going to discuss

17:05:33

over here we're going to uh like uh I

17:05:35

will tell you in a live session so here

17:05:37

is Inon YouTube channel where you will

17:05:39

find out all my recordings so guys

17:05:41

please go through with the Inon YouTube

17:05:42

channel and try to check with the

17:05:44

description so in the description

17:05:46

actually we have already given you the

17:05:47

dashboard link so here in the DH uh in

17:05:50

the description you'll find out the

17:05:52

dashboard link this is the dashboard

17:05:54

just click on that and this is a this is

17:05:56

completely free right no need to pay

17:05:58

anything for this particular dashboard

17:06:00

I'm telling to the people who uh joined

17:06:02

this session first time now here what

17:06:04

you need to do here you just need to

17:06:06

register yourself and after that uh you

17:06:08

will get access of this particular

17:06:10

course no need to pay anything you just

17:06:12

need to sign up and login and then you

17:06:15

can navigate to this particular course

17:06:17

now once you will go through with the

17:06:19

Course once you will go through with the

17:06:20

dashboard so there you will find out all

17:06:23

the recording now let's uh go through

17:06:25

with the previous recording so here uh

17:06:27

is is a recording of the day n so just

17:06:30

click on that and here in the resource

17:06:31

section you will find out all the

17:06:33

resources so whatever resources I uh

17:06:36

discuss in the class throughout the

17:06:39

entire session so you will find out each

17:06:41

and everything inside the resource

17:06:42

section so I discuss this uh ipb file so

17:06:45

the ipb file is available over here so

17:06:48

you can visit the dashboard you can

17:06:49

download this file and you can execute

17:06:52

inside your system and you can revise

17:06:54

your concept now here apart from this uh

17:06:58

lectures and resources you will find out

17:07:00

the quizzes you will find out the

17:07:01

assignment so just visit this uh

17:07:04

particular dashboard and there you'll

17:07:06

find out everything and the link has

17:07:08

been mentioned inside the description

17:07:10

itself so just go and check in the

17:07:12

description uh we have already given you

17:07:15

the link here is a link so just click on

17:07:17

that and try to enroll yourself uh uh in

17:07:20

the dashboard now apart from that you

17:07:22

will find out other social social media

17:07:25

handles and different different channels

17:07:26

of the I so please try to follow there

17:07:29

we are uploading amazing content related

17:07:32

to the uh like related to the different

17:07:34

different topics so just just follow to

17:07:37

uh just follow Ion on the Instagram and

17:07:39

the other YouTube channel as well like

17:07:41

Hindi YouTube channel see once you will

17:07:43

check with the Hindi YouTube channel so

17:07:45

here let me show you this Hindi YouTube

17:07:47

channel of the Inon then you will find

17:07:49

out a same playlist in the Hindi as well

17:07:51

so there I have discussed each and

17:07:53

everything in Hindi if you finding out a

17:07:56

difficulty right say if you're finding

17:07:57

out a difficulty uh like you're not

17:07:59

getting anything in English so here you

17:08:01

can cover a same thing right you can

17:08:03

cover the same thing in Hindi as well

17:08:05

here uh we have uploaded all the Hindi

17:08:08

session right I'm taking the Hindi

17:08:10

session uh so you can go and check this

17:08:13

ion Tech Hindi Channel and here you'll

17:08:16

find out the SQL series as well so we

17:08:18

are taking live SQL classes now see uh

17:08:21

this uh this is a sorab actually Sor is

17:08:23

taking a live SQL classes and we are uh

17:08:26

covering each each and everything

17:08:27

whatever is required for the data

17:08:29

science for the data analytics and for

17:08:31

the data engineering job so guys please

17:08:33

try to check with the Inon Tech Hindi

17:08:36

there we are uploading uh like refined

17:08:39

content or whatever uh is a trending

17:08:41

thing in a Hindi itself and not even a

17:08:44

single video we are uploading a complete

17:08:46

playlist so you must visit this

17:08:48

particular Channel and you should check

17:08:50

with a Content now coming to coming back

17:08:53

to my topic so here already we have

17:08:56

discussed uh so many now today is day 10

17:09:01

of of this particular of this community

17:09:03

Series so now let start with the day 10

17:09:06

where the topic will be a chroma DB so

17:09:08

yesterday I have talked about the pine

17:09:10

con so Pine con was a vector database so

17:09:13

we use this Vector database for storing

17:09:15

a vector right now here we have one more

17:09:18

DB that's going to be a chroma DB so

17:09:20

we'll try to talk about the chroma DB as

17:09:22

well and we'll see the differences

17:09:23

between this pine cone and the chroma DB

17:09:26

that how it is

17:09:27

are different from each other this pine

17:09:30

cone and the chroma DB now one more

17:09:32

thing which I would like to highlight

17:09:33

over here see many people ask about the

17:09:36

certificates and all so let's say if

17:09:37

someone is going to complete the course

17:09:40

right someone is going to complete the

17:09:41

course so definitely in their mind there

17:09:43

will be a like question so will I get a

17:09:46

certificate or not so that thing also

17:09:48

you will find over here over the LMS

17:09:50

itself so you will find out three option

17:09:53

on top of this uh dashboard the first is

17:09:56

curriculum the second is analytics and

17:09:58

the third is certificate so here you'll

17:10:00

find out the entire curriculum here

17:10:02

you'll find out your entire analytics so

17:10:03

what all thing you have completed are

17:10:05

you doing assignment or not each and

17:10:07

everything you can uh track over here

17:10:10

inside this analytics portal now the

17:10:12

third one is a certificate so if you are

17:10:14

going to complete at least 40% of the

17:10:17

course right if you're going to complete

17:10:19

at least 40% of the course then

17:10:21

definitely you will be able to generate

17:10:23

the certificate now how like the course

17:10:26

uh that that uh that will be that how

17:10:29

like the course will be completed right

17:10:31

so how my system will get to know and

17:10:33

then only you can generate a certificate

17:10:34

see after completing a video after

17:10:36

completing this particular video here

17:10:38

you will find out the tick mark this

17:10:39

this particular mark this blue tick mark

17:10:42

so that mean the meaning is that so you

17:10:44

are uh you have completed that

17:10:46

particular video and the course name is

17:10:48

what the course name is a foundational

17:10:50

or generative AI Foundation of

17:10:52

generative AI now uh once you will tick

17:10:54

mark on this particular video it will be

17:10:56

completed and now you can check inside

17:10:58

the analytics also so here just look

17:11:01

into the analytics so your video

17:11:03

progress uh will be there right so you

17:11:05

will find out the video progress over

17:11:07

here so yeah this is fine this is clear

17:11:10

to all of you now please go and check

17:11:12

with the dashboard there you'll find out

17:11:14

each and everything now apart from that

17:11:17

one more thing which I would like to

17:11:18

show you uh so uh I will uh I would like

17:11:21

to introduce you uh with One dashboard

17:11:24

one more dashboard so let me show you

17:11:27

that particular dashboard so just go

17:11:29

inside the course section and here uh

17:11:31

inside the course section you will find

17:11:32

out this generative AI right inside this

17:11:35

boot camp now just click on that just

17:11:37

click on this particular course so there

17:11:38

is a course name is mastering generative

17:11:41

AI with open AI Len CH and Lama index

17:11:45

just scroll down till last and here you

17:11:47

will find out a complete detail syllabus

17:11:50

of of for this particular course now

17:11:52

here actually we are going to cover each

17:11:54

and everything related to the generative

17:11:56

AI we are going to start from very basic

17:11:59

from the foundation of a generative Ai

17:12:01

and then we'll come to the like word

17:12:03

embedding text reprocessing we'll talk

17:12:05

about the llms we'll talk about the hung

17:12:07

face API and other different apis as

17:12:10

well and we'll talk about the L chain

17:12:13

llama index these are the different

17:12:15

different framework basically which we

17:12:16

use for creating an llm based

17:12:17

application and then you will find out

17:12:20

end to endend project also so this

17:12:22

entire curriculum is a industry ready

17:12:24

curriculum and we have added so many

17:12:26

things recent l or we are updating this

17:12:28

particular cbus uh so there are so many

17:12:31

things coming like day today actually so

17:12:34

we are analyzing all those thing and we

17:12:35

are finding out so whatever is required

17:12:37

for the industry whatever is required

17:12:39

for the community so definitely we based

17:12:42

on that we are trying to update our

17:12:44

syllabus so tomorrow itself if you will

17:12:45

look into the syllabus you will find out

17:12:47

a new changes right because many things

17:12:50

is coming uh like dayto day right so

17:12:52

regarding the fine tuning regarding the

17:12:55

like evaluation of the model regarding

17:12:57

the like Fast retrieval right so

17:13:00

regarding the fast retrieval regarding

17:13:01

the different different databases or

17:13:03

different different llm So based on that

17:13:05

only based on a current market we are

17:13:07

updating this curriculum so just go and

17:13:10

check uh over there just go and check

17:13:12

with the Inon website and there you'll

17:13:14

find out amazing curriculum and yes so

17:13:16

this course is going to be start from 20

17:13:20

uh 20th of January right and here you

17:13:22

will find out the language we have

17:13:24

launched this particular course in

17:13:25

English and here the duration is around

17:13:27

5 month and this is going to be a timing

17:13:29

so timing is from 10: to 1:00 p.m. IST

17:13:32

and this will be a live course right and

17:13:35

here you will find out your instructor

17:13:37

so Chris sir is there Sanu is there me

17:13:40

uh is there and here is a buy so buy

17:13:42

will also take a session uh means will

17:13:45

also be a mentor along with me Sudan Su

17:13:47

and Chris so guys uh please go and check

17:13:51

uh with this particular dashboard with

17:13:53

this particular course and for the

17:13:55

further information you can contact with

17:13:57

the sales team here you can drop your

17:13:58

information so my sales team will

17:14:00

contact to you fine so I hope I have

17:14:04

clarified each and everything now if you

17:14:06

have any sort of a doubt you can ask me

17:14:08

and then we'll start with the Practical

17:14:12

implementation tell me guys uh do you

17:14:15

have any doubt sir where to find

17:14:17

neurolab code for the McQ generator

17:14:19

project it is not updated on GitHub so

17:14:22

here is my GitHub which I already uh

17:14:24

uploaded in my resource section you can

17:14:27

go and check with a resource section let

17:14:28

me give you that uh GitHub just a second

17:14:32

and don't worry I will be pasting inside

17:14:34

the chat

17:14:35

also just go with my repository my

17:14:38

GitHub repository there you will find

17:14:39

out this McQ generator right this is the

17:14:43

application not this one this one

17:14:45

generative AI so let me open this

17:14:48

generative Ai and yeah this is the app

17:14:51

this is the complete application which I

17:14:52

added in my uh resource section also let

17:14:54

me show you where you'll find out that

17:14:56

so Foundation generi course and here is

17:15:00

the this is

17:15:06

the just wait first let me give you this

17:15:08

particular link and then uh I will show

17:15:11

you so I'm giving to my team and they

17:15:15

will uh directly P inside the chat okay

17:15:18

just

17:15:25

wait

17:15:30

fine now I think we can start so guys uh

17:15:34

all

17:15:35

clear sir estra DV is a vector database

17:15:38

or it's a no SQL database it's a no SQL

17:15:41

database estra DV actually in a backend

17:15:43

it is using the cassendra and cassendra

17:15:45

is a no SQL

17:15:51

database yesterday I discussed that

17:15:54

whether you can use or not this estra DB

17:15:57

this cassendra is a vector database I

17:15:59

given you the each and every information

17:16:00

regarding that just just look into that

17:16:02

just go through with my previous session

17:16:05

you will get to

17:16:10

know uh great now I hope everyone is

17:16:15

getting that so can we

17:16:19

start here is a pine gon one so please

17:16:23

give me a quick confirmation if we can

17:16:24

start with the session then uh

17:16:27

uh I will start writing the code so let

17:16:32

me open my code share. also here I'm

17:16:35

going I'm going to paste each and

17:16:36

everything each and every line so I will

17:16:39

okay let me give you this particular

17:16:41

link also I'm giving you this code

17:16:44

share. iio

17:16:46

link just a second yeah this one so just

17:16:51

a second guys you will get this

17:16:53

particular link where I going to paste

17:16:56

each and every line each and every line

17:16:58

uh whatever I'm writing inside my

17:17:00

Jupiter notebook so today uh we going to

17:17:03

start with a chroma DB so for that guys

17:17:06

what you can do so here first of all let

17:17:08

me close everything and here is what

17:17:11

here is my session which is going on so

17:17:13

let me keep it somewhere and yes now it

17:17:17

is

17:17:22

perfect great so uh first of all what

17:17:25

you need to do here here so first at the

17:17:27

first place you need to launch your

17:17:29

neural lab so just click on this neural

17:17:32

lab guys just click on this neural lab

17:17:34

and once you will click on this neuro

17:17:36

lab so here you will find out this type

17:17:39

of interface now there is two option the

17:17:41

first option is start your lab and the

17:17:44

second option is my lab so just click on

17:17:46

this start your lab right if you have

17:17:49

already created a lab if you have

17:17:51

already uh created your uh jup instance

17:17:53

definitely you can uh go inside my lab

17:17:56

and you can launch the same jupyter

17:17:58

instance and there you can write it down

17:18:00

your code after creating the IP VB file

17:18:02

that is also fine but I'm showing you

17:18:04

from starting so here guys what you need

17:18:06

to do you need to click on this start

17:18:09

your lab so once you will click on that

17:18:11

so it will ask you about the sign in and

17:18:14

all so here you can sign in guys you can

17:18:16

pass your email ID and it is completely

17:18:18

flee no need to uh like pay anything for

17:18:21

this neuro lab as of now so here you can

17:18:24

see we have a different different stack

17:18:27

so big data analytics data science

17:18:28

programming and web development so what

17:18:31

you can do here you can click on this

17:18:33

data science so what you will click on

17:18:34

that so here you'll get all the option

17:18:37

whatever is required for developing a

17:18:39

project in this data science if you are

17:18:41

going to develop a project uh inside the

17:18:44

data sence so here you will find out all

17:18:46

the ID all the ID we have given you in

17:18:49

the form of template you just need to

17:18:51

click on that and you can launch your

17:18:52

instance so now let me show you with

17:18:54

this Jupiter so in today's session we're

17:18:57

going to use the Jupiter and in the next

17:18:59

session we're going to use this cond

17:19:01

cond for end to end development and

17:19:03

Jupiter just for the ipynb

17:19:05

implementation right now here what I'm

17:19:07

going to do so here I'm going to open my

17:19:09

Jupiter so it will ask you the name so

17:19:11

here I can write down the name chroma DV

17:19:14

so today in today's class we're going to

17:19:15

talk about the chroma DV which is

17:19:17

nothing which is a database Vector

17:19:19

database and here what I will do I will

17:19:22

proceed it and then it will be launching

17:19:24

the lab so guys please do it please

17:19:26

please uh do along with me because today

17:19:28

I'm I'm I will be going very very slow

17:19:30

and each and every line of code I will

17:19:32

be pasting inside the coda.io so that

17:19:34

you can copy from there how many of you

17:19:37

you are doing along with me please uh

17:19:39

write it down the chat I'm waiting for a

17:19:43

reply sir I have a interview for the

17:19:46

gener position can give me some tips and

17:19:49

project so if you are asking about the

17:19:52

tips if you have a generative AI uh like

17:19:55

if you have an interview to generative

17:19:57

so first of all your foundation should

17:19:59

be strong and there you need to discuss

17:20:01

about the project right so the the pro

17:20:04

whatever like practical implementation I

17:20:06

have discussed throughout this commun

17:20:07

series you can go through with that and

17:20:09

you can prepare that so the question you

17:20:11

will get around to that only so there

17:20:13

will they will ask you uh are you using

17:20:15

this API why you are why you are using

17:20:18

it what is the cost of that can you

17:20:20

prize it what all Alternatives we have

17:20:22

so what is the concept of the vector

17:20:24

database why we cannot use other

17:20:26

database what is the concept of the RG

17:20:28

how we can finetune the model what is

17:20:30

the cost what will be the cost of the

17:20:31

fine tune fine tuning of the model can

17:20:33

be like can we like keep in keep it in a

17:20:37

scal scalable mode or not right so uh

17:20:40

can we do a uh like like CPU based

17:20:43

finetuning right there is a like if the

17:20:46

model is very very huge so in that case

17:20:49

how uh if the model is very very huge so

17:20:51

in that case how I can load it so in

17:20:53

that case you need to say that I I can

17:20:55

use the quantize model model so this

17:20:57

type of question you can assume inside

17:20:59

the interview right so don't worry I

17:21:01

will share one PDF there I will keep all

17:21:03

the interview question related to the

17:21:04

generate Ai and it will be available on

17:21:07

your dashboard got it don't worry got it

17:21:11

raes Ramesh

17:21:13

nangi fine uh I think it is taking time

17:21:16

so let me refresh it and then again I

17:21:19

will launch just a second guys I have

17:21:21

refreshed it now let's

17:21:25

see

17:21:40

oh why it is taking too much

17:21:51

time yeah now it's done so let me launch

17:21:54

then uh I

17:21:56

kernel let let me launch this IPython

17:21:59

notebook so please uh give me a quick

17:22:01

confirmation if you are able to see

17:22:04

this tell me guys so here I can print

17:22:08

all

17:22:10

okay yeah so guys all

17:22:17

okay no we are not going to do a fine

17:22:20

tuning in a community session so we'll

17:22:22

restrict this community session till uh

17:22:24

the project itself till that end to end

17:22:26

project where we are going to call the

17:22:28

API that's it the so tell me guys all

17:22:32

okay yes or

17:22:34

no and I think everything is visible to

17:22:36

all of you right so can we start and

17:22:40

first of all let me save this notebook

17:22:42

so here I can write it down this chroma

17:22:45

DV so my notebook name is what my

17:22:49

notebook name is a chroma DB so let's

17:22:52

start uh let's start with the chroma DB

17:22:55

so first of all guys uh let me give you

17:22:57

the brief introduction about the chroma

17:22:59

DB that what is a chroma DB and why we

17:23:02

are using it so let's uh search together

17:23:06

and here let's search about the chroma

17:23:09

DB so once I will search uh here the

17:23:12

chroma DB so here you will find out the

17:23:15

very first website of the chroma DB just

17:23:18

click on that and let me open it first

17:23:20

of all so here is what here is a chroma

17:23:22

DV guys now they have given you the

17:23:24

different different option right so here

17:23:26

you will find out a different different

17:23:27

option on top of this website so the

17:23:30

first one is a documentation the second

17:23:32

is a GitHub the third one is a discard

17:23:34

Community the fourth one is a Blog and

17:23:36

here they have written that we are

17:23:38

hiring and here launching multimodel so

17:23:41

they have announced multimodel also now

17:23:43

from here you can start here you can

17:23:45

find out the demo as well so you can uh

17:23:48

like check with the demo and here you

17:23:51

will find out the the complete

17:23:53

architecture which they have given to

17:23:55

you and like what you are going to do

17:23:58

here tell me you are going to convert

17:23:59

your queries into a vector and that

17:24:01

Vector basically are going to save it

17:24:03

right that Vector that particular Vector

17:24:05

you are going to save it now here uh

17:24:08

let's try to discuss about the uh

17:24:11

difference between this chroma DB and

17:24:13

the pine but first of all let me go

17:24:15

through with the documentation so here

17:24:16

is a demo demo of the chroma DB which

17:24:21

you will find out over here inside the

17:24:23

collab notebook which they have provided

17:24:25

you over the website itself now if you

17:24:27

want to look into the source code so

17:24:29

here they have given the source code as

17:24:31

well this is the GitHub just click on

17:24:33

that and here you will find out the

17:24:35

complete source code of the chroma DB so

17:24:38

the uh this chroma DB is a open source

17:24:41

database and here you can see the number

17:24:43

of contributor how many contributor is

17:24:45

there 86 contributors is there like

17:24:49

10.7k people has already used this

17:24:52

particular um database now here you will

17:24:55

find out the 9 92 commits and if you

17:24:57

will look into the package if you look

17:24:59

into the pp package so let's see the

17:25:01

first version and the last version the

17:25:03

latest version of the chroma DB so here

17:25:05

you can write it down this chroma DB

17:25:08

chroma DB on top of the Google Now here

17:25:11

you will find out the web this uh P by

17:25:13

page so this is the latest version of

17:25:16

the chroma DV

17:25:18

0.420 right now if you will look into

17:25:20

the previous version if you want to

17:25:22

check with that so just click on that

17:25:23

just click on this release history

17:25:25

you'll find out the entire history of

17:25:28

this chroma version so how frequently

17:25:30

they are updating the thing uh so they

17:25:32

haven't completed even one year right

17:25:34

and here you will find out that these

17:25:37

many of version uh like you will find

17:25:40

out you will get it related to this

17:25:41

chroma DB because it is a open source

17:25:43

now here you will find out so many

17:25:45

contributor inside this chroma DB you

17:25:48

can check with the contributor list you

17:25:49

can check with the contributor name here

17:25:52

and here you can see the entire

17:25:53

community so guys uh this is the

17:25:56

contributor now used by 10.7k people and

17:25:59

here you will find out the fork number

17:26:02

of fork and the star so just go through

17:26:04

with this particular GitHub there you

17:26:06

will find out the entire detail related

17:26:08

to the chroma DV where you will get it

17:26:10

so you will get this thing or the

17:26:12

website itself so here on top of the

17:26:14

website you'll find out a different

17:26:15

different options so they have you there

17:26:17

you will find out the GitHub and even

17:26:19

you can join the community of this

17:26:21

chroma DB so they have given you the

17:26:22

option of the Discord so just click on

17:26:24

that and you can join their community on

17:26:26

Discord so whatever doubts and all you

17:26:28

have so you can ask it over the Discord

17:26:30

now coming to the documentation so here

17:26:32

is a documentation of the chroma DB so

17:26:35

just look into the documentation here

17:26:37

you will find out each and everything

17:26:39

whatever is required for understanding

17:26:42

this chroma DB so let's start with the

17:26:44

getting it started now here they have

17:26:46

given you the two option the first one

17:26:48

is going to be a python this one and the

17:26:50

second option is going to be JavaScript

17:26:52

right so the first option is a python

17:26:54

the second option is a Java script now

17:26:56

uh here you will find out the

17:26:57

installation detail how to install this

17:26:59

thing now here you'll find out how to

17:27:02

create a client from the chroma DB so if

17:27:04

you want to create a client of the

17:27:06

chroma DB so here is a option for

17:27:08

creating a client for the of the chroma

17:27:11

DB now here uh how to create a

17:27:13

collections and all so this is the

17:27:15

collection and here how to add it now

17:27:17

how to query The Collection each and

17:27:19

everything you will find out over here

17:27:21

so guys once you will install this

17:27:23

particular package you will get

17:27:24

everything over here this is not a

17:27:26

cloud-based database it's a like a local

17:27:30

database there if you will download this

17:27:32

thing so everything you will get inside

17:27:33

the local itself so there the first

17:27:35

major difference between the pine cone

17:27:38

and the chroma DB so chroma DB actually

17:27:40

it's not a cloud based database and here

17:27:43

actually see it's not a cloud base here

17:27:45

everything you will do inside the local

17:27:46

itself right so here you will do

17:27:48

everything inside the local itself in

17:27:50

your local workspace but if we are

17:27:52

talking about the pine cone so it's a

17:27:54

cloud-based database so in that you have

17:27:56

seen you must have seen let me show you

17:27:58

the pine con website as well so here if

17:28:00

I'm writing down this a pine con so you

17:28:03

will find out here over the pine con

17:28:05

that it's a vector database for the

17:28:07

vector search now just scroll down here

17:28:10

so here you will find out a different

17:28:12

different Cloud oper Cloud uh operator

17:28:15

so it is fully managed by Google gcp AWS

17:28:18

and AO anywhere you can create an

17:28:20

instance and then you can utilize it

17:28:23

after installing this inside your local

17:28:26

system so everything will be available

17:28:28

over the cloud after configuring this

17:28:30

pine cone so that the first major

17:28:32

difference between the pine code and

17:28:34

this chroma DB now coming to the point

17:28:37

so here uh we are talking about the

17:28:39

chroma DB so let's try to check with the

17:28:42

Google itself what is the difference

17:28:43

between chroma DB and the pine con so uh

17:28:46

everything is available to the Google so

17:28:48

here actually I found out uh find out

17:28:50

one article so let's try to look into

17:28:53

this particular article and by uh like

17:28:55

reading this articles and all you can

17:28:58

understand because this is a recent

17:28:59

thing Recent research okay it's not like

17:29:01

that that people are working on this on

17:29:03

top of this since last like 10 year or

17:29:07

15 years so you will find out that there

17:29:09

is a recent active community so whatever

17:29:12

you will find out you will find out on

17:29:13

top of the Reddit on top of the strike

17:29:15

overflow GitHub or you will get a

17:29:17

knowledge from the documentation or from

17:29:19

a different different blog so just try

17:29:21

to read this particular blog and let's

17:29:23

try to understand the difference between

17:29:25

Pine cone and chroma DB now what is the

17:29:28

pros and cons so with that you will get

17:29:30

a some sort of idea that if you are

17:29:32

going to decide about a database

17:29:34

whatever database is there right so

17:29:36

whatever database is there whatever

17:29:37

Vector database is there so on which

17:29:40

point right on which topic you need to

17:29:42

select the database what all thing you

17:29:44

need to consider over there that is a

17:29:46

main point so let's try to discuss let's

17:29:48

try to see over here so we are talking

17:29:51

about the pine con guys so Pine con is a

17:29:53

manage Vector database designed to

17:29:55

handle real time search and similarity

17:29:58

matching at scale right so here they

17:30:00

have clearly mentioned that this uh pine

17:30:03

cone data base it designed to hander

17:30:05

realtime search and similarity matching

17:30:07

at scale which we have seen in my

17:30:09

previous class which we I have shown you

17:30:11

in my previous uh like a lecture itself

17:30:14

you can go and check it's B on a state

17:30:16

of art technology and has gained

17:30:18

popularity of its use cases of

17:30:20

performance right so here uh it is easy

17:30:22

to use and it is uh performing well

17:30:24

because of that it gain the popularity

17:30:27

now let's delay into the key attribute

17:30:29

advantage and the limitation of the pine

17:30:31

cone so here just look into the pros and

17:30:34

here they are saying that it is for the

17:30:35

real time search it is for the

17:30:37

scalability definitely we are going to

17:30:39

use the uh cluster on top of the cloud

17:30:42

so definitely we can do a horizontal

17:30:44

scaling over there right so this is the

17:30:46

scalable B so architecture has been

17:30:49

designed in such a way the installation

17:30:50

and all the computation and the dbm

17:30:53

database management is happening in such

17:30:54

a way that it is a scalable and it's not

17:30:57

a vertical scale right it we can do a

17:30:59

horizontal scaling regarding this pine

17:31:01

cone now this is for the realtime search

17:31:04

here you will get the automatic indexing

17:31:06

So Yesterday itself we have created one

17:31:08

index and there you will find out along

17:31:10

with the vector you will find out that

17:31:12

we were having an index column there we

17:31:14

are having the scoring and all so

17:31:16

automatically indexing right you no need

17:31:18

to write it down anything automatically

17:31:20

you will get the indexing now here

17:31:22

python support so this is a very

17:31:24

important thing if if you are going to

17:31:25

develop any application in data science

17:31:27

in machine learning and deep learning

17:31:29

where heavily we are using python so yes

17:31:31

definitely it is supporting of python as

17:31:34

well got it now what is the cons of it

17:31:36

so cons wise here you will find out the

17:31:39

first one is a cost right so cost is a

17:31:42

like major disadvantage of this spine

17:31:44

cone so we cannot use the spine cone

17:31:46

freely so here if you will look into the

17:31:48

pricing of this spine cone so there you

17:31:50

will find out the different different

17:31:52

pricing so if you are a starter if you

17:31:54

are a beginner definitely you can go

17:31:56

with a free tire but let's say if you're

17:31:58

are not a starter if you're not a

17:32:00

beginner you want to use it for some

17:32:02

sort of application right where you are

17:32:04

going to implement some PS and all where

17:32:06

you want to uh Implement some realtime

17:32:08

use cases for your organization for your

17:32:10

project so you can take this particular

17:32:13

pack where standard is there now here

17:32:15

you will find out uh these many thing

17:32:17

you can check according to your

17:32:18

requirement and let's say if you want to

17:32:20

productionize something right so let's

17:32:22

say if you are working in a company and

17:32:24

there you want to productionize

17:32:25

something and here so what you can do

17:32:28

you can take this Enterprise solution so

17:32:30

there you will find out many more thing

17:32:32

you can check with the pricing detail

17:32:33

you can talk with the pine cone team

17:32:35

right Consulting team they will guide

17:32:37

you regarding each and everything so the

17:32:39

first thing the first disadvantage you

17:32:41

can see over here that is a cost itself

17:32:43

the second disadvantage you will find

17:32:44

out limited query functionality so while

17:32:46

Pine cold Xcel as similar to search it

17:32:48

might like some Advanced query

17:32:50

capability the certain project required

17:32:52

maybe the mathematical model they are

17:32:54

using the different different meical

17:32:56

medical model they are using behind that

17:32:58

like like cosign similarity dot product

17:33:00

so it is not working in that much

17:33:02

effective way which people has uh felt

17:33:05

right even I haven't checked with this

17:33:06

particular cons right I haven't checked

17:33:09

that this is uh having a limited query

17:33:11

functionality because I uh just check

17:33:13

with a certain use cases so guys if you

17:33:15

are getting this particular con so

17:33:17

definitely before starting with the Pyon

17:33:19

before productionize it right or before

17:33:22

uh like uh using inside your U like

17:33:24

project definitely you should consider

17:33:26

to this particular point where you have

17:33:28

a limited query functionality right now

17:33:31

how to use pine con I think I already

17:33:33

told you how to use pine code I'm not

17:33:35

going into that much detail now let's

17:33:37

talk about the chroma DB so chroma DB is

17:33:40

similar to pine go just just try to

17:33:42

focus now just for 2 minute next for 2

17:33:45

minute and then I will go with the

17:33:46

Practical implementation right so if we

17:33:48

are talking about the chroma DB so it is

17:33:50

similar to the Pine go and designed to

17:33:52

handle Vector storage and retable means

17:33:55

we can store the data and we can

17:33:57

retrieve the data right so it offers a

17:33:59

robust set of feature that creator that

17:34:02

c various use cases making variable

17:34:04

choice for many Vector application right

17:34:06

so here uh clearly we are getting that

17:34:08

that we we can use this chroma DB for

17:34:10

storing the vectors right we can store

17:34:12

the vector and we can retrieve the

17:34:14

vector right now here you will find out

17:34:16

a different different pros and cons so

17:34:18

the first Pros is there that is what

17:34:20

that is a open source right so open this

17:34:22

chroma DB is a open source Vector

17:34:24

database base here I have shown you the

17:34:26

code of this chroma DB right you can you

17:34:29

can like uh check with this particular

17:34:31

code now here you can press the dot so

17:34:34

this entire code will be available

17:34:36

inside the vs code now you can go

17:34:39

through with this particular code and

17:34:41

you can check that what all files and

17:34:43

folder they have created and what all

17:34:45

thing they have written inside this

17:34:47

particular project right so you can

17:34:49

consider there's nothing just a project

17:34:50

only now here you will find out a

17:34:52

different different files and folder and

17:34:53

now they are maintaining the this thing

17:34:55

in the form of package also so on top of

17:34:57

the pii repository you will find out

17:34:59

this chroma DB in the form of package so

17:35:01

from there you can install it by using

17:35:04

the PIP install Command right now just

17:35:06

look into this chroma DB that what they

17:35:08

have written so here they have written

17:35:10

of they have created a various folder so

17:35:12

the first one is a API now here you will

17:35:14

find out a different different API let's

17:35:16

try to create click on this fast API

17:35:18

just read the code from here and here

17:35:21

you can see the all CLI so this is the

17:35:23

real time project right which which they

17:35:25

have deployed in a real time and which

17:35:26

they are using right which everyone is

17:35:28

using and there you will find out the

17:35:30

number of force number of star number of

17:35:32

contributor each and everything you can

17:35:34

see so there's a first uh advantage of

17:35:37

this uh chroma DB that is a open source

17:35:40

now extensible query chroma DB allows

17:35:42

more F more flexibility quering

17:35:45

capability including complex range such

17:35:47

and combination of vector attribute so

17:35:49

here you can think that or here you can

17:35:51

assume that uh this chroma DB is working

17:35:54

well right compared to the pine cone

17:35:56

where I have to do a similar search

17:35:58

right so here they have clearly

17:35:59

mentioned inside this particular block

17:36:01

based on their own experience that this

17:36:03

chroma DB is working well for the

17:36:06

similarity search if you want to find

17:36:07

out some sort of a combinations and all

17:36:09

in that case it is going to work very

17:36:11

very well now Community Support is very

17:36:13

very high as I told you that it's a open

17:36:15

source right so here you will find out

17:36:17

the complete Community just go back and

17:36:19

check with the GitHub itself so here is

17:36:22

a AT3 contributor 86 contributor and if

17:36:25

you will look into the website if you

17:36:26

will look into the website so there you

17:36:28

will find out the Discord GitHub slack

17:36:32

everything they have provided to you uh

17:36:34

for uh connecting with the community so

17:36:38

if you want to connect with the

17:36:39

community so there they have given you

17:36:41

the different different ways right so

17:36:42

this community the community of the

17:36:44

chroma DB is a very very strong now

17:36:46

let's look into the cons so here I told

17:36:48

you that this chroma DB uh set this

17:36:51

chroma DB is not for the deployment

17:36:53

deployment complexity is there because

17:36:55

you won't be able to find out this

17:36:57

chroma DV on top of the cloud right so

17:36:59

they uh the pine cone basically already

17:37:01

it is running on top of the cloud there

17:37:02

you just need to consume it by using the

17:37:04

API right there you need to use this

17:37:07

chroma DB there you need to use the pine

17:37:09

cone by using the API but it is not same

17:37:13

with chroma DB actually this chroma DB

17:37:16

whenever you are going to use it it is

17:37:18

not available in the form of API because

17:37:21

it's a open- source package you need to

17:37:23

install it inside your local workspace

17:37:24

space and you need to use it right you

17:37:26

need to install it inside your local

17:37:28

workspace and you need to use it so if

17:37:30

you're going to deploy it right if

17:37:32

you're going to deploy it so there you

17:37:33

will find out a complexity so here just

17:37:35

read U the complexity Point setting up

17:37:38

chroma DB chroma and managing it scale

17:37:40

might require more effort and expertise

17:37:42

compared to many solution like pine cone

17:37:44

because in the pine cone you're just

17:37:45

consuming the API right you're just

17:37:47

consuming the API everything is there on

17:37:49

top of the uh third party server

17:37:51

everything is running over there you

17:37:53

just need to consume it by using the API

17:37:55

but here in the chroma DB the thing is

17:37:58

not same deployment complexity

17:38:00

definitely will find out because there

17:38:02

is a no like Cloud support as of now for

17:38:05

the chroma DB you will have to install

17:38:07

inside your local workspace and you will

17:38:09

have to set up each and everything got

17:38:11

it now performance consideration yes uh

17:38:14

definitely this thing also will come

17:38:15

into the picture if we are talking about

17:38:17

regarding the realtime use cases so

17:38:19

performances also might be here and

17:38:21

there so there are some points you can

17:38:24

uh search about more regarding a

17:38:26

different different like regarding a

17:38:28

different different Vector database and

17:38:31

from there you can uh like pick out you

17:38:34

can pick up this particular points this

17:38:35

particular heading and you can do your

17:38:38

own research so whether it's a scalable

17:38:40

whether it's a whether there is an

17:38:41

indexing for the fast retrieval whether

17:38:43

there is a python support or it is fine

17:38:45

for the deployment so you can pick up

17:38:47

this point and based on that you can

17:38:50

make a differences and based on that you

17:38:52

can understand actually right so I hope

17:38:55

guys you are getting it now uh the

17:38:58

differences is clear so please do let me

17:39:01

know in the chat if uh the differences

17:39:03

is clear to all of you then we'll uh go

17:39:07

for the coding yes or

17:39:14

no yeah thank you Sati so sa saying Sun

17:39:18

sir I have enrolled for the Gen 10%

17:39:20

discount got the python free recording

17:39:22

with that that's a big surprise

17:39:25

great great satis

17:39:26

congratulation so yeah now uh I hope

17:39:30

this part is clear to all of you now

17:39:32

let's start with the Practical

17:39:34

implementation of this chroma DB so here

17:39:37

uh for uh implementation actually first

17:39:40

of all we'll have to install some

17:39:42

Library so whatever code whatever code

17:39:45

I'm pasting over here in my jupter

17:39:47

notebook the same code I will provide

17:39:48

you in my code share. I also so here is

17:39:52

my code guys which I'm going to run now

17:39:54

the same code I am pasting in my Cod

17:39:57

share. so that you can copy from there

17:40:00

so did you get a link of this Cod share.

17:40:02

IO please do let me know in the chat

17:40:04

please do confirm guys if you got the

17:40:07

link of this code share. iio so don't

17:40:09

worry my team will give it to you inside

17:40:11

the chat and from there you can copy the

17:40:14

entire

17:40:16

code how to find tune the question

17:40:19

answer data using lar 2 model and I

17:40:22

don't have context but I have only uh

17:40:24

question answer and I have so that is

17:40:27

that the the fine tuning also we can do

17:40:29

that but for that we required a huge

17:40:31

amount of resources and based on a Model

17:40:34

also like which model you are going to

17:40:35

use so as of now I'm not going giving

17:40:37

you the detail regarding the fine tuning

17:40:39

and all I understand that's going to be

17:40:40

an important topic but yeah so here I'm

17:40:43

talking about the vector database and

17:40:45

then we'll start with one more project

17:40:46

and after that maybe we'll take few more

17:40:48

classes we'll try to discuss about the

17:40:50

concept of the fine tuning right but as

17:40:52

of now you can think that uh like if you

17:40:55

have your own question answering data

17:40:57

right so there might be a different

17:40:58

different technique right different

17:41:00

different technique for the finetuning

17:41:02

the recent technique which I was

17:41:04

searching the recent technique name was

17:41:05

the parametric effective fine tuning so

17:41:08

what's the meaning of that parametric

17:41:10

effective fine tuning so there you have

17:41:13

the question answer there you have your

17:41:15

data now based on that you have to train

17:41:17

the model which will be required a huge

17:41:20

amount of resources and you can do over

17:41:23

the uh like C CPU also on like on a low

17:41:26

cost also but for that you will be

17:41:28

required a quantise model so that is a

17:41:30

different thing how you can quanti your

17:41:32

model and then how you can do a find Uni

17:41:34

there are some uh more techniques comes

17:41:37

into the picture like Laura and Cur that

17:41:40

is also a technique a different

17:41:41

different technique regarding this uh

17:41:43

parametric effective fine tuning so

17:41:45

we'll try to discuss it right and for

17:41:47

that only we have designed the course

17:41:49

just just look into that each and

17:41:50

everything we have mentioned over there

17:41:52

where we are going to discuss everything

17:41:53

you know very very detailed way got it

17:41:56

now here uh I have given you this

17:41:59

particular link and here is a

17:42:01

installation statement pip install

17:42:03

chroma DB open Lang and Tik token you

17:42:05

need to install this for library now

17:42:09

here guys uh let me install this library

17:42:11

inside

17:42:13

my inside my environment just a

17:42:17

second are you doing it can I get a

17:42:20

quick yes or no in the chat if you are

17:42:22

doing along with me

17:42:25

and please hit the like button guys

17:42:26

please hit the like button if you're

17:42:28

liking the session because I can see uh

17:42:30

you have joined the session but uh

17:42:32

you're not writing anything inside the

17:42:34

chat and you're you're just watching

17:42:36

don't don't do like this hit the like

17:42:38

button guys and if you have any sort of

17:42:40

a doubt just just uh write it on the

17:42:43

chat just cheer up okay so let's make it

17:42:45

more interactive got

17:42:53

it

17:43:03

yeah it is installing now let me give

17:43:04

you few more libraries so just a second

17:43:07

I can give you few more Library which I

17:43:09

kept

17:43:11

somewhere okay that is fine now after

17:43:15

that you can check with this particular

17:43:16

command so here is a command guys this

17:43:18

one so let me give you this particular

17:43:22

command PIP show chroma d DB just uh

17:43:26

check with this command that your chroma

17:43:28

DB successfully installed or not here's

17:43:30

a command the command is PIP show chroma

17:43:49

DB yeah it is perfect now it is done so

17:43:53

have you installed it having installed

17:43:55

uh this all the

17:43:58

library tell me guys fast then I will

17:44:01

proceed further now you can check with

17:44:02

the chroma DB then you will find out the

17:44:04

detail of the chroma DB so it is giving

17:44:07

you the it will give you the detail of

17:44:08

the chroma DB there is a simple command

17:44:11

PIP show chroma DB so we have installed

17:44:14

the chroma DB on the uh workspace in the

17:44:17

latest workspace and here you will find

17:44:19

out the detail of the chroma DV this is

17:44:21

the latest model this is the latest

17:44:23

model Vishnu I have already shared the

17:44:26

code please go and check with the code

17:44:29

share. okay join the session on

17:44:32

time because again and again I won't

17:44:34

repeat a same thing so please we aware V

17:44:38

Active I'm sharing everything that's why

17:44:40

there is a like cod share. which I have

17:44:44

shared with all of you okay just copy

17:44:46

from there and paste it inside the

17:44:49

Jupiter

17:44:51

notebook yes we have a gen related

17:44:53

project just check in a commune session

17:44:55

also we have completed a project and

17:44:57

even in the course also we have a

17:44:58

project so rames please check with the

17:45:01

course please check with the

17:45:05

dashboard now I think uh till here

17:45:08

everything is fine everything is done

17:45:10

see the first thing what I need to do so

17:45:12

here actually I need to I need to uh

17:45:16

like uh I need to get I need to download

17:45:19

a data so from here from this particular

17:45:21

link I'm going to collect a data right

17:45:24

let me show you uh what we have on top

17:45:26

of this part on over here actually at

17:45:29

this particular link so for that just

17:45:31

copy it and paste it inside your Google

17:45:34

so just just paste it over here open the

17:45:36

Google and paste it in your Google now

17:45:39

just a

17:45:41

second yeah so here is a Dropbox guys so

17:45:44

in the Dropbox actually you will find

17:45:46

out this particular data right so just a

17:45:49

second uh let me show you this

17:45:51

data m

17:45:56

specifically we have this data just a

17:45:58

second guys so here in the URL box I can

17:46:01

paste

17:46:02

[Music]

17:46:06

it yeah so here is a data guys so the

17:46:09

data actually it's a news article so

17:46:12

just just see the article uh it's a news

17:46:14

article so AI powered supply chain

17:46:16

startup pendo lens 30 million investment

17:46:19

txt just open it and read it right this

17:46:22

data is already available somewhere

17:46:24

where in the Dropbox so I just shown you

17:46:26

this particular link and we are going to

17:46:27

like use this data for creating

17:46:30

embeddings and for like uh and then

17:46:33

we'll uh then we'll store the embedding

17:46:35

inside the then we'll store the

17:46:37

embedding inside the vector database so

17:46:39

this is the data basically which we are

17:46:40

going to use here we have a several text

17:46:42

files so just go through with the data

17:46:44

there you will find out the entire

17:46:45

detail related to the data uh so here is

17:46:48

a one more article replace TB writers

17:46:50

strike. txt so go and check with this

17:46:53

particular artic article now here is one

17:46:55

more article just go and check with that

17:46:56

particular article so this is the

17:46:58

article everything you need to know

17:47:00

about the AI power chb right so

17:47:03

different different article you will

17:47:04

find out over here check the AI power

17:47:06

data protection project right so there

17:47:08

are so many article which we are going

17:47:10

to use which we are going to use for our

17:47:13

uh like this this is the article which

17:47:15

we are going to use for our embeddings

17:47:16

and all by using this data by using this

17:47:19

text data by using this particular data

17:47:21

text Data what we are going to do we are

17:47:23

going to to first we are going to

17:47:24

convert a chunks right and then we are

17:47:26

going to convert those chunks into a

17:47:28

embedding by using the embedding model I

17:47:31

will show you which embedding model

17:47:32

we're going to use so we are going to

17:47:33

use the openi model but there are so

17:47:35

many embedding model you can use the

17:47:38

buttu bag there are so many model you

17:47:39

will find out over the hugging phas also

17:47:41

so it's up to you you can do a Google

17:47:43

search I will show you how to do that

17:47:45

and then you can select your model as

17:47:47

per your requirement right now here this

17:47:50

is the data now let me give you the data

17:47:52

link over here by running this

17:47:54

particular command so this is the data

17:47:56

link and by running this particular

17:47:58

command here is a command guys where is

17:48:00

a command this is the command so by

17:48:02

using this uh particular command you can

17:48:05

install the data or you can load the

17:48:07

data or you can download the data into

17:48:10

your local workspace so let's see let uh

17:48:13

me show you the data basically so here

17:48:15

you just need to run this command so

17:48:18

just press shift plus enter and see left

17:48:21

hand side your data is is getting

17:48:24

installed and yes it is done now here is

17:48:26

a j file see guys there is a j file news

17:48:30

article J file left hand side in the

17:48:32

left hand uh in the workspace basically

17:48:34

you you will find out this news

17:48:36

article. jip but if you want to unj this

17:48:40

data so for that also we have a command

17:48:42

now let me give you that a particular

17:48:44

command so the command is what command

17:48:46

is nothing unip hyphen Q news article

17:48:50

you need to be uh like unload it uh you

17:48:53

need to be like unloaded right you need

17:48:55

to be unzip it uh and here you will get

17:48:58

this data inside this particular folder

17:49:00

now let me show you let me run it and

17:49:02

here you can see we have our data inside

17:49:05

this particular folder so I'm giving you

17:49:08

this command I'm giving you this

17:49:09

particular command just a second you can

17:49:12

check and you can run inside your system

17:49:15

so here is a data guys here you will

17:49:17

find out the data now let me unnoted uh

17:49:21

this particular thing this is the data

17:49:23

data is about the news article so news

17:49:27

article data and here you will find out

17:49:31

the command which you can run and with

17:49:33

that you can install you can install

17:49:35

this chip file install the chip file in

17:49:38

your local workspace where you need to

17:49:41

install guys tell me need to install

17:49:43

this work file you need to install this

17:49:45

file inside your local workspace so let

17:49:48

me write it down here local workspace

17:49:50

and with this particular command you can

17:49:52

unip it so so by using this particular

17:49:55

command you can unip it so each and

17:49:58

everything I have written over here you

17:49:59

just need to copy and paste inside your

17:50:03

Jupiter notebook that's it right great

17:50:07

so please use the if see someone is

17:50:10

saying ra is saying Sir W get is not

17:50:12

working so here W get is working now

17:50:14

this use this with escalation mark right

17:50:17

and use the neural lab I haven't shown

17:50:19

you this thing by using the collab or

17:50:21

maybe this local setup I'm see in Linux

17:50:24

environment definitely it will work but

17:50:26

if you are using the Windows system so

17:50:28

in in that case it might not work so use

17:50:30

the Linux environment and this lab

17:50:33

actually has been configured on top of

17:50:34

the Linux environment in a production

17:50:36

you will find out the Linux environment

17:50:37

only because for that you no need to pay

17:50:40

anything it's a open source right so

17:50:42

just like required a small amount of the

17:50:45

Linux server but yeah if you are like

17:50:47

using a Windows server in a production

17:50:49

so definitely it's going to charge you

17:50:51

very very much so here is a Linux

17:50:54

environment which I'm uh like where I'm

17:50:57

executing all this command so w Is there

17:51:00

anip is there now let me run the next

17:51:03

command so here the next command is what

17:51:05

what so here I need to set my open a API

17:51:08

so I got the data here you'll find out

17:51:10

basically I got the data this is what

17:51:12

this is what this is my data which I got

17:51:14

in my local workspace now after that I'm

17:51:18

going to set my I'm going to set my open

17:51:21

a API key you know it how to set the

17:51:24

openi key many time I have shown you in

17:51:27

my lecture so for that you just need to

17:51:29

go through the open website open the

17:51:32

open website and here search uh just

17:51:35

click on that the and then click on the

17:51:37

login you'll find out two option the

17:51:39

first option is the API and the second

17:51:41

is a chat jpt so just click on the API

17:51:44

and then click on the API key so here

17:51:46

you will find out the API key so this is

17:51:48

the API key basically which I have

17:51:50

generated and here I have passed it

17:51:52

inside my note book also so just if you

17:51:55

will see into this API key so here I

17:51:57

pass this API key into my notebook this

17:51:59

is what this is my API key right now

17:52:02

what I can do guys see uh just a second

17:52:05

let me pass the correct one because I'm

17:52:09

using the old API key over here just a

17:52:12

second just allow me a minute

17:52:17

okay I kept it somewhere I kept it

17:52:21

uh and you have to generate your opena

17:52:24

API key I'm not giving you that uh

17:52:27

because for that I have paid actually so

17:52:29

please use your API key uh there are so

17:52:32

many person which join the session so if

17:52:34

they are going to use my open key

17:52:35

definitely it will be rushed out so

17:52:38

please use your op key please generate

17:52:41

it by yourself initially it will give

17:52:42

you the $20 credit so you can use it now

17:52:46

here uh there is what there is my open a

17:52:49

API key now it is done tell me guys

17:52:51

still here everything is fine everything

17:52:53

is clear to all of you please uh do let

17:52:56

me know in the chat if everything is

17:52:58

going well so far so I'm waiting for a

17:53:01

reply and I'm giving you this particular

17:53:02

command there you can paste your openi

17:53:06

key and you can run it so this is for

17:53:08

the openi key tell me guys fast waiting

17:53:11

for a reply if you are done till here

17:53:14

then please do let me know then only I

17:53:17

will proceed sir I for the P can I my I

17:53:21

on team yes Sati you can ask your doubt

17:53:23

uh to the Inon team they will assist you

17:53:26

regarding your all the doubts all the

17:53:33

concerns so please give me a quick

17:53:35

confirmation guys if uh you are done if

17:53:39

you are able to follow me till here then

17:53:41

I will proceed

17:53:44

further tell me guys fast waiting for

17:53:47

your reply please or do let me

17:53:52

know

17:53:56

and please hit the like button guys uh

17:53:59

if you're liking this session and yeah

17:54:02

you can write down the chat chat also

17:54:05

whatever doubt you have while you are

17:54:06

implementing it and don't worry today

17:54:08

the understanding will be more clear

17:54:10

regarding this database regarding this

17:54:12

Vector database compared to the previous

17:54:15

session because today uh because already

17:54:18

we have learned it now right so today is

17:54:19

a kind of revision so don't worry we

17:54:21

have uh created Creed one project also

17:54:24

and after the after this Pro after this

17:54:27

like implementation I will show you the

17:54:29

project architecture also so uh in the

17:54:31

next class we are going to discuss about

17:54:33

that particular project we are going to

17:54:34

implement from a scratch and there you

17:54:36

will get to know that how this Vector

17:54:38

datab base is being used right so we are

17:54:41

going to create one chatboard and the

17:54:43

chatboard is going to be a medical

17:54:44

chatboard we are specifically going to

17:54:46

train on top of the medical data right

17:54:49

so just stay tuned with us uh in next

17:54:52

class uh we'll create one more project

17:54:54

and we'll try to use it the we'll try to

17:54:56

use the flask over there and fast API

17:54:59

and we'll deploy it also right got it

17:55:01

great now here after that I have

17:55:05

imported few libraries now let me give

17:55:06

you this libraries inside the uh like

17:55:09

cod. I so there what I can do guys here

17:55:13

I can uh write it down you need to

17:55:16

import this a particular Library so here

17:55:19

I have written you need to import this

17:55:21

are libraries libraries so just just

17:55:25

copy it guys and after copying it you

17:55:27

can uh uh run inside your system so see

17:55:31

guys if I'm running it then definitely

17:55:33

uh where is my

17:55:35

not yeah this one so here you can see

17:55:38

after running it uh after basically

17:55:40

importing it what I need to do I just

17:55:41

need to run it so see I'm able to import

17:55:43

each and everything now let's try to

17:55:45

understand each and every detail about

17:55:47

this libraries about this import

17:55:50

statement so for that uh just a second I

17:55:53

can open My Epic pen and that there I

17:55:56

can explain you each and

17:55:59

everything sir can I exp experience

17:56:01

certificate with a paid course yes

17:56:03

definitely in certificate and experience

17:56:04

certificate will be available right so

17:56:07

actually you can generate it um I given

17:56:09

you the walkth through in my previous

17:56:11

session just just check and uh check

17:56:12

with those particular like session just

17:56:14

go through with the introduction itself

17:56:16

uh so there I have discussed about the

17:56:17

internship portal as well if you don't

17:56:19

know don't worry again I will open that

17:56:21

and I give you I will give you the walk

17:56:23

through so how you can complete the

17:56:24

internship on top of the generative AI

17:56:26

because we are going to add more and

17:56:28

more project related to the generative

17:56:29

AI with a different different uh like

17:56:31

domain so you can complete your project

17:56:33

in a multiple domains right so don't

17:56:35

worry uh like I will show you that is

17:56:39

still it is in a pipeline uh the project

17:56:41

will be uploaded Maybe not today in the

17:56:43

next class definitely we'll be talking

17:56:44

about it right so let's try to discuss

17:56:47

about this Library so here is the

17:56:49

library the first one is the Len chain

17:56:51

do Vector store and here is a chroma

17:56:53

right so chroma it is this for the

17:56:56

chroma DB this for this is what this for

17:56:58

the chroma DB now here this is for the

17:57:00

open a embedding and as I told you right

17:57:02

so uh we can generate a embedding right

17:57:05

we can generate the word embedding and

17:57:07

this word embedding is nothing this word

17:57:09

embedding is nothing it's a vector only

17:57:11

so what is this tell me this word

17:57:13

embedding is nothing it's a vector it's

17:57:16

a vector right so here actually this

17:57:18

open I already uh trained so they

17:57:21

already took the data and they already

17:57:23

trained one model and by using this

17:57:26

particular model they have generated a

17:57:27

Ming now how to do that so how to do

17:57:30

that tell me guys so here regarding this

17:57:32

particular data regarding this

17:57:33

particular data definitely they must be

17:57:35

having the uh like vocabulary they have

17:57:38

generated one vocabulary and for this

17:57:40

particular vocabulary they must have

17:57:42

created the features right so features

17:57:44

and they are passing each and everything

17:57:46

to their model and this model is nothing

17:57:48

that's going to be a neural network

17:57:50

right this is going to be a neural

17:57:51

network and yes based on that they will

17:57:54

they are going to generate the embedding

17:57:56

right so I told you that how to generate

17:57:58

embedding and all if you will go and

17:57:59

check with my previous session there I

17:58:02

have discussed about this embedding open

17:58:04

AI embedding now here we have one more

17:58:07

package open AI this is for the this we

17:58:09

calling this open a API so by using this

17:58:11

one we can call the open API directory

17:58:14

loader we can load the directory text

17:58:16

loader we can load the text and all

17:58:17

whatever uh like files we have now we

17:58:20

have in a text format so by using this

17:58:22

uh text loader we can load that

17:58:25

particular data that particular file so

17:58:27

let's try to uh load it now so for that

17:58:29

also we have a code for loading a data

17:58:32

and here is a simple code let me copy

17:58:35

and paste it over here and along with

17:58:38

that let me copy and paste inside your

17:58:41

uh inside the inside the Cod share. also

17:58:45

so please copy from here each and

17:58:46

everything I'm giving you uh so you just

17:58:49

need to copy it and you need to paste it

17:58:51

inside your system so here what I can do

17:58:54

guys here I can write it down for

17:58:57

loading the data and guys believe me

17:58:59

after completing this much of thing the

17:59:02

understanding will be more clear to all

17:59:04

of you so for loading the data let me

17:59:06

write it down over here uh just copy

17:59:08

from here and paste it inside your

17:59:11

system now what I can do here I can load

17:59:13

and inside this news article so Globe is

17:59:16

for what Globe is for all the text files

17:59:19

so whatever text file is there so is

17:59:21

going to read the data from the entire

17:59:23

text file right so it's going to read

17:59:25

the data from the entire text file for

17:59:27

that you just need to mention one

17:59:29

parameter the parameter is going to be

17:59:31

Globe right dot means current directory

17:59:34

SL star means what so here we have

17:59:36

written the star so what is the meaning

17:59:38

of the star so star is nothing star is

17:59:41

representing the entire directory right

17:59:43

so whatever file name is going to start

17:59:45

from this txt we are going to load the

17:59:48

entire file we are going to load all

17:59:50

those file that's it that's a meaning of

17:59:52

the simple code now if I'm going to run

17:59:54

it you will find out that we are able to

17:59:56

create a loader over here I just need to

17:59:59

call one method now I just need to call

18:00:02

one method and the method is going to be

18:00:04

do load so let me run it and you will

18:00:07

find out that it is giving me a syntax

18:00:08

error now let me show you that yes we

18:00:11

are able to load the data so it is

18:00:14

saying that the file is not there okay

18:00:16

let me remove it and here is

18:00:20

this home Joy on news article is not

18:00:24

there why it is

18:00:27

so oh just a wait let me copy the

18:00:31

path to sharable

18:00:34

link should be treor news

18:00:39

article so is this a path just a

18:00:46

wait just a wait guys just a wait let me

18:00:50

check

18:00:51

once

18:00:54

lab

18:00:58

directory okay why it is giving me this

18:01:02

issue copy the path and paste it over

18:01:05

here that's

18:01:13

it are you facing the same

18:01:16

issue my open is expired you can

18:01:18

generate a next one now you can generate

18:01:20

a next API key

18:01:26

uh it is giving me a issue guys just a

18:01:28

second let me delete it and let's see

18:01:31

whe whether I will get up so this is the

18:01:34

directory actually see home Jan just

18:01:37

copy this

18:01:38

directory and just copy this complete

18:01:40

directory and dismiss it and keep it

18:01:42

over

18:01:45

here now let me

18:01:50

check yeah now I'm able to do it

18:01:53

so guys here see once you will do the

18:01:56

right click and just click on the delete

18:01:58

just click on the delete so it will give

18:01:59

you the complete uh directory I don't

18:02:02

know why I was not getting by using this

18:02:04

copy path but yeah now I getting it so

18:02:07

are you do it are you able to do it are

18:02:10

you able to load the data are you able

18:02:11

to load the document please do let me

18:02:14

know yes or

18:02:16

no so here is what here is my uh

18:02:20

document please again give me a quick

18:02:23

confirmation guys if you able to load

18:02:25

the document so just wait let me give

18:02:28

you this line also this uh loader. load

18:02:32

and please try to load the data by using

18:02:35

this loader. load tell me guys if you

18:02:38

are able to load the data then please

18:02:40

write it down the chat I'm waiting for

18:02:42

your

18:02:44

reply tell me

18:02:51

first

18:03:18

are you enjoying the session do you like

18:03:20

the session guys tell me

18:03:22

do you like the session so far all all

18:03:26

your all the doubts and all is getting

18:03:28

clear yes or no tell

18:03:48

me oh great so I think till here

18:03:51

everything is fine everything is clear

18:03:53

now we got our data right so we got our

18:03:59

data now what I will do here so just a

18:04:01

second let me show you so first of all

18:04:03

we have a data now guys tell me after

18:04:06

getting a data what I will do any guess

18:04:09

any any guess

18:04:21

anything just wait just

18:04:35

wait yeah so after getting the data what

18:04:38

I will do so after getting a data I will

18:04:40

create a chunk right so let me copy and

18:04:44

paste this particular code over here

18:04:45

what I can do just a second this data is

18:04:47

very very huge so actually it is taking

18:04:50

time if I'm scrolling down just a second

18:04:52

yeah now it's perfect so here actually

18:04:54

you will find out a data related to all

18:04:57

the text file right so you got a data

18:04:59

related to all the text file now here

18:05:02

you need to create a chunk so for that

18:05:04

basically I'm going to use this

18:05:07

particular library and here we have few

18:05:09

more code right few more code few more

18:05:12

thing uh so let me give you this

18:05:14

particular code and then I will explain

18:05:16

you the meaning of it because yesterday

18:05:18

also like many people were asking to me

18:05:20

sir what is the meaning of this

18:05:21

particular Cod code why we are using it

18:05:24

uh like what we are doing over here what

18:05:26

is the meaning of this uh text splitter

18:05:28

split document and all each and

18:05:30

everything we going to discuss over here

18:05:33

now uh let me open my Scrabble link

18:05:37

right and here we going to discuss about

18:05:38

each and everything so what I can do let

18:05:41

me zoom in first of all and now it is

18:05:45

perfect so let's try to understand so

18:05:47

guys at the first place what I did just

18:05:49

tell me guys so at the first plate at

18:05:51

the first place we have uh we have

18:05:54

generated a data right so here actually

18:05:56

we have a data so we got a data from

18:05:58

somewhere this is what this is my data

18:06:01

right after getting a data after getting

18:06:03

a data what I what I'm doing guys tell

18:06:05

me so after getting a data I need to

18:06:07

convert this particular data into a

18:06:10

embedding right so what I need to do I

18:06:12

need to convert this particular data

18:06:15

into

18:06:18

embedding now here I got a data and I'm

18:06:21

going to convert this data into

18:06:23

embedding can you tell me which model we

18:06:24

are using for this embedding can anyone

18:06:26

tell me which model we are using for

18:06:28

this embedding anyone fast which model

18:06:32

so we are using open AI embedding model

18:06:35

open AI open AI edding M bidding model

18:06:41

right we are going to use open AI edding

18:06:44

model now guys here we are talking about

18:06:47

this open a embedding model so just just

18:06:50

look into that just just open the model

18:06:52

here what I can do uh let me show you

18:06:54

the open

18:06:56

models here I'm searching about the open

18:07:00

models right so you will get all the

18:07:02

models over the whatever model is there

18:07:04

over the openi platform so these are the

18:07:06

model Guys these are all the model which

18:07:08

you can see here right so GPD 4 is there

18:07:11

GP 3.5 is there Delhi TTS whisper

18:07:14

embedding is there so just click on this

18:07:16

embedding right so just click on this

18:07:18

embedding and here you will find out the

18:07:20

embeddings and all right so uh text

18:07:22

generator uh text uh moderation latest

18:07:25

model max token you can pass 30,000

18:07:27

right 32,000 now here is a GPT based

18:07:30

model So weage based model so there is

18:07:32

like you can pass 60 16,000 token there

18:07:36

uh is a d Vinci model there you can pass

18:07:38

16, 384 token now there is GPD 3 based

18:07:41

model so there you can pass 2,000 token

18:07:44

right this this is the token now

18:07:46

actually in our case we are going to use

18:07:48

the GPT based model this this GPT based

18:07:51

model so we are going to use GPT 3.5

18:07:53

turbo right so here which model we are

18:07:56

going to use we are going to use GPT 3.5

18:07:59

turbo right so here GPD GPD 3.5

18:08:02

basically we are using so now just just

18:08:04

look into this in a GPD 3.5 uh this this

18:08:06

model by default actually we are going

18:08:08

to use this particular model now tell me

18:08:10

guys what is the total limit here what

18:08:11

is the total limit the total limit is

18:08:15

4,960 right and here if you will look

18:08:17

into your data so this is your this is

18:08:19

what this is your data now just look

18:08:21

into this particular data

18:08:22

now here are guys there are so many

18:08:25

tokens there are so many words if you

18:08:28

will calculate the words so definitely

18:08:30

is going to exceed 4,000 right so

18:08:33

definitely is going to execute 4,000

18:08:35

exceed 4,000 now let's say let let's

18:08:37

talk about that if you are working in a

18:08:39

real time so you will get a very huge

18:08:41

amount of data you are you will be

18:08:43

getting a very huge amount of data and

18:08:46

here if the sentence is going to be a

18:08:47

very long in that case there might be a

18:08:49

chance that my model will not be able to

18:08:52

sustain the context right my model will

18:08:55

not be able to sustain the context and

18:08:57

here you can see the there's there are

18:08:58

like two long text right and here by

18:09:01

defa which model we are going to use we

18:09:03

are going to use this GPT 3.5 turbo this

18:09:05

this particular model uh basically

18:09:07

whenever we are going to use the llm

18:09:10

right we are going to use this

18:09:11

particular model which is going to be a

18:09:12

gbt 3.5 turbo and here you can see the

18:09:14

tokens limit 4096 tokens right 4096

18:09:18

tokens now here the data which we have

18:09:21

in inside that we have a lots many

18:09:23

tokens right so we have a tokens which

18:09:25

might exceed more than 4,000 or let's

18:09:28

say this is not going to exceed more

18:09:29

than 4,000 but let's say if you are

18:09:31

working on some realtime data and there

18:09:33

there you are getting a data which is

18:09:35

very very huge and which is exceeding

18:09:37

the number of tokens right whatever

18:09:39

model you are using let's say you are

18:09:40

using a topmost model where you can give

18:09:42

30,000 token but still it is exceeding

18:09:45

the limit in that case what you will do

18:09:47

so you will provide your data in terms

18:09:48

of chunks what you will do tell me you

18:09:51

will provide your data in terms of in

18:09:53

the form of chunks right so that is what

18:09:56

we are going to do over here so over

18:09:58

here guys what I'm going to do see uh

18:10:01

here is what let's say here is my data

18:10:04

right and here is what here is my Ming I

18:10:07

want to perform the Ming now what I will

18:10:08

do here I I will keep one thing so in

18:10:11

between this data and this Ming right so

18:10:14

actually after that after this eding and

18:10:16

all what I will do tell me I will pass

18:10:18

my model now I will pass this thing to

18:10:21

my model

18:10:22

right so I cannot deny with this thing

18:10:24

so I'm going to pass this thing to the

18:10:26

model and here we have a data right we

18:10:28

have a data and in between actually what

18:10:30

we are going to do we are going to do a

18:10:33

chunking right what we are going to do

18:10:35

we are going to do a chunking now let's

18:10:37

try to understand what is the meaning of

18:10:39

the chunking so let's say we have a data

18:10:42

right so what what I have guys tell me

18:10:44

let's say we have a data now what I have

18:10:48

to do I have to do a Chun right I have

18:10:51

to convert this data into a chunks now

18:10:53

here in the library which I have

18:10:55

imported there you will find out two

18:10:57

thing two words so let me do one thing

18:10:59

let me copy and paste this thing from

18:11:01

here so here what I can do what is

18:11:04

happening

18:11:07

okay where is

18:11:11

this oh just a second guys just a

18:11:17

[Music]

18:11:20

wait

18:11:25

yeah here is a code guys see so what I'm

18:11:28

going to do from here I'm going to take

18:11:31

uh I'm going to copy this particular

18:11:33

line this this particular line right now

18:11:35

let me copy it and let me paste it over

18:11:38

here so here is what here is my dis link

18:11:41

so here I'm going to paste this a

18:11:43

particular line and now guys here

18:11:46

actually you'll find out two thing the

18:11:48

first is a chunk size and the second one

18:11:51

is what overlap right so what I'm going

18:11:53

to do so here I'm going to copy and

18:11:55

paste some data from here itself right

18:11:58

just just focus everything will be clear

18:12:00

over here so here is what here is my

18:12:02

data now let me copy this particular

18:12:05

data this is my data this one page

18:12:07

content now I'm going to copy this

18:12:09

particular data and I copy let's say

18:12:11

till here right this just for the demo

18:12:14

this just for the demo nothing else

18:12:15

right so here is what guys here is my

18:12:17

data which I kept over here right now

18:12:20

just just looking into this data so

18:12:22

here's my data which I just took for the

18:12:25

demo so the first thing which I have

18:12:27

defined that's going to be a chunk size

18:12:29

right chunk size now what is the meaning

18:12:32

of that so here actually let's say uh

18:12:35

I'm going to divide my data into chunks

18:12:37

what I'm going to do tell me I'm going

18:12:38

to divide my data into chunks so I want

18:12:41

that I want 100 tokens over there here

18:12:44

here I have written thousand right let's

18:12:45

say I'm giving 100 tokens so what is the

18:12:47

meaning of that means let's say there is

18:12:49

first Chun one Chun in that until I'm

18:12:52

not going to complete 100 tokens let's

18:12:54

say from here to here from here to here

18:12:58

we got 100 tokens right so I will stop

18:13:00

over here and that data so that is what

18:13:02

there is my first chunk now again there

18:13:04

will be a second chunk so it's going to

18:13:06

start from here and let's say till here

18:13:09

so here I'm going to complete my 100

18:13:11

tokens so this is going to my third

18:13:13

chunk now there is a third uh third

18:13:14

chunk basically so in the third chunk

18:13:16

you will find out we are going to start

18:13:18

from here and let's say till here so

18:13:20

this is going to be my third chunk where

18:13:22

I'm able to complete my 100 tokens and

18:13:24

what is the meaning of the tokens so

18:13:26

tokens is nothing it's going to be a

18:13:28

word so what is the meaning of the

18:13:29

tokens tokens is nothing the word itself

18:13:32

is called a token right so if you are

18:13:35

going to complete 100 words in that case

18:13:39

I'm able to generate my first chunk I'm

18:13:41

going to generate my first chunk and why

18:13:44

I'm doing that because let's say data is

18:13:45

very very huge so I cannot directly pass

18:13:49

that particular data to my model it will

18:13:51

Ex the limit so the better thing is what

18:13:54

I'm going to provide my data in terms of

18:13:56

chunks in terms of small small chunks

18:13:59

right so it will be able to sustain the

18:14:01

context also and my limit is not going

18:14:04

to exceed got it now here you have a

18:14:07

three chunks regarding this particular

18:14:08

data let's understand the meaning of

18:14:11

this chunk overlap right so let's say

18:14:13

instead of this uh 200 I'm just writing

18:14:17

20 right so now guys let's say uh my

18:14:21

first CH is going to start from here to

18:14:24

here right to here now second chunk is

18:14:28

going to start from the from this if

18:14:31

from here to here right here now let's

18:14:35

say uh I'm writing 20 so what will

18:14:38

happen you know what will happen so it

18:14:41

will take 20 wats this this second this

18:14:44

second chunk this second chunk it will

18:14:48

take it will take 20 words it will take

18:14:51

20 words from the previous sentence so

18:14:53

let's say this is a 20 words this this

18:14:55

is a 20 words now this 20 words will be

18:14:59

carry forward to my second chunk now

18:15:03

here we are talking about the third one

18:15:05

third one so here let's say from here to

18:15:08

here from here to here this is my third

18:15:10

chunk now if I'm writing chunk overlap

18:15:13

is 20 so from the previous sentence from

18:15:16

the previous chunk my 20 words is

18:15:19

getting overlap mean means it is going

18:15:21

to forward is it is carrying forward to

18:15:24

my next chunk getting my point what is

18:15:26

the meaning of this chunk size and why

18:15:28

we are doing that what is the meaning of

18:15:30

the chunk size chunk overlap what is the

18:15:32

meaning of Chunk I hope everything is

18:15:35

getting clear now I have given you the

18:15:36

clearcut explanation so let's try to do

18:15:39

a chunking regarding my data so over

18:15:42

here if you will find out let me show

18:15:45

you the chunks and all and how we can do

18:15:47

that

18:15:50

actually what is the purpose of the

18:15:52

overlapping just just think about it

18:15:54

just think about it what is the purpose

18:15:55

of the overing we want to sustain the

18:15:57

information from the previous sentence

18:15:59

from the previous chunk that's

18:16:01

it right that's it now my data is little

18:16:04

smaller in that case uh I'm not able to

18:16:06

create so many chunks what I will do I

18:16:08

will perform the

18:16:10

overlapping getting my point right yeah

18:16:12

to maintain the context to maintain the

18:16:14

length whatsoever now here I'm passing

18:16:17

my document I'm passing my document and

18:16:19

here I'm going to create a chunk so guys

18:16:22

over here you will find out inside this

18:16:24

particular variable there is my chunk so

18:16:27

here if I want to extract the first

18:16:29

chunk so this is what this my first

18:16:30

chunk as you can see now I can call the

18:16:34

page content so here if I'm going to

18:16:35

call this a page content so you will

18:16:38

find out this is what this is my content

18:16:40

right now here I can take the second

18:16:43

chunk also so here is what here is let's

18:16:45

say is my second chunk so you will find

18:16:47

out this what this is my second Chun now

18:16:49

here you will find out the third chunk

18:16:51

so this is is going to be your third

18:16:53

chunk now let me show you the third

18:16:56

chunk so here actually you will find out

18:16:58

all the Chunk in the list so I can get

18:17:00

the length of the list also so just uh

18:17:04

call this length and this text so here

18:17:06

you will find out total

18:17:08

233 chunks got it yes or no now let me

18:17:12

give you this particular code and here

18:17:14

is what here uh I have a code let me

18:17:17

close it first of all this is what this

18:17:18

is my code let me paste it over here so

18:17:21

just copy from here and try to extract

18:17:24

right so try to extract so here actually

18:17:28

uh you have a text right and from there

18:17:30

you can extract the content now trial

18:17:34

Junction is saying explain

18:17:49

so then you can visit ion Tech Hindi

18:17:52

Channel there I'm explaining everything

18:17:54

in English sorry in the Hindi right so

18:17:57

this is the channel for the English and

18:17:59

the channel will be for the Hindi so

18:18:01

just go and check then you will find all

18:18:03

the content in Hindi otherwise just wait

18:18:04

for one more hour from 6 p.m. onwards

18:18:07

I'm going to start a same class in a

18:18:09

Hindi also right on Inon Tech Hindi got

18:18:12

it great now here you can see we are

18:18:16

able to get a content from the page from

18:18:19

the data now uh this is the data which I

18:18:22

got I'm able to do a chunking now it's

18:18:24

time to do a now it's time to do a tell

18:18:27

me it's time to perform the eding now

18:18:29

let's try to do a eding and let's try to

18:18:31

do a a further thing over here so the

18:18:35

next thing is going to be embedding

18:18:37

itself just a second let me do the

18:18:39

embedding uh let me give you the code

18:18:42

basically so here is a code for the

18:18:46

chunking yeah so guys the next step is

18:18:49

going to be a very very uh the next step

18:18:52

is going to be a very very crucial just

18:18:54

just focus on that and within a 15

18:18:56

minute we'll try to complete it so here

18:18:59

my next step is what so here my next

18:19:02

step is creating a DB so let me remove

18:19:05

it first of all and here I'm going to

18:19:08

create my

18:19:09

database so what I'm going to do guys

18:19:11

I'm going to create my database so for

18:19:14

creating a DB actually there is a is a

18:19:17

like certain thing there is a certain

18:19:19

code which I need to write it down over

18:19:21

here so the first thing uh the first

18:19:23

thing basically what I need to do I need

18:19:26

to import the embedding so first of all

18:19:28

let me give you this entire code and

18:19:29

step by step one by one I will try to

18:19:32

explain you so just a second I'm going

18:19:34

to paste the entire code in my Cod

18:19:38

share. so here uh you can paste it you

18:19:42

can copy it from here from the codeshare

18:19:44

doio I'm giving you each and every of

18:19:46

code each and every line so at least you

18:19:48

can run along with me if you are running

18:19:51

inside your system so you can run along

18:19:53

with me here is the entire code guys

18:19:56

from 41 to 48 just copy it and run

18:19:59

inside your ipv file now let me show you

18:20:03

that what thing we are going to do over

18:20:05

here so here is a embedding let me copy

18:20:07

it from here let me paste it so this is

18:20:09

going to my embedding and let's run it

18:20:12

yes we are able to uh import it now the

18:20:16

second thing is what I told you uh I

18:20:18

told you initially that we are not not

18:20:21

going to maintain any such information

18:20:24

or we are not going to store any such

18:20:25

information on cloud right we are not

18:20:28

going to store any such information on

18:20:31

cloud because here this chroma DB is a

18:20:35

local DB right where you won't be able

18:20:37

to find out any server on top of the

18:20:39

cloud any cluster on top of the cloud

18:20:41

everything will be happening in a local

18:20:42

itself in our local workspace so

18:20:45

purchase directory there I'm going to

18:20:47

store my all the embedding here is a fer

18:20:51

this is what this is the directory now

18:20:52

let me run it and here is a directory

18:20:54

now what I will do guys so here I'm

18:20:56

going to create an embedding right so

18:20:58

here I'm going to create an embedding

18:20:59

just a

18:21:01

wait so this is going to be my embedding

18:21:04

open embedding means uh it's what it's

18:21:07

my class right for generating edings

18:21:10

which I'm going to import from the openi

18:21:12

yesterday also I shown you this thing

18:21:14

now here this is the crucial step just

18:21:16

just focus over here guys just focus and

18:21:19

don't worry I'm giving you the link

18:21:20

again so just uh call okay I'm giving

18:21:24

you to my giving it to my team and they

18:21:27

will paste it inside the chat so here

18:21:30

you will get it uh within fraction of

18:21:32

second just

18:21:39

wait so guys uh here I given this

18:21:42

particular link inside the chat now you

18:21:44

can check you can copy it and you can

18:21:46

copy you can open it and you can copy

18:21:47

the entire code from here itself so

18:21:50

within a second you will get a link

18:21:52

inside your chat now let's try to

18:21:54

understand the further things till here

18:21:56

everything is fine everything is clear

18:21:58

everything is a perfect now here is what

18:22:01

here we have a method here actually we

18:22:03

have a like class chroma and inside that

18:22:06

you will find out a method from a

18:22:08

documents right now here we are passing

18:22:10

three things the first thing is what the

18:22:12

first thing is text the second thing is

18:22:14

a embedding and the third thing is what

18:22:16

the third thing is a directory right

18:22:19

first thing is text the second thing is

18:22:21

a embedding model and the third thing is

18:22:23

a directory now as soon as I will run it

18:22:25

let's see what I will be getting so it

18:22:27

is running and it is creating a

18:22:29

embedding it is generating an embedding

18:22:31

and I will get that inside my DB folder

18:22:34

inside my database folder just wait and

18:22:37

just look into this DB folder guys so

18:22:40

here actually uh it is running still it

18:22:42

is running and now open this DB so just

18:22:46

just refresh it and here inside that you

18:22:49

will find out the m now guys

18:22:52

see there is uh one cons there is one

18:22:55

disadvantage of this chroma DB So

18:22:59

Yesterday itself I shown you the pine

18:23:01

con there you will able to see the there

18:23:03

you were able to see the embedding and

18:23:05

all on top of the screen but here

18:23:08

whatever embedding you will get you will

18:23:11

get in the form of binary

18:23:14

file getting my point so here you will

18:23:17

get all the embeding in the binary file

18:23:20

in the bin file right here is the

18:23:22

extension you can see do bin getting my

18:23:25

point yes or no so now let's try to

18:23:28

decode this thing what I can do now

18:23:29

let's try to decode this thing this

18:23:31

particular thing where I got my eming

18:23:34

now everything is going to track by

18:23:35

using this uh SQL 3 right so in back end

18:23:39

it is using the SQL 3 and it's trying to

18:23:41

store the embeding because it is

18:23:43

required some sort of a server now

18:23:44

chroma DB is not a database right it's

18:23:47

just like a just a basically you can

18:23:50

think it's just a wrapper kind of a

18:23:52

wrapper basically so back in back end it

18:23:54

is using this sql3 server and it's

18:23:56

storing the

18:23:58

embedding but not like we are not going

18:24:01

to interact with this SQL 3 and all with

18:24:03

SQL and all right no it's not like

18:24:06

that right we are storing this vector

18:24:08

and in back end it is using a sql3

18:24:10

server got it now if you want to

18:24:13

understand more about the chroma DB you

18:24:15

can read about you can go and check with

18:24:17

the documentation and all then you will

18:24:18

find out a depth intuition regarding

18:24:20

this chroma DB now here I think this is

18:24:22

clear this is fine now let's do one

18:24:24

thing let's try to understand few more

18:24:26

thing over here after storing the data

18:24:28

in the form of uh embeddings inside this

18:24:31

DB folder now what I need to do next so

18:24:34

here uh you can see so we have the U

18:24:38

directory so let me show you okay just a

18:24:41

wait Vector DV data M

18:24:45

ready okay so here guys you can see uh

18:24:48

we are going to call this particular

18:24:50

method Vector db. pures right now here

18:24:53

I'm saying that purses the DB to the dis

18:24:55

so here I can call it I can call this a

18:24:58

particular method which is there on

18:25:00

inside the vector DB so here actually

18:25:03

you will find out you this is the object

18:25:05

right so which you got which you are

18:25:06

getting over here you can call this

18:25:08

particular method persist now if I will

18:25:10

run it so here you will be able to

18:25:11

persist this thing inside your uh local

18:25:14

disk itself right this one now here you

18:25:17

can see so Vector database is done we

18:25:20

can assign this also now guys here one

18:25:23

more thing which I would like to show

18:25:24

you which I would like to write it over

18:25:25

here that is what that is this uh like

18:25:28

chroma itself right so here we are

18:25:30

saying now we can load the purs database

18:25:33

from the disc and use it as a normal one

18:25:36

so what I can do here so here I call

18:25:38

this pures now I'm going to assign this

18:25:40

none now what I'm going to do here see

18:25:43

uh I'm going to use this Pur directory

18:25:45

means in whatever directory you want to

18:25:47

keep the database so there is a DB

18:25:49

itself This One DB and here I'm calling

18:25:51

embedding function is equal to embedding

18:25:53

right so here itself like here my

18:25:55

embedding function will be this

18:25:56

embedding and here is my Pur directory

18:25:59

right now what I have written over here

18:26:01

see now we can load the purs database

18:26:03

from the disk and use it in a normal

18:26:06

fashion right over here we can uh do

18:26:08

that so let me run it and here you will

18:26:10

find out so this is

18:26:12

what so here actually you will find out

18:26:14

the database so inside this itself uh

18:26:18

okay it is getting updated

18:26:21

just a second now let me yes read me new

18:26:26

article yeah so here basically in this

18:26:28

particular Vector DB you'll find out a

18:26:30

database now now see guys what we are

18:26:32

going to do so we have created a chunks

18:26:35

right now we have we have created a

18:26:37

chunks after that this is what this is

18:26:39

my embeddings which we are going to

18:26:40

import from the lenon itself now here is

18:26:43

my directory VB itself now here you will

18:26:45

find out the open AI embedding right so

18:26:48

this is what this is for calling the

18:26:49

embedding uh embedding like class which

18:26:52

is there inside the openi platform now

18:26:54

here what I'm going to do I'm going to

18:26:56

call this chroma right chroma is there

18:26:58

which I imported just just look into uh

18:27:00

this chroma okay which uh I had imported

18:27:03

somewhere let me show

18:27:05

you and we are consuming uh this as a

18:27:08

object this chroma just wait so

18:27:11

somewhere I have imported this thing

18:27:14

M where it is where it is imported

18:27:17

chroma import chroma yeah PIP show

18:27:19

chroma

18:27:20

DB I think I have imported somewhere in

18:27:23

between you you can check in a file

18:27:25

itself I have imported now here after

18:27:28

that what I need to do I need to call

18:27:29

this particular method from document

18:27:31

right now here I'm going to pass the

18:27:33

text this is my embedding and this is my

18:27:34

directory right in which I want to

18:27:36

process the m so here Ive created this

18:27:38

Vector DV right so as soon as I did it

18:27:40

now here you will find out we are going

18:27:42

to create this we have this particular

18:27:44

directory inside this we have this uh we

18:27:47

have this bin file there you will find

18:27:49

out there you will find out your

18:27:50

embeddings and all right and it is using

18:27:53

the sql3 server in back end right this

18:27:55

is fine now purs the DB to the disk if I

18:27:57

want to purist I'm just going to call

18:28:00

I'm just going to call this Vector db.

18:28:02

pures right now here if you will look

18:28:04

into that so here I'm going to call this

18:28:06

chroma right Pur DV this is my directory

18:28:10

now here is what here is my embedding

18:28:11

okay now if I'm going to run it so here

18:28:13

I'm getting my Vector DB right so from

18:28:15

the dis itself I'm able to get this

18:28:17

Vector DB so here actually we have the

18:28:19

dat see if I will run it now if I will

18:28:22

show you this Vector DB this one so

18:28:24

there you will find out this is what

18:28:25

this is my database means I'm able to

18:28:28

persist okay I'm able to purs this data

18:28:31

I'm able to purs this data in my local

18:28:33

disk and by using this particular object

18:28:35

we can access that now let me show you

18:28:38

how you can do that okay just wait so

18:28:40

here I'm writing uh the next thing which

18:28:43

you want to do so here I'm writing this

18:28:46

make retriever so just a second here I'm

18:28:49

going to write it down this make

18:28:50

retriever now you want to make a

18:28:52

retriever basically and for that what

18:28:55

I'm going to do so here I'm going to

18:28:57

call this one more method uh which is uh

18:29:01

which this function is having the method

18:29:03

name is what as retriever right so there

18:29:05

is what this will what this will my

18:29:06

retriever now what I can do guys just

18:29:08

wait I can give you this entire code so

18:29:11

you all can run inside your system so

18:29:13

I'm passing or I'm giving you this on

18:29:15

the like codes share. so you can get the

18:29:19

entire code from from there itself so

18:29:21

just a second I passing it over here I'm

18:29:23

giving you inside

18:29:25

my uh I'm giving you this inside the Cod

18:29:28

share. just just copy from there and

18:29:32

here the last method which you need to

18:29:33

call this is going to be a as retriever

18:29:36

so just a second now we just need to

18:29:38

cover few of the few thing and then I'm

18:29:40

going to wrap up it so here guys you can

18:29:42

see we have a retriever we after calling

18:29:45

this particular method we are able to

18:29:47

click we are able to create a retriever

18:29:49

now what I will do here just just focus

18:29:51

right just focus so here I'm going to

18:29:54

run this particular method by using this

18:29:56

Retriever get relevant document right so

18:29:59

here I'm going to run this uh this

18:30:01

particular method the method name is

18:30:03

what the method name is get relevant

18:30:05

document and here I am going to pass one

18:30:09

question the question is that how much

18:30:11

money did Microsoft raise right how much

18:30:14

money did Microsoft raise so this is the

18:30:16

question based on article if you look

18:30:18

into the article if you will try to read

18:30:20

the news right so there you will find

18:30:22

out somewhere related to the Microsoft

18:30:24

and related to the different different

18:30:27

startups so here I want to here

18:30:29

basically I have created a retrieval

18:30:31

right which is there uh we have a

18:30:33

function actually this method Vector DB

18:30:36

do as retrieval so this is what this is

18:30:38

my retrieval now here I'm going to call

18:30:40

this get relevant document so what it

18:30:43

will do so it will uh search inside the

18:30:46

entire DB and based on that it will

18:30:48

generate an answer so let's see what I

18:30:49

will be getting over here so yes if I'm

18:30:52

running it and now inside the docks

18:30:54

right now let me show you inside the

18:30:57

docks that what I have so here you can

18:30:59

see I'm getting a document right I I'm

18:31:02

getting a answer here I have created a

18:31:04

retrieval and whatever question I'm

18:31:06

asking right so it is matching it is

18:31:08

checking and here I'm getting answer how

18:31:11

this thing is happening let me explain

18:31:13

you so what I can do I can open my uh

18:31:16

Blackboard and there itself I can

18:31:18

explain you about it so so just a second

18:31:21

uh what is happening see what I'm going

18:31:23

to do

18:31:24

here so let's say we have a data right

18:31:29

just a second guys yeah so we have a

18:31:31

data and the data actually what I'm

18:31:33

going to do tell me so this data I'm

18:31:36

going to be uh this data actually

18:31:39

whatever data is there I'm going to

18:31:40

convert into

18:31:43

embeddings I'm

18:31:45

beding by using what tell me so by using

18:31:49

this opening API so here I can mention

18:31:52

the open a API now let's say we have

18:31:55

this

18:31:57

open AI API got it now this open by this

18:32:03

this basically this embedding whatever

18:32:05

embedding I'm going to generate I'm able

18:32:07

to keep inside my inside my tell me guys

18:32:10

inside my chroma DB right from here to

18:32:13

chroma DB let me create one more box

18:32:15

over here so here actually what I'm

18:32:18

going to do I'm going to keep inside my

18:32:21

chroma database got it right now this is

18:32:26

fine this is perfect okay and this

18:32:28

chroma DB actually it is available in

18:32:30

the local dis space it is available in

18:32:34

my local disk space now it is using this

18:32:40

SQL light server it is using the SQL

18:32:44

light server in

18:32:47

backend right and here it is storing the

18:32:50

data in the form of binary

18:32:54

file got it now here whatever data which

18:32:57

we are going to store inside my chroma

18:32:59

DB now I want to retrieve it means I

18:33:01

want to make a request from this D right

18:33:05

so what I want to do guys I want to make

18:33:06

a request from here so what I will do

18:33:09

for that uh so actually see I want to

18:33:11

make a request so the request will work

18:33:13

in which way so let's say we have

18:33:16

created a retriever right let let me

18:33:18

create a retriever over here so let's

18:33:21

say we have created a retriever now just

18:33:23

a second here is what here is what here

18:33:27

is my retriever now let me write it down

18:33:30

the

18:33:31

retriever over here this is what is my

18:33:33

retriever now I want to retrieve the

18:33:35

data so here let's see this is what

18:33:37

chroma DV is having a database so this

18:33:40

is what this is my

18:33:41

database

18:33:45

right okay great great great

18:33:50

so this one this one and this one right

18:33:54

so this is the database where we are

18:33:55

going to store the embedding now what I

18:33:57

will do I'm going to retrieve the data

18:33:59

so with that I have created object of

18:34:00

the retriever now I make a query so from

18:34:04

here basically I make a query so here

18:34:06

let's see this is what this is my query

18:34:09

okay just a second let me Define the

18:34:11

query over

18:34:12

here query okay query now I made a query

18:34:17

and this query actually see the request

18:34:19

is going the request is going from here

18:34:21

from here from here to this database

18:34:25

right this one and from here actually

18:34:28

what I'm getting in response if you will

18:34:30

look into the response so in the

18:34:32

response actually I'm getting a output

18:34:34

right so the response will be coming

18:34:37

from here and it is going like this this

18:34:41

one and this one right so this is what

18:34:44

tell me this is the response which I'm

18:34:46

getting so here I'm making a request

18:34:48

from here this is what this is my

18:34:50

request this is also my request right

18:34:53

and here what I'm getting I'm getting a

18:34:55

response right this is what this is my

18:34:57

response got it now here actually what

18:35:00

I'm doing so here I'm going to perform

18:35:02

the similarity search right so in this

18:35:04

requency response actually the thing

18:35:06

which we are going to perform we are

18:35:08

going to perform the similarity search

18:35:11

and based on that based on a similarity

18:35:14

search itself based on a semantic

18:35:16

meaning it is generating a final output

18:35:19

right so as a retriever actually what

18:35:20

I'm getting I'm getting a final output

18:35:22

and based on the semantic search it is

18:35:24

generating that a final output I hope

18:35:27

now the architecture is pretty much

18:35:29

clear to all of you let's start with the

18:35:32

coding again so here I'm getting uh all

18:35:35

the like whatever a question I've asked

18:35:37

so based on that it is going to generate

18:35:39

output and here you can see the first

18:35:41

output second output now let's check

18:35:43

with the first output so it has

18:35:45

generated uh like a different different

18:35:46

output not a single one and here if I'm

18:35:49

to check the page content so you will

18:35:51

find out that we have the entire detail

18:35:54

right so here you will find out the

18:35:56

entire detail regarding this particular

18:35:57

question so in this particular question

18:35:59

you'll find out the entire detail now

18:36:01

you can check the length of the document

18:36:04

also so what I can do here so what you

18:36:06

can do here so here you can write down

18:36:08

this dogs and there you'll find out it

18:36:10

is generating a four answer by default

18:36:12

it is giving me a four answer got it now

18:36:15

this is fine this is clear now what I

18:36:17

can do I can uh like I can call one more

18:36:21

method just a wait so here actually in

18:36:23

the retriever itself we have a different

18:36:24

different method sorry in the vector

18:36:26

database we have a different different

18:36:28

method so here I have called this uh as

18:36:31

retriever right as retriever now here is

18:36:34

what here is my retriever Now by using

18:36:35

this retriever I'm going to call this

18:36:37

get relevant document everything you

18:36:39

will find out in inside the document

18:36:41

itself just go and check with a chroma

18:36:43

DB documentation we have uploaded or

18:36:46

sorry not basically we so they have

18:36:48

uploaded everything over there in a very

18:36:50

detailed way just go and check every

18:36:52

function every method I'm going to take

18:36:54

from there itself right so I I'm going

18:36:56

to take from there itself just go and

18:36:58

check with the documentation now over

18:37:00

here guys see uh we have a retriever now

18:37:02

here I can Define the key also so search

18:37:04

KW KW R GS k equal to 2 there will be

18:37:08

only two output now here if I'm going to

18:37:10

call it now you will find out what I'm

18:37:12

going to do so I'm going to call this a

18:37:15

particular uh keyword s retriever dok

18:37:18

search a w RGS so you'll find out two so

18:37:21

we'll be getting two output only so if

18:37:23

you are going to search it now if you're

18:37:25

going to search any sort of a question

18:37:26

so let's say here is my question is what

18:37:28

here is my question uh retriever do get

18:37:31

relevant document and here how much uh

18:37:34

did Microsoft raise so let's see in the

18:37:36

document two what I will be getting so

18:37:38

here in the document two let me show you

18:37:41

first of all let me show you the length

18:37:42

of this document two so here is the

18:37:44

length of the document will be two so

18:37:46

I'm getting only two document I'm

18:37:48

getting only two document as a relevant

18:37:50

one means it is performing a similarity

18:37:52

size so in a back end itself in a back

18:37:54

end itself there is a vector and there

18:37:56

will be also a vector each and

18:37:58

everything is going to be uh like each

18:38:00

and every permutation is going to be

18:38:01

form and based on a similarity search

18:38:04

Okay based on a similarity search is

18:38:06

providing me a output so here you can

18:38:08

see it is giving me a two output as of

18:38:10

now now if you will look into this doc

18:38:12

two so there you will find out only two

18:38:15

output right so here you can see you

18:38:18

just have to Output so initially

18:38:21

actually by default it was giving me

18:38:22

four so I hope this thing is clear to

18:38:25

all of you now here I want to do one

18:38:28

thing I want to make it more realistic

18:38:31

right what I want to do guys tell me so

18:38:33

first of all let me give you this

18:38:34

particular code so at least you can

18:38:36

also uh generate some limited

18:38:41

output Vector DB as a retriever and here

18:38:45

is the next one is what so just a

18:38:48

second Vector DB

18:38:53

retriever so this is for the by default

18:38:57

and here this next one actually it is

18:39:00

for the two only right so here we have

18:39:03

Define the two so get how much Microsoft

18:39:05

money so here actually this is what this

18:39:07

is my docs tool got it guys yes or no

18:39:10

tell me did you got it

18:39:17

yes yes or no guys guys tell me please

18:39:20

copy the code from here please be active

18:39:23

I understand it is like it is it is

18:39:26

about to hour now so so please be active

18:39:30

guys see I I have a same energy now you

18:39:32

have to keep you have to learn with the

18:39:34

same energy okay I I haven't down my

18:39:36

energy and I'm I'm like explaining you

18:39:38

with the same energy I understand

18:39:40

initially thing will get in a more

18:39:42

effective way but as we are pro

18:39:44

progressing with the session so we lose

18:39:45

our like Focus we lose our like focus

18:39:48

and all

18:39:49

and so don't do like that okay so just

18:39:52

be active just be active for for more 10

18:39:54

minute and yeah we are going to wrap up

18:39:57

this thing so you will be ready with the

18:39:58

vector databases now in the next class

18:40:00

easily we can implement the project

18:40:03

right easily we can implement the

18:40:04

project and we can perform the RG

18:40:06

retrieval argument generator so this

18:40:08

Vector database we use for the RG only

18:40:11

for the retriever agumented generation

18:40:14

and is going to play a very important

18:40:16

role if you are going to create create

18:40:19

any sort of a application related to the

18:40:22

llms right related to the generative AI

18:40:25

where you are going to use llm so please

18:40:27

guys be take a take it serious and yes

18:40:31

in interview they will ask you the same

18:40:33

thing right I have seen many require

18:40:35

whatever requirements people are having

18:40:37

right related to the generative to the

18:40:39

llm and they are specifically they have

18:40:41

mentioned chroma DB pine cone right

18:40:45

because this is a trend actually right

18:40:48

people are able to uh use it people are

18:40:50

able to productionize it right people

18:40:52

are able to achieve whatever they want

18:40:55

right with respect to their use cases

18:40:56

and all and yes as a techie you have to

18:40:58

solve this thing you have to take care

18:41:00

this thing so please be serious over

18:41:03

here now uh here guys see we are able to

18:41:06

retrieve the document a similar document

18:41:09

by using this particular method right

18:41:11

now everything you will find out over

18:41:12

the documentation if you want to

18:41:14

understand a more depth go and check

18:41:16

with the documentation now let's try to

18:41:19

understand the next concept so here you

18:41:22

can see we have a doc two now let's do

18:41:25

one thing let's make it more interactive

18:41:27

and so for that here I have written

18:41:28

something uh so let's make a chain now

18:41:31

what I can do I can make a chain and

18:41:34

here guys for that here is one Library

18:41:37

you will find out inside the Len CH

18:41:39

itself the library is going to be

18:41:41

retrieval QA now let me run it and yes

18:41:44

we are able to import this retrieval Q

18:41:47

retrieval means you just need to

18:41:48

retrieve it retrieve it you just need to

18:41:50

get it right retrieve means response

18:41:52

right so here you can see we have this

18:41:54

retrieval QA now what I will do guys

18:41:56

here I'm going to use my llm model so

18:41:59

I'm going to call my open API because I

18:42:02

want to I want to get uh see here if you

18:42:05

if you will find out in the response so

18:42:07

just just look into the response here so

18:42:09

just just print this particular

18:42:13

response um what I can do I can print it

18:42:17

now see the response so they are giving

18:42:20

you the response and they are mentioning

18:42:21

everything over there now how to make it

18:42:23

more interactive and how to work with it

18:42:26

like a question answering right question

18:42:29

answering so for that you'll find out

18:42:31

this retrieval QA over here now here I'm

18:42:34

going to use my llm now you will find

18:42:35

out the use of the llm over here what is

18:42:38

the use or I will show you one

18:42:39

architecture so here I shown you the

18:42:41

simple architecture which I created by

18:42:44

myself only here you can see clearly you

18:42:45

can understand everything I will show

18:42:47

you one more architecture and I will

18:42:49

show you what is the role of this llm

18:42:51

over here what is the role of the llm

18:42:53

over here right now just wait let me

18:42:56

show you that or first of all let me run

18:42:58

it uh here I have written couple of

18:43:02

thing so let me show you the llm

18:43:05

first see we have we are going to call

18:43:08

open API and by default we have the uh

18:43:11

by default we have the model GPT model

18:43:14

cut it now what I'm going to do here I'm

18:43:16

going to create a chain by using this a

18:43:20

particular method so retrieval QA from

18:43:22

chain type so LM open a model and here

18:43:25

we have a retriever object retriever is

18:43:27

there this one okay retriever is there

18:43:31

and here you will find out the document

18:43:33

so return Source document is true so we

18:43:35

just need to pass two thing here the

18:43:37

first is what up our model and the

18:43:39

second one is retriever so retriever is

18:43:41

here this one okay this one so we are

18:43:45

going to collect it from the vector DB

18:43:47

this retriever right so here Vector DB

18:43:49

as retriever so this is my Retriever and

18:43:51

by using this retriever only we are

18:43:53

getting an information whatever we are

18:43:54

passing as a question and we are using

18:43:57

this method and this is what this is my

18:43:58

docs so this retriever object also we

18:44:00

are passing over here so we have a llm

18:44:02

model we have a retriever and here two

18:44:05

more parameter right now let me run it

18:44:08

and here you can see we are able to

18:44:09

generate or we are able to create a

18:44:11

object and which I'm going to store in

18:44:13

qhn right now guys here what I can do I

18:44:17

have return one more method so let me

18:44:20

copy and paste it over here and one more

18:44:22

method and after that the thing will be

18:44:24

more clear to all of you so what I'm

18:44:26

doing over here see uh this is the two

18:44:29

method which I have pasted right two uh

18:44:31

two code two Cod code is snipp it

18:44:34

basically which I pasted over here so

18:44:36

here see we want to create a retriever

18:44:39

QA so just just check what is the

18:44:40

meaning of that just open the Google and

18:44:43

uh search it over the Google Now paste

18:44:46

it over here and search about the

18:44:47

retrieval Q QA so what is this retrieval

18:44:50

QA everything you will find out inside

18:44:52

the Lang CH and guys believe me this

18:44:54

langen chain is very much powerful right

18:44:58

whether whatever like framework you are

18:45:00

going to learn in future I don't care

18:45:01

llama index and all but please try to

18:45:03

learn this Len CH if you want to build

18:45:05

llm based application so just take a

18:45:08

Mastery on top of this Len chain it's a

18:45:10

important one now here you will find out

18:45:13

what is this retrieval QA this example

18:45:15

so is question answering over an index

18:45:18

right the following example combining a

18:45:20

retrieval with a question answering

18:45:22

chain to do question answering right so

18:45:24

here I just want to make a question

18:45:25

answering chain and here is a complete

18:45:28

code snipp it here is a complete example

18:45:30

which they have given to you now what I

18:45:32

can do here I can uh show you that how

18:45:35

that this uh two thing is working now

18:45:38

this is what this is the from chain type

18:45:39

which I called create a chain to answer

18:45:41

the question now see process llm

18:45:44

response so llm response is there right

18:45:46

whatever L see first of all see this is

18:45:48

a query now here we are passing a query

18:45:51

now this is what this is the query which

18:45:52

we are getting now llm response see here

18:45:55

what we are going to do see this is what

18:45:57

uh here from here basically uh what I

18:46:00

see step by step let me show you so

18:46:03

first of all let me run it right this

18:46:05

one now what I will do here so this is

18:46:07

what this is my query right so here is

18:46:10

what here is my query how much money did

18:46:12

Microsoft race right now what I can do

18:46:14

here uh I can uh like call this

18:46:17

particular

18:46:19

uh method right so what is the method

18:46:20

guys tell me here this one is qhn right

18:46:23

so here is what here is a qhn this one

18:46:26

this one so I'm passing this query to my

18:46:28

qn right so let me run it and here you

18:46:31

will find out the llm response so let me

18:46:33

copy it and let me paste it over here so

18:46:35

this is what guys see this is your llm

18:46:37

response this one right so here what I'm

18:46:40

doing I see uh retrieval QA right you

18:46:45

you are talking about the r now

18:46:46

retrieval argument generation so it is

18:46:49

related to that only it is related to

18:46:51

this only it's Advanced concept so this

18:46:53

is a basic RG which we have created this

18:46:55

is a basic RG which we have created

18:46:57

where we are not going to generate

18:47:00

directly answer from my llm no we are

18:47:03

not going to do that here we are going

18:47:05

to pass this retriever object this

18:47:07

particular object and from there

18:47:08

actually we are going to generate an

18:47:10

answer from here see we have open AI

18:47:14

model llm model we are not going to ask

18:47:17

we are not going to generate a response

18:47:18

from the open from the llm model right

18:47:21

it is just for the refinement right it

18:47:23

is just for the refinement or for the

18:47:24

better understanding is not if you are

18:47:27

not going to train it now if you're not

18:47:28

going to train this model on top of this

18:47:30

data and if you are passing this

18:47:32

retriever if you are passing this

18:47:34

retriever object over here means you are

18:47:36

passing the embedding you are passing

18:47:38

your database you are passing your data

18:47:40

over here right so instead of instead of

18:47:43

generating a data instead of generating

18:47:45

answer from the model is it is it is

18:47:47

giving you the answer from the embedding

18:47:49

itself llm is here just for the

18:47:51

refinement right just to understand it

18:47:54

not going to generate answer and this is

18:47:56

only called retrieval argument generator

18:47:59

gener generator retrieval argument

18:48:01

generator and here you are going to

18:48:03

achieve this thing by using this Vector

18:48:06

datab Base by using this Vector database

18:48:10

so here you are going to call this llm

18:48:12

right here is llm have you created a

18:48:14

function calling have you created a

18:48:16

function calling so it is working

18:48:17

similar to that if you are aware about

18:48:20

the function calling where I'm using a

18:48:22

llm but llm is not generating answer

18:48:24

some third party API is giving me answer

18:48:27

right so it is working in a similar way

18:48:29

here is my llm and this is what this is

18:48:31

my retriever which is nothing which is

18:48:33

my embedding so here I passed my query

18:48:36

and it has generated answer this LM

18:48:38

response now guys what I want to do I

18:48:40

want a response so where it is tell me

18:48:43

it is there inside the source document

18:48:44

so here what I'm going to do so I'm

18:48:46

passing my LM response over here and

18:48:49

from the result so this is my result and

18:48:51

this is my complete uh like answer which

18:48:53

is which it is giving to me so here

18:48:56

actually this llm we are using for the

18:48:58

refinement for the refined answer see

18:49:00

see over here now if I'm running it this

18:49:03

one what I'm doing I'm going to run it

18:49:05

see this I'm going to run this one so it

18:49:07

is giving me a so it is giving me this a

18:49:09

particular uh it is giving me this like

18:49:12

a particular answer this is for the

18:49:14

refinement llm is not for the generation

18:49:16

answer generation answer this is the

18:49:19

answer which we are generating from the

18:49:20

document itself from the database itself

18:49:24

based on a similarity search right and

18:49:26

this is only called R A retrieval

18:49:28

argument generation and here this chat

18:49:30

GPD or this like a GPD model we are

18:49:32

using for the refinement so it is giving

18:49:34

me a final answer so already I have

18:49:36

written a code over here so we are get

18:49:38

extracting a result and we are printing

18:49:40

a result and here is a metadata and all

18:49:42

whatever is there so we can print that

18:49:44

also so this is the metadata resources

18:49:47

now guys tell me did you get the concept

18:49:49

of the r did you get the concept of the

18:49:51

vector database did you get that how to

18:49:54

like uh do the question answering after

18:49:57

generating a aming and all in my

18:49:58

previous class also I shown you the same

18:50:00

thing in the previous class I created a

18:50:02

while loop and I was giving the queries

18:50:04

and all and I was generating answer you

18:50:05

can do the same thing over here and you

18:50:07

can create your question answering

18:50:09

system you can create your chatbot which

18:50:11

we are going to do in the next class so

18:50:14

this is just a like a basic introduction

18:50:17

and the next class we are going to

18:50:19

create a application by using this

18:50:21

particular concept now tell me are you

18:50:24

getting it guys yes or

18:50:30

no tell me how many people are able to

18:50:33

understand yes or no tell me fast

18:50:35

whatever explanation I have given you

18:50:37

regarding that how many people are able

18:50:39

to

18:50:42

understand yes sir uh we have existing

18:50:46

qua system what is uh what is the

18:50:51

difference between exis system and llm

18:50:52

model exis system is this one now this

18:50:55

is your data see let me revise this

18:50:57

thing what I can do here uh where it is

18:51:02

okay this one now what I can do here

18:51:03

itself I can revise this thing just a

18:51:05

second okay so I have one image let me

18:51:08

show you that a particular image just a

18:51:17

second

18:51:20

so this is the image right this is the

18:51:23

image can you see this image guys this

18:51:25

one is it visible to all of you this

18:51:27

this particular image tell me guys fast

18:51:31

so this is the image actually which I

18:51:32

created for uh for the project actually

18:51:35

this is the project flow now let's try

18:51:37

to understand what is happening over

18:51:38

here right so I can explain you this

18:51:40

thing in a like clear man manner just

18:51:43

just see just focus over

18:51:46

here right now what is is happening see

18:51:49

uh do you have a data just say yes or no

18:51:53

until you won't say Yes I won't proceed

18:51:55

so this is the data

18:51:57

right are we extract are we converting a

18:52:00

data so are are we extracting a data yes

18:52:03

so this is my first step this is my

18:52:05

second step right now here you can see

18:52:08

this is my third step now here you can

18:52:11

see this is what this is my fourth step

18:52:12

this one right this is what this is my

18:52:15

fourth step now after that what I'm

18:52:17

going to do so so

18:52:19

here I'm going to save my data in my

18:52:22

Vector store in my chroma DB so either I

18:52:25

can store chroma DB or vector database

18:52:27

tell me so here either I can store

18:52:29

chroma DB or vector datab everyone so I

18:52:32

think you all are enjoying s's

18:52:34

class

18:52:46

lecture okay so guys here you can see so

18:52:50

this is what here we are going to store

18:52:52

the data in a chroma DB itself right so

18:52:54

in a chroma DB yeah here actually we are

18:52:57

going to store the data in a chroma DB

18:52:59

now see if user is going to query right

18:53:02

if user is going to query now what will

18:53:05

happen if user is going to query this

18:53:07

thing now what will happen see uh here

18:53:10

let's say this is what this is my user

18:53:12

okay just wait let me remove it from

18:53:15

here um yeah

18:53:18

so this is the user right so we have a

18:53:20

data over here we have created a data uh

18:53:23

so this is what this is my data where I

18:53:25

have saved my embedding right so here I

18:53:27

have saved my embedding now here you

18:53:30

will find out the embedding now here is

18:53:32

a user this is what this is the user now

18:53:35

here user is asking the question right

18:53:37

user is asking the question now here we

18:53:40

will search like query aming right and

18:53:43

based on that so we'll go into the

18:53:45

database and here see from the database

18:53:47

will retrieve the answer and llm will

18:53:50

refine the answer right llm will refine

18:53:52

the answer just just look into the arrow

18:53:54

so what is the role of the llm over here

18:53:56

llm is just for the refinement because

18:53:59

the mding we are going to the iding

18:54:02

right so whatever iding is there right

18:54:04

so this embedding

18:54:05

actually uh this data we are going to

18:54:09

fetch from the DB itself right so here

18:54:12

is a see till here everything is fine

18:54:14

see this is the work of the uh this is

18:54:16

the work of the developer till here now

18:54:19

let's say user will ask the question so

18:54:22

the question will come over here it is

18:54:23

going to do a semantic search and and is

18:54:25

going to take a answer and here from

18:54:28

here actually it is taking an answer and

18:54:30

then it is going to rank the result so

18:54:32

in that in my case I'm getting two

18:54:34

result right or three result or four

18:54:36

result now what I will do here so it

18:54:38

will pass to my llm model and this llm

18:54:41

model will give me a final answer now it

18:54:44

is getting clear how the flow is

18:54:46

happening how the how the thing is

18:54:48

working over here tell me guys fast how

18:54:51

the thing is working over here did you

18:54:53

get it guys yes or no got it now so that

18:54:56

is a thing which we have implemented in

18:54:58

a Jupiter notebook Now by using that so

18:55:00

this thing actually we can use this this

18:55:03

particular thing we can use inside our

18:55:05

application right and we can create one

18:55:07

QA system so from the data whatever data

18:55:10

we have from the data the data basically

18:55:12

the files which we have our data from

18:55:15

there basically we can get answer and

18:55:17

llm can refine that particular answer I

18:55:19

can give the direct answer also from the

18:55:20

database or I can refine the answer so

18:55:23

that's is a use of the vector database

18:55:26

now in the next class we are going to

18:55:28

create a in the next class we are going

18:55:30

to create an application and that's

18:55:32

going to be chatboard application and

18:55:34

literally you will enjoy if you are able

18:55:35

to understand this today's session so

18:55:38

tell me guys how was the session how

18:55:40

much you would like to rate to this uh

18:55:42

application and and whatever I have done

18:55:45

over here so tell me guys fast if you

18:55:49

have any query any doubt you can let me

18:55:51

know I will give you this entire code

18:55:53

and here is the uh like I can give you

18:55:56

this particular code as well I hope I

18:55:59

have already pasted in the just a second

18:56:02

so let me give you this uh two thing the

18:56:07

first is going to be a qhn this one and

18:56:11

the second is going to be this

18:56:15

one uh just a second

18:56:19

this okay so I given you the both code

18:56:22

now what I can do here

18:56:25

so this is the code and yeah now you can

18:56:30

query you can ask anything whatever

18:56:32

query whatever like uh data actually we

18:56:36

have based on that you can query you can

18:56:38

take a bigger database right and yeah

18:56:42

now I think

18:56:44

uh you are able to get it

18:56:50

no this

18:56:54

one so fine I hope uh this part is clear

18:56:58

to all of you now please go through with

18:56:59

the code please try to run inside your

18:57:01

system just copy from here and run

18:57:04

inside your jupyter notebook data and

18:57:05

all each and everything I have provided

18:57:07

to you I have already given you and uh

18:57:11

yeah now if you want to see if you want

18:57:13

to stop the database if you want to

18:57:15

means uh the datab database basically

18:57:18

which you have created right so if you

18:57:19

want to stop it if you want to delete it

18:57:22

if you want to like clean it so for that

18:57:24

also we have a command let me give you

18:57:26

uh those particular command so here you

18:57:29

just need to so first of all let me

18:57:31

write down the heading and the heading

18:57:32

is what so heading is uh you can delete

18:57:35

the database so delete the DB now you

18:57:40

can see uh what you can do guys you can

18:57:42

delete the DB and here uh what you need

18:57:45

to do so you need to read this J you

18:57:48

need to like uh create this jip file

18:57:50

actually this jip by using first of all

18:57:53

you need to jip it actually the entire

18:57:55

thing is there just you need to jip it

18:57:57

and after that what you will do you will

18:57:59

run this particular command so let me

18:58:02

give you this two command the two

18:58:05

command the first one is delete

18:58:07

collection and the second one vector.

18:58:09

process right so to clean up entire

18:58:11

thing you just need to call this two

18:58:13

thing and here the last one you can

18:58:16

delete this jip directory so here is the

18:58:19

directory which you are going to delete

18:58:21

means here is the folder the entire

18:58:22

folder where you will be having the jip

18:58:24

directory you are going to delete that

18:58:26

and yes finally you will be able to

18:58:27

delete your data base the data base

18:58:31

basically which you have created by

18:58:32

using this chroma DB so yes or no guys

18:58:37

tell me um if you got everything then

18:58:40

yes it is well and good if you if you

18:58:43

didn't get then um definitely you should

18:58:45

revise the thing everything will be

18:58:46

available over the dashboard so just uh

18:58:49

go and check with the dashboard let me

18:58:52

show you the

18:58:53

dashboard just a

18:58:55

second so here the session is going on

18:58:58

now let me show you the dashboard also

18:59:01

this is the dashboard guys uh this one

18:59:04

so just just check with the dashboard

18:59:05

just enroll to this dashboard and apart

18:59:07

from that you can explore the course as

18:59:09

well the course which we have launched

18:59:11

on a generative AI here is a Course and

18:59:13

there you will find out everything the

18:59:15

concept which I have explained you over

18:59:16

here we are going to explain in a more

18:59:18

detailed way we are going to clarify

18:59:20

more thing regarding this RG or

18:59:23

regarding this uh like different

18:59:25

different uh tuning and all parametric

18:59:26

tuning this that whatever everything we

18:59:28

are going to clarify over here so just

18:59:30

go uh go and check uh with this uh

18:59:34

website with the uron website just go

18:59:36

and explore the course this uh just go

18:59:39

and explore this Genera course

18:59:42

everything you will be finding out over

18:59:44

here just just explore the syllabus okay

18:59:46

this is the syllabus and if you want

18:59:48

anything if you want any update anything

18:59:50

let's say this is the new one right

18:59:52

which we have launched right so if you

18:59:54

want anything any recent thing which on

18:59:56

which you are working in a market in

18:59:58

your organization you can let us know

19:00:00

you can let me know you can ping me you

19:00:02

can uh write it down on my LinkedIn

19:00:04

right so based on that um if there will

19:00:06

that will be like uh that uh I I will

19:00:09

consider I will think about that and if

19:00:12

it is really going to be an important

19:00:14

one so I will add on inside the syllabus

19:00:16

okay immediately I will add on inside

19:00:18

the syllabus and we are going to take it

19:00:19

inside the live class so I hope uh this

19:00:23

is fine to everyone now we can wrap up

19:00:26

the session and from next class onwards

19:00:28

we are going to start with one more

19:00:30

project and that's going to be on Monday

19:00:33

Monday 6 sorry Monday 300 p.m. IST and

19:00:37

yes so I'm not going to take that

19:00:39

session buppy will be available for that

19:00:42

particular session buy will start with

19:00:44

the project and all if you don't know

19:00:46

about the buy so I can show you the

19:00:48

profile of the buy just uh over the open

19:00:51

the LinkedIn and search the search uh

19:00:54

buppy okay now buy the full form name

19:00:58

the full name is a b Ahmed buy just open

19:01:01

the profile of the buy and he's like

19:01:03

really good Mentor you can visit his

19:01:05

YouTube channel as well this is the

19:01:07

YouTube channel of the Wy there you'll

19:01:09

find out the like content related to the

19:01:12

computer vision and all so just go

19:01:14

inside the video he's having a amazing

19:01:16

cont content related to the computer

19:01:18

vision and you can go and check you can

19:01:21

check with the mlops content as well

19:01:23

everything he he has kept over the

19:01:25

YouTube so you can visit the YouTube

19:01:27

channel so next class will be taken by

19:01:30

the buy and yes in that we are going to

19:01:33

implement one more project so Monday

19:01:35

Tuesday and Wednesday fine so I hope

19:01:39

guys this is clear to everyone now there

19:01:43

is one question sir can you provide one

19:01:45

end to end project for interview purp

19:01:47

yes we are going to implement that in a

19:01:49

next class in the next uh in the next uh

19:01:53

basically class and uh don't worry you

19:01:55

will find out a project soon in my

19:01:57

internship on on the internship portal

19:01:59

as well so let me show you the

19:02:01

internship portal where it is just click

19:02:03

on this click on the internship portal

19:02:06

and here okay so you will find out all

19:02:10

the project and all as of now we haven't

19:02:12

updated related to the generative AI it

19:02:15

is in a pipeline I already given to my

19:02:17

team the work is work is uh going on on

19:02:19

top of that so there's there are like

19:02:22

couple of use cases related to the

19:02:24

different different domain which is a

19:02:25

which is directly related to the real

19:02:27

world so you can explore that you can uh

19:02:30

like go through with that and then you

19:02:32

can start your internship and you can

19:02:34

generate a certificate you can generate

19:02:35

a experience certificate and you can uh

19:02:37

write it down that particular project in

19:02:39

a in resume also see one thing I would

19:02:42

like to tell you let's say if you are uh

19:02:44

like whatever I'm like telling you

19:02:46

whatever I'm teaching you let's say I'm

19:02:48

not able to teach 100% but I'm giving

19:02:50

you the direction let's say I taught you

19:02:52

50% thing but rest of the 50% I've given

19:02:55

you the direction right so rest the rest

19:02:57

50% thing I given you in terms of the

19:02:59

direction and all so try to explore

19:03:02

those Thing by

19:03:03

yourself like anywhere you won't be able

19:03:05

to find out that one Mentor is doing

19:03:08

everything for you let's say you ask

19:03:09

about the inter you ask about this uh

19:03:12

like uh one project which I can show you

19:03:14

in a uh in a like interview and all or

19:03:17

which I can show you somewhere so guys I

19:03:20

guided you up to certain point right now

19:03:23

it's your chance you can find out the

19:03:24

different different use cases and you

19:03:26

can Implement those by taking my

19:03:28

reference and in that you can add on few

19:03:29

more things right then only you will be

19:03:32

able to cck the interview if you going

19:03:33

to take a same project from me and you

19:03:35

are going to uh like you are going in an

19:03:37

interview then you won't be able to

19:03:39

crack it because you won't be having

19:03:40

that confidence that knowledge okay

19:03:43

which is required in an interview which

19:03:45

you will get once you will do by your

19:03:47

self okay so keep this thing in your

19:03:49

mind and learn according to that and yes

19:03:52

definitely you can crack any interview

19:03:54

this is not a big deal you just need to

19:03:56

represent yourself your work that's it

19:03:59

okay so thank you guys thank you for

19:04:01

attending this session from next class

19:04:02

onwards we are going to start one more

19:04:04

project and please do revise the thing

19:04:07

whatever we have learned in today's

19:04:08

session in today's class here is the

19:04:10

entire file here is our entire content

19:04:13

just go through with that and yeah thank

19:04:15

you bye-bye take care if if you have any

19:04:17

doubt you can write it down on the over

19:04:18

the LinkedIn and please share your

19:04:20

learning as well uh over the LinkedIn

19:04:23

you can tag me I will look into that I

19:04:24

will like it I will share it so my name

19:04:27

is B Ahmed B and uh I'm working as a

19:04:30

data scientist at Inon and I have more

19:04:33

than two years of experience uh in the

19:04:35

field of machine learning deep learning

19:04:37

computer vision Genera and natural

19:04:39

language processing and uh if you want

19:04:41

to connect me anytime so this is my

19:04:43

social media link I think some of them

19:04:45

already have connected with me so if you

19:04:48

have any issue u in the field of this

19:04:50

generative a and all with the

19:04:52

implementation of the projects so

19:04:54

anytime you can ping me okay I will be

19:04:55

happy to help

19:05:04

you okay guys thank

19:05:14

you so let me uh show you that agenda

19:05:17

for today so today actually I'm going to

19:05:19

discuss something called open source

19:05:20

large language

19:05:21

model so as of now I believe you have

19:05:24

work with like open AI based large

19:05:27

language model guys yes or

19:05:38

no uh

19:05:41

yes now uh can anybody tell me what was

19:05:44

the difficulties actually you were

19:05:45

facing whenever uh you are using this

19:05:47

kinds of Open Source lar language model

19:05:50

any anyone give me any

19:05:55

response yeah mostly open a and a your

19:05:58

open yeah I know that so what is what is

19:06:01

your difficulty level there just can you

19:06:03

tell

19:06:06

me um resources uh it's not a major

19:06:13

[Music]

19:06:15

issue okay see the major issue is like

19:06:20

uh the cost okay because I believe you

19:06:24

onlyon be having like a paid account

19:06:26

most of

19:06:28

you and before starting guys let me tell

19:06:31

you uh all the resources has been

19:06:32

updated in that uh uh dashboard actually

19:06:36

so let me show you the dashboard

19:06:38

once so if you open that

19:06:40

dashboard I believe guys you enroll for

19:06:43

the dashboard and it is completely free

19:06:45

without any cost

19:06:48

yeah see guys all the video has been

19:06:51

updated here and as well as I believe

19:06:53

the resources also has been updated even

19:06:55

maybe some quizzes and assignment has

19:06:57

been also given there okay so you can go

19:06:59

through that even it is also available

19:07:02

in your YouTube live section okay and

19:07:04

today whatever things actually I'm going

19:07:06

to do everything would be shared in your

19:07:08

resources section no need to worry

19:07:15

about yeah

19:07:17

so what I was telling guys uh see as of

19:07:20

now you have used like open AI based

19:07:22

large language model and the major issue

19:07:24

was the like cost there yes or no

19:07:27

because I believe you won't be having

19:07:29

like paid account most of you if you are

19:07:32

having also paid account so at the end

19:07:34

of the month you need to pay okay for

19:07:36

the model you are using from the open a

19:07:38

yes or

19:07:41

no

19:07:43

yes okay now see guys U how to like

19:07:47

track your cost like whenever you are

19:07:49

using this kinds of open based like uh

19:07:52

large language model okay if I'm talking

19:07:53

about open based large language model so

19:07:55

I'm mostly talking about something

19:07:57

called GPT okay GPT Series so if you

19:08:00

just search open AI pricing okay if you

19:08:02

just search openi pricing on Google so

19:08:05

there is a page actually you will get

19:08:07

from the openi site and here actually

19:08:09

they have already mentioned the cost

19:08:11

okay they're taking from you so let's

19:08:13

say if you're using GPT 4 Series model

19:08:15

okay so in GPT 4 Series you have

19:08:17

different version of the model so let's

19:08:19

say you have GPT 4 Turbo okay so if you

19:08:22

are using this particular model so this

19:08:24

is the model name as you can see GPT 4

19:08:27

uh 1106 preview so this is the model and

19:08:30

this is the cost with the input tokens

19:08:32

okay so each of the model will have

19:08:35

their input size okay what is the input

19:08:36

size input size means the number of text

19:08:39

actually you are giving as a input to

19:08:40

the model okay and that can be

19:08:42

calculated by this

19:08:43

token okay so let's say if you're giving

19:08:46

1,000 tokens so it will charge you

19:08:49

0.0 $1 okay this is the charge and if

19:08:52

your model is giving let's say one uh

19:08:54

1,000 uh like tokens output so it will

19:08:57

charge around

19:08:58

0.03 now just combine them and just

19:09:00

calculate the

19:09:02

cost okay so this is for the GPT for

19:09:05

Turbo now let's come to the GPT model

19:09:07

and you can see whenever you are trying

19:09:09

to use the core GPT model it will uh

19:09:11

take you some more charge for

19:09:15

me okay

19:09:17

okay now see not only GPT uh 4 you have

19:09:20

also GPT 3.5 turbo then you have

19:09:23

assistant API fine tuning models even I

19:09:25

think you already used embedding models

19:09:27

in your vector database guys yes or

19:09:33

no have you used this embedding

19:09:42

model

19:09:45

yeah

19:09:50

okay see that's how you can calculate

19:09:53

your cost like how much it will charge

19:09:54

you whenever you are going for any kinds

19:09:56

of model okay you can go through this

19:09:58

pricing praise and you can understand

19:10:00

this

19:10:01

thing all

19:10:03

right yeah see ADI is there DCI is there

19:10:07

there are lots of model okay they have

19:10:08

given just high level overview but maybe

19:10:11

they have some more pages actually I

19:10:13

think you can go through and like see

19:10:15

the cost there

19:10:22

all right now see why we need to use

19:10:25

open AI uh sorry why I need to use this

19:10:27

open source large language model okay

19:10:29

first of all let me discuss then I will

19:10:30

start with that uh like discussion okay

19:10:33

what like today's discussion on the Lama

19:10:35

2 I will tell you how to use Lama 2 and

19:10:37

all even I will show you some available

19:10:39

open source model you can go through

19:10:41

okay now see guys whenever I'm talking

19:10:43

about open source model okay open source

19:10:50

open

19:10:52

source

19:10:54

llm okay op source llm so the first

19:10:58

thing uh you can consider you don't need

19:11:01

to pay any cost okay so you don't need

19:11:05

any no

19:11:08

need

19:11:09

cost okay the second thing you can talk

19:11:13

about um it is completely free to use

19:11:17

free to use for

19:11:21

the

19:11:25

research and commercial use

19:11:30

cases okay commercial use

19:11:35

cases all right but whenever I'm talking

19:11:38

about open

19:11:39

AI okay open

19:11:43

AI open so so I'm talking about GPT

19:11:47

series okay GPT

19:11:51

Series so let's say if you want to use

19:11:53

open a so the first thing actually will

19:11:55

come you need to get

19:11:58

the API

19:12:01

key okay API key and if you need this

19:12:04

API key you need to pay for okay you

19:12:06

need to pay for you need to pay it's not

19:12:09

a free all right but one advantage

19:12:12

actually will get with this open

19:12:15

AI

19:12:17

one advantage actually will get uh from

19:12:19

this open a which is nothing but uh it

19:12:23

is completely API accessible okay

19:12:28

API accessible okay so here you don't

19:12:31

need to download that particular model

19:12:33

to use so if I visit open a so let's say

19:12:37

this is my open a

19:12:39

website okay this is my open a so here I

19:12:42

will just loging with this uh website

19:12:45

and here I can generate the API keys I

19:12:47

think you already done some of the

19:12:48

projects and all right so here I can

19:12:50

easily get the open API keys and what I

19:12:53

will do I will open my local machine I

19:12:55

can also open my Google collab I can

19:12:57

also open my jupyter notebook and there

19:12:59

actually I can start my development okay

19:13:02

there is no issue with that so you don't

19:13:03

need any kinds of powerful machine there

19:13:05

because everything is running on the

19:13:10

API yes or no guys tell

19:13:14

me let's make this session

19:13:16

interactive so that I can Al also

19:13:18

understand like you are understanding my

19:13:20

concept guys reply me in the

19:13:34

chat

19:13:39

yeah thank

19:13:42

you so this is the idea of open AI so so

19:13:46

openi what they did actually they

19:13:47

created this beautiful website okay and

19:13:49

they hosted their models U um to their

19:13:53

server okay and they created some of the

19:13:55

API and with the help of API we can send

19:13:58

the request to the model and we can get

19:14:00

the response okay let's so let's say

19:14:01

this is my this is my model okay this is

19:14:04

my

19:14:05

model this is my model hosted on open

19:14:09

okay it is hosted on open

19:14:11

a now here user will give some query

19:14:15

okay user will get some some

19:14:17

quy okay with the help of the API

19:14:20

key okay with the help of the API key

19:14:23

and this model will give you some

19:14:25

response okay this model will give you

19:14:27

some

19:14:29

response response okay and this uh

19:14:33

request and response you are getting for

19:14:35

this you need to pay you need to pay

19:14:36

some money because this is not a free

19:14:39

this model is hosted on the openi

19:14:41

website and they have created the API

19:14:43

key so for this API key okay to access

19:14:45

the you need to pay

19:14:49

something hi sir as you know Lama 2 is a

19:14:52

heavy model and it's responsive time

19:14:54

also High then how can we decrease the

19:14:58

time to response the open source model

19:15:00

so F we'll be discussing this one okay

19:15:02

no need to worry about like how we can

19:15:04

use this Lama to model in our CPU

19:15:06

machine so we have a projects no need to

19:15:08

worry about I will tell you

19:15:12

okay so guys so far this understanding

19:15:15

is clear like uh what is the advantage

19:15:18

with the open AI okay why we usually use

19:15:21

open AI is it

19:15:25

clear if yes then I will move to the uh

19:15:28

open source part like why we need to use

19:15:30

open source okay and what is the

19:15:31

difficulty level with the open source

19:15:38

model okay can we set the limit of the

19:15:42

uses tokens how we get idea about the

19:15:45

pricing when the test out chatbot uh yes

19:15:47

you can also set the limit uh limit of

19:15:50

the pricing it is also possible let's

19:15:52

say you can set the limit for the $10 so

19:15:54

when it will uh come like close to the

19:15:56

$10 so you will get the notification

19:15:59

okay that can be also

19:16:02

done all right now see so whenever I'm

19:16:06

talking about open source model okay

19:16:08

open source

19:16:10

model open source

19:16:13

llm okay so the first thing you need

19:16:15

need

19:16:20

to so so the first thing you need to

19:16:23

understand uh see whenever I'm talking

19:16:26

about open source it's not hosted okay

19:16:28

it's not hosted not hosted

19:16:32

anywhere some of the model might be

19:16:34

hosted you will get API key but most of

19:16:37

the model would be available on the

19:16:38

hugging pH okay hugging face or

19:16:40

different website okay so it's not

19:16:42

hosted

19:16:44

anywhere it's not host anywhere okay so

19:16:47

what you need to do you need to

19:16:50

download download that particular

19:16:54

model download that

19:16:57

model okay then what you need to do you

19:17:01

need to load that

19:17:04

model you need to load that model okay

19:17:07

that's how you need to perform all the

19:17:09

task manually okay so there actually you

19:17:11

won't be getting any kinds of open kinds

19:17:13

of API key so that actually you can hit

19:17:14

the AP key request and you will get the

19:17:17

response it's not like

19:17:22

that uh guys my video is fine um or

19:17:25

there is any lag you can

19:17:37

feel uh video is fine

19:17:42

guys yeah I I believe it is fine

19:17:49

okay all

19:17:57

right all right now see the main

19:18:01

disadvantage of this open source llm is

19:18:03

you

19:18:04

need you

19:18:06

need good

19:18:11

configuration good fun configuration

19:18:14

system

19:18:16

okay so whenever I'm talking about good

19:18:18

configuration system you should have at

19:18:20

least Core

19:18:22

i core i5 or let's say three

19:18:28

processor processor and you should have

19:18:31

at least uh 8

19:18:34

GB of RAM okay 8 GB of RAM and if you

19:18:38

have GPU then it would be plus point for

19:18:41

you okay because it needs GPU

19:18:44

computation so whenever we'll execute

19:18:46

the uh model it needs actually GPU

19:18:48

computation but I will tell you also how

19:18:50

we can execute the model on the CPU

19:18:52

machine both can be done okay so uh and

19:18:55

think see U today actually I'm not going

19:18:57

to use this neural LA because I believe

19:19:00

in the neural La we don't have any GPU

19:19:01

integration there so I'll be using

19:19:03

Google collab today okay so whenever I

19:19:05

will be implementing the projects that

19:19:07

time I can show you on the neural

19:19:14

lab yes we have see we know that

19:19:17

actually we all have mostly CPU machine

19:19:20

okay we know that okay that is why I

19:19:21

will tell you one like technique uh

19:19:24

using that technique actually you can

19:19:26

execute any kinds of llm model on your

19:19:27

CPU machine as well it is also

19:19:33

possible okay so these are the

19:19:35

requirement actually you need whenever

19:19:36

you are talking about open source large

19:19:38

language model okay because this model

19:19:40

you need to manually

19:19:41

download okay manually download manually

19:19:44

load and manually execute deser the

19:19:46

model okay that you won't be getting any

19:19:48

kinds of API kinds of thing okay so that

19:19:50

is the

19:19:56

thing and some if I'm talking about some

19:19:59

advantage of the open open source model

19:20:01

so here actually you don't need any

19:20:03

kinds of cost okay without any kinds of

19:20:06

cost you can use this model for the

19:20:07

research purpose as well as the

19:20:09

commercial

19:20:12

purpose so guys uh is it clear the

19:20:15

difference difference between our open

19:20:17

AI model and our open source large

19:20:19

language model yes or

19:20:27

no uh see if you have 4GB of ram then I

19:20:30

think you can practice on uh Neal lab

19:20:33

it's completely fine but uh today

19:20:35

actually I will show everything on the

19:20:36

Google collab

19:20:39

okay so you don't need to worry about

19:20:41

the system

19:20:44

configuration all

19:20:46

right guys uh is it clear the difference

19:20:49

between uh open a model and

19:20:57

[Music]

19:21:09

uh uh okay just a minute uh just a

19:21:14

minute

19:22:10

okay uh am I

19:22:14

Audible

19:22:22

uh please let me know in the chat am I

19:22:23

audible

19:22:25

[Music]

19:22:31

guys

19:22:36

okay okay thank you so now uh let's

19:22:39

introduce our uh some open source large

19:22:43

language model so here if you see there

19:22:46

are like very popular and Powerful open

19:22:48

source llm

19:22:54

there okay so see uh there are very uh

19:22:58

like there there are lots of actually

19:22:59

open source large language model

19:23:01

available okay over the internet you

19:23:03

will find but there are some most

19:23:05

popular uh open source llm I will

19:23:07

introduce today so uh the first thing is

19:23:09

like I personally like this one called

19:23:11

meta Lama 2 okay so this is the model

19:23:14

for from the Facebook so Facebook has

19:23:17

trained this model and they named it as

19:23:18

Lama 2 okay so there is another model

19:23:21

called Google Pam 2 okay so this is

19:23:23

another model called Google Pam 2 so the

19:23:25

this model actually trained by the

19:23:27

Google anyone used like Google B before

19:23:31

Google B like chat GPT anyone

19:23:38

used maybe you used also Google B like

19:23:41

chat GPT yes or

19:23:44

no

19:23:46

okay do you know like which model uh is

19:23:49

running in the back end of this uh U

19:23:52

Google

19:23:53

Bart the free free uh version you are

19:23:56

using Okay so this this is the model

19:23:58

actually they're using called pal

19:24:03

2 okay so in future uh we'll also see

19:24:06

like how we can use Google pump to model

19:24:07

okay and there is another model called

19:24:09

Falcon okay Falcon has lots of variant

19:24:13

like Falcon like 7B B okay then 13B so

19:24:17

it has lots of

19:24:19

variant not only this one so there is a

19:24:22

uh GitHub actually you will get uh just

19:24:24

search for open llm okay open

19:24:28

llms so this is the

19:24:31

GitHub and here you will see all the

19:24:34

open source model are available over the

19:24:36

internet and it is already integrated

19:24:39

here see see this guy actually uh so

19:24:42

this is this is the guy so he has

19:24:44

actually uh created this repository and

19:24:46

he has actually added all the open

19:24:48

source llm here so we have let's say T5

19:24:51

and this is the release date and this is

19:24:53

the model checkpoint okay and this is

19:24:55

the paper and blog if you want to read

19:24:56

this uh like U about this model and all

19:24:59

so you can open this paper and blog you

19:25:01

can read it okay then you have ul2 so

19:25:05

this is one of the llm model then you

19:25:07

have uh uh this uh care brace GPT so

19:25:11

this is another llm model then you have

19:25:13

pathia dolly then Delight then Bloom is

19:25:17

also there stable LM Alpha okay then MTP

19:25:21

uh MPT 7B is also there then you have

19:25:25

Falcon okay see I already told you

19:25:27

Falcon is also there see llama 2 is also

19:25:29

there okay see lots of Open Source model

19:25:32

are available here okay all the open

19:25:34

source model so this is the like GitHub

19:25:37

you can go through let's say if you want

19:25:38

to learn any kinds of Open Source llm so

19:25:41

you can go through this GitHub and you

19:25:43

can read about

19:25:50

uh

19:25:51

see for object detection actually we

19:25:54

have like lots of model OKAY already

19:25:57

even see nowadays actually people are

19:25:59

also inting computer vision with these

19:26:01

kinds of large language model so both

19:26:03

can be

19:26:13

support

19:26:19

uh yes I can share the link as well in

19:26:21

the chat so this is the link you can go

19:26:33

through all

19:26:40

right okay so this is the actually

19:26:43

GitHub actually you can go through to

19:26:45

learn about open source llm so all the

19:26:47

models are listed

19:26:49

here H all right now see today actually

19:26:53

I'm going to discuss something called U

19:26:56

Lama 2 okay meta Lama 2 so this is the

19:26:59

model from the Facebook so they have

19:27:01

trained this

19:27:07

model so uh the first thing actually uh

19:27:11

uh in this session actually I'll be

19:27:13

discussing the Llama 2 so first of all I

19:27:15

will introduce Lama 2 what is Lama 2 and

19:27:17

all about then I will show you like how

19:27:19

we can execute the Lama 2 okay without

19:27:22

like Lang chain because there is a

19:27:24

library actually they have created

19:27:25

called Lama

19:27:28

CPP okay so using that Library actually

19:27:31

I will uh first of all execute the Lama

19:27:34

2 model then I will show you like how we

19:27:36

can execute the Lama 2 model with the

19:27:38

help of langen because in future

19:27:40

whenever you will be do doing the

19:27:41

development you will be implementing any

19:27:43

kinds of projects you should uh you need

19:27:44

to use something called Lang Chen okay

19:27:47

so you also need to understand how we

19:27:48

can use Lang Chen uh with these kinds of

19:27:51

Open Source llm as well okay so both I

19:27:53

will show you and at the last I will

19:27:55

show you uh one project implementation

19:27:57

so mostly uh I will start the

19:27:59

implementation tomorrow so we are going

19:28:01

to implement one chatboard projects okay

19:28:03

and this is going to be medical

19:28:04

chatboard okay with the help of Lama 2

19:28:06

we'll be implementing end to end okay so

19:28:09

this is the complete

19:28:13

agenda now

19:28:15

if you just search like lama lama to

19:28:18

meta okay Lama to meta on Google so this

19:28:21

is the website you will

19:28:22

get uh from The Meta Ai and this is the

19:28:26

Lama 2 actually website as you can see

19:28:28

so they have already written about L 2

19:28:30

so lar 2 is nothing but it's a Next

19:28:32

Generation open source large language

19:28:34

model okay so previously it has actually

19:28:37

another version called llama 1 okay so

19:28:41

llama

19:28:42

1 llama 1 they have uh actually

19:28:44

developed just for the research purpose

19:28:46

okay so it was not for the commercial

19:28:48

use cases so only for the internal use

19:28:50

cases actually internal research purpose

19:28:52

they created the Llama one okay but

19:28:54

later on whenever actually they saw like

19:28:57

GPD kinds of model came in the market so

19:29:00

they so they introduced something called

19:29:02

Lama 2 model okay and this is the Lama

19:29:06

2 and they have also tell uh to like

19:29:09

Lama 2 is available for free and uh

19:29:12

research and commercial use cases both

19:29:18

and one thing actually you need to do to

19:29:19

get the

19:29:21

model uh if you want to get the model

19:29:23

then you need to get the permission from

19:29:25

The Meta AI okay this is the requirement

19:29:27

so just click on this download model

19:29:30

this button and here you just need to

19:29:32

fill some of the information like your

19:29:34

first name your last name then your date

19:29:36

of birth your email address country and

19:29:38

organization if you're working with then

19:29:40

you just need to select these are the

19:29:42

model okay then just submit the request

19:29:45

so after uh 30 to 40 minutes actually

19:29:47

they will accept the request and they

19:29:48

will give give you the access okay so

19:29:51

this is the requirement and if you're

19:29:52

not getting the access as of now okay

19:29:54

there is another alternative I will show

19:29:56

you how we can use this model okay so no

19:29:59

no need to worry so what you can do guys

19:30:01

you can open this website uh Lama to

19:30:04

meta and just apply for the permission

19:30:07

here

19:30:10

everyone okay apply for the per

19:30:13

permission

19:30:16

so let me share you the link as

19:30:26

well so guys are you doing with me can

19:30:28

you please

19:30:43

confirm

19:30:48

uh

19:30:51

hello

19:30:54

okay I already have the access okay so

19:30:57

you already have the access then no need

19:30:59

to worry about you can directly access

19:31:00

the model and one particular things

19:31:03

actually I just need to mention so

19:31:05

whenever you are applying for the

19:31:06

request okay so it will ask for the

19:31:08

email address so I I I believe actually

19:31:11

you all have something called hugging

19:31:13

face account guys yes or no hugging face

19:31:15

account maybe hugging face has been

19:31:17

discussed previous

19:31:20

session so make sure you try to use the

19:31:22

hugging face email address the email

19:31:24

address you used for the hugging

19:31:27

face okay so this email address you need

19:31:30

to give

19:31:34

here because this model are available in

19:31:36

the hugging face website so whenever you

19:31:38

will uh apply for the access they will

19:31:41

like U ask for this email address

19:31:54

all

19:31:56

right now let's discuss about this Lama

19:32:00

2 little bit more like what they are

19:32:02

telling so if you just go below little

19:32:04

bit so this is the Lama 2 so they're

19:32:06

telling Lama 2 was trained on 40% mode

19:32:08

data than Lama 1 I already told you

19:32:11

there was another model called Lama 1

19:32:13

and what they did in Lama 2 actually

19:32:15

they train the model of with the 40%

19:32:18

more data okay 40% more data than your

19:32:20

llama 1 and it has a has like double

19:32:23

context

19:32:28

length we can download the model into

19:32:31

our local drive as well and can play

19:32:33

with right yes you can do it I will show

19:32:35

you like how we can download the model

19:32:37

all

19:32:43

right

19:32:45

okay uh now see guys llama 2 has

19:32:47

actually different variant so it has

19:32:49

actually 7 billion parameter variant so

19:32:51

this is the 7B model and it has also 13

19:32:54

billion model that means uh uh the model

19:32:57

has actually 13 billion billion

19:32:58

parameter and there is another model

19:33:00

called 7 70b okay so this is like 70

19:33:04

billion parameter so if you want to use

19:33:06

these two model you need like good

19:33:08

machine configuration and uh I'll tell

19:33:11

you like how we can use this 1B model

19:33:13

and B model as well so first of all I

19:33:15

will like tell you how we can use this

19:33:17

13B model okay what would be the

19:33:19

approach to access this model okay I

19:33:21

can't directly load the actual model

19:33:24

because actual model you can't ever load

19:33:26

in your low configuration machine okay

19:33:28

you need some good memory some good GPU

19:33:30

there uh but I will show you one

19:33:33

alternative there we'll be using

19:33:34

something called quantized version

19:33:41

model

19:33:43

okay yeah

19:33:45

and now see guys this is The Benchmark

19:33:47

so this is the data set on this data set

19:33:50

actually they have 10 different

19:33:51

different large language model as you

19:33:53

can see M PT uh 7 me this this is the

19:33:56

model and this is the accuracy score uh

19:33:59

26.8% and they also trained uh Falcon

19:34:02

model falcon 7 7 billion parameter model

19:34:05

and this is the accur accuracy score

19:34:07

26.2 and they also trained on Lama 2 7 7

19:34:11

billion model okay and this is the accy

19:34:13

score

19:34:14

45.3% now see guys the accuracy

19:34:18

Improvement okay isn't it good model

19:34:21

guys what what you can feel like see

19:34:24

llama 2 is uh claiming uh this is this

19:34:27

model is better than your GPT uh 3.5

19:34:30

turbo anyone used GPT 3.5 turbo model

19:34:34

before maybe you have

19:34:43

used

19:34:47

yes yeah so they're claiming actually uh

19:34:50

this model is better than GPT 3.5 turbo

19:34:52

okay so that's how actually they have

19:34:55

also given the Benchmark here and see

19:34:57

Lama 2 13 billion and this is the

19:34:59

accuracy and they again trained on mpt's

19:35:03

13 billion parameter model and this is

19:35:04

the accuracy they got okay now they also

19:35:08

trained with the Falcon 14 billion

19:35:10

parameter this is the model they got

19:35:13

this accuracy they got okay 15 uh

19:35:17

55.4% then uh this is the Lama 1 model

19:35:21

uh this is the accuracy and llama 2 7

19:35:24

billion model okay and see this is the

19:35:25

highest accuracy they got uh

19:35:28

68.9% okay that's how they train on

19:35:31

different different data set different

19:35:32

different open source data set as you

19:35:34

can see these are the data set actually

19:35:35

data set

19:35:38

name all right and um these are actually

19:35:42

partners and supporters for this L 2

19:35:44

okay like hugging face Nvidia they're

19:35:47

Intel they are also using these are the

19:35:51

model all right now guys uh did you

19:35:54

appli for the permission um here did you

19:35:57

appli for the permission

19:36:05

everyone uh if not uh no need to worry

19:36:07

about I will show you one one

19:36:09

alternative this alternative you can

19:36:10

follow okay no need to worry

19:36:13

about

19:36:19

can we use llama 2 for translation of

19:36:21

the codes into python code find tuning

19:36:24

custom data yes you can do it okay Lama

19:36:26

2 has different different model variant

19:36:27

I will tell

19:36:29

you even in future we'll also see how we

19:36:32

can fine tune the Lama 2 model as well

19:36:35

it is also possible on your custom

19:36:39

data even it is already included in our

19:36:41

paid courses I think you know uh that is

19:36:44

also one paid version of this course so

19:36:47

there actually we have already

19:36:48

introduced the fine tuning technique as

19:37:02

well all right so guys uh so far

19:37:05

everything is clear everything is fine

19:37:07

you can let me

19:37:12

know uh if you have any question you can

19:37:15

ask me otherwise I will uh continue with

19:37:17

the

19:37:29

session what is the name of the course

19:37:32

could you please give me the information

19:37:34

run this model over the docker key see

19:37:36

it would be also discussed okay it would

19:37:37

be also discussed Asal okay in the paid

19:37:40

courses actually we'll show the

19:37:41

deployment we'll also integrate docker

19:37:44

okay we'll also integrate cicd so

19:37:46

everything would be discussed

19:37:54

there all

19:37:57

right now see if you want to play with

19:38:00

this Lama 2 model uh as your chat GPT so

19:38:03

there is another website actually hosted

19:38:05

just search for

19:38:08

llama Lama 2.

19:38:11

a okay so now you will see something

19:38:13

called uh this website and you will see

19:38:16

it's like chat gbt like interface so let

19:38:18

me also give you the link in the

19:38:24

chat okay now here just click on the

19:38:27

setting Okay now click on the setting

19:38:29

and from the setting itself you can um

19:38:32

like select different version of The L 2

19:38:34

model okay I already told you L 2 has

19:38:36

different different version so it has 13

19:38:38

billion parameter it has 7 billion

19:38:40

parameter and it has also uh 70 billion

19:38:43

parameter okay now first of all let's

19:38:45

select this model uh this is the

19:38:46

smallest model model I will select

19:38:48

because response time would be a little

19:38:49

bit fast okay and if you want to use any

19:38:52

system prompt your custom prompt you can

19:38:54

give it so I'll keep this default Pro

19:38:56

prompt which is nothing but you are

19:38:57

helpful assistant so it will work as a

19:38:59

assistant okay you can also set the

19:39:01

temperature okay what is the temperature

19:39:03

temperature means if you uh set this

19:39:06

temperature to close to one that means

19:39:07

your model will take the risk and it

19:39:09

will give you some random output okay

19:39:11

and if it is close to zero that means

19:39:13

this model would be more strict to the

19:39:15

authentic output okay it w be taking any

19:39:17

kinds of risk so these are the parameter

19:39:18

actually you can play with all right now

19:39:21

let's say I have selected this model

19:39:23

called llama to 7B now I can chat with

19:39:25

this model okay now I'll just write

19:39:28

hello so see it is giving me the

19:39:32

response okay see it is giving me the

19:39:34

response now you can do anything now

19:39:37

let's say you are having one error okay

19:39:39

you are having one error in your code so

19:39:40

let me search for one error so so let's

19:39:43

say this is the error I was having in my

19:39:46

uh flash code so I'll copy this

19:39:49

error and I will give it here so I

19:39:54

am getting this

19:40:01

error uh can you please uh fix

19:40:06

it let's see what

19:40:12

happens

19:40:15

uh see guys this is the response uh it

19:40:17

has given sh I would be happy to fix the

19:40:19

error can you please provide more

19:40:21

context about the error you are getting

19:40:23

uh what the line uh of the code is

19:40:26

causing the error so it is also uh uh

19:40:30

like uh telling me to send some uh more

19:40:34

uh information so what I can do uh I can

19:40:36

tell I'm

19:40:39

getting I'm getting this is the

19:40:42

error

19:40:48

in

19:40:49

my flash

19:40:54

code see now uh it has given me the

19:40:58

response okay it has given me other

19:41:00

response like how to fix

19:41:06

it now you can also select different

19:41:09

version of the model from here you can

19:41:11

also play with 13 billion and 70 billion

19:41:13

it's up to

19:41:16

you guys are you able to execute this uh

19:41:20

website this l2.

19:41:35

a

19:41:42

okay

19:41:44

all

19:41:52

right okay thank you now uh let me show

19:41:55

you the GitHub repository of the Lama 2

19:41:57

as well see this is the Facebook

19:41:59

research and llama repository they have

19:42:02

created let me share you the link as

19:42:09

well uh this is the link and if you come

19:42:12

here so they have already given like

19:42:14

where this model is available everything

19:42:16

they have given so if you want to access

19:42:18

the model so this model is available on

19:42:20

the hugging face website okay just you

19:42:21

can open the hugging face and you can

19:42:23

visit the model see all the models are

19:42:25

available okay different different

19:42:27

version of the models are available and

19:42:29

what is the chat model and what is this

19:42:30

without chat model I will tell you okay

19:42:32

so there are some like uh you can say

19:42:36

difference between these are the model

19:42:37

I'll tell you okay now see guys they

19:42:40

have already mentioned here if you go

19:42:42

below um here so Lama 2 actually has two

19:42:46

different model one is like pre-end

19:42:47

model and another is like fine tune chat

19:42:49

model okay so what is the pre-end model

19:42:51

first of all you need to understand so

19:42:52

preon model is nothing but these model

19:42:54

are not for fine tune for the chat or

19:42:56

question answering okay they should be

19:42:59

uh prompted so that uh the uh expected

19:43:02

answer is the uh natural continuation of

19:43:05

the prompt so basically let's say if you

19:43:07

want to uh generate the text okay if you

19:43:09

want to generate any kinds of text from

19:43:10

the Lama to model then you to use this

19:43:12

pretend models okay from the Lama 2

19:43:15

Series and there is another model called

19:43:17

fine tune chat model what is fine tune

19:43:18

chat model fine tune chat model is

19:43:20

nothing but the fine tune models uh were

19:43:22

trained for the dialogue application to

19:43:24

get the expected features from the

19:43:26

performance from from them specific

19:43:28

formatting defined chat completion so

19:43:30

here it is telling if you want to do

19:43:32

let's say question answering system or

19:43:33

chat operation so you can use this fine

19:43:35

tune chat

19:43:36

model okay now if I visit hugging

19:43:39

hugging face again here now I think this

19:43:42

should be very much clear like whenever

19:43:44

they're defining like chat

19:43:46

model okay whenever they defining chat

19:43:49

model that means this is the model for

19:43:50

the question answer or let's say chat uh

19:43:53

I mean chat model okay and whenever you

19:43:56

won't be seeing any kind of chat model

19:43:57

that means this is for the Tex

19:43:58

generation model is it

19:44:00

clear why different difference model you

19:44:02

can see in the hugging

19:44:12

fish

19:44:14

let me know

19:44:30

guys yes one for chat another another

19:44:33

one for like uh text

19:44:38

generation

19:44:42

great

19:44:46

okay now let me close this other the

19:45:00

tab

19:45:03

H now first of all Let's uh play with

19:45:06

this model called LMA 213 billion

19:45:08

parameter model this model first of all

19:45:10

I will tell you like how we can execute

19:45:11

this model and if you have very low

19:45:14

configuration PC so what you can do in

19:45:16

this case okay first of all I will tell

19:45:17

you this one then I will show you how we

19:45:19

can execute this uh 7 billion parameter

19:45:21

model with the help of the Lang chain as

19:45:24

well both I will show

19:45:26

you so for this first of all let's try

19:45:28

on neural lab okay so if neural lab is

19:45:31

not working then I will go to the Google

19:45:33

collab so first of all I will be using

19:45:35

the quantied model and let's see whether

19:45:36

it is working or not so everyone you can

19:45:39

open your neural app so let me open so

19:45:43

so I'll loging with the

19:45:54

website so here I can take I think

19:45:57

jupyter

19:46:06

notebook repter notebook I think I can

19:46:12

take

19:46:23

so everyone can open this uh neural lab

19:46:26

with you

19:46:37

also let me Zoom this

19:46:40

screen now my screen is visible guys

19:46:54

this text is visible you can confirm me

19:46:55

in the

19:47:09

chat all

19:47:12

right

19:47:14

so let me first of all test whether I

19:47:17

have GPU here or not maybe there is no

19:47:19

GPU here how can we uh check the

19:47:27

configuration see here no need to check

19:47:29

the configuration because this is like a

19:47:32

remote server it is

19:47:41

running

19:47:43

uh okay this command is not found maybe

19:47:46

no GPU okay then I will use quantied

19:47:49

model let's see what

19:47:53

happened and also let me share the code

19:47:55

with you so what I can do I can open

19:47:58

code

19:48:02

share and I will share this link in the

19:48:05

chat so whatever code I will be writing

19:48:08

I will be just pasting here okay you can

19:48:09

get from

19:48:11

here

19:48:19

all right now first of all let me show

19:48:22

you the model actually I'm going to use

19:48:24

uh so we'll be using some quantized

19:48:31

model so this is the website of the

19:48:34

Quant model and this Quan model is

19:48:36

already available on the hugging phase

19:48:37

okay so there are different different

19:48:39

organization so they actually did the

19:48:41

quantization of the model and they

19:48:43

publish the model here okay see Lama 27b

19:48:45

model Lama 23b model chat model OKAY

19:48:48

different different models are here now

19:48:51

do you know what is quantization guys

19:48:53

anywhere here what is the quantization

19:48:56

what quantize

19:48:57

mean you can let me know in the

19:49:06

chat if you're not familiar with

19:49:08

quantization then I will give some idea

19:49:10

how this quantization works model uh

19:49:12

comparation technique yes you are right

19:49:19

uh okay now see what happens actually so

19:49:22

whenever you train your neural network

19:49:24

okay so whenever you train your neural

19:49:26

network so let me take um one just demo

19:49:30

neural network here so let's

19:49:36

say this is my

19:49:41

network

19:49:53

okay so this is my let's say Network so

19:49:56

this network will have some of the

19:49:57

weights okay let's say W1 W2 W3 and so

19:50:02

on okay so each of the uh layer will

19:50:05

have the weights okay each of the layer

19:50:09

will have the weights yes or no guys do

19:50:12

you understand understand this neural

19:50:13

network concept

19:50:23

maybe

19:50:25

yeah now see what is this weight weight

19:50:28

is nothing but it's a value okay it's a

19:50:29

number only it's a floating number so it

19:50:31

will have let's say

19:50:33

0.36 or let's say

19:50:35

0.46 it might be also 1.2 it might be

19:50:39

also 0.88 any kinds of number okay it

19:50:41

would be adjusted ining back propagation

19:50:44

BP all right now one thing I think you

19:50:47

already know uh whenever I'm talking

19:50:51

about data type and data size okay so

19:50:53

whenever I'm talking about character

19:50:55

character data type okay so I can take

19:51:00

uh 32 bit I can also take 64

19:51:06

bit okay character now can anybody tell

19:51:09

me uh what is the character uh let's say

19:51:13

size in the 30 32

19:51:18

bit anyone know what is the like

19:51:22

character size okay in the memory for

19:51:24

the

19:51:25

32bit

19:51:29

anyone because whenever you will uh

19:51:31

assign these are the number it will

19:51:33

occupy the memory okay it will occupy

19:51:34

the ram so what what would be the size

19:51:38

there any anyone any idea

19:51:41

idea for kilobyte

19:51:46

uh no in 32bit actually it would be 1

19:51:51

BTE one bite

19:51:53

okay and 64bit also it would be one

19:52:01

bite and if I'm talking about

19:52:04

short okay short or you can also talk

19:52:07

about

19:52:08

string okay then in 32 bit it would be 2

19:52:12

by

19:52:15

and 64bit also it would be 2

19:52:19

by okay now if I'm talking about

19:52:21

something called

19:52:23

integer so 32 bit it would be uh 4

19:52:28

by and 64bit it would be 4

19:52:33

by okay and if I'm talking about

19:52:37

long so long means it's a floating

19:52:39

number okay it's a float you can talk

19:52:41

about so float would be uh 32 bit it

19:52:43

would be 4

19:52:45

by and 64 bit it would be 8

19:52:50

by and long long there is another data

19:52:53

type called long long long long means

19:52:55

it's a double in Python we call it

19:52:56

double okay so mostly you will see in

19:53:00

the weight initialization they will be

19:53:02

assigning the double number okay instead

19:53:04

of floating number so it would be uh in

19:53:07

the 32 bit it would be 8

19:53:09

by okay 8 bytes and 64 bit it would be

19:53:12

be 8

19:53:14

bytes okay now tell me uh which uh data

19:53:18

type is taking more space in the memory

19:53:20

U floating or

19:53:22

integer tell

19:53:27

me just reply me guys first in the

19:53:30

chat which data type is taking more

19:53:33

memory in the uh more space in the

19:53:41

memory float yes you are correct float

19:53:45

is taking more memory so now let's say

19:53:47

whenever we are training any kinds of

19:53:49

neural network so by default the weight

19:53:50

initialization or weight adjusting is

19:53:53

happening with the floating number now

19:53:55

see you can also round the floating

19:53:57

number let's say you you are having

19:53:58

these kinds of number 1.22 okay or let's

19:54:01

say 2.33 now if you just round it let's

19:54:04

say 1.22 you can make it as 1 okay and

19:54:07

2. 32 you can make it as two now you

19:54:09

just round the number and it has become

19:54:11

in that means integer okay some data

19:54:14

loss would be happened but again you are

19:54:16

somehow trying to adjust it or let's say

19:54:18

round it to the root root number okay so

19:54:21

we call it a quantization technique so

19:54:23

basically what you are doing uh the

19:54:25

floating number you are having okay in

19:54:26

the weight you are just trying to uh

19:54:28

round it to the actual number okay you

19:54:30

are just trying to convert the floating

19:54:32

number to integer number okay now tell

19:54:34

me uh previously it was having that uh

19:54:37

floating number now it has become the

19:54:38

integer number now is there would be any

19:54:41

uh uh like changes in the

19:54:48

memory yes or

19:54:52

no okay now see memory size would be

19:54:54

reduced because of this U integer number

19:54:57

because we have done the quantization

19:54:58

technique okay so this is the

19:55:00

quantization idea basically uh you are

19:55:02

just trying to convert your floating

19:55:04

number to integer number all

19:55:06

right yes and whenever I'm talking about

19:55:10

models uh model will have l let's say

19:55:12

billion million parameter now let's say

19:55:14

if you have billion million parameter

19:55:16

and you are converting everything to the

19:55:18

integer now just think about how much

19:55:20

memory will save let's say your model

19:55:22

size is 30 GB okay your model size is 30

19:55:24

GB initially okay now after doing the

19:55:27

quantization this model will have

19:55:30

5gb okay and we call it as quantized

19:55:33

model and this is the actual model so

19:55:36

some accuracy might be drop in this

19:55:38

model but again this model would be fast

19:55:40

and we can easily load this model in the

19:55:42

memory okay in our low configuration PC

19:55:45

got it so let's say this model needs

19:55:47

actually 16 GB Ram but after done the

19:55:51

quantization this model has become 5gb

19:55:53

now I can easily run this model in the

19:55:55

8GB M Ram or let's say 4GB Ram it is

19:55:58

also possible got the idea

19:56:09

guys if it is clear just write clear in

19:56:12

the the chat so that so that I can

19:56:14

understand you are getting my

19:56:17

point yes performance will reduce uh but

19:56:21

we need somehow the faster inference

19:56:29

okay but quantize model is also good it

19:56:32

will give you like good

19:56:41

responses okay now there are different

19:56:43

types of actually quantization

19:56:45

techniques okay so one of them is

19:56:47

gml okay gml gml is the quantization

19:56:50

technique or quantization Library you

19:56:52

can talk about gml gml format

19:56:54

quantization there are various kinds of

19:56:56

technique but uh they have used

19:56:57

something called gml okay gml

19:57:02

quantization so today actually I'll be

19:57:04

using one gml format model quantized

19:57:07

model of that 13 billion parameter model

19:57:09

and I will show you how we can execute

19:57:10

the model

19:57:14

all right okay now let me show you the

19:57:18

model actually I'm going to use

19:57:20

[Music]

19:57:27

here so this is the model guys I will be

19:57:29

using so let me give you the

19:57:37

link so this is the link guys and L 2 13

19:57:41

billion chat okay because I want to do

19:57:43

question answering with my model that's

19:57:45

why I I'm using chat model but let's see

19:57:47

if you want to generate text guys which

19:57:49

model you will be using tell

19:57:50

me chat model or without chat

19:57:59

model no no no it is support Lama CPP I

19:58:03

I'll I'll execute and show you

19:58:05

Prashant yeah without chat uh yeah now

19:58:08

see guys this is the chat model and this

19:58:09

is the gml model and this model has

19:58:12

different different variant as well see

19:58:14

uh some of the model is like 5gb some of

19:58:16

the model is 6gb okay 7gb so different

19:58:20

different model we have so from these

19:58:21

are the model actually I'll be using one

19:58:23

particular

19:58:28

model so this is uh your quantization

19:58:31

Technique you can talk about

19:58:32

quantization Library so Library they

19:58:33

used for the quantization okay so

19:58:36

uh so zml is the one of

19:58:40

them

19:58:44

and if you see this is the dot bin that

19:58:45

means it's a binary model okay it's a

19:58:47

binary

19:58:55

representation all right now see guys uh

19:58:57

if you want to use this quantized model

19:58:59

OKAY gml version model then you need to

19:59:01

use one Library called uh Lama CPP okay

19:59:05

Lama CPP CPP okay this is the library

19:59:08

let me show

19:59:09

you um see that's how you can install

19:59:13

this Lama CPP Library so these are the

19:59:16

command you need to

19:59:17

execute so cake so this is the command

19:59:20

so it will install your Lama

19:59:22

CPP and as well as Lama CPP python you

19:59:26

need and this is the specific napai

19:59:29

version you need and as well as the

19:59:31

hugging face Hub also you need okay why

19:59:32

you need the hugging face Hub because

19:59:34

this model is available on the hugging

19:59:36

face okay and to download this model

19:59:37

from the hugging face I need this

19:59:39

hugging face Hub okay this is the

19:59:40

library now let me EX and see whether it

19:59:42

is working here or

19:59:45

not let me also give you the code in the

19:59:48

code

19:59:53

share guys you can let me know if you

19:59:55

are able to see the code in the code

20:00:10

share

20:00:20

the code is accessible guys yes or

20:00:40

no

20:00:43

uh please give me some response so that

20:00:45

I can get to

20:01:03

know

20:01:06

okay uh maybe installation is done uh

20:01:10

okay fine so you can ALS also make the

20:01:14

installation all

20:01:17

right now I will be defining the model

20:01:20

actually I'll be using okay so now let's

20:01:22

define the model

20:01:24

here

20:01:30

so okay so see guys uh this is the model

20:01:34

I'm going to use uh Lama 2 13 billion

20:01:37

chat

20:01:40

gml

20:01:43

all right see this is the model uh Lama

20:01:46

2 13 so you just copy copy this name and

20:01:50

just give it here copy this name and

20:01:52

give it here and you also need to give

20:01:55

the Bas model name because here you can

20:01:56

see there are lots of model OKAY in

20:01:58

binary format now which particular model

20:02:00

you should be using here so I'm using

20:02:02

this model so let me copy the name and

20:02:04

searce it

20:02:08

here see I'm using this specific model

20:02:11

and this model model size is

20:02:12

9 76 GB actually okay this is the model

20:02:17

so this model I'll be using so let me

20:02:22

execute now first of all I need to

20:02:24

import uh hugging face Hub to download

20:02:27

the model as well as I will also import

20:02:29

something called Lama CPP

20:02:36

Library okay now let's download the

20:02:40

model

20:02:45

so let me also give you the

20:03:08

code now here if you see I'm giving the

20:03:11

repo ID so this is my repo ID model name

20:03:14

or path and this is the base model I

20:03:16

want to download okay and I'm using

20:03:18

hugging face Hub to download the model

20:03:20

now let me

20:03:22

download so see it's downloading it's

20:03:25

around

20:03:26

9.76

20:03:40

GB

20:03:45

share the link I already shared this uh

20:03:47

code shell link all the codes are

20:03:49

available here let me share it

20:04:06

again all the codes are available just

20:04:08

copy paste uh in your notebook and ex

20:04:11

Ute one by

20:04:40

one

20:04:51

so guys is it running so far everything

20:04:53

is fine without any

20:05:10

error

20:05:30

and if you check the original uh this 13

20:05:32

billion parameter model it's like huge

20:05:34

model okay you can't U download this

20:05:37

model on this neural lab so you need a

20:05:40

good uh instance there so that is why

20:05:41

actually we are using this contest

20:05:53

model almost done let's

20:06:10

see

20:06:12

okay it's done now if you want to check

20:06:14

the model path actually where it has

20:06:16

downloaded you can just uh uh see that

20:06:19

see this is the path actually it has

20:06:21

downloaded the model okay see we have

20:06:24

locally downloaded our

20:06:27

model now what I need to do I need to

20:06:30

load my model okay so to load my model I

20:06:32

will be using this Lama CPP Library okay

20:06:35

and see I'm importing from Lama CPP

20:06:38

import uh Lama now with the help of that

20:06:42

actually I will load my

20:06:46

model okay

20:06:47

see uh if you have GPU in your machine

20:06:51

then this would be quick response okay

20:06:53

otherwise maybe it will take time let's

20:06:55

see what happened on neural app because

20:06:57

in neurolab it doesn't have any

20:06:59

GPU so here is the model path I am

20:07:02

giving and these are the parameter you

20:07:04

need to give okay like uh threshold U

20:07:07

number of threshold like CPU CES you

20:07:09

want to use then number of B actually

20:07:11

you want to use okay then number of GPU

20:07:14

layers you

20:07:15

have so by default keep this number and

20:07:18

let's execute and see what

20:07:23

happened loaded internal vocab okay so

20:07:26

it has been loaded I guess let me

20:07:28

execute it

20:07:30

again it's

20:07:40

loading

20:08:03

so this is the problem with uh open

20:08:05

source llm because here it it uh it

20:08:08

needs actually some good instance okay

20:08:09

to run the model

20:08:19

okay

20:08:20

done uh there is no error okay fine now

20:08:24

what I can do let me give you the

20:08:38

code now let's uh create one Pro prom

20:08:41

template

20:08:45

here uh guys do you know what is promt

20:08:48

template

20:08:50

anyone maybe uh you already learned this

20:08:53

thing in your open a

20:08:56

discussion just give me a quick response

20:08:58

in the chat what is a prompt template

20:09:01

what is prompt do you know why we use

20:09:03

prompt in

20:09:04

llm yes okay great see here we are

20:09:08

writing one prompt here our custom

20:09:10

prompt template so here I'm just telling

20:09:12

as a prompt uh write a linear regression

20:09:14

code okay and as a system prompt I'm

20:09:17

giving you are a helpful uh and

20:09:19

respective respectful and honest

20:09:21

assistant always answer as a helpfully

20:09:23

okay then user will give you the prompt

20:09:25

and you need to provide the answer as a

20:09:27

assistant okay so this is the custom

20:09:28

prompt template I have created now let

20:09:31

me execute and give it to my model also

20:09:34

I'll paste it

20:09:37

here

20:09:39

h

20:09:42

now finally I will give this promt

20:09:44

template to my llm okay see I'm calling

20:09:47

this Lama um that means this uh Lama CPP

20:09:50

library and here I'm giving my prompt

20:09:52

template okay see this is my prompt

20:09:54

template I have created prompt template

20:09:57

as well as I'm also giving the max token

20:09:59

length okay that means maximum response

20:10:01

okay maximum tokens actually it will

20:10:03

give me as output and I'm also setting

20:10:05

the temperature okay temperature top P

20:10:07

then P penalty I think you remember if I

20:10:10

open this one

20:10:13

Lama do Lama 2. a now if I go to the

20:10:16

settings now see these are the parameter

20:10:19

you can adjust here got it guys what is

20:10:22

this parameter see temperature max token

20:10:24

top parameter okay see everything is

20:10:26

there you can um change it

20:10:31

here so by default keep this number and

20:10:39

execute

20:10:49

can you explain the

20:10:51

penalty see uh penalty like see it's a

20:10:55

parameter actually it helps to generate

20:10:57

a like you can say uh actual response

20:11:00

okay let's say if you increase and

20:11:02

decrease this parameter so what will

20:11:03

happen actually you will see your model

20:11:04

will give some random response okay or

20:11:07

let's say the response actually it is

20:11:09

not relevant to your prompt you are

20:11:11

giving so this parameter actually

20:11:12

adjustable parameter so this parameter

20:11:15

can be changes whenever you are changing

20:11:17

the temperature parameter so here

20:11:19

temperature parameter I kept as 0.5 that

20:11:21

means I'm turning to my model uh

20:11:24

sometimes just take a risk okay

20:11:26

sometimes don't take a risk okay it just

20:11:27

a uh I mean adjusted number I have given

20:11:30

now let's say if I'm increasing the

20:11:32

temperature value let's say close to one

20:11:34

so what will happen my model will be

20:11:36

taking risk okay let's say if I'm giving

20:11:38

any kinds of prompt and if if it doesn't

20:11:40

know anything it will give risk and it

20:11:42

will generate some random response as

20:11:44

well which can be correct which can be

20:11:45

wrong as well okay and if you decrease

20:11:47

this parameter close to zero so what

20:11:50

will happen your model won't be taking

20:11:51

any risk it will only give the authentic

20:11:53

response you are expecting from your

20:11:54

model okay so these are the parameter

20:11:56

can be changed all

20:12:07

together see again it is running on CPU

20:12:10

machine that's why respond time little

20:12:11

bit High here and again we are using 13

20:12:14

billion parameter model so that's why if

20:12:16

you're taking 7 billion parameter model

20:12:18

so respond time would be a little bit

20:12:23

less so let me give you the code as

20:12:39

well

20:12:46

so it's still running let's wait for

20:12:48

some

20:13:08

times if anyone get getting response so

20:13:11

you can let me know whether response

20:13:15

uh unable to run in neural

20:13:18

lab um see I think I'm able to run it's

20:13:21

working for me so

20:13:25

far so if you're not able to run in

20:13:27

neural Labs what you can do you can open

20:13:29

Google collab Iman okay and there

20:13:30

actually you can execute

20:13:34

maybe the same code you can copy paste

20:13:36

there and make sure you selected GPU

20:13:39

there

20:14:22

it's taking time a lot guys so side by

20:14:24

side what I can do I can also show you

20:14:26

the collab

20:14:29

execution because I don't know how much

20:14:31

it will

20:14:34

take I already have the notebook ready

20:14:36

so let me just show

20:14:39

you

20:14:41

I'll share it with

20:14:55

you so let me

20:15:09

connect

20:15:13

still running on NE lab

20:15:24

okay so here I got the GPU Tesla T4 this

20:15:27

is the free version GPU and let me

20:15:30

install the

20:15:39

libraries

20:16:08

guys if it is taking time for you in La

20:16:10

so you can execute on Google collab I

20:16:12

think it you will get quick response

20:16:16

there because again I need to cover that

20:16:19

uh langen part so it will take

20:16:39

time

20:17:43

okay done now let me quickly execute

20:17:45

because I already explained these are

20:17:46

the code how it is

20:18:09

working

20:19:17

okay now let's load the

20:19:39

model

20:19:57

okay now if you want to check the GPU

20:19:59

layers so you can check it out so I have

20:20:01

32 layers in my GPU and here is my

20:20:04

custom prom template and now let's uh

20:20:08

execute my llm and let's wait for the

20:20:38

response

20:21:19

okay done now this is the response I got

20:21:22

now if you want to see the actual

20:21:23

response so you need to uh call this one

20:21:27

like Choice then I want to take the

20:21:30

first uh list and this is the text okay

20:21:32

it will give you now see it is telling

20:21:34

uh I would be happy to help with that

20:21:36

however I want to make sure we have the

20:21:38

same understanding on the linear

20:21:39

regression

20:21:40

okay so basically if you're executing

20:21:42

for the first time so it will give you

20:21:43

this response okay now if you want to

20:21:45

get the actual response then again you

20:21:46

need to execute the same

20:22:08

code

20:23:09

so it's better better to use a 7 billion

20:23:11

version model because it will give you

20:23:13

quick response um than this 13 billion

20:23:28

one so guys are you able to execute the

20:23:31

code I shared with you this

20:23:38

notebook

20:23:43

okay done now this is the response and

20:23:46

this is my final response now see uh is

20:23:49

it correct code can anybody tell me uh I

20:23:52

told my model to generate linear

20:23:54

regression code for me now just see the

20:23:57

code and tell

20:24:04

me just give me quick response guys in

20:24:06

the

20:24:08

chat

20:24:14

yeah so for this we need to use some

20:24:16

smallest version of the model okay

20:24:17

because if you don't have good

20:24:19

configuration PC then this is the only

20:24:21

option

20:24:26

SAS all right now is it is it correct

20:24:29

code just give me a quick

20:24:38

response

20:24:40

okay great now see you can ask any kinds

20:24:43

of question okay like your chat GPT or

20:24:45

what you have done so far okay now see

20:24:48

without any cost we are able to also uh

20:24:51

use these kinds of large language model

20:24:53

okay yeah now you don't need to pay for

20:24:56

anything if you don't have money okay if

20:24:58

you don't want to buy open AI so it's

20:25:00

completely fine you have different

20:25:01

different uh large language model open

20:25:03

source large language model you can use

20:25:05

them for your development and tomorrow

20:25:07

I'll be discussing one particular

20:25:09

projects then it would be clear like how

20:25:10

we can Implement any kinds of projects

20:25:12

with respect to that okay yeah so this

20:25:15

is uh the implementation of Lama 2 uh

20:25:18

using the Lama CPP library now I'll show

20:25:21

you how we can do it with the help of

20:25:22

Lang chin because going forward all the

20:25:24

application will be uh like uh

20:25:26

developing with the help of Lin okay so

20:25:29

first of all let me uh stop that uh

20:25:33

instance I have

20:25:38

opened

20:25:45

okay

20:25:53

now all

20:26:00

right so can we try this free llm

20:26:03

instead open Ai and make a uh practice

20:26:06

with the Lang yes you can do it I will

20:26:07

show you how to use uh with the l

20:26:10

okay I'll show you everything would be

20:26:13

cleared so see the same thing you need

20:26:15

to do as of now you have done with the

20:26:17

open AI only you just need to import

20:26:19

this large language model open source

20:26:21

large language model okay then you need

20:26:22

to use that as llm that's it okay

20:26:29

yeah all right now this code is working

20:26:32

fine guys everyone are you able to get

20:26:34

the

20:26:36

response just uh give me a confirmation

20:26:38

then I think I should start with the

20:26:40

langen one if it is running fine for

20:26:54

you just give me a quick

20:27:08

response

20:27:14

okay now let's see the Lang chain one so

20:27:17

let me uh share you with this

20:27:21

code so here I'm going to use the actual

20:27:24

model OKAY actual model not the

20:27:25

quantized model and I'll be using 7

20:27:28

billion parameter model and let's see

20:27:30

how we can use it so this is the code

20:27:32

actually you can

20:27:38

refer

20:27:40

yeah so here actually GPU is required

20:27:42

okay GPU is

20:27:44

required now first of all let me connect

20:27:47

the

20:28:08

notbook

20:28:12

all right now if you want to check the

20:28:14

GPU you got or not so this is the

20:28:16

command so here again I got Tesla T4 GPU

20:28:19

then I need to install some of the

20:28:20

libraries here okay so first thing I

20:28:22

need something called Transformers okay

20:28:24

why I need to install Transformers

20:28:25

because uh this model is available on

20:28:28

the hugging face okay if you see here

20:28:30

and I'll be using hugging face pipeline

20:28:32

here to load the model that's why sorry

20:28:34

not this

20:28:36

one I think just just let me open this

20:28:42

one yeah so I have the model

20:28:45

here

20:28:47

H so see this is the model on hugging F

20:28:50

and I will be loading this model with

20:28:52

the help of hugging fist pipeline okay

20:28:54

so that's why this Transformer library

20:28:56

is required then these are the like

20:28:58

dependency you need with the this

20:29:00

Transformer then I I'm also installing

20:29:02

something called Lang chain okay then

20:29:04

bits and bu and accelerate you need you

20:29:06

don't you need to install for this

20:29:08

Transformer now let me install

20:29:29

them uh link I think I have already

20:29:31

given just just a

20:29:38

minute

20:29:51

uh link would be shared just a

20:29:59

minute okay then I need to loging with

20:30:02

my hugging face okay to loging with the

20:30:04

hugging face this is the command hugging

20:30:06

face uh CLI login okay you need to do it

20:30:09

it now let me execute now it will ask

20:30:11

for the uh token okay secret token yeah

20:30:16

so you can take time now how to generate

20:30:18

this secret token just go to your

20:30:20

hugging Fish account let me open my

20:30:22

hugging Fish

20:30:26

account hugging

20:30:28

face now here just click on the profile

20:30:31

and click on the settings okay and here

20:30:34

you will get something called access

20:30:35

tokens now click on the access tokens

20:30:37

now here I already have some of the

20:30:39

token so what I will do I will uh remove

20:30:41

one of the token from here so let me

20:30:43

delete

20:30:45

it okay now I'll generate a new tokens

20:30:48

so you can also generate a new tokens so

20:30:50

give the name I'll give

20:30:54

Lama and I will give only read access

20:30:57

because I I only want to read the model

20:30:59

okay not I I don't want to upload

20:31:01

anything that's why read is fine now

20:31:02

generate the tokens now this is my Lama

20:31:05

uh tokens now I'll copy it so you need

20:31:08

to generate your own token guys don't

20:31:10

use my token I'll remove it after

20:31:12

sometimes now here I can give the token

20:31:16

and press

20:31:19

enter now here just give yes and press

20:31:24

enter done login successful now first of

20:31:28

all I need to import something called

20:31:29

hugging face pipeline because I already

20:31:31

told you with the help of hugging F

20:31:33

pipeline I need to uh like uh load the

20:31:36

Llama 2 model okay now let me uh first

20:31:38

of all imported from the langen see len.

20:31:41

llms I'm importing hugging face pipeline

20:31:45

okay now if you're using openi model U I

20:31:48

think you remember you you used to

20:31:49

import something like that uh from

20:31:51

langen llm import openi yes or

20:31:56

no can you can you recall that concept

20:31:58

you learn in your openi so only

20:32:01

difference would be like

20:32:07

that

20:32:11

now I also uh need to import tokenizer

20:32:14

okay why I need to import tokenizer

20:32:19

because yeah so link just a

20:32:37

minute so link I will add in this

20:32:41

uh code share okay see this is the link

20:32:44

I have added at the last so you can copy

20:32:45

from

20:32:58

here now why tokenizer is required Auto

20:33:01

tokenizer so whenever you will be giving

20:33:03

uh the input to your llm so it would be

20:33:05

a raw text okay but um see Auto

20:33:09

tokenizer what it does actually it will

20:33:11

take the raw text and it will clean up

20:33:12

first of all it will do the

20:33:13

pre-processing some of the preprocessing

20:33:15

let's say if you if it is have some

20:33:16

kinds of HTML tags and all it will

20:33:18

remove then it will convert that uh uh

20:33:21

like text to numbers okay automatically

20:33:23

it would be converted using this Auto

20:33:25

tokenizer okay Auto tokenizer class so I

20:33:27

I need to import that I also need to

20:33:29

import something called Transformers and

20:33:31

torch and I will also import this

20:33:35

warnings done now first of all I need to

20:33:39

load the model okay I need to load the

20:33:40

model now see guys here one thing you

20:33:43

need to remember so I'm using this

20:33:45

particular model let me show you so if I

20:33:47

open this model on the hugging

20:33:49

face so this is the model I'm using and

20:33:52

this model is from meta Lama if you see

20:33:55

here I'm not using any quantized model

20:33:56

this is the actual model and see I

20:33:58

already have the permission here okay I

20:34:00

already have the permission you have

20:34:02

been granted access to this model but

20:34:04

for you this this will come like that

20:34:06

let me show you so if I open my en Cito

20:34:09

window and if I go to this link uh you

20:34:13

will see this window guys can you can

20:34:15

you see that can you check from your

20:34:17

computer whether you are getting this

20:34:18

one or not access Lama to on hugging P

20:34:20

then you need to submit some form here

20:34:22

you need to sign

20:34:24

up just give me a quick

20:34:37

response

20:34:39

uh can you see this window

20:35:04

guys okay so if you're getting this

20:35:06

windows so what you need to do you need

20:35:07

to log in okay you need to log login and

20:35:09

submit that information I already told

20:35:11

you so if you visit that one meta Lama 2

20:35:17

Meta Meta Lama

20:35:21

2 sorry it would be llama 2 now here you

20:35:25

will get this this window okay here you

20:35:28

need to submit your information and

20:35:30

maybe if you have submitted for the

20:35:32

first time uh initially I showed you

20:35:34

then it's completely fine and make sure

20:35:35

the email address you are giving the

20:35:37

same email address you are using for the

20:35:38

hugging face okay now see I already have

20:35:40

the access uh to this model to The Meta

20:35:44

this organization that's why I can

20:35:46

access these are the model now see after

20:35:48

some times let's say 40 to 50 minutes

20:35:52

you will get one notification okay in

20:35:54

your email so it will be looking like

20:35:56

that let's say your name this let you

20:35:59

know that your request uh access to this

20:36:01

model has been accepted by the repo

20:36:03

author okay so once you got this mail

20:36:05

that means you would be able to access

20:36:07

this model okay then you will able to to

20:36:08

see you have the uh you you have been

20:36:11

granted to the access to the model okay

20:36:13

you will get this notification then you

20:36:15

will be able to use the official version

20:36:17

of the model and if you're are not

20:36:19

getting the access as of now so what you

20:36:21

can do you can activate this line of

20:36:23

code and you can comment this line of

20:36:24

code okay see this is another uh

20:36:28

organization that means another guy he

20:36:30

has cloned this meta model okay that

20:36:32

means this model and he has already

20:36:34

published this model from his

20:36:36

organization that means from his

20:36:37

Repository and this is completely public

20:36:40

okay you can easily download the model

20:36:41

no need any permission okay so this is

20:36:44

the alternative way to use the

20:36:46

model okay so I already have the

20:36:49

permission so I will use the official

20:36:51

model I will just comment this line but

20:36:53

if you don't have the access you can

20:36:55

uncomment this line and comment this

20:36:56

line it's up to you now let me

20:37:02

execute now first of all I need to load

20:37:04

my tokenizer okay uh so tokenizer will

20:37:07

use the same name to load the token

20:37:08

tokenizer okay now let me load the

20:37:13

tokenizer loaded now here I need to

20:37:16

create the pipeline hugging face

20:37:18

pipeline so what is the hugging face

20:37:20

pipeline see um how this hugging face

20:37:23

pipeline will work so let's

20:37:24

say uh this is your

20:37:28

model or let's say this is your pipeline

20:37:31

this is your pipeline object you have

20:37:35

created and this is the input you are

20:37:37

giving input

20:37:41

text input text okay so it will give you

20:37:44

the

20:37:47

response so in pipeline what will happen

20:37:50

so first of all it will uh apply some

20:37:53

pre-processing apply

20:37:58

pre-processing pre-processing okay with

20:38:01

the help of uh Auto

20:38:06

tokenizer auto toen

20:38:09

ner okay then second what it will do it

20:38:13

will uh convert that number okay that

20:38:16

means a text would be converted to

20:38:19

numbers that means Vector okay then this

20:38:22

Vector would be passed to my

20:38:25

model okay then prediction would be

20:38:30

happened then fourth it will give you

20:38:32

the

20:38:34

response okay so this is the pipeline

20:38:36

task actually so this is the pipeline

20:38:38

they have created so you don't need to

20:38:40

take care these are the task

20:38:42

automatically it would be done okay you

20:38:43

just need to create this pipeline

20:38:45

objects now here I already imported

20:38:47

Transformers you remember and here I'm

20:38:49

just calling the pipeline and here you

20:38:51

need to give the name so here I'm

20:38:53

performing Tech generation okay that's

20:38:55

why I'm giving Tech generation because

20:38:56

if you see the model it's a TCH

20:38:58

generation model okay although it's a

20:39:00

chat model but it's a tech generation

20:39:02

model let me show you the model card if

20:39:04

you see it's a TCH generation model okay

20:39:06

this is the key you need to give so here

20:39:08

here I already given the name Tech

20:39:09

generation now here I given the model so

20:39:12

this is the model I given and I also

20:39:14

given the tokenizer I downloaded now

20:39:16

these are the default parameter you need

20:39:18

to give okay no need to change anything

20:39:19

the default parameter you need to give

20:39:21

now let me load my pipeline now see if

20:39:24

this model is not available first of all

20:39:25

it will download the model from the

20:39:27

hugging P so it's downloading the

20:39:37

model

20:40:03

anyone doing with me

20:40:07

guys

20:40:10

so which one you are using the official

20:40:12

one or this alternative

20:40:33

one alternative one okay

20:40:37

great

20:40:40

so you can wait after applying this uh

20:40:42

uh like you can say access permission

20:40:44

you can wait for uh like 40 to 50

20:40:46

minutes or let's say 1 hour you will get

20:40:49

the email definitely you will get the

20:40:51

email then you can use the official

20:40:59

one because in the hugging pH what

20:41:01

happens actually um some of the

20:41:04

organization uh will have their private

20:41:06

repository okay and if you want to

20:41:07

access the private repository you need

20:41:10

the access from the author okay

20:41:11

otherwise you can't use their model and

20:41:13

all okay they will be uploading that's

20:41:16

why we need to apply for the permission

20:41:17

but most of the repository you will see

20:41:19

it's public okay you don't need any

20:41:21

permission but this is the meta

20:41:23

organization that's why maybe they have

20:41:24

uh given you that one maybe they want to

20:41:28

uh take your information okay because

20:41:30

whenever you are submitting the this

20:41:32

request form uh they are having your

20:41:34

name email address which organization

20:41:36

you are working on so that they they

20:41:37

will send you some mail regarding their

20:41:40

product okay maybe this is the things

20:41:42

they have

20:41:55

developed see model has been downloaded

20:41:58

now see guys this is the magic Now using

20:42:00

hugging face pipeline you can easily

20:42:03

create your llm see now as a pipeline I

20:42:06

need to give this pipeline objects okay

20:42:08

and this pipeline object is nothing but

20:42:09

my entire uh Auto tokenizer and my model

20:42:12

okay everything it is there now model uh

20:42:15

you need to give some argument so what

20:42:17

is the argument argument means the

20:42:18

temperature okay the temperature value

20:42:20

so we always give the temperature value

20:42:22

because I want uh my model like how it

20:42:24

will give me the response and all so as

20:42:26

of now I just set this temperature as

20:42:28

zero because I am telling to my model

20:42:30

don't give any random output just stick

20:42:32

to the response you are giving okay now

20:42:35

see guys this is the llm I have

20:42:36

developed now see those who have used

20:42:38

open a maybe you just used open a here

20:42:40

okay instead of llm like that maybe used

20:42:43

like that so

20:42:45

llm equal to open

20:42:49

AI okay and here you you used model name

20:42:52

let's say

20:42:54

GPT uh GPT

20:42:58

3.

20:43:00

3.5

20:43:02

turbo yes or

20:43:06

no

20:43:08

please tell me got the difference uh how

20:43:12

to use open open Ai and how to use open

20:43:15

source

20:43:18

one please give me give me a

20:43:21

confirmation in the

20:43:35

chat guys I can't see any response so

20:43:37

please response

20:43:49

me okay now let me uh remove this line

20:43:54

and let me open uh load my

20:43:56

llm

20:43:58

okay okay now uh what I need to do I

20:44:02

need to uh give my prompt okay so first

20:44:04

of all I will be giving the prompt like

20:44:06

that okay in just one shot so here I'm

20:44:08

giving one prompt so what would be the

20:44:10

good name for a company that makes

20:44:12

colorful socks okay so this is the

20:44:13

prompt I have given to my llm now let's

20:44:16

see what is the response it will

20:44:21

generate see 7me model is also very good

20:44:24

model me I personally use this model a

20:44:26

lot so you will see it will give you

20:44:29

like very good

20:44:30

answer and it's not a quantized model

20:44:33

okay we are using the actual

20:44:36

model

20:44:48

see this is the response okay now it has

20:44:50

given me uh some company name a good

20:44:53

name for the company that makes colorful

20:44:55

socks could be something playful and

20:44:57

crashy uh now see this is the company uh

20:45:01

uh sock

20:45:02

tastic and then toys on fire color of

20:45:06

fista then soulmates uh stre socks Hue

20:45:11

and cry uh socktopia and souls uh

20:45:17

session okay so these are the company

20:45:19

you can use uh let's say if you are like

20:45:22

stablishing any company so you can use

20:45:24

this name this is a unique name

20:45:27

actually now let's uh give another P so

20:45:30

here I have given another P here I'm

20:45:32

telling I want to open a restaurant for

20:45:34

Indian food suggest me uh some fence

20:45:37

name for this okay now let's see what is

20:45:39

the name it will give

20:46:06

me

20:46:09

okay see uh it has given me so many name

20:46:12

so tanduri kns spice route Mumbai street

20:46:16

food uh then uh Rajasthani Royal then uh

20:46:21

Tikka tandur Nan shop Biryani bazer

20:46:24

Masala am menion and

20:46:27

dosen it's taking more time to give the

20:46:30

response yeah definitely it will give

20:46:32

some time because we are using the

20:46:33

actual model not a quantised model okay

20:46:36

now isn't it good response guys what you

20:46:37

feel

20:46:45

like tell me isn't it good

20:47:06

response

20:47:10

okay now you can also uh create your

20:47:12

prompt templates okay now here I have

20:47:14

given the prompt directly now you can

20:47:16

also create your own prom templates okay

20:47:17

it is also possible so to create the

20:47:19

prom templates you need to import the

20:47:21

prom template from langen and langen I

20:47:23

think it is already discussed like what

20:47:25

is prompt templates what is prompt okay

20:47:27

uh everything actually uh uh we we have

20:47:30

already seen in the langin so that is

20:47:32

what actually I'm using we are not

20:47:34

playing right so we have to

20:47:39

compromise yeah now let's uh import this

20:47:43

prom template and this llm chain okay

20:47:46

why I need llm chain because if you want

20:47:48

to add your custom prom templates you

20:47:50

need this llm chain okay with the help

20:47:51

of llm chain you will combine your llm

20:47:54

and your prom template together okay

20:47:55

then you can execute now see the first

20:47:58

prom template I have developed this is

20:47:59

the first prom template and this is the

20:48:01

prom template and input variable is kins

20:48:04

okay now instead of giving the template

20:48:06

okay in one chance I'm just I will give

20:48:08

the name I'll give the cuine name and it

20:48:11

will automatically take take the prom

20:48:12

template from from here okay now see how

20:48:15

it will work now if I execute it now see

20:48:17

if I do format operation and give the

20:48:19

kuin equal to Indian now see this is the

20:48:22

prompt it will give me okay I want to

20:48:24

open a Resturant for the Indian food see

20:48:26

automatically it has taken the input

20:48:28

okay now this is another prompt I have

20:48:31

developed uh provide me a concise

20:48:34

summary for the book name okay now book

20:48:37

name us will give that okay instead of

20:48:39

giving the whole template user will only

20:48:40

give the Boog name and it will take the

20:48:42

entire prompt now see this is the entire

20:48:45

prompt it will make like

20:48:46

that okay provide me a uh concise

20:48:49

summary of the book of Alchemist see

20:48:52

user is giving Alchemist and Alchemist

20:48:53

will come here now I will execute my

20:48:56

final Chen now see I'm calling my llm

20:49:00

Chen and here llm is equal to G I'm

20:49:01

giving my llm which I already created

20:49:04

here this is my llm I think you remember

20:49:07

and as well as I'm also giving my prompt

20:49:09

template see prompt is equal to my

20:49:10

prompt template so let's take the first

20:49:12

prompt template first of all so I'll

20:49:14

take this prompt

20:49:18

template okay and baros is equal to true

20:49:21

that means if you want to see the output

20:49:23

as well like what is happening so you

20:49:25

can give it as true otherwise you can

20:49:26

keep it as false now let's give the uh

20:49:29

prompt here so this is prompt template

20:49:31

one means I want for the uh food purpose

20:49:35

okay that means cuisin so let me give

20:49:36

the cuisin name so I'll

20:49:41

Indian now let's

20:49:48

execute fcy Resturant thank you for

20:49:51

Advance help best

20:49:52

regard okay let me

20:50:06

again

20:50:23

now see first of all it will uh like

20:50:25

make the prompt now see it will give

20:50:27

give give you the response now see the

20:50:30

response you got now let's say I want to

20:50:31

use the prom template to so I'll copy

20:50:34

the name and here I will give it and

20:50:36

this is for the summarized book okay now

20:50:38

here you can give any kinds of book

20:50:40

let's give Harry

20:51:06

Potter

20:51:42

okay done now here is the uh Harry

20:51:46

Potter uh you can see this is the

20:51:48

summary okay like what is the Harry

20:51:50

Potter book and all about so it will

20:51:51

give you the entire summary okay so

20:51:54

that's how actually you can use this

20:51:55

open source large language model okay

20:51:58

now you can try with different different

20:51:59

variant so if you if you can visit here

20:52:02

let me

20:52:04

visit maybe this is the page

20:52:09

see you have still lots of model you can

20:52:11

explore okay uh side by

20:52:15

side now I believe guys you are able to

20:52:18

understand like how to use open source

20:52:21

large language model yes or no so

20:52:23

tomorrow we are uh going to implement

20:52:25

one particular projects called medical

20:52:27

chatbot then I will show you how we can

20:52:30

uh execute on the CPU machine as

20:52:36

well

20:52:38

so guys everything is clear give me a

20:52:40

confirmation because we are done with

20:52:42

the

20:52:52

session and one particular things

20:52:54

actually uh you need to download for

20:52:56

tomorrow so let me show

20:53:01

you

20:53:02

because we need this thing

20:53:06

actually

20:53:09

so this is the model actually I'm going

20:53:10

to use tomorrow for the medical chatbot

20:53:15

implementation so this model just try to

20:53:17

download and keep it with you so I'll be

20:53:19

using Lamas to 7B chat model gml again I

20:53:23

will be using quanti model and from

20:53:28

here and see this is the model you need

20:53:31

to download so let me give you the link

20:53:33

so copy link address so everyone you

20:53:35

need to download this model and keep it

20:53:37

with you okay so tomorrow this model is

20:53:40

required I have shared the link so maybe

20:53:43

you can get the link from here and you

20:53:45

can download the model and it's around

20:53:47

uh 3.79 GB you need to download this

20:53:50

model no tomorrow is not a last uh class

20:53:53

okay still some of the session would be

20:53:55

there so link is there in the chat guys

20:53:57

so you need to download this model and

20:53:59

keep it with you okay because this uh

20:54:02

download will take time so just try to

20:54:04

download this model and keep it with you

20:54:12

so uh how how was the session guys are

20:54:15

you able to understand

20:54:16

everything about this open source large

20:54:18

language model and

20:54:20

all and I already shared all the code

20:54:23

and everything so you can execute from

20:54:24

your

20:54:28

site if yes then let's uh I think end

20:54:31

the session I have done with the

20:54:34

discussion okay uh so let's start with

20:54:37

our session guys uh so today actually I

20:54:39

was uh telling I will be showing you one

20:54:41

project implementation so the project

20:54:43

name is n2n medical chatbot

20:54:46

yes and here I will try to integrate all

20:54:49

of the like technology you have learned

20:54:51

so far let's say Lang chain uh Vector

20:54:53

database okay then I will also use like

20:54:55

lama lama 2 model yesterday I think I

20:54:58

was discussing Lama 2 how we can execute

20:55:00

and all okay so we'll be combining this

20:55:02

thing uh together and we'll be

20:55:04

implementing this amazing projects so

20:55:06

mostly uh today actually I will show you

20:55:08

the notebook experiment okay and

20:55:10

tomorrow I will show you uh the web app

20:55:13

implementation at the modular coding

20:55:14

implementation okay so today I'll be

20:55:16

discussing the architecture overview and

20:55:18

all and I will show you the notebook

20:55:20

experiment like how we can develop this

20:55:22

thing uh in our jupyter notebook because

20:55:24

I know like most of you are like already

20:55:27

familiar with jupyter notebook

20:55:28

implementation I'll uh try to show you

20:55:31

after implementing the projects on the

20:55:33

jupyter notebook how we can convert to

20:55:35

our modular coding okay so that should

20:55:37

be our main

20:55:40

objective so are you ready guys if you

20:55:43

are ready just uh give me a quick yes in

20:55:45

the chat so that I can start with the

20:55:52

session okay thank you thank you

20:55:59

everyone all

20:56:05

right

20:56:11

uh so first of all uh let me uh tell you

20:56:14

the technology and the architecture

20:56:16

actually I'm going to uh use in this

20:56:18

projects uh then the implementation

20:56:20

would be clear in your mind uh because

20:56:23

uh I always like to discuss the

20:56:26

architecture at the very first before

20:56:27

implementing any kinds of projects okay

20:56:29

so it makes me like uh to discuss the

20:56:32

projects in a very easy way okay so

20:56:34

let's do the architecture discussion at

20:56:36

the very first

20:56:39

all

20:56:40

right um guys my screen is visible uh

20:56:44

can you see that Blackboard and all you

20:56:47

can let me know or should I zoom a

20:56:49

little

20:56:58

bit okay

20:57:01

great all right now uh let's discuss

20:57:04

with the architecture uh

20:57:07

overview so the projects actually I'm

20:57:10

going to implement called uh

20:57:17

medical

20:57:22

chatbot okay so here what is our idea so

20:57:26

the first thing actually see uh the uh

20:57:28

chatbot actually I'm going to implement

20:57:30

so this would be only uh let's say

20:57:32

depends upon our custom data okay the

20:57:34

data actually I will show to my bot it

20:57:36

will only give me the response uh with

20:57:38

respect to that okay you can also like U

20:57:41

integrate like U um all over the

20:57:43

internet data it is also possible but uh

20:57:47

first of all I want to show you let's

20:57:48

say if you have some specific data if

20:57:50

you have some specific let's say domain

20:57:52

like that data how to connect okay with

20:57:54

your Bot because we have seen like the

20:57:56

chatbot implementation U like with the

20:57:59

all over the data available in the

20:58:01

Internet it's completely fine but we

20:58:03

haven't seen like how to use our custom

20:58:05

data okay so that is the main thing here

20:58:07

so that's why uh so the first thing what

20:58:09

I need to do in the data injetion part

20:58:12

uh I'll be using my own component here

20:58:14

okay so there actually I'm going to

20:58:15

write one component called Data inje or

20:58:18

you can talk about data integration so

20:58:20

here you can use any kinds of data so

20:58:22

here in this case I'm going to use

20:58:24

something called PDF file okay PDF

20:58:27

file PDF files so in this case actually

20:58:31

what kinds of PDF PDF file actually I'll

20:58:33

be using so I'll be using something

20:58:34

called Medical

20:58:38

medical

20:58:41

book medical

20:58:43

books okay so let me just show you the

20:58:46

PDF actually I'm going to use here uh I

20:58:50

will also give the PDF um no need to

20:58:53

worries about so see guys this is the

20:58:55

book actually I'm going to use so the

20:58:57

book name is the G enyclopedia of

20:59:01

medicine okay so this is one of the

20:59:03

Great Book actually I found in the

20:59:04

internet it has actually

20:59:07

637 pages and this book has been

20:59:10

discussed all the disease with respect

20:59:12

to the medicine as well okay if you go

20:59:14

through this book so I was just going

20:59:15

through the book and I was just checking

20:59:17

what are the contents actually they have

20:59:18

given see all kinds of disease actually

20:59:21

they have mentioned with respect to the

20:59:22

disease actually they have also given

20:59:24

the medicine okay you need to use so

20:59:26

this kinds of data actually I will give

20:59:28

to my llm and I will teach my llm like

20:59:31

uh this is my data okay and these are

20:59:33

the disease with respect to that these

20:59:34

are actually my let's say medicine okay

20:59:37

so if user is asking any kinds of

20:59:38

question with respect to that you should

20:59:40

give the response okay so this is the

20:59:42

data guys so I'll will share this PDF

20:59:45

with you so you can open it up and you

20:59:47

can go through okay you can go through

20:59:49

like what are the disase actually it has

20:59:50

discussed what are the medicine it has

20:59:51

discussed uh okay everything uh you will

20:59:54

get from

20:59:55

here all right so this is going to be my

20:59:58

data source here okay so the first

21:00:00

component actually I'm going to

21:00:01

implement which is nothing but my data

21:00:04

integration all right so after after

21:00:07

like uh data integration what I need to

21:00:09

do because it's a PDF file okay it's a

21:00:11

PDF file I just need to extract those

21:00:13

data okay if I'm not extracting the data

21:00:15

then how we will give to my model right

21:00:17

so that is why the second thing what I

21:00:19

need to do I need to extract the data so

21:00:22

here I'm going to write another

21:00:25

component and I will just name it as

21:00:31

extract extract uh

21:00:34

data or you can also tell

21:00:38

content okay content so this is going to

21:00:41

be my second component now after

21:00:43

extracting the data what I need to do

21:00:45

okay I need to create a chunks okay so

21:00:47

let me just draw it here so what I will

21:00:50

do

21:00:50

here I will create different different

21:00:53

chunks okay why this chunks is important

21:00:55

I will tell

21:00:58

you yeah so here I'm going to

21:01:02

create text

21:01:05

chunks

21:01:07

text chunks okay so let me just copy

21:01:11

this

21:01:30

component okay so this is my Tex chunks

21:01:33

okay now let me uh discuss what is this

21:01:35

test CHS okay why I exactly need that so

21:01:38

for this what I can do uh let's uh copy

21:01:41

some of the content from this book so

21:01:43

let's copy from

21:01:44

here um let's say I will copy this

21:01:47

content from

21:01:48

here I'll copy let's copy this

21:01:53

part I'll copy now I'll just paste this

21:01:57

content

21:01:59

here okay so let's say this is my

21:02:05

data

21:02:10

so let's say this is my data so let's

21:02:12

say this is my entire book data I

21:02:15

collected okay I extracted from my PDF

21:02:17

book so this is my uh Corpus okay you

21:02:20

can call it this is a

21:02:22

corpus Corpus Corpus Corpus means your

21:02:25

entire data okay you have currently but

21:02:28

why we are creating the chunks okay so

21:02:30

to understand this one first of all I

21:02:32

will show you so if you search open a

21:02:34

models okay let's give you the like demo

21:02:38

with the open a only so I'll just search

21:02:39

open AI

21:02:42

model okay if I search it now we will

21:02:45

get one page

21:02:47

here now let me Zoom a little bit yeah

21:02:50

now let's say these are uh these are the

21:02:52

model are available okay here these are

21:02:54

the model are available now let's say

21:02:55

you want to use this GPT 3.5 okay if I

21:02:58

click on this model now here you will

21:03:00

see something called this model and this

21:03:02

model description and the context window

21:03:05

okay what is this context window cont

21:03:07

context window is nothing but it's just

21:03:09

a input token size okay so like how many

21:03:12

tokens this model can accept Okay at a

21:03:13

time as a input so this is the input

21:03:16

token now let's say if you're using GPT

21:03:18

3.5 turbo okay so this is the tokens

21:03:20

okay this is the tokens like

21:03:22

4,096 tokens it can take as a input okay

21:03:26

now here in this case I I'm using

21:03:28

something called Lama 2 model OKAY the

21:03:31

model actually I'm going to use called

21:03:32

Lama 2

21:03:33

model llama 2 model and uh this model

21:03:38

actually uh has the Contex size that

21:03:40

means the input tokens uh is nothing but

21:03:44

496 okay token

21:03:46

limit token limit okay but if you see in

21:03:51

this entire PDF okay if I extract the

21:03:53

data okay if I'm extracting the data

21:03:55

from this entire PDF I have around 637

21:03:59

Pages now just think about will it be

21:04:01

like more than uh this token guys 4,096

21:04:05

token yes or no just tell me in the chat

21:04:08

what do you feel

21:04:09

like token means it's just a particular

21:04:12

word you can talk

21:04:16

about if you combine three character

21:04:19

together you can call as one

21:04:23

token uh making sense guys like if I am

21:04:26

extracting the data from my entire PDF

21:04:28

so it would be more than 4,096 token yes

21:04:31

or

21:04:35

no

21:04:38

yeah so maybe you are getting okay so

21:04:40

that is why actually what I need to do

21:04:42

okay because see my input length is that

21:04:45

means input limit is 496 token but

21:04:48

whenever I'm extracting the data it

21:04:50

might be more than it might be more than

21:04:52

4,096 tokens okay it might be more than

21:04:56

4,096 tokens so that is why what I need

21:04:59

to do I need to just create a chunks

21:05:02

okay instead of giving all the Corpus

21:05:03

together to my model I'll be create a

21:05:05

different different chunks

21:05:06

what is the chunks guys chunks means

21:05:08

like you will be taking some particular

21:05:10

paragraph let's say I'll start from here

21:05:13

okay now let's say I will assign this

21:05:15

Chang

21:05:17

size Chang

21:05:19

size is equal to let's say I will assign

21:05:21

as 200 so what it will do it will count

21:05:24

200 word okay let's say this is the 200

21:05:26

word I have here so it would be one CH

21:05:29

okay this is my first chunks now again

21:05:32

uh it will start from here again it will

21:05:35

count 200 wordss and it will start uh

21:05:37

like end here okay so this would be my

21:05:39

second chance so that's how like all the

21:05:42

data you have okay in this PDF it will

21:05:44

be creating a different different chunks

21:05:46

okay and now if you see one particular

21:05:48

chunks have the token size of 200 okay

21:05:51

now there won't be any input problem to

21:05:53

my model okay so this is the idea of

21:05:55

this creation of the chunks I think this

21:05:57

part is clear why this chunks is

21:06:02

important okay yes

21:06:06

so there is another concept called

21:06:08

chunks overlap okay I discuss whenever I

21:06:10

will be assigning the chunks overlap I

21:06:12

will discuss what is Chunks overlap s

21:06:15

overlap is nothing but so whenever you

21:06:17

will Design This chunks overlap par

21:06:19

parag uh this parameter Chun

21:06:23

overlap overlap let's say I will assign

21:06:25

as 20 so what it will do whenever it

21:06:28

will create the second chunks okay it

21:06:30

will just go back to your first chunks

21:06:32

and it will count 20 words again so

21:06:35

let's say here is my 20 words okay so

21:06:37

from here actually it will start the

21:06:39

second chunks and it will end here okay

21:06:41

it will end here okay so basically what

21:06:44

is happening if you see here some extra

21:06:46

word is also coming from my previous

21:06:48

chunks as well okay so with that

21:06:50

actually my model is getting the context

21:06:52

that means after this chunks actually

21:06:54

this chunks is starting okay got it so

21:06:56

this is the idea of this chunks overlap

21:06:58

so that's how actually we'll be

21:07:00

generating our embedding Vector

21:07:01

embedding then we'll be storing them to

21:07:03

the vector DB got it

21:07:07

yeah now let's go to our architecture

21:07:10

and see our uh like uh fourth component

21:07:14

what I will be

21:07:16

do now fourth component wise I'll be

21:07:19

creating something called embeddings

21:07:20

okay so here after creating the chunks

21:07:22

each of the chunks I need to convert as

21:07:24

a number okay so we call it as embedding

21:07:27

so just let me draw

21:07:30

it this is my

21:07:34

embedding now I'll just copy this

21:07:46

component uh thanks Forman for your

21:07:49

contribution thank

21:08:01

you so this is my embedding so embedding

21:08:04

is nothing but it's a a vector okay so

21:08:07

it's a vector so let's say it can be any

21:08:09

kinds of vector I'll just take some

21:08:10

dummy Vector here so let's say this is

21:08:12

my

21:08:15

Vector okay so we call it as

21:08:20

embedding this is my

21:08:22

embedding okay now what I need to do see

21:08:26

I have uh extracted my data as well as I

21:08:30

have also created my chunks and I have

21:08:32

also converted that chunks to my

21:08:34

embedding that means vector now what I

21:08:36

need to do I will be creating one

21:08:37

semantic index okay what is semantic

21:08:39

index semantic index is nothing but uh

21:08:41

see it's a vector database concept I

21:08:44

think whenever you learn the vector

21:08:45

database so in Vector database we have

21:08:47

two kinds of thing okay one is like my

21:08:50

knowledge base and other is like like

21:08:52

semantic index okay with the help of the

21:08:54

semantic index actually it will build a

21:08:55

cluster I think you remember so it will

21:08:58

build a different different cluster so

21:08:59

let's say king and queen would be

21:09:01

appearing in the same cluster then man

21:09:03

and woman will be appearing in the same

21:09:05

cluster then Mony will appearing in the

21:09:07

different cluster okay so with the help

21:09:09

of the centic index that can be possible

21:09:11

okay it will calculate the distance

21:09:13

between all the vector and will create

21:09:15

some like let's say like cluster here

21:09:19

okay so this is the idea of this centic

21:09:21

index so just let me draw it here so

21:09:24

after creating my embedding so what I

21:09:25

will do with the help of this Vector DB

21:09:28

I'll be creating one I'll just build one

21:09:32

centic

21:09:34

index uh

21:09:38

semantic index so I'll combine all the

21:09:42

vector

21:09:46

together okay and I will be building

21:09:48

this centic

21:09:50

index extra words are coming on previous

21:09:53

chunks to make relationship the vector

21:09:57

uh yeah so whenever I'm talking about

21:09:59

this chunks overlap that means I'm

21:10:01

taking some previous words as well okay

21:10:03

in my second chance that means uh my

21:10:05

model will able to understand after this

21:10:07

chunks actually this second chance

21:10:09

chunks is starting okay so because of

21:10:11

this overlap overlap

21:10:14

condition got

21:10:16

it yeah now I have built my semantic

21:10:19

index now what I need to do guys I need

21:10:20

to build my knowledge base okay

21:10:22

knowledge means I I just need to store

21:10:24

these are the vector to my knowledge

21:10:26

base so just let me create the component

21:10:30

here so I'll be creating one knowledge

21:10:34

base

21:10:36

knowledge base okay so here knowledge

21:10:38

base wise I'll be using something

21:10:40

called pine

21:10:45

cone Pine con um Vector

21:10:51

restore uh so guys I think you are

21:10:54

already familiar with pine cone I think

21:10:56

this has been covered already how to

21:10:58

work with pine cone and all how we can

21:10:59

store the vectors in my Pine con

21:11:01

database yes or

21:11:04

no

21:11:11

okay okay great now I'll be building my

21:11:15

knowledge

21:11:18

base all

21:11:20

right now see this is the part actually

21:11:24

my first part okay this is my first

21:11:26

component this is my let's say uh this

21:11:29

is my backend component you can talk

21:11:31

about now I also need to build my front

21:11:33

end component so this thing is my back

21:11:35

end compon component the entire

21:11:37

thing you can talk about this is my back

21:11:39

end

21:11:44

component this is my back end component

21:11:46

okay now see what now user will do user

21:11:50

will raise some query okay with respect

21:11:52

to that I also need to provide the

21:11:54

answer to the

21:11:56

user uh I'll be using pine cone here

21:11:58

okay you can also integrate chrb why

21:12:01

I'll be using pine con because Pine con

21:12:02

is the remote database okay it is

21:12:04

already hosted in the website so I can

21:12:06

store my Vector there but chroma DV is

21:12:08

the local Vector DV okay so that is why

21:12:11

actually I W be using chroma DV but you

21:12:12

can also integrate chroma DB the same

21:12:14

thing you can do

21:12:16

it all right yeah now let's work with

21:12:20

the user part now let's say this is my

21:12:23

user let's say this is my

21:12:30

user this is my

21:12:32

user okay so I can assign this this is

21:12:35

my user so user what uh actually he will

21:12:39

do he will raise some query okay so

21:12:41

let's say this is the question so here

21:12:43

is the

21:12:47

question is the question user will ask

21:12:50

now first of all what I need to do I

21:12:52

need to convert this question to the

21:12:54

query embedding so here is the component

21:12:57

I can call it as

21:13:02

query embedding okay so this is the

21:13:04

query embedding now this qu query

21:13:06

embedding I just need to send to my

21:13:08

knowledge base okay so here I can

21:13:10

integrate like that so I will send this

21:13:13

query embedding to my knowledge

21:13:16

[Music]

21:13:19

base uh thanks uh bright bright side I

21:13:23

think what's your name I don't know but

21:13:25

thanks for the contribution

21:13:28

yeah thank

21:13:32

you okay now this uh question I will

21:13:36

send to my knowledge base okay because

21:13:38

knowledge base has all of the vector

21:13:40

okay all of the data now now what uh

21:13:44

okay Karan thank you Karan okay for your

21:13:47

contribution thank you it really

21:13:49

motivates a lot thank

21:13:52

you all

21:13:55

right all right great now see this query

21:13:59

uh actually I will send to my knowledge

21:14:00

base okay now what this knowledge base

21:14:02

will do actually it will give you some

21:14:05

rank result okay what it will give you

21:14:07

it will give you some rank result just

21:14:10

let me draw this

21:14:15

component this will give

21:14:19

you rank

21:14:27

result that means it will give you some

21:14:29

closest Vector with respect to the query

21:14:31

you have asked okay now what I need to

21:14:33

do okay I will be intrig my large

21:14:36

language model OKAY in this case I'll be

21:14:37

using something called Lama

21:14:42

2 Lama 2 okay so this is my large

21:14:45

language model so with the help of this

21:14:47

large language model I'll just filter

21:14:49

out my exact answer I'm looking for from

21:14:51

this rank result okay so this llm will

21:14:54

give me the response so this response I

21:14:56

will send to the

21:14:59

user okay I'll send to the

21:15:04

user

21:15:06

all right so this is the complete

21:15:08

architecture of our medical chatboard so

21:15:10

the first thing what I doing first of

21:15:12

all I am integrating my data component

21:15:14

which is nothing but PDF file in this

21:15:16

case okay I'll be using PDF book now the

21:15:19

second thing I need to extract the data

21:15:21

or content from the PDF book then I need

21:15:23

to create a chunks okay I need to create

21:15:25

different different chunks because it

21:15:27

might be more than my input tokens okay

21:15:30

to my model so that's why this chunks

21:15:32

creation is very much important so after

21:15:34

creation of the chunks I'll be

21:15:36

generating the embeddings okay

21:15:37

embeddings means the vector okay that

21:15:39

Vector I'll be combined together and I

21:15:41

will be build one semantic index okay in

21:15:43

the vector DB then it will be creating

21:15:46

one uh like system called knowledge base

21:15:48

okay this is nothing but our Pine con

21:15:49

Vector history you can talk about now

21:15:51

I'll be go going to the front end part

21:15:54

so here actually user will give some

21:15:55

question okay that question first of all

21:15:57

I need to like convert to the query

21:15:59

embedding that query embedding I will be

21:16:01

sending to the knowledge base knowledge

21:16:03

base will give me some rank result that

21:16:05

rank results I'll be sending to my Lama

21:16:07

2 model my Lama 2 model will understand

21:16:09

the question okay understand the like

21:16:11

question so here I can I think draw one

21:16:14

more line so whatever question user is

21:16:16

asking first of all it will understand

21:16:18

the query as well as the answer okay

21:16:21

answer from your database that's that

21:16:22

means the knowledge base so both it will

21:16:25

do the processing and after that it will

21:16:27

give you the correct response okay it

21:16:28

will give you the uh

21:16:31

actual actual response

21:16:36

actual response okay so this is the

21:16:37

complete

21:16:38

idea so guys uh you can let me know

21:16:41

whether this architecture part is clear

21:16:43

or not everyone just give me a quick

21:16:45

response in the chat so that I can go

21:16:50

proceed how this entire architecture is

21:16:52

working how we have we have created

21:16:55

different different component right so

21:16:57

now this this thing would be very much

21:16:59

easy for us to implement the code right

21:17:01

now because see what we usually do okay

21:17:03

initially whenever I was in learning

21:17:05

phase I also did the same thing let's

21:17:08

say whenever I I got one projects I

21:17:10

directly jump into the coding part okay

21:17:12

instead of understanding the project

21:17:13

architecture and all okay so it it was

21:17:16

like very difficult me to complete the

21:17:18

code because I don't know like after

21:17:19

creating the data in where I need to go

21:17:22

okay so that's why uh what I started

21:17:25

actually I started creating these kinds

21:17:26

of architecture so that see I have my

21:17:29

architecture right now let's say I have

21:17:30

completed this data data component part

21:17:33

let's say I will again uh like do the

21:17:35

coding tomorrow then I can see like I

21:17:37

have completed this data like you can

21:17:39

say integration part now I I I need to

21:17:42

work on this extract data or content

21:17:44

part then after that actually I need to

21:17:46

work on this Tech chunks part okay so

21:17:48

that's how I have the plan actually

21:17:49

entire plan of my entire projects okay

21:17:51

so that's why this like architecture

21:17:54

creation is very much important what I

21:17:56

feel

21:17:57

like okay and don't need to worry about

21:17:59

I will be also maintaining the GitHub

21:18:01

and all like I'll be committing the code

21:18:03

there so that you can also get the code

21:18:05

from there everything I will show

21:18:09

you okay

21:18:12

great all right now let's try to

21:18:15

understand what are the technology or

21:18:16

what are the tech stack actually I'm

21:18:18

going to use in this projects okay so

21:18:20

let me just write here um I'll be taking

21:18:24

a different color maybe I can take this

21:18:29

color so take a

21:18:33

stack

21:18:37

take is Tech

21:18:41

used so the first thing actually um as a

21:18:45

programming language

21:18:49

wise programming

21:18:53

language I'll be using Python

21:18:58

Programming okay now the second thing

21:19:01

I'll be using something called A Lang

21:19:04

chin

21:19:07

okay langin as my um generative

21:19:14

AI generative AI

21:19:19

framework okay like uh in deep learning

21:19:22

actually I think you know in DL actually

21:19:24

we have different different framework

21:19:25

let's say we have tensor

21:19:27

flow we have tensor flow

21:19:30

okay then we have something called P

21:19:33

torch

21:19:36

okay so we have then we have also

21:19:38

something called MX

21:19:39

net so these are the framework let's say

21:19:42

we have different different in deep

21:19:43

learning but whenever I'm talking about

21:19:45

generative AI okay whenever I'm

21:19:47

developing something in the field of

21:19:48

generative AI I should use this langin

21:19:51

or there is another framework you can

21:19:52

use something called uh maybe I can name

21:19:55

it as llama

21:20:00

index Lama

21:20:03

index okay so this is the alternative

21:20:06

framework of the langen so whatever

21:20:08

things actually you can do with the

21:20:10

langen with the help of langen uh just a

21:20:12

minute yeah

21:20:14

so so whatever things actually you can

21:20:17

do with the help of this langin the same

21:20:18

thing you can also do with the help of L

21:20:20

index okay and we have Au inte Lama

21:20:22

index in our paid courses I think you

21:20:24

can go to the syllabus and you can check

21:20:26

it there okay we'll show llama index as

21:20:28

well there all

21:20:31

right all right now third thing maybe I

21:20:36

can just uh just a

21:20:59

minute okay so the third

21:21:03

thing

21:21:07

uh our uh front

21:21:11

end front

21:21:13

end or I can talk about our web

21:21:18

app okay for the web app implementation

21:21:20

I'll be using

21:21:22

flask okay maybe I think you have

21:21:25

already learned like how to use stream

21:21:26

lit okay in your previous projects guys

21:21:29

yes or no do you know how to integrate

21:21:31

stream lead with our um application and

21:21:34

all

21:21:35

so that is why I have integrated flask

21:21:37

okay I can um I just want to show you

21:21:39

different different things actually you

21:21:40

can integrate

21:21:44

here all

21:21:48

right now our model

21:21:51

Wise

21:21:52

llm Wise I'll be using

21:21:57

meta Lama

21:22:00

2 all right and fifth vector

21:22:06

be wise I'll be using pine

21:22:10

cone okay so these are the tech stack

21:22:13

actually I'll be using to implement this

21:22:14

entire

21:22:21

projects so far guys everything is clear

21:22:24

you can let me know in the

21:22:30

chat the take is stack and the

21:22:33

architecture everything is clear

21:22:38

here okay

21:22:44

great all right now let's go to the our

21:22:49

implementation okay now the first thing

21:22:52

what I will do uh because you will be

21:22:55

also doing the coding with me so it's

21:22:57

better to use my GitHub maybe because

21:22:59

from my GitHub actually you can get the

21:23:01

code I think so what I will do first of

21:23:03

all I will be creating one repository so

21:23:04

let me create one repository at at the

21:23:06

very

21:23:21

first so here I'll be creating one

21:23:24

repository so I'll just name it as end

21:23:26

to

21:23:28

end end to end

21:23:32

medical uh chatbot

21:23:42

using Lama

21:23:44

2 so this is the name so let's make it

21:23:47

as public repo and I will add rme file G

21:23:51

ignore I'll be taking as

21:23:53

Python and license you can take anything

21:23:55

so let's take MIT

21:23:58

license H then I will create the

21:24:03

Repository

21:24:04

okay so I'm sharing this link guys in

21:24:07

the chat so you can Fork it and you can

21:24:11

also get the code from

21:24:14

here so this is the public repo everyone

21:24:17

can access so you can Fork

21:24:19

it you can for forkit either you can

21:24:21

clone this repository so whatever code

21:24:23

actually I'll be writing I'll be

21:24:24

committing

21:24:29

here all right now let's clone this

21:24:32

repository so I'll just uh click on code

21:24:34

and copy this link address and I will

21:24:36

open my folder and here let me open my

21:24:47

terminal so get

21:24:51

clone and let's past the link and clone

21:24:55

it now I'll just go inside the folder

21:24:58

end to

21:25:00

end

21:25:02

medical chatbot using Lama 2 now I'm

21:25:06

inser my

21:25:13

folder now let's open my vs code here so

21:25:17

if you have pyam or any other code

21:25:20

editor you can use it feel free to use

21:25:22

it no

21:25:30

issue um guys can you confirm my vs code

21:25:33

is visible to all of

21:25:37

you can you see

21:25:40

the text and all clearly you can let me

21:25:45

know

21:25:50

okay so the first thing what I need to

21:25:52

do I'll be creating one virtual

21:25:54

environment okay so let's create one

21:25:56

virtual

21:26:03

environment

21:26:10

uh yes yes uh we'll be doing on CPU okay

21:26:12

that is

21:26:20

why and yesterday I told you to download

21:26:23

one particular model guys it's around

21:26:25

4GB I think you

21:26:29

remember uh yeah see uh the same thing

21:26:34

we can do it on the neural lab as well

21:26:36

okay so you can also open up your neural

21:26:38

lab and you can also do it there but the

21:26:41

thing is like there actually I need to

21:26:43

upload my model and it will take time

21:26:45

okay it will take time to upload my

21:26:47

model there so I will show you how to do

21:26:49

it how to set up the environment here as

21:26:51

well so let me open my neural

21:26:56

lab because it's around 4GB model so if

21:27:00

I want to like upload there so it will

21:27:02

take time so that's why I'm showing on

21:27:04

on local machine so start my lab so from

21:27:07

here actually what you can do you can uh

21:27:09

launch up this one

21:27:16

python so this is my medical chat

21:27:29

Bo so here also you will get the same

21:27:31

environment as as your V code let me

21:27:34

show you

21:27:46

see all

21:27:48

right okay but I have the model in my

21:27:51

local machine I already downloaded but

21:27:53

if I want to upload it it will take time

21:27:55

so it's better to use my uh this vs

21:28:02

code

21:28:05

okay so now let me create the

21:28:06

environment so just write the command

21:28:09

cond

21:28:12

create hypen in um I'll just name the

21:28:17

environment as

21:28:20

uh

21:28:23

medical or I can just write M chatbot

21:28:26

that means medical

21:28:32

chatbot it's very EAS just open up your

21:28:35

terminal and just write code space dot

21:28:37

okay this is the command to open the uh

21:28:39

vs

21:28:46

code okay

21:28:49

yeah and now let's uh take the python

21:28:53

version equal to

21:28:56

3.8 hyen y so everyone you should use

21:28:59

Python version 3.8 okay no you don't

21:29:02

need to use uh like less than 3.8

21:29:04

otherwise you might face some issue okay

21:29:07

you can also take 3.9 it's fine but I'll

21:29:09

be using 3.8 this specific version also

21:29:12

just let me mention the command in my

21:29:14

rme file so here step to

21:29:21

run

21:29:24

steps to

21:29:28

run the

21:29:32

project so the first thing what I need

21:29:34

to do I need to create

21:29:36

one so I can just write this

21:29:43

line I just need to create my

21:29:47

environment now let me just quickly

21:29:49

create

21:30:02

it

21:30:13

you can use it okay you can use it it's

21:30:14

up to you what particular version you

21:30:16

will be using it's up to you personally

21:30:19

I like python 3.8 because it supports

21:30:22

like

21:30:32

B

21:30:59

uh guys am I audible

21:31:02

now

21:31:21

okay uh sorry there was a small power

21:31:24

cut from my side extremely sorry for

21:31:27

that okay thank

21:31:31

you uh yes uh

21:31:36

okay see uh first of all you need to

21:31:38

create one environment okay so this is

21:31:40

the command you need to execute uh this

21:31:42

is the command you need to execute just

21:31:44

Conta create hypen in then your uh name

21:31:47

of the environment then use Python 3 uh

21:31:49

3.8 okay and then create the environment

21:31:52

then I just need to activate the

21:31:53

environment okay so this is the command

21:31:55

so just

21:31:57

copy and paste

21:32:01

it now it has been activated so let me

21:32:04

also uh give the command

21:32:19

here

21:32:23

okay so environment creation is done now

21:32:27

I need to install the requirements okay

21:32:29

some of the requirements I need for this

21:32:30

project so let's install the

21:32:32

requirements so here I'll be creating

21:32:34

one file called

21:32:39

requirement.

21:32:43

txt okay and now let's mention uh the

21:32:54

requirements so the first requirement I

21:32:57

need

21:33:00

here uh something called C transform

21:33:03

forer I'll tell you why this C

21:33:05

Transformer is

21:33:08

required um so the first thing I need

21:33:11

something called C Transformer okay and

21:33:12

I will be using this specific version of

21:33:14

this C Transformer so you can uh use any

21:33:17

of the version but I'll be using this

21:33:19

particular version because I also want

21:33:20

to show you like whenever you are

21:33:22

creating any kinds of projects okay you

21:33:23

also need to specify the version of the

21:33:25

library you are using let's say this

21:33:27

project you are sharing after let's say

21:33:29

one year okay so what will happen at the

21:33:32

Times uh some Library changes would be

21:33:34

happen Okay and some of the

21:33:35

functionality would be removed some of

21:33:37

the functionality would be replicated so

21:33:38

it's better to use a specific version

21:33:40

always okay so that is why you can use

21:33:43

specific version let's say if I search

21:33:44

the C Transformer on Google C

21:33:47

Transformer

21:33:49

Pi so you will see different

21:33:52

different

21:33:53

uh version of the C Transformer Library

21:33:56

so release story now see guys different

21:33:58

different and this is the current one

21:34:02

0.227

21:34:04

C Transformers that means see the model

21:34:06

actually I'm going to use it's a

21:34:08

quantized model because we'll be running

21:34:10

on CPU so that is why uh we need this C

21:34:12

Transformer library to load the

21:34:14

quantized model got

21:34:19

it I think yesterday you saw like we are

21:34:22

using something called Lama CPP library

21:34:24

right but here we are using Lang chain

21:34:27

and if you want to use Lang chain so you

21:34:29

need to use the C Transformer

21:34:32

Library

21:34:34

then the second Library I need sentence

21:34:36

Transformer okay because I want to

21:34:39

download this uh model from the hugging

21:34:41

face

21:34:42

itself uh uh like which model I'll be

21:34:45

downloading from huging face itself

21:34:47

because here I need one embedding model

21:34:48

because as the architecture I showed you

21:34:51

here we'll be generating embedding okay

21:34:55

we'll be generating embedding of our

21:34:56

text SS and to generate this embedding

21:34:58

we need one embedding model okay so

21:35:00

we'll be using one free embedding model

21:35:06

uh guys just a minute just a

21:35:32

minute

21:35:55

okay uh now I think my network is

21:36:02

fine

21:36:11

okay

21:36:12

great okay fine so that is why actually

21:36:15

uh for this embedding okay for this

21:36:17

embedding generation actually I need one

21:36:19

embedding model okay and that particular

21:36:21

model I'll be downloading from the h

21:36:23

face itself okay so that is why I need

21:36:25

this seat uh Transformer sorry sentence

21:36:28

Transformer Library got

21:36:32

it

21:36:33

thank

21:36:34

you now let's uh see our third

21:36:38

requirement actually I'll be

21:36:41

using

21:36:42

uh third actually I need to use uh this

21:36:46

pine cone client because I want to

21:36:49

integrate pine cone database okay Pine

21:36:51

con Vector DB so that's why this pine

21:36:52

cone client is needed then as I told you

21:36:55

I'll be also using something called Lang

21:36:59

chain so this is the Lang chain and and

21:37:03

I also need flask to create my front

21:37:09

end okay so these are the prerequisite I

21:37:12

need as of now if I need anything else

21:37:14

I'll add later on okay I'll add later on

21:37:17

now just let me install them quickly so

21:37:20

before that what I can do I can just

21:37:21

quickly commit the changes in my GitHub

21:37:23

so that actually you can also get the

21:37:25

code from here so requirements

21:37:32

added

21:37:44

so it's already added let me check it so

21:37:47

if I

21:37:50

refresh yeah guys see already

21:37:52

requirements has been

21:37:54

added so you can you can just refresh

21:37:56

the page of my GitHub and you can open

21:37:58

up this txt file and you can copy paste

21:38:00

the

21:38:02

code

21:38:04

uh yeah we'll be also adding Docker uh

21:38:07

cic dependra okay this thing we have

21:38:09

already added in our paid courses and

21:38:11

projects and all okay we'll show that

21:38:13

how we can do the deployment

21:38:19

yes okay now let's install the

21:38:21

requirements so I'll just write P

21:38:24

install hypen

21:38:26

R uh requirement.

21:38:31

txt

21:38:41

so it will take some time to install the

21:38:42

requirements let's

21:38:44

wait so in between what I can do I can

21:38:47

write the command

21:38:55

here P install ienr requirement.

21:39:01

txt

21:39:16

so guys are you doing with me this

21:39:18

project implementation how many of you

21:39:20

are doing with me you can let me know in

21:39:21

the chat so far everything is fine

21:39:23

everything is

21:39:31

running

21:39:39

okay okay

21:39:59

great let me take some comments uh

21:40:08

can we use Docker here cicd I already

21:40:10

answered

21:40:26

that okay now quid is

21:40:31

great uh is it NE Neary to mention the

21:40:34

version in the requirements uh yes I

21:40:36

feel like it is necessary let's say you

21:40:38

are sharing this code or let's say you

21:40:40

are executing this code after one year

21:40:43

so in that one year duration what might

21:40:45

happen actually these are the library

21:40:46

might upgrade right some of the let's

21:40:48

say functionality would be deprecated

21:40:50

now let's say if you're not mentioning

21:40:52

the version specific version so what

21:40:54

will happen actually it will install the

21:40:56

current version okay it will install the

21:40:58

current version andbody is installing

21:40:59

the current version that means the

21:41:01

upgraded version some of the

21:41:03

functionality would be deprecated and

21:41:04

this project will throw the error like

21:41:06

this is not found here so that's why

21:41:07

it's better to use the specific version

21:41:09

let's say if you are executing this

21:41:10

project after one year as

21:41:16

well okay it will work

21:41:28

fine please let me uh quickly ask did

21:41:33

you not up with the generator projects

21:41:36

we started last

21:41:40

week you did not finish up uh McQ

21:41:45

generator I think it was uh taken by San

21:41:48

s

21:41:51

maybe maybe he has completed the

21:41:53

projects we been the deployment as well

21:41:55

guys yes or

21:42:01

no

21:42:10

yeah McQ is already finished if didn't

21:42:13

downloaded the llm model that still can

21:42:16

I make this projects are still required

21:42:18

to download you need to download ano

21:42:20

okay without the model how you'll

21:42:29

predict you can uh just make the

21:42:31

download yesterday I think I shared the

21:42:33

link and everything

21:42:38

right or just let me also give you the

21:42:41

model download link so here I will be

21:42:43

creating one

21:42:44

folder and just name it as

21:42:48

model and here I'll just create one txt

21:42:51

file I'll just write as

21:42:55

instruction.

21:42:56

txt and just let me give you the

21:43:00

instruction so you need to download this

21:43:03

particular model from this

21:43:08

[Music]

21:43:29

URL okay so this is the link

21:43:34

uh let me visit the

21:43:37

link and uh this is the name of the

21:43:42

model if I do contrl F and crl V so this

21:43:46

is the model you need to download it's

21:43:48

around 3. 79

21:43:52

GB so let me just comit it as well so

21:43:55

I'll just

21:43:56

comit model instruction

21:44:01

added

21:44:09

so those you don't have the model you

21:44:12

can download from this link okay I have

21:44:14

already comitted the code in my GitHub

21:44:15

you can check it

21:44:18

out can I make this projects in desktop

21:44:21

application and make it as uh MSI setup

21:44:24

and run locally yes you can do it okay

21:44:27

you can also create as a desktop

21:44:28

application let's say you can use Tinker

21:44:31

U framework to ment the desktop

21:44:33

application and

21:44:39

all okay I think my requirement

21:44:41

installation is completed okay uh yes it

21:44:45

is

21:44:46

completed now here what I will do I'll

21:44:48

just create one uh

21:44:51

notebook so let's create one notebook um

21:44:54

new file I'll just name it as

21:44:59

trials

21:45:01

uh Tri files. IP

21:45:10

YB and let me select my kernel

21:45:16

here so the environment I created uh

21:45:21

it's m

21:45:28

chatbot where this mchat bot just a

21:45:31

minute

21:45:38

yeah this

21:45:41

one now let me test it if everything is

21:45:44

fine or not I'll just write

21:45:47

print

21:46:01

okay

21:46:05

uh yeah uh I will drop the GitHub link

21:46:10

again so this is the GitHub

21:46:31

link

21:46:41

yeah some installation is going on let's

21:46:43

wait for sometimes just a

21:46:55

minute it's done

21:46:58

now okay now everything is working fine

21:47:04

yeah so everything is working fine guys

21:47:06

how many of you have done guys you can

21:47:08

let me know for me everything is working

21:47:09

fine so

21:47:14

far okay and uh in between I just want

21:47:18

to tell you guys if you don't know uh we

21:47:21

have launched one uh paid courses of our

21:47:23

generative a you can explore this

21:47:25

courses and we have added so many module

21:47:28

here so basically we'll be covering like

21:47:30

uh fine tuning part like how we can

21:47:32

deploy it as a cicd okay how we we can

21:47:35

integrate Docker even Lama index okay

21:47:38

even we have introduced more open source

21:47:40

large language model here like Google p

21:47:42

to Falcon okay then uh we'll be

21:47:45

discussing so many things here so you

21:47:47

can go through this labus and if you're

21:47:49

interested you can enroll for this

21:47:54

course and here you will get uh lots of

21:47:57

end to end projects implementation and

21:47:59

it would be amazing implementation alog

21:48:01

together

21:48:07

all

21:48:09

right now uh let's start the

21:48:12

implementation of our notebook so just a

21:48:31

minute

21:48:33

so here I need to import some of the

21:48:35

libraries first of

21:48:51

all

21:48:56

H okay now let's import some of the

21:48:59

libraries so first thing actually I need

21:49:02

some um I need promt templates

21:49:07

so uh yes I think I can reduce the size

21:49:11

it's not visible guys I think it's

21:49:13

visible because I'm showing I think on

21:49:16

top of my picture

21:49:23

yeah all

21:49:28

right now let's import some libraries so

21:49:31

the first thing I need something called

21:49:32

prom templates so from Lang

21:49:36

Chen Lang Chen uh import promt

21:49:43

template uh

21:49:46

prompt prom template so as of now let's

21:49:50

import I will discuss why I'm using

21:49:51

these are the thing okay it would be

21:49:53

clear now I need something called uh

21:49:55

retrieval question answering uh class

21:49:58

okay from Lang Chen so I'll just import

21:50:00

it from Lang Chen

21:50:03

uh dot

21:50:05

chain

21:50:07

import uh you have a class called

21:50:10

retriever question

21:50:14

answer okay just a minute I think I

21:50:17

should move the

21:50:22

camera

21:50:26

here uh now I think the screen is

21:50:30

visible

21:50:39

okay

21:50:46

fine then I also need to import uh the

21:50:50

hugging face embedding so from Lang

21:50:54

chain

21:50:56

uh you have one function called

21:50:59

embeddings and you need to import

21:51:05

hugging P

21:51:09

embedding hugging face

21:51:12

embeddings all right then I also need uh

21:51:17

pine cone so from langen it is already

21:51:20

available in the langen so langen uh do

21:51:23

Vector

21:51:25

store

21:51:29

UT uh I need pine cone

21:51:35

you can also import Pine con from

21:51:43

here then I need uh some more Library

21:51:46

like directory loader and my uh PDF

21:51:48

loader because I'm going to load my PDF

21:51:50

here so let's import so I'll just write

21:51:53

it from Lang

21:51:56

chain uh here you have something called

21:51:59

document loaders so from this actually I

21:52:02

need to import uh Pi PDF Pi PDF loader

21:52:07

as well as my directory

21:52:10

loader okay now to uh convert my inter

21:52:15

Corpus to chunks I need another uh class

21:52:18

called recursive character text splitter

21:52:20

okay so let's import so from

21:52:24

langen uh do text

21:52:26

splitter

21:52:29

import

21:52:30

recursive text uh character text

21:52:33

splitter okay with the help of that

21:52:35

we'll be creating the

21:52:36

chunks then I also need prom template so

21:52:39

from Lang

21:52:41

chain do

21:52:43

prompts I need this prompt

21:52:48

templates okay it should be

21:52:52

import import prom

21:52:55

template then I need also uh C

21:52:58

Transformer library because I'll be

21:52:59

using quantized model okay so just write

21:53:01

from Lang

21:53:04

chain uh

21:53:06

llms

21:53:08

import C Transformer C

21:53:13

Transformer yeah maybe everything I have

21:53:15

imported now let me

21:53:19

execute okay done now first of all let

21:53:22

me move my data here so I'll create one

21:53:24

folder here called

21:53:26

data and here I'm going to move my data

21:53:29

just a minute I think I already

21:53:31

downloaded the

21:53:37

data I'll also give you the data just a

21:53:45

minute this is my data so let me just

21:53:48

comment

21:53:56

it dat add

21:54:00

it

21:54:17

okay now I think you can download the

21:54:19

data from my GitHub okay I already uh

21:54:21

push that PDF okay if I go to my

21:54:29

GitHub yeah notebook is also available

21:54:32

data is also available now you can get

21:54:33

the data from here now I also need to

21:54:35

move my model okay so I already

21:54:37

downloaded the model just let me move it

21:54:56

here this is the

21:55:00

model

21:55:05

okay

21:55:12

fine what is the difference between from

21:55:15

langin import fromom template and promt

21:55:18

you can use any of them dendra okay I

21:55:19

have showed multip like two things you

21:55:21

can use any of

21:55:23

them both are

21:55:30

same

21:55:34

okay now uh what I need to do I need to

21:55:38

uh create my Pine con cluster okay

21:55:43

because uh we'll be using pine cone

21:55:45

Vector DB so let me just uh quickly show

21:55:53

you yeah so just visit this pine

21:56:00

website

21:56:08

so let me just logging with my

21:56:21

account all right so the first thing you

21:56:23

need something called API key okay just

21:56:25

click on the API key and uh just create

21:56:28

a API key if you don't have any API key

21:56:30

you can create from here

21:56:31

so I already have one default API key

21:56:33

I'll just copy this API key I'll just

21:56:37

copy and I will open my vs code and

21:56:42

here just let me write so pine

21:56:55

cone Pine con uh API

21:57:00

key

21:57:04

so this is my API

21:57:06

key don't uh use my API key guys I will

21:57:09

be removing after the implementation so

21:57:11

you can generate your API key then I

21:57:14

need something called Pine con API

21:57:15

environment so I'll just write pine

21:57:19

cone pine

21:57:24

cone API en

21:57:28

EnV okay to get this Pine con API uh

21:57:31

environment you need to create one index

21:57:34

now let's create one index here so I'll

21:57:36

go to the index and here I'll just click

21:57:38

on create

21:57:39

index you can give the index name so in

21:57:42

this case I'll be give medical

21:57:52

chatbot and uh Dimension uh it will ask

21:57:56

for the dimension so what is the

21:57:57

dimension Dimension means the like

21:58:00

embedding model you'll be using it has

21:58:01

some particular Dimension okay so the

21:58:04

embedding model I'm going to use in this

21:58:06

case let me show you the embedding

21:58:07

model uh this embedding model is

21:58:10

available on the hugging face so this is

21:58:12

the name of the model guys all mini LM

21:58:16

six uh L6 V2 okay so this is the

21:58:18

embedding model I'll be using and this

21:58:20

model returns uh this uh Dimension that

21:58:23

means dimension of the vector of three

21:58:26

uh 384 okay so this is the dimension let

21:58:29

me just write here t 84 so this is the

21:58:32

vector

21:58:37

Dimension and I'll be keeping cosine

21:58:39

Matrix and let's create our

21:58:47

index now this is your environment API

21:58:50

now I'll copy and here I paste

21:59:00

it

21:59:09

okay all set now let me

21:59:15

execute

21:59:19

yeah now first of all I need to load my

21:59:22

data okay load this PDF from this folder

21:59:25

so for this let's create one function so

21:59:27

I'll just name it as

21:59:30

extract extract

21:59:32

data

21:59:34

from the

21:59:38

PDF so let me Define one function so

21:59:41

I'll just name it as load PDF load

21:59:43

uncore

21:59:45

PDF so it will take the data

21:59:50

directory then I'll be using this

21:59:54

directory loader I think you remember we

21:59:57

already imported this directory loader

21:59:59

here directory loader okay with the help

22:00:01

of this directory loader uh I load my

22:00:08

data then I only want to load my PDF

22:00:11

file okay so here you can set one

22:00:13

parameter called Globe so here I only

22:00:15

want to load my PDF file so

22:00:18

start.pdf

22:00:27

then you need to Define one uh class

22:00:31

here loader class is equal to Pi PDF

22:00:33

loader so with the help of this Pi PDF

22:00:36

loader uh it should be Pi PDF yeah P PDF

22:00:39

loader it will load load it so here is

22:00:42

the P PDF

22:00:46

loader by PDF

22:00:53

loaded and this thing I will store in a

22:00:55

variable I'll just name it as load

22:00:59

up okay

22:01:04

now once uh I will uh load my PDF uh so

22:01:08

I need to call load functions so I'll

22:01:10

just write

22:01:11

uh

22:01:14

loader do

22:01:17

load and I will store these other data

22:01:20

as a

22:01:26

documents then I will return these

22:01:29

documents

22:01:37

H now let me commit the

22:01:40

changes uh data loader

22:01:51

added okay uh one thing so let me just

22:01:54

stop it just a

22:01:59

minute

22:02:14

because uh here is my model as well so I

22:02:16

can't uh directly push the

22:02:18

model uh just a minute let me close the

22:02:29

execution

22:02:47

okay so in this dogit ignore I will

22:02:51

uh add this model

22:02:59

name

22:03:18

yeah now it is

22:03:19

fine now let me commit the

22:03:29

changes

22:04:15

okay so I'm getting an error because I

22:04:17

terminated that

22:04:19

uh commit operation that's why just a

22:04:21

minute read

22:04:26

add get

22:04:29

commit

22:04:39

should positive the

22:04:40

[Music]

22:04:59

POS

22:05:22

okay uh so now let me open the code

22:05:25

again so I'm having some issue with my

22:05:28

GitHub just a minute yeah it's done so

22:05:32

guys so far everything is fine for

22:05:42

you yeah so whenever we'll be doing the

22:05:45

deployment at that time I can get uh

22:05:47

keep my model uh either in S3 bucket

22:05:49

either in this one uh you can also use

22:05:53

uh Google uh like bucket okay every

22:05:56

anywhere you can store it no issue with

22:05:59

that

22:06:01

okay now let me execute

22:06:15

them H

22:06:19

done now what I need to do I need to

22:06:22

extract my data so I'll uh I need to

22:06:26

load my data so I'll call this

22:06:29

function load PDF and

22:06:32

here I'll give my data path so here is

22:06:35

my data

22:06:38

present and this variable I will call as

22:06:41

my

22:06:44

extracted extracted

22:06:52

data now let's load

22:06:54

it modle not found P

22:06:59

PDF

22:07:03

okay so what I can do I can install Pi

22:07:16

PDF by PDF this is the

22:07:29

modu

22:07:31

P

22:07:43

install no import I have imported but it

22:07:46

is the dependency okay if you want to

22:07:48

use this PDF loader you need this P PDF

22:07:51

package that is why now I think it

22:07:53

should work just let me restart my

22:07:59

kernel h huh now it should

22:08:13

work see now it is working now it is

22:08:15

loading the

22:08:17

data so you can also keep multiple PDF

22:08:19

here uh it will also work let's say you

22:08:22

have 10 different book you can keep it

22:08:29

here

22:08:39

and guys uh all the resources has been

22:08:41

updated in the dashboard you can visit

22:08:44

the

22:08:47

dashboard yesterday whatever things

22:08:49

actually I discussed everything has been

22:08:51

updated

22:08:59

here

22:09:03

so this is the dashboard and here all

22:09:05

the videos and materials has been

22:09:06

updated so you can go through it now I

22:09:09

think it's done yeah it's done now you

22:09:11

can see the

22:09:14

data see this is uh loaded as a

22:09:19

document now let me comment

22:09:22

out

22:09:29

h

22:09:34

okay now uh guys are you able to load

22:09:36

the data yes or no is it

22:09:42

working okay great now we have created

22:09:45

this uh um extract data from the PDF now

22:09:48

what I need to do now let's go back to

22:09:50

my architecture so this thing we have

22:09:53

done now what I need to do I need to uh

22:09:57

create this one uh chunks okay chunks

22:09:59

implement because I need to convert my

22:10:02

Corpus to chunks T chunks okay so that's

22:10:04

why now let's write this

22:10:06

component so for this what you can do um

22:10:11

let me just comment the

22:10:13

name yeah so I can name it as uh split

22:10:19

or create a text

22:10:22

chunks create text

22:10:28

trunks so here I will Define another

22:10:31

function called def text splitter or

22:10:34

text chunks you can name anything so

22:10:36

let's name it as text

22:10:39

split so this will take your extracted

22:10:43

data because the data you have extracted

22:10:46

that is your Corpus okay it will take

22:10:47

and it will uh create a chunks so

22:10:50

extracted data now here I'll call this

22:10:53

recursive text splitter this

22:10:58

function okay with the help help of that

22:11:01

I'll be uh creating the Chun so here I

22:11:03

need to like pass two parameter I think

22:11:05

remember one is my Chang size one is my

22:11:09

chunk uh underscore

22:11:12

size okay so you can give any chunk size

22:11:15

here so let's define as 500 I saw like

22:11:17

people starting with 500 and chunk

22:11:20

overlap chunk

22:11:23

uncore

22:11:25

overlap so chunk overlap I will be

22:11:28

giving let's say 20 okay so this is the

22:11:30

starting point you can give so I hope

22:11:34

this part is clear what is Chunks size

22:11:36

and what is CH overlap because I already

22:11:37

discussed on my board here okay what is

22:11:39

the chunks and what is the chunks of lab

22:11:42

okay all right now let's uh store this

22:11:46

thing in a variable I'll just name it as

22:11:51

text uh

22:11:58

splitter okay

22:12:01

now after that what I need to do I need

22:12:02

to split it so again I will just uh call

22:12:07

my text

22:12:11

splitter and uh here you have one

22:12:16

parameter yes you can you can put

22:12:18

multiple data it will also work okay I

22:12:20

have only one PDF that's why I kept it

22:12:22

here now split documents okay now here

22:12:26

it will take your extracted

22:12:28

data

22:12:31

now this thing I will store so I'll just

22:12:33

name it as textor

22:12:36

chunks then after that I will return

22:12:38

this Tech

22:12:43

chunks Tech chunks okay so this is going

22:12:46

to be my

22:12:49

function all right now let's apply this

22:12:51

function I'll call this

22:12:54

function and here uh I will pass my

22:12:58

extracted text okay I'm getting from

22:12:59

from

22:13:03

here and let me store it so I'll just

22:13:06

call it as take

22:13:13

chunks and if you want to uh see the

22:13:16

length like how many chunks you got so

22:13:18

you can also print it so

22:13:22

length of my

22:13:28

chunks

22:13:42

okay now let's uh do

22:13:45

it yeah so we got SE uh 7,020 chunks

22:13:51

okay uh because we have a huge data and

22:13:55

our Chun size is if you see 500 okay so

22:13:57

what it is doing actually it is just

22:13:59

counting ing the tokens as 500 okay and

22:14:02

it is creating one particular chunks

22:14:04

that's how it has created 7, and20

22:14:08

chunks okay 7,20 chunks if you want to

22:14:11

see them maybe it would be big file see

22:14:15

720 CHS and all are

22:14:20

documents clear

22:14:24

guys now this 720 chunks actually I need

22:14:27

to store in my Vector DB okay but for

22:14:29

that I need to convert them to my Vector

22:14:33

representation so we have completed till

22:14:35

this

22:14:36

point um till this point we have

22:14:38

completed we have converted our Corpus

22:14:40

to teex

22:14:46

chunks now what I need to do I need to

22:14:49

uh create another function here and that

22:14:53

function will uh give me the vector

22:14:54

embedding so let's comment here so

22:14:58

download embedding

22:15:05

model okay

22:15:09

so

22:15:11

download I can name this function Like

22:15:13

That download huging Face

22:15:20

embedding so this function will download

22:15:22

the Hing embedding from the hangas

22:15:24

itself so here

22:15:28

embedding

22:15:31

is equal

22:15:32

to uh here I imported hugging face

22:15:40

embedding and inside that you need to

22:15:42

pass the model name you will be

22:15:49

downloading so here is the model I

22:15:51

already showed you so I'll just copy the

22:15:58

name

22:16:02

okay everything is fine then I will

22:16:03

return this

22:16:13

embedding okay it's done so uh see I

22:16:17

already uh downloaded the model

22:16:18

previously that's why it has been

22:16:22

executed okay no I think I didn't call

22:16:24

the function sorry sorry I didn't call

22:16:25

the function maybe it will download

22:16:27

again so let's download the model so

22:16:29

I'll just uh call it as

22:16:37

embedding and now let's download the

22:16:44

model see guys now it is downloading so

22:16:47

it will take some time uh because it is

22:16:49

downloading from the HF itself now so

22:16:52

far guys everything is fine are you able

22:16:54

to execute see download is

22:16:58

done

22:17:04

are you able to download the model

22:17:13

guys okay fine now uh I have my

22:17:17

embedding model okay I have my embedding

22:17:19

model you can also print this embedding

22:17:23

object uh see guys this is the uh see

22:17:26

the output Dimension it is also telling

22:17:29

uh 384 I told you this is the uh like

22:17:32

return uh like vector

22:17:34

Dimension and uh this is the model

22:17:49

name okay this is the model

22:17:51

[Music]

22:17:58

name

22:18:04

okay great now what I need to do so

22:18:07

let's just uh do it quickly because I

22:18:10

think you got the concept what I I'm

22:18:12

doing

22:18:14

exactly yeah now I have downloaded by

22:18:17

embedding model now let's test this

22:18:19

embedding model okay now let's test this

22:18:21

one uh whether it is uh giving me the

22:18:24

embedding model or not embedding that

22:18:26

means embedding on not so this is the

22:18:28

code so here here what I'm doing I'm

22:18:30

just calling this embedding objects and

22:18:32

here there is a parameter called embed

22:18:34

query now here I'm just giving one uh

22:18:36

test word okay that means T sentence I'm

22:18:38

giving hello word okay now if I execute

22:18:41

this one see it will return return

22:18:43

384 and this is nothing but this is the

22:18:46

vector representation of hello word

22:18:49

clear guys yes or

22:18:50

no now with the help of this embedding

22:18:53

model we are able to convert our text to

22:18:55

embeddings that means vectors and what

22:18:57

is the dimension of that Vector is 384

22:18:59

four okay and this is the vector that's

22:19:01

how this Vector looks like clear can I

22:19:04

get a confirmation

22:19:11

quickly now this technique I will apply

22:19:14

on top of my data okay the data actually

22:19:17

I have extracted okay from my PDF then I

22:19:19

will be storting them to my Vector

22:19:25

DB all right now for this actually I

22:19:28

will just copy paste the code from your

22:19:30

previous session because you already

22:19:32

completed pine cone code like how to

22:19:35

initialize the pine cone and all so this

22:19:37

is the code we usually initialize our

22:19:39

pine cone pine cone client see guys okay

22:19:42

so here you just need to give uh this

22:19:45

one uh your Pine con API key and pine

22:19:48

con API environment which I have already

22:19:50

initialized I think you remember here I

22:19:51

have already initialized okay now here

22:19:56

you need to give the index name in this

22:19:57

case what is my index name I think

22:19:59

remember we created one index let me

22:20:01

show you this is the index name medical

22:20:03

chatbot I'll copy the name and here I

22:20:07

will give the name okay make sure you

22:20:08

are giving your own index name okay

22:20:11

don't try to use my index name if you

22:20:13

haven't created this one all right then

22:20:16

once it is done I'll call my Pine con

22:20:19

and from text here you need to give your

22:20:21

extracted text okay that means the

22:20:23

chunks you have created and you also

22:20:25

need to provide your embedding model

22:20:26

okay and you also need to give the index

22:20:28

name so what this Pine con will do it

22:20:30

will take all your uh chunks as well as

22:20:34

your embedding model as well as the

22:20:36

index name okay it will take all

22:20:38

together then what it will do it will

22:20:39

apply the embedding model on top of the

22:20:41

data you have it will convert that data

22:20:43

to embeddings then it will automatically

22:20:45

store that Vector to your Pine con that

22:20:48

means this index the index the cluster

22:20:50

you have created on the pine con okay

22:20:52

now let me show you so let me execute

22:20:53

this

22:20:55

code not able to see the code sir please

22:20:58

uh okay now I think you can see the code

22:21:01

let me just see

22:21:05

once maybe I can just a

22:21:14

minute yeah now I think it is

22:21:19

visible I can move my screen here just a

22:21:28

minute

22:21:33

H see now this is uh going on so it is

22:21:37

converting my text to numbers okay and

22:21:40

it is storing to my Vector DB now if I

22:21:42

go to my Vector DB now if I refresh okay

22:21:45

refresh the page

22:21:47

here now you will see it will store the

22:21:49

vector

22:21:52

here you can also see the vector this is

22:21:54

the beauty of this pine cone even I

22:21:55

personally like see this is the vector

22:21:57

okay this is the vector and this is this

22:21:59

is the text actually it has converted

22:22:00

the vector now how many Vector it has

22:22:02

stored as of now it has VOR stored 800

22:22:05

Vector okay and how many like uh chunks

22:22:08

we have guys here I think you remember

22:22:11

how many chunks we

22:22:13

have we have 7,020 chunks so it will uh

22:22:17

create 7,020 vector and it will store

22:22:19

there so you need to wait for some times

22:22:21

for all the uh Vector U like

22:22:27

conversion so again I will come here see

22:22:30

uh it has been

22:22:36

1,536 no no no uh not full book it's

22:22:39

just storing now see still execution is

22:22:41

going on so it is storing like one by

22:22:44

one one by one one by one okay that's

22:22:46

how so it will restore till 720 because

22:22:50

720 chunks you have

22:22:53

totally yeah each chunks corresponding

22:22:56

to each Vector counts you can you are

22:22:58

right

22:23:06

now see uh

22:23:08

1,900 2, uh

22:23:12

240 so I need to wait for some times

22:23:15

because it will store otherwise I

22:23:17

can't

22:23:20

execute so let's take some query guys

22:23:22

you can ask me some query in the chat in

22:23:27

between

22:23:29

okay it's updating for you also okay

22:23:32

great uh is there any alternative to

22:23:35

Pine

22:23:36

con uh to save Vector locally yes you

22:23:40

can use chroma DB just SP you can use

22:23:42

chroma DB uh otherwise there is another

22:23:44

Vector DB called f okay this is from

22:23:46

Facebook you can use as a locally and if

22:23:49

you want to uh store data on the remote

22:23:51

so you can use pine con either wave yet

22:23:54

there is another Vector DB called wave

22:23:55

yet you can also use radius so we have

22:23:57

already showed uh integrated in our paid

22:24:00

courses there will

22:24:05

show but personally I prefer this Pine

22:24:07

con because see here uh this is the

22:24:09

beautification actually you can see the

22:24:11

vector you can see the score as well see

22:24:13

this is the semantic score like uh how

22:24:16

much uh this uh Vector is similar to

22:24:19

this Vector got

22:24:25

it what is

22:24:27

autogen autogen means I can't see any

22:24:30

autogen

22:24:31

here uh we can check different Vector

22:24:34

database yes you can check maybe uh

22:24:37

chroma DB has been discussed you can

22:24:38

also integrate chroma DB

22:24:43

Imran

22:24:45

3,936 as of

22:24:57

now

22:24:59

what is the difference between single

22:25:02

and single agent and multi-

22:25:08

agent like uh what kinds of agent you

22:25:11

are talking about because agent can be

22:25:13

like

22:25:14

many because uh in langin actually we

22:25:17

have Al

22:25:23

agent agent why we use let's say you

22:25:25

don't have any um like the prompt you

22:25:28

have asked this data is not available

22:25:30

okay with the help of agent actually you

22:25:32

can uh use some SAR API and you can

22:25:34

search over

22:25:41

internet

22:25:43

4,800 and 32 as of

22:25:56

now is high St

22:26:02

High stack uh I didn't use high stack I

22:26:05

can't say whether it's similar to langen

22:26:07

or not but I used Lama index maybe

22:26:12

raish because these are some more

22:26:14

popular tool okay langin lamex people

22:26:17

are using

22:26:27

broadly

22:26:36

okay so let me see the vector count okay

22:26:39

2,000

22:26:40

Moree what about you guys how

22:26:57

much

22:27:04

okay it would be done in some time yeah

22:27:06

uh

22:27:17

6,34 and tomorrow guys we'll be doing

22:27:19

the modular coding and the web app

22:27:21

implementation so please join the

22:27:23

session tomorrow so tomorrow we'll be

22:27:25

completing these projects okay so today

22:27:27

actually I'm showing you notebook

22:27:29

experiment uh because many of you have

22:27:31

familiar with notebook experiment okay

22:27:33

so that's why now tomorrow I will try to

22:27:36

like convert this notebook to the

22:27:37

modular

22:27:46

coding okay

22:27:47

720 it's done guys it's done

22:27:54

great see it's

22:27:57

done all right now what I need to do

22:28:00

guys I need to

22:28:02

um you can also perform some

22:28:08

uh okay so uh now you can also do some

22:28:11

centic starts okay now we have stored

22:28:13

our Vector okay I already told you we'll

22:28:15

be building one centic index here see we

22:28:18

have built our knowledge base now uh we

22:28:21

have also our centic index now we can

22:28:22

see our rank results now if you give any

22:28:24

query so it will give you some rank

22:28:26

results okay now let's test this one so

22:28:28

let's say here I'm giving one

22:28:31

uh here I'm giving one question what is

22:28:34

allergies okay now if you open this book

22:28:37

okay if you open this book see allergies

22:28:39

has been also written in this book let

22:28:41

me show you now if I crl F and contrl V

22:28:45

maybe allergy allergy yes it is

22:28:51

somewhere see it has also written about

22:28:55

allergies okay see allergy like what is

22:28:58

is allergy and all so one question I'm

22:29:00

just giving what is allergies here now

22:29:03

it is searing your knowledge base okay

22:29:05

and it will give you top uh similar

22:29:08

three result okay top similar three

22:29:09

results and that results actually I'm

22:29:11

just printing let me show

22:29:13

you

22:29:15

see this is the top uh three results but

22:29:18

it's not readable because I told you if

22:29:20

you see that U architecture it will give

22:29:23

you rank results but it's not readable

22:29:25

okay the answer we are looking for it

22:29:27

should be need clear it should be

22:29:29

correct answer and to get this response

22:29:31

actually I will take the help from my

22:29:33

llm okay I will give this rank results

22:29:35

to my llm and I will tell it this is my

22:29:37

question and this is my answer this

22:29:39

three top answer now give me the correct

22:29:41

answer with respect to that okay now

22:29:43

let's generate our correct answer with

22:29:44

the help of our llm so for

22:29:46

this uh this is the code you need to

22:29:49

write first of all I will Define one

22:29:51

prom template okay because you know what

22:29:53

is prom template you are just telling

22:29:55

your llm like you need to do this thing

22:29:57

so if uh use the following piece of

22:29:59

information to answer the question if

22:30:01

you don't know the answer just say that

22:30:03

you don't know don't try to make up the

22:30:05

answer okay so I just want the authentic

22:30:08

answer from my LM that's why I'm giving

22:30:09

the prompt so user will give the uh

22:30:12

context and question and it should reply

22:30:14

the answer okay so this is the template

22:30:17

I have written you can write any kinds

22:30:18

of promp template it's up to

22:30:21

you what is the distance is used perform

22:30:24

similarity cosine Matrix

22:30:26

justel now this is my prompt now here

22:30:29

I'll be creating the prompt template

22:30:31

okay you already know what is prompt

22:30:33

template even I yesterday I was also

22:30:35

discussing I'll be creating this prompt

22:30:36

template this prompt template I have

22:30:37

added here and I created The Prompt and

22:30:39

this thing I have created as a chain

22:30:41

type arguments because I will be using

22:30:43

chain okay question uh uh like retable

22:30:46

question answering chain okay that's why

22:30:48

now let's load

22:30:50

my llama model so here is my model in

22:30:53

the model folder as you can see so here

22:30:56

I'm just giving the path and I'm just

22:30:57

loading the L model with the help of

22:30:59

this C Transformer library and this is

22:31:01

going to be my llm now let's

22:31:05

execute done now what I will do I will

22:31:09

create my question answering object now

22:31:12

see retrieval question answer I think

22:31:14

you know what is Ral question answer

22:31:15

from langen and here I'm giving my llm

22:31:19

as well as my prompt template as you can

22:31:21

see we have implemented my prompt

22:31:22

template and some of the arguments that

22:31:24

means dock string doers what is this

22:31:27

docer doers is nothing but your

22:31:28

knowledge base which is nothing but my

22:31:30

Vector DB U representation okay and here

22:31:33

I'm just giving uh I'm just telling it

22:31:36

will give you two relevant answer and

22:31:38

from this two relevant answer you should

22:31:40

give me the correct response okay now

22:31:42

this is my question answer object now

22:31:44

let's finally ask some

22:31:46

question so this is one for loop I have

22:31:48

written so it will take the input from

22:31:51

the user then it will ask the question

22:31:53

to my llm and llm will give me the

22:31:55

response now let me execute and show you

22:31:57

see this is the input so I'll just ask

22:32:00

what is let me show you which question

22:32:03

I'm I'll be asking so contrl

22:32:06

F I'll be asking something related

22:32:10

acne maybe acne is

22:32:14

there see acne okay so acne is a screen

22:32:18

problem I think you know see this is the

22:32:21

acne so let's ask something related to

22:32:23

the acne like what is acne and all about

22:32:24

so I'll just say what is acne

22:32:29

now let's ask this

22:32:31

question so again U response time would

22:32:34

be a little bit High because we are

22:32:36

using U um like model on our CPU machine

22:32:40

that's

22:32:41

why and again I am doing live streaming

22:32:43

so for me it would be a little bit late

22:32:45

okay but if I stop the streaming so it

22:32:47

would be

22:32:51

quickly and tomorrow we'll be

22:32:53

integrating the uh like front end part

22:32:55

and you will see the beautification of

22:32:57

this projects okay it would be amazing

22:33:13

completely so for this live streaming

22:33:16

actually I'm uh having

22:33:17

some uh slow time

22:33:27

maybe

22:33:35

so anyone running is it running for

22:33:50

you okay see done now this is the

22:33:54

response guys I got acne is a common

22:33:56

skin disease character ized by pimples

22:33:59

on the face chest and back that occurs

22:34:02

when the uh pores of the skin becomes

22:34:06

clothed with the oil dead skin cells and

22:34:11

bacteria is it

22:34:14

correct is it correct response guys just

22:34:16

give me give me a quick yes in the chat

22:34:19

how is the

22:34:26

project you can ask any kinds of

22:34:28

question guys any kinds of question from

22:34:30

this book just go through the book get

22:34:32

some idea what are the disease what are

22:34:33

the med medicine you have okay and you

22:34:36

can ask the

22:34:38

question I'm not a doctor

22:34:40

sir even I'm not a doctor but I have

22:34:43

this bot right now I can ask any kind of

22:34:46

question so how was the session guys Al

22:34:48

together did you learn the entire

22:34:50

concept like how we can integrate all

22:34:52

the technology together and implement

22:34:54

this kinds of

22:34:55

projects no no fine tuning is a

22:34:57

different friend benit fine tuning will

22:34:59

show in our paid courses it available

22:35:01

okay this is the existing model we are

22:35:03

using with our custom

22:35:08

data

22:35:09

okay now let me stop the execution uh

22:35:12

tomorrow I will show you the further

22:35:14

part uh uh it is enough for today I

22:35:18

think yeah and this code would be

22:35:21

available in my GitHub the link I have

22:35:22

shared with you let me share it again so

22:35:25

I'll just comment the code after the

22:35:26

session so you'll get from here

22:35:31

so this is the GitHub link guys everyone

22:35:33

you can yeah now let me take some

22:35:37

question where did you get the data data

22:35:40

I downloaded from the internet this book

22:35:42

I downloaded okay data I've already

22:35:44

shared and please and doer CD pipeline

22:35:47

upcoming classes we'll be adding uh we

22:35:49

have a projects in our paid courses

22:35:50

dependra we'll show that how much data

22:35:53

we can give uh terabyte you can give as

22:35:57

many as data but uh you should have good

22:35:59

memory condition okay if you are like

22:36:01

very less memory then uh you can't load

22:36:05

so so much data so guys uh let's start

22:36:08

with our uh medical chatbot

22:36:10

implementation so yesterday I was

22:36:12

discussing the architecture and the uh

22:36:15

notebook experiment part uh today

22:36:17

actually I will show you how we can

22:36:19

convert this entire things to modular

22:36:21

coding even uh I will also show you like

22:36:23

how we can uh create the web application

22:36:25

and all using flas so it should be U

22:36:28

totally amazing so make sure you are

22:36:30

watching this live till the

22:36:32

end okay guys so before starting with

22:36:35

the session uh first of all I want to

22:36:37

show you um your all of the resources

22:36:39

has been updated in your dashboard so

22:36:41

let me open my dashboard

22:36:43

once

22:36:46

um so guys here is the dashboard and uh

22:36:49

if you see today is day 13 so till day

22:36:53

12 actually it uh it has updated already

22:36:55

so all the resources all the like GitHub

22:36:58

link everything has been updated here so

22:37:00

you can check from your

22:37:04

end and guys uh if I disconnect somehow

22:37:07

so no need to worry about just stay here

22:37:09

I will uh again reconnect okay I have

22:37:14

backup all

22:37:21

right so everyone is ready can I get a

22:37:24

quick yes from everyone so that I can

22:37:25

start with the implementation so

22:37:28

just give me a yes in the

22:37:40

chat okay thank

22:37:44

you all right so uh let me open my uh

22:37:48

project actually I created yesterday so

22:37:50

this is my project guys even I have

22:37:53

already updated the code in my GitHub as

22:37:55

you can see uh this notebook I

22:37:57

implemented yesterday so this is already

22:37:59

updated here even the data is already

22:38:01

available and model actually I can't

22:38:03

upload in my GitHub because it's a huge

22:38:05

model so what I did actually I just

22:38:07

given the instruction okay so this is

22:38:08

the instruction I have given like how to

22:38:11

download this particular model from this

22:38:12

URL okay so first thing what I will do

22:38:15

uh I will try to upgrade this uh readme

22:38:18

file once because let's say if you are

22:38:19

referring this uh GitHub okay if you're

22:38:21

referring this repository so how we can

22:38:24

set up this projects and all okay first

22:38:26

of all I will just write uh some STS in

22:38:27

the rme file then I will try to start

22:38:30

with our implementation okay so let me

22:38:32

open my project with my vs code and uh

22:38:35

what I will do uh I will also show you

22:38:37

uh on the neural lab as well because

22:38:39

neural lab I was trying to upload the

22:38:41

model but it was taking time uh for me

22:38:43

okay because this model is hug so I'll

22:38:46

will also show you side by side

22:38:47

implementation how we can do it so what

22:38:49

you just need to do here you just need

22:38:50

to upload the model here in the model

22:38:52

folder okay and all the steps will

22:38:54

remain

22:38:56

same all right

22:38:58

so I have this model in my local machine

22:39:01

so this is the model now what I will do

22:39:03

first of all let me open

22:39:05

my uh vs code

22:39:12

here

22:39:15

okay so everyone you can open up your vs

22:39:17

code or you can also do it on the neural

22:39:21

lab and if you don't have the code you

22:39:24

just clone from my repository

22:39:26

once

22:39:40

okay so I hope my screen is visible

22:39:42

properly everyone just confirm in the

22:39:45

chat or should I zoom a little

22:39:52

bit maybe it's

22:39:55

fine okay

22:40:03

just a minute

22:40:09

uh okay so first of all let me write

22:40:11

down the steps what you need to do to uh

22:40:14

execute this project so I can remove

22:40:17

these are the steps

22:40:19

maybe yeah so the first thing you need

22:40:23

to clone this particular repository so

22:40:25

let me just add this

22:40:28

part so first of all you need to clone

22:40:30

the repository okay so here I have just

22:40:32

given like till github.com so what you

22:40:35

need to do you need to just clone this

22:40:37

particular repository the repository I

22:40:39

have created Okay click on the code and

22:40:41

click on this link address then uh the

22:40:44

second thing you just need to create one

22:40:46

virtual environment so we have already

22:40:49

created the

22:40:50

environment and the name of the

22:40:52

environment was here uh this is the name

22:40:56

so medical chat boo so I just written M

22:40:58

chatbot okay I'll copy this name and

22:41:01

here I'll just

22:41:03

upgrade okay and I was using python 3.8

22:41:06

version

22:41:08

okay so when the projects will be

22:41:11

available uh in

22:41:13

Inon uh this project is already

22:41:16

available okay in my GitHub Raven even

22:41:19

Inon website it is also available you

22:41:22

can check it out and today we'll be

22:41:24

completing this project implementation

22:41:26

okay entirely because yesterday I was

22:41:28

doing the notebook exper experiment

22:41:35

only then I need to active by uh

22:41:39

environment here so this is the

22:41:44

name after

22:41:46

that okay internship project you are

22:41:49

talking about so internship project

22:41:50

should be updated also okay raan just uh

22:41:53

check the internship portal it would be

22:41:56

updated

22:42:01

then uh I just need to install the

22:42:03

requirements actually so yesterday I

22:42:05

showed you I was installing some of the

22:42:07

requirements so this is the command to

22:42:09

install the requirements all right then

22:42:12

what we did exactly we just created Pine

22:42:14

con uh API key I think you remember so

22:42:17

let me open my Pine con once so pinec

22:42:20

con. let me loging with my

22:42:22

[Music]

22:42:24

account so I'm going to use the same

22:42:26

index because we have already stored our

22:42:28

data yesterday okay so I'll be using the

22:42:31

same index

22:42:33

only so this is my index guys medical

22:42:35

chatbot I created so here I think you

22:42:37

remember we collected the API Keys as

22:42:39

well as our environment okay this Pine

22:42:43

con environment so both I need to add

22:42:46

otherwise this project won't be working

22:42:47

so that thing I will also mention in the

22:42:49

rme

22:42:51

file so here I'm just telling create

22:42:54

aemv file I will tell you what is this

22:42:56

EnV file file okay how we'll be managing

22:42:58

this uh secret key and all okay so this

22:43:01

thing you need to pass in the

22:43:02

environment file then it will

22:43:05

work all right and the last thing I

22:43:09

downloaded my model so this is the step

22:43:12

to download my model so you just need to

22:43:15

download this particular model from this

22:43:17

URL and need to Pro uh like keep that

22:43:19

model in the model folder okay for us

22:43:21

actually we already kept the

22:43:25

model all right so these are the steps

22:43:27

actually we uh completed yesterday and

22:43:30

rest of the thing actually I will show

22:43:31

you today now let me commit the

22:43:47

changes okay done now if I go to my

22:43:49

GitHub and refresh the

22:43:53

page yeah it is updated now let me share

22:43:56

the link with you again

22:44:06

so here's the

22:44:18

link all

22:44:23

right so the first thing actually uh

22:44:27

what I need to do I need to create my

22:44:28

project template because yesterday I

22:44:31

completed the notebook experiment okay

22:44:32

so most of the thing I will copy from my

22:44:34

notebook only so this is my notebook so

22:44:36

most of the code actually I'll be copy

22:44:37

pasting from here and the thing is like

22:44:40

I just need to uh create a modular

22:44:42

coding pipeline okay so that is the main

22:44:44

thing here like how we can organize our

22:44:47

code so for this uh instead of creating

22:44:50

the folder manually uh so what I will do

22:44:52

I will just create a template file here

22:44:55

so that template file I will just write

22:44:57

some of the logic like what are the

22:44:58

folders I need and how it would be

22:45:00

created with the help of python then if

22:45:02

I execute that particular template file

22:45:04

it will automatically generate the

22:45:05

folder for me okay now let's say if I

22:45:07

want to create the folders and file now

22:45:09

what I need to do I need to manually

22:45:10

create it let's say I want a file I will

22:45:12

click here again I will name the file

22:45:14

then I need a folder here I will again

22:45:15

click here then I will just uh name the

22:45:17

folder name that's how I will be

22:45:19

creating manually but let's see if

22:45:20

you're doing the uh like the same

22:45:22

projects again and again okay similar

22:45:23

kinds of projects what you need to do

22:45:25

again you need to create those are the

22:45:26

files manually so instead of that what I

22:45:28

will do I'll create one template file

22:45:30

and that should be one time effort okay

22:45:32

and I will I will just write all the

22:45:34

logic there like how we can create I

22:45:36

will be creating this folder structure

22:45:37

and all so every time if you execute

22:45:39

that file so it will automatically

22:45:40

create the folder structure for

22:45:42

you okay so for this let's create this

22:45:45

file and I will name it as

22:45:48

template template.

22:45:53

pipe okay so here first of all let's

22:45:56

let's import some of the library so I

22:45:58

need the operating

22:46:00

system then I also need something called

22:46:03

path from path Le I'll tell you why this

22:46:05

path leave is required just let me

22:46:07

import it first of all so uh it should

22:46:10

be everything

22:46:11

from so from path

22:46:14

Le import

22:46:17

path then I also need something called

22:46:22

login okay so the first thing I just

22:46:24

need to create one logging string here

22:46:26

okay why I need to create a loging

22:46:27

string so let's say whenever you will

22:46:29

execute that template. Pi file so it

22:46:32

will also show you the log on the

22:46:33

terminal like whether this folder has

22:46:35

been created or not okay if it is if it

22:46:37

is created now why it is created it will

22:46:39

also show you the location as well okay

22:46:40

so to log these are the information I

22:46:42

need this login string okay I hope you

22:46:45

already know what is logging in Python

22:46:46

guys yes or no if you don't you can

22:46:48

search on Google like logging in Python

22:46:51

so logging is a inbuilt uh modu inside

22:46:53

python so maybe you already worked with

22:46:57

login so this is the documentation of

22:46:59

login

22:47:04

guys all right so if you visit the

22:47:07

documentation so you will see these

22:47:09

kinds of loging string people are

22:47:11

writing okay this is the loging string

22:47:13

we usually follow so here we usually

22:47:15

mention first of all our logging level

22:47:18

okay so here the log level is like

22:47:19

information uh like level log so

22:47:22

basically I just want to save my

22:47:23

information like why this folder is

22:47:26

creating what is the path so these are

22:47:27

the information actually so that's why

22:47:29

here I have given login. info okay and

22:47:32

you just need to uh mention also the

22:47:33

format format of the loging like what

22:47:35

particular message actually it will show

22:47:37

you so the first thing I'm just saving

22:47:39

my asky time that means the current time

22:47:40

stamp let's say I'm executing the code

22:47:43

at this time so it will save that

22:47:45

particular time with respect to the the

22:47:47

message actually you will be writing

22:47:49

okay so this is the loging string so it

22:47:50

would be clear whenever I'll execute the

22:47:52

code and I'll I'll tell you okay how

22:47:54

this log would be

22:47:55

saved

22:48:01

now here I need some list of the file

22:48:04

okay so let's create a

22:48:06

variable and I will just name it as list

22:48:09

of

22:48:11

file list of files is equal to so let's

22:48:14

make it as a list now here first of all

22:48:17

I need uh One Source folder okay so I'll

22:48:21

just name it as

22:48:24

SRC so inside SRC I'll creating one

22:48:27

Constructor so underscore uncore

22:48:30

unit I'll tell you why this underscore

22:48:32

uncore init _ Pi is needed as of now

22:48:35

just uh create the folder with

22:48:37

me and then I will be creating another

22:48:40

uh like file called helper. Pi in the

22:48:43

same folder so I'll copy the same thing

22:48:47

again and it should be helper.

22:48:55

Pi then again I will be creating another

22:48:57

file inside that and I'll just name it

22:48:59

as

22:49:02

prompt prompt.

22:49:05

Pi okay then I also need one uh file

22:49:09

called

22:49:15

envv then I also need uh something

22:49:17

called setup. Pi because requirements we

22:49:19

already created I don't need it so I'll

22:49:22

just write setup.py

22:49:25

then I also need something called U one

22:49:28

resource folder because I'm going to

22:49:30

keep this file inside a folder called

22:49:32

resource so let's name it

22:49:35

research slash and here I'm going to

22:49:38

create that trial.

22:49:47

ipnb all right then I also need

22:49:50

something called

22:49:55

app.py

22:49:59

then uh I need another file called store

22:50:04

index store uncore

22:50:08

index. Pi I'll tell you why this IND

22:50:11

store underscore index is required okay

22:50:13

I'll tell you now I think most of the

22:50:16

things I have created okay so I will

22:50:18

also integrate the flask so for this

22:50:19

actually you need one folder called

22:50:23

Static

22:50:25

uh

22:50:30

static and another folder you need

22:50:33

something called template. Pi sorry

22:50:38

templates so inside templates I will be

22:50:40

creating another file and I will just

22:50:42

name it as uh chat.

22:50:46

HTML yeah so these are the folders and

22:50:50

file I need as of now if I need it so

22:50:53

I'll uh create uh later on okay so as of

22:50:55

now let's create these are the things

22:50:56

only now I have already listed down the

22:50:59

files and folder actually I'll be

22:51:01

creating here okay now how to create it

22:51:04

okay how to create it so for this we

22:51:06

just need to write some of the logic

22:51:07

here so I'll be using simple python code

22:51:09

only to create this folder structure and

22:51:11

all so the first thing I'll be looping

22:51:13

through this list okay so I'll just

22:51:14

write one for Loop so for file uh

22:51:19

path in list of the file that means this

22:51:23

list actually I'm iterating through then

22:51:26

what I need to do first of all uh the

22:51:30

file path actually I'm having so first

22:51:32

of all I need to convert them to

22:51:38

path I need to convert them to path okay

22:51:40

why I'm converting them uh like to path

22:51:43

because if you see here the operating

22:51:45

system actually currently I'm using it's

22:51:46

Windows okay Windows machine I'm using

22:51:48

but here if you see I'm using forward

22:51:50

slash so I think you already know in

22:51:53

Windows machine actually we usually use

22:51:55

something called backward slash

22:51:57

yes or no guys backward slash if you see

22:51:59

any kinds of Windows path it would be

22:52:00

backward slash instead of forward

22:52:02

slash okay but here we are using

22:52:05

something called forward slash okay so

22:52:07

forward slash we usually use uh in the

22:52:09

Linux operating system and Mac operating

22:52:11

system okay but in Windows we usually

22:52:13

use backwards

22:52:14

slash so that is why to uh prevent this

22:52:17

kinds of issue okay I need this path

22:52:19

Library okay now how this path will be

22:52:21

working let me show you let me give one

22:52:23

demo so here I will activate my python

22:52:27

so let's import

22:52:30

W uh maybe I can import this path so

22:52:36

from path

22:52:39

leap import

22:52:41

path so let's define One path so I'll

22:52:44

just write path equal to so here I can

22:52:47

give let's say

22:52:49

test uh let's I will give uh forward

22:52:52

slash here and here I will give U app.

22:52:55

pi

22:52:58

so let's say this is my path now what I

22:53:00

will do I will just give this path in my

22:53:02

path

22:53:05

class okay if I give it now see what

22:53:08

will happen just see that it will

22:53:09

automatically detect it's a Windows

22:53:12

path okay first of all it will detect my

22:53:15

uh operating system I I'm using okay

22:53:16

with respect to that it will convert

22:53:18

that path okay so this is the advantage

22:53:20

to use this path class okay so what will

22:53:22

happen now if you execute this code in

22:53:24

the Linux operating system as well Mac

22:53:26

operating system as well everywhere it

22:53:28

will work because with with the help of

22:53:30

this path class it will first of all

22:53:31

detect the operating system then it will

22:53:33

convert that part with respect to the

22:53:35

operating system we are using okay so

22:53:36

that's why we are using this path from

22:53:38

the path Li itself all

22:53:41

right now here I got my file path again

22:53:44

so I'll just store

22:53:51

it okay now here what I need to do I

22:53:54

need to separate out my folders and file

22:53:56

because as you can see here this is my

22:53:58

folders okay and this is my files so I

22:54:01

need to separate them because as you can

22:54:03

see here I can't directly create my

22:54:05

folders and file okay all together so

22:54:07

what I need to do I need to separate my

22:54:09

folders and I need to separate my files

22:54:11

okay in a two variable then I will be

22:54:12

creating that so for this what you can

22:54:14

do so first of all I will store my file

22:54:20

directory then I will instore my file

22:54:23

name okay so there is a uh method inside

22:54:27

operating system package so just write

22:54:28

OS do

22:54:31

path uh os. path.

22:54:35

split okay so this is the method you can

22:54:37

use and inside that you just need to

22:54:39

give the file

22:54:41

path okay now what will happen let me

22:54:44

show you so let's say this is my path I

22:54:46

have so I will import o again now what I

22:54:50

will just do I'll just write uh first of

22:54:53

all uh yeah w dot

22:54:57

path do

22:55:00

split okay and here I will give my path

22:55:02

so let's say this is my path and now see

22:55:05

what will happen see it is returning the

22:55:07

folder separate and it is returning the

22:55:10

file separate okay now what I can do I

22:55:12

can create a two variables here you can

22:55:14

see I can I have created two variables

22:55:16

so the first variable will contain the

22:55:18

folder name and the second variable will

22:55:21

contain the file name okay so this is

22:55:22

the logic actually I'm just trying to

22:55:25

write

22:55:27

all right so once I got my uh file

22:55:30

directory and my file name now what I

22:55:32

need to do okay I just need to create my

22:55:34

file directory at the very first so for

22:55:36

this I can write one logic so I'll just

22:55:37

write if file

22:55:39

directory if file directory is not empty

22:55:44

okay is not

22:55:45

empty so I can write like that is not

22:55:48

empty so what I need to do I'll be

22:55:50

creating the uh file directory so I'll

22:55:52

just write w. make D okay so this is the

22:55:55

method actually you can use to create

22:55:56

any kinds of directory okay and here

22:55:59

I'll just give my file directory name I

22:56:02

want to create then after that I need to

22:56:05

give one parameter called exist okay is

22:56:06

equal to true so what will happen if

22:56:09

this file is already available if this

22:56:10

folder is already available in your

22:56:12

computer so it won't be creating okay

22:56:14

otherwise it will create so with the

22:56:16

help of this parameter you can control

22:56:18

this thing

22:56:19

okay now if you're not giving it so what

22:56:22

will happen it will replace that

22:56:23

particular folder let's say in the

22:56:25

particular folder you have some files

22:56:26

okay again it will replace that so you

22:56:28

need to recreate it again so that is why

22:56:30

you need to give this

22:56:33

method okay so once it is done I also

22:56:36

need to log the information I'll just

22:56:38

write login

22:56:40

doino and here I can give one log so

22:56:46

creating creating F uh

22:56:54

directory

22:56:56

creating directory uh first of all I'll

22:56:59

give the folder

22:57:03

name uh folder name so this is my file

22:57:09

directory and after that for the

22:57:13

folder for the uh for the

22:57:18

file and here I will give my file name

22:57:21

so this is my file name okay that's it

22:57:24

now once my folder is uh done okay let's

22:57:26

say I have created my folder now what I

22:57:28

need to do I also need to create the

22:57:30

file inside the folder okay so for this

22:57:32

I need to write another logic so

22:57:35

here uh what I can

22:57:40

do

22:57:42

yeah I'll again write one if statement

22:57:46

if maybe intention is not correct just a

22:57:49

minute yeah so

22:57:52

if uh not o do

22:57:59

path uh do

22:58:03

exist this file

22:58:07

path okay this file path that means the

22:58:10

file path actually I'm having so if it

22:58:12

is doesn't exist okay in my directory so

22:58:15

what I need to do okay I need to create

22:58:18

it but instead of using one particular

22:58:20

logic I'll be using another particular

22:58:22

logic I will also check the size of the

22:58:24

file so what I can do

22:58:26

I can write another logic here so

22:58:28

W uh dot

22:58:33

path dot uh there is a parameter you

22:58:35

will get called G size if you want to

22:58:38

check uh any particular size of any any

22:58:40

file so you can use this method actually

22:58:42

get size now inside get size you need to

22:58:45

give the file

22:58:46

name file name and that uh if it is not

22:58:51

let's say uh if it is not let's say uh

22:58:55

equal equal zero that means if this file

22:58:57

is not empty so what I need to do I need

22:58:59

to create that particular file so for

22:59:01

this I'll just use with

22:59:05

open with open and here I will give my

22:59:08

file

22:59:09

path okay and here I just need to create

22:59:12

it so that's why I need to open with

22:59:14

write mode okay once it is done I'll

22:59:17

just do the pass operation here because

22:59:19

I'm not doing anything I'm just only

22:59:20

creating that particular file here okay

22:59:23

then I also need to log the information

22:59:25

so what I can do here I I'll just write

22:59:30

login login.

22:59:34

info login. info and here I will give

22:59:37

the log so I can just write

22:59:44

creating creating empty

22:59:49

file and let's give the file name

22:59:53

here file path

22:59:58

yeah and if it is already exist so what

23:00:01

I will do I'll just write

23:00:03

else so I'll just give the log message

23:00:06

here so login do

23:00:10

info um here I can give uh this file

23:00:15

file

23:00:17

name is

23:00:19

already um created okay so this is the

23:00:22

message I think I can give yeah so this

23:00:24

is the simple I have written so guys

23:00:27

this code is understandable for you yes

23:00:29

or no give me a confirmation in the chat

23:00:32

are you getting this code how I have

23:00:33

written it's a simple python code

23:00:42

only

23:00:46

yes okay great now let's execute this

23:00:51

particular template file and see what

23:00:53

happens okay now if you see left hand

23:00:55

side I I don't have these are the files

23:00:56

and folder okay now once I will execute

23:00:59

this template. Pi let's see what will

23:01:01

happen so I'll open my terminal I'll

23:01:03

exit from my

23:01:06

python uh first of all let me uh

23:01:09

activate my environment I'll just write

23:01:10

cond

23:01:12

activate M

23:01:18

chatbot now let's execute this template.

23:01:21

Pi so template. Pi see see the magic

23:01:24

guys automatically all the files and

23:01:26

folder would be created left hand side

23:01:27

just see left hand side and see the log

23:01:30

guys it is saving my Tim stamp the

23:01:33

current time stamp I'm executing the

23:01:35

code as well as the date and it is

23:01:37

giving you the message like directory

23:01:38

created SRC for the file of uncore uh

23:01:43

init.py

23:01:44

again creating an empty file inside SRC

23:01:48

uncore init.py okay that's how all the

23:01:52

file and folder has been created and see

23:01:54

left hand side guys we are able to

23:01:57

create our folder

23:01:58

structure uh in just one

23:02:01

shot okay now let's see you need some

23:02:03

other files and folder okay in future so

23:02:05

what you need to do you just need to

23:02:06

give the list here let's say I need

23:02:08

something called test. Pi I'll just give

23:02:10

test. Pi here I'll save this one again

23:02:13

if I execute the same template. Pi uh

23:02:16

okay so it is

23:02:18

telling this system cannot find the

23:02:21

specific Pi okay I'm getting one error

23:02:24

let me see test. Pi has been cre or

23:02:26

not okay static it is throwing the error

23:02:30

okay static should not be empty so here

23:02:31

I can give

23:02:33

uh uh

23:02:38

CSS or I can give U just dogit

23:02:43

ignore

23:02:45

dogit

23:02:53

keep let me remove this static file

23:02:57

here now let me execute it

23:03:03

again okay it's throwing error just a

23:03:06

minute

23:03:10

um file name St

23:03:17

size not o. get software line five get

23:03:21

size return file not found the system

23:03:25

cannot find the file

23:03:27

specified underscore uncore unit.

23:03:42

Pi maybe my logic is

23:03:54

correct okay now it's done I think yeah

23:03:57

now if you see uh my static folder has

23:04:00

been also created now here if

23:04:04

I uh just uncomment this test. PI right

23:04:07

now and if I again execute

23:04:11

it see guys it has created okay now see

23:04:15

you can create as much as file and

23:04:17

folder okay it's up to

23:04:20

you okay so in this case I don't need

23:04:22

this test. Pi I'll just remove it and

23:04:25

here I will also remove the test.py from

23:04:30

here all right so in future let's say if

23:04:33

you're developing any kinds of projects

23:04:35

instead of creating the folders and file

23:04:37

manually what you can do you can create

23:04:40

this particular template file and here

23:04:42

just write the logic okay it would be

23:04:44

one time effort but this file you can

23:04:46

use it okay in your every projects just

23:04:49

uh execute this particular file and it

23:04:51

will automatically create the folder

23:04:52

structure for

23:04:54

you all right now let me move that

23:04:57

trials file in my resarch folder so I'll

23:04:59

just move it I'll just cut it in my

23:05:01

resarch

23:05:05

folder

23:05:07

yeah uh everything is done now let me

23:05:10

just comment the changes in my GitHub

23:05:13

quickly folder

23:05:16

structure add

23:05:24

it

23:05:30

so guys so far everything is

23:05:33

clear you can let me know in the

23:05:41

chat like how we have created the folder

23:05:44

instuction and all so far everything is

23:05:48

clear

23:05:54

okay

23:05:56

okay fine now we are done with our uh

23:06:00

project template creation so now second

23:06:03

thing I just need to write my setup. Pi

23:06:05

file okay why I needed setup. Pi file

23:06:08

because as you can see now we have

23:06:09

created so many file inside the folder

23:06:13

okay now let's say I want to import

23:06:15

something from this particular file

23:06:17

let's say help .p I have written

23:06:18

something now let's say I want to import

23:06:20

that thing inside my app.py okay so what

23:06:23

I need to do I need to write from SRC do

23:06:26

helper import something okay so if you

23:06:29

want to do this kinds of operation then

23:06:31

you need to set up this particular SRC

23:06:33

file as my local

23:06:34

package I think you already familiar

23:06:36

with what is local package okay in

23:06:38

Python let's say whenever you install

23:06:41

any kinds of like package from the piy

23:06:44

website okay it is already hosted on the

23:06:46

pii website but uh it can be also done

23:06:49

we can also create our local package as

23:06:51

well okay let's say here if I do uh pep

23:06:54

list

23:06:56

pip list so it will list down all of the

23:07:00

package actually I have installed in

23:07:01

this projects okay but here if you see

23:07:04

this SRC is missing okay SRC is missing

23:07:07

so if I want to import something from

23:07:08

the SRC then it will throw error it it

23:07:11

will tell SRC is not found okay so to

23:07:13

prevent these kinds of error what I need

23:07:15

to do I need to create this setup. Pi

23:07:17

file and I need to set up this SRC

23:07:19

folder as my local

23:07:23

package

23:07:26

no this is not a pre-installed this

23:07:28

thing I have installed from the

23:07:29

requirement. txt I think you remember

23:07:32

Iman okay because this is my new created

23:07:35

environment and inside the environment I

23:07:37

install all the package actually I need

23:07:39

for this

23:07:41

project all right but here if you see

23:07:43

SRC is

23:07:44

missing SRC is missing now let's say if

23:07:47

I'm writing something inside help .p

23:07:49

let's say if I Define anything let's say

23:07:50

import OS uh let's say I will write one

23:07:53

function here uh let let's say main

23:07:55

function I have written and I'll just

23:07:57

doing some pass operation now let's say

23:07:59

I want to import this main method inside

23:08:01

my app. Pi now what I need to do okay

23:08:04

what I need to do I just need to import

23:08:06

it first of all so from SRC so SRC is my

23:08:09

folder SRC do help part okay then import

23:08:14

main import main getting my point so if

23:08:19

I want to import like that now see this

23:08:21

SRC is not present inside my environment

23:08:24

okay it's not present as a package envir

23:08:26

environment so it will throw error like

23:08:28

SRC module is not found got it but if

23:08:31

you want to install this SRC as your

23:08:33

local package and if you want to keep it

23:08:35

inside your environment okay just to

23:08:36

prevent the error you just need to write

23:08:38

this setup. Pi so this thing actually we

23:08:41

usually use in our end to end

23:08:43

implementation always because we write a

23:08:45

modular coding

23:08:47

here all

23:08:49

right so now let's write our uh setup.

23:08:53

Pi so I'll open the setup do pi and this

23:08:55

code is very common so I already written

23:08:58

this code let me show

23:08:59

you setup. Pi

23:09:02

code uh see guys here you just need to

23:09:05

use one particular package called setup

23:09:07

tools okay setup tools is a pre-built

23:09:10

package inside python from here you need

23:09:12

to import two particular things one is

23:09:14

like find packages and other is like

23:09:16

setup now you need to create one setup

23:09:18

object here so see here I have created

23:09:20

the setup objects here you can give your

23:09:22

project name so in this case I creating

23:09:24

Genera VI projects okay that's why I

23:09:25

given generative projects you can also

23:09:27

give something called medical chatboard

23:09:28

let's give medical chatboard medical

23:09:32

[Music]

23:09:33

chatboard all right you can also specify

23:09:36

the version okay version of the package

23:09:38

you want to create so let's say this is

23:09:40

the initial phase I'm implementing the

23:09:41

project so that's why the version I have

23:09:43

used

23:09:47

0.0.0 okay now here you can give the

23:09:50

author name so let's say I here I have

23:09:52

given my name you can also give your

23:09:53

name so let me give my full full name

23:09:55

here so I'll just write

23:09:59

B ah Bui okay this is my name you can

23:10:03

also give the author email address let's

23:10:05

say here I have given my email address

23:10:07

you can also give your email address now

23:10:09

here you need to call this find packages

23:10:12

this uh method so what it will do it

23:10:14

will look for this Constructor file in

23:10:16

each and every folder and where it will

23:10:19

get this particular file that folder

23:10:20

would be considered as my local package

23:10:22

okay so this is the idea to create our

23:10:24

local package okay so that's why we

23:10:27

created this uncore init.py because I

23:10:30

want to make this SRC folder as my local

23:10:33

package and how it will get to know with

23:10:35

the help of this find package method

23:10:38

okay so this find package method it will

23:10:40

find everywhere in every folder and it

23:10:43

will look for this particular uncore

23:10:45

uncore dop file wherever it is present

23:10:48

it will create that particular folder as

23:10:50

my local package clear guys this concept

23:10:52

is clear yes or no you can let me know

23:10:54

in the chat

23:11:02

if yes just write clear in the chat so

23:11:04

that I can get to

23:11:06

know okay

23:11:08

great now how to install the setup.py

23:11:11

how to install the setup.py for this I

23:11:13

will be utilizing my requirement. txt

23:11:15

file okay I'll be utilizing my

23:11:17

requirement. txt file so here I'll just

23:11:19

write one particular line I'll just

23:11:21

write hypen space Sorry hypen space dot

23:11:25

okay hyen eace dot if you just write

23:11:28

this particular line automatically

23:11:30

whenever you will be set uping that

23:11:31

requirement text it will look for that

23:11:34

setup.py file okay then it will open

23:11:37

that setup. Pi file then it will install

23:11:38

everything got it so whenever it will

23:11:40

install everything that means you have

23:11:42

done the installation of the local

23:11:45

package now let me show you so I'll open

23:11:47

my terminal

23:11:48

again I'll clear

23:11:50

it now here I'll just write python sorry

23:11:54

uh peep

23:11:58

install

23:12:00

peep

23:12:02

install hypen

23:12:04

R requirement. txt okay I already added

23:12:07

that uh hypen eace dot uh yes hypen e

23:12:13

space dot in my requirements now it will

23:12:19

work see now setup. Pi has been

23:12:22

installed now if you see there would be

23:12:24

a folder automatically created called

23:12:26

medical cho. EG info okay if it is

23:12:29

generating this particular folder that

23:12:30

means you are done with the installation

23:12:33

okay and inside that you will have some

23:12:34

of the metadata okay no need to worry

23:12:36

about some metadata related of your

23:12:39

package you have installed let's say

23:12:40

these are the package you have installed

23:12:41

okay as a local folder so these are the

23:12:43

information it will save here all right

23:12:45

now if I show you peep list now if I do

23:12:48

peep list operation in my terminal that

23:12:51

means I want to see what particular uh

23:12:53

Library I have now here you will see SRC

23:12:55

would be present I can show you SRC SRC

23:12:59

would be

23:13:00

present setup

23:13:05

Tool uh not SRC it would be medical

23:13:07

chatboard the name of the package I have

23:13:10

installed called medical chatbot in the

23:13:11

inside the medical chatbot I have this

23:13:13

SRC folder right now okay see this

23:13:15

medical chatbot was not present and see

23:13:17

this package is coming from my local

23:13:18

machine itself okay so that's why this

23:13:21

is needed now if I want to import

23:13:23

something from my helper I can easily do

23:13:25

it without any kinds of

23:13:32

error all right now let me uh push the

23:13:35

changes in my GitHub but before that I

23:13:37

will remove these are the

23:13:45

line so I'll just write uh

23:13:50

setup file

23:13:52

added and I'll comp it so you can

23:13:56

refresh my GitHub and you can go get the

23:13:58

code from there now same thing you can

23:14:00

do it on the numeral app so let me copy

23:14:02

this template file and I will go to the

23:14:05

Neal

23:14:07

app and here I will create one uh

23:14:10

template

23:14:12

file template. Pi

23:14:16

file let me Zoom a little bit now I'll

23:14:19

paste the code

23:14:21

here save now if I execute the template.

23:14:25

P file here so python template. Pi file

23:14:28

see it has automatically created okay

23:14:29

the same thing you can perform on the

23:14:31

Neal lab okay only you just need to

23:14:33

upload the model here upload the model

23:14:35

that thing you need to

23:14:45

do all

23:14:49

right now we have generated our folders

23:14:52

and file and uh everything is working

23:14:54

fine so far now let's add first of all

23:14:57

our environment variable okay so what

23:14:59

are the secret key and secret uh API

23:15:01

will be using so everything I'll be

23:15:03

mentioning here so in this case guys

23:15:05

what I need I think you remember so I

23:15:08

need something called my pine cone API

23:15:11

key the first thing I need my Pine con

23:15:14

API

23:15:15

key okay and the second thing I need

23:15:18

something called Pine con API

23:15:23

environment

23:15:24

so where I will get it I already

23:15:26

collected yesterday I think you remember

23:15:28

so I'll just open my

23:15:32

notebook and here I think I already

23:15:34

mentioned yeah so this is my API key

23:15:35

I'll just

23:15:38

copy and uh I'll open my environment

23:15:41

variable uh environment file and here I

23:15:43

will just paste

23:15:44

it and I will also copy my API

23:15:50

environment here I will paste it okay

23:15:53

now what you can do you can remove it

23:15:54

from here okay no need to show like to

23:15:57

your user or let's say if you are

23:15:59

uploading this thing on your GitHub

23:16:00

account so just try to remove them from

23:16:02

here okay otherwise people can also

23:16:04

access your credential I'm just keeping

23:16:06

it here just for the reference just to

23:16:08

understand the things I'll just remove

23:16:09

these are the uh index okay after

23:16:12

the yeah same same yesterday key because

23:16:15

I'm using the same same index same index

23:16:17

from my Pine con okay that's why if

23:16:19

you're creating any new index so you

23:16:21

need to collect that particular keys and

23:16:23

paste it here

23:16:26

okay all

23:16:29

right now see I have already added this

23:16:33

EMV file okay I have already added this

23:16:36

EMV file in my code but I already

23:16:38

committed my code in my GitHub now can

23:16:40

you see this EnV file in my GitHub is it

23:16:43

present guys no see it will

23:16:46

automatically ignored okay it will

23:16:48

automatically ignore by the help of this

23:16:50

dogit ignore file because if you open

23:16:52

this dogit ignore file and here they

23:16:54

have already written this kinds of EMV

23:16:57

file would be automatically ignored okay

23:16:59

let me show you so I think I can search

23:17:02

here

23:17:04

envv uh where is

23:17:08

EnV crl F do

23:17:11

EnV see guys Dov VNV EnV VNV these are

23:17:16

the files and for would be automatically

23:17:19

ignored during committing the code need

23:17:21

our GitHub okay so that's why we use

23:17:23

this method to create any kinds of

23:17:25

secret uh

23:17:28

credential okay another thing you can do

23:17:30

you can open up your environment

23:17:32

variable environment

23:17:34

variable so it is already available

23:17:37

inside your system now here you can

23:17:39

click on the environment variable and

23:17:41

here you can create a in uh variable key

23:17:44

as well as the value you are using so

23:17:46

both you can do it but this is the

23:17:48

method actually people uh usually use

23:17:50

nowadays okay instead of reading the uh

23:17:53

configuration file file from our system

23:17:55

itself okay yeah and to read this file

23:17:58

I'll be using one particular Library

23:17:59

okay so the library name is uh python.

23:18:02

EnV let me just

23:18:04

write

23:18:07

um I think I already added this

23:18:12

thing okay so there is a library

23:18:15

called EnV dot e NV Pi

23:18:22

Pi

23:18:25

yeah so this is the package name I'll

23:18:26

just

23:18:28

copy and here I will mention inside my

23:18:31

uh requirement

23:18:35

file now let me install it

23:18:52

again okay done

23:18:55

now we have also added our confidential

23:18:57

secret as well okay now what I need to

23:18:59

do I'll be start implementing the

23:19:01

component one by one right now so the

23:19:03

first thing what I need need guys if I

23:19:05

open my notebook I think you remember uh

23:19:08

the first thing yesterday we did we

23:19:10

first of all uh worked with our data

23:19:13

injection part that means data component

23:19:15

so I will copy the same function okay

23:19:18

I'll just copy the same function and

23:19:20

here I think we remember we created one

23:19:23

helper Pi inside SRC I will open the SRC

23:19:26

folder and here I will open this helper.

23:19:28

pi and here I will just mention this

23:19:30

particular function okay so most of the

23:19:32

code I'll just copy paste from my

23:19:34

notebook itself because we have already

23:19:36

done the experiment and we saw

23:19:37

everything is working fine now what is

23:19:39

our task I just need to convert

23:19:41

everything to the modular coding okay so

23:19:43

this is the thing I'm just showing

23:19:44

that's why yesterday I did The Notebook

23:19:46

experiment and today I'm referring that

23:19:49

particular notebook and I'm just writing

23:19:50

the modular coding okay all right

23:19:54

now I need this directory loader package

23:19:56

and as well as this Pi PDF loader so I

23:19:59

can copy from here only so directory and

23:20:01

Pi PDF loader I'll copy this thing and

23:20:04

here I will

23:20:06

mention and let me select my environment

23:20:09

I think it is already selected my

23:20:12

medical Chat bar yeah

23:20:15

done now tell me what is the second

23:20:18

thing you need to

23:20:19

add what is the second thing you need to

23:20:21

add just open the notebook and try to

23:20:24

see here the second thing I need to add

23:20:27

my uh uh text splitter okay I think

23:20:29

remember we are uh converting our conver

23:20:32

like Corpus to chunks why I I was

23:20:34

converting our Corpus to chunks because

23:20:36

of the model input model input token

23:20:38

limit limit okay so that's why I was

23:20:41

creating this particular function okay

23:20:43

so I'll copy this particular function as

23:20:45

it is I'll open my helper. pi and here

23:20:49

I'll mention it and again I need one

23:20:52

particular Library recursive character

23:20:54

text splitter again I will open my

23:20:56

notebook and from here I will

23:21:01

copy now guys tell me this method is

23:21:04

easy for

23:21:07

you are are you are you getting like

23:21:09

confident to write the code how to write

23:21:11

the modular coding after doing the

23:21:12

notebook experiment yes or no because

23:21:15

same code I'm just copy pasting from my

23:21:17

notebook only and I'm just arranging my

23:21:19

folder structure yes or no

23:21:22

guys

23:21:25

you can let me know in the

23:21:28

chat

23:21:32

great now going forward whenever you are

23:21:35

implementing any kinds of projects as

23:21:37

end to end the first thing create the

23:21:39

project architecture create the project

23:21:41

architecture then try to implement these

23:21:43

are the component in your notebook at

23:21:45

the very first then try to convert that

23:21:48

notebook as the modular coding I'm

23:21:52

doing

23:21:54

all right now again let's open my uh

23:21:57

trials. ipnb and see our third component

23:22:00

okay so third component was nothing but

23:22:02

uh downloading the model from the

23:22:04

hugging face I will copy this function

23:22:06

as it is and here I will mention

23:22:10

it here I will mention it now what I

23:22:13

need I need this hugging face embedding

23:22:15

package so again I will open my trials.

23:22:17

ipnb and from here I will copy this code

23:22:20

copy this

23:22:21

import and here I will paste it

23:22:27

[Music]

23:22:29

done now anything I need let me see

23:22:33

after downloading embedding uh no

23:22:35

everything is fine everything is fine

23:22:37

now uh your Pine code Cod code will

23:22:39

start okay that means you need to store

23:22:41

your vector right now so this code I can

23:22:44

write in a separate file I'll tell you

23:22:45

how to organize this thing so first of

23:22:47

all I showed you the helper function

23:22:49

implementation okay so this uh this file

23:22:52

should be my helper file

23:22:56

yeah now I'll be using this helper file

23:22:57

and I would I would be able to import

23:23:00

this particular uh function one by one

23:23:02

okay whenever I need it instead of

23:23:04

writing again and again okay inside my

23:23:06

component just follow the architecture

23:23:09

and following

23:23:10

the uh code okay one one by one okay

23:23:17

great all right now let me show you uh

23:23:21

how we can store the data again so so

23:23:24

I'll I'll what I will do I'll just again

23:23:26

remove this index from my pine cone

23:23:29

let's instore our index again so what I

23:23:31

will do uh I'll just remove this index

23:23:34

so I'll just click

23:23:35

here and I'll just delete this

23:23:39

index you need to give the name so it's

23:23:45

medical medical

23:23:50

chatbot you can also load the existing

23:23:53

index it is also possible but I'm

23:23:55

showing because I have done the modular

23:23:57

coding now I just want to test it

23:23:59

whether everything is working fine or

23:24:00

not whether it is able to create the

23:24:01

index or not okay that is why I'm just

23:24:03

creating this thing so now let me delete

23:24:07

index now it would be deleted after

23:24:09

sometimes yeah it has

23:24:11

deleted all right now what I need to do

23:24:13

I need to write uh the data uh that

23:24:17

means my uh data push uh I mean uh

23:24:19

Vector Pusher code okay that means I

23:24:22

need to convert my uh Tes two vectors

23:24:24

and I need to push them to my Vector DB

23:24:26

that particular code I need to write so

23:24:28

I'll be again referring the same

23:24:29

notebook I think I yesterday I already

23:24:31

wrote that code this is the code I was

23:24:33

initializing my pine cone that then I

23:24:35

was just sending my data to the Pine con

23:24:37

okay so I'll be referring the same code

23:24:39

so for this what I need to do uh I'll be

23:24:42

using one particular file here called

23:24:44

store index. Pi okay this file I'll be

23:24:47

utilizing to push my Vector to the

23:24:49

vector DB okay so here first of all what

23:24:51

I need guys

23:24:54

if I want to push my Vector to Vector DV

23:24:56

first of all I need to load my PDF file

23:24:58

from the folder itself so let me import

23:25:00

so from

23:25:02

SRC do help

23:25:05

part import first of all I need what I

23:25:09

need this load PDF okay this function so

23:25:11

let's import load PDF okay after load

23:25:13

PDF what I need I need this function

23:25:17

text splitter so let's import text

23:25:20

splitter then after that what I need I I

23:25:23

need this download hugging face model

23:25:25

okay so this one so I'll just also

23:25:27

import hug download huging Face

23:25:29

model okay then I also need to import

23:25:32

something called uh pine cone so let me

23:25:37

import so that's how you can import Pine

23:25:39

con you can either import from Lang

23:25:42

either import directly okay then I also

23:25:45

need to import my load EnV package okay

23:25:49

so I'll just write

23:25:51

from from

23:25:54

EnV from EnV import load EnV okay load.

23:26:00

EnV because I want to read this

23:26:02

particular file Dov file and here I have

23:26:04

my credential okay primon credential and

23:26:07

if you want to access these are the

23:26:09

secret key you just need to take the

23:26:12

help from this EMV package okay and this

23:26:13

thing I have already installed here let

23:26:15

me show you as a python. ENB I already

23:26:17

installed here okay python. ENB so this

23:26:19

is the package now let me open this one

23:26:22

yeah

23:26:25

now first of all I need to load my EMV

23:26:27

file so that's how you can

23:26:31

load uh so for this I also need

23:26:33

something called operating system

23:26:34

package so import OS now let me show you

23:26:37

how it will read exactly so what I can

23:26:40

do I can open this EnV file and I will

23:26:43

copy the API key first of all and here I

23:26:46

will restore it so equal to I'll just

23:26:48

write OS do environment doget and here I

23:26:53

need to give the key

23:26:55

name okay the key name you are using

23:26:57

inside the EMV file okay this is the key

23:26:59

name okay now once you have loaded I

23:27:02

will also load my second one which is

23:27:04

nothing but my Pine con API environment

23:27:06

I will copy and I will give the name

23:27:10

here again I'll give the name

23:27:12

here now let me print and let me show

23:27:15

you whether it is able to read or not

23:27:16

I'll just print first of all my Pine con

23:27:19

API

23:27:21

key as well as I'll also read my Pine

23:27:24

con API

23:27:26

environment now let me execute this

23:27:29

particular file so I'll just write

23:27:33

python

23:27:36

store index uh.

23:27:41

Pi it should

23:27:45

work see guys uh this is my API and this

23:27:49

is my en environment key got it how I'm

23:27:52

reading it

23:27:56

okay now I need to create again one

23:27:58

index because I deleted my previous

23:28:00

index what I will do again I will go to

23:28:02

my pine cone and here I will uh first of

23:28:05

all copy my key I'll copy my key and

23:28:09

here I will paste

23:28:10

it so this is my key I think this is the

23:28:13

same

23:28:14

key this is my key and I also need

23:28:17

something called my environment so I'll

23:28:19

again create one index so create index

23:28:21

and here you can give the same name

23:28:24

medical medical

23:28:27

bot and dimension it's uh 384 I think

23:28:31

you remember the model actually you are

23:28:33

using sentence Transformer model uh the

23:28:36

output dimension of the vector 3 uh 884

23:28:39

and I'm using cosine metric then I will

23:28:41

create the

23:28:46

index now this is my environment name I

23:28:48

will copy and I'll paste it here which

23:28:50

is nothing but gcp

23:28:52

starter

23:29:01

done

23:29:05

okay now first of all what I need to do

23:29:07

I need to load my PDF so let me load the

23:29:10

PDF so here is the code I think I

23:29:13

already written yeah this is the code

23:29:16

I'll

23:29:18

copy and here I'll paste first of all it

23:29:21

will load the PDF and PDF is is present

23:29:23

inside my data folder now after that I

23:29:26

need to extract uh sorry I need to apply

23:29:29

the text splitter that means I need to

23:29:31

create a chunks so this is the code I'll

23:29:34

copy and uh here I'll paste

23:29:37

it okay after getting the chance I need

23:29:40

to download the embedding so this is the

23:29:43

code I'll

23:29:44

copy and here I'll will paste

23:29:47

it embedding download is also done now

23:29:51

uh what I need to do I need to

23:29:53

initialize my pine cone okay so this is

23:29:56

the code I think remember how to

23:29:57

initialize the pine

23:30:00

cone it will take your Pine con API key

23:30:03

which you are getting from the

23:30:04

environment variable and this is your

23:30:06

Pine con uh API environment okay we have

23:30:08

initialize the pine cone and now how to

23:30:11

store the

23:30:12

data so this is the code okay I'll copy

23:30:14

the same code from my

23:30:18

notebook this is the

23:30:21

code so so here I'm using pine con. from

23:30:24

text here I'm giving my text chunks and

23:30:28

also need to mention my index name so

23:30:30

index name is my nothing but my medical

23:30:32

chat

23:30:34

Bo so I'll copy the index

23:30:40

name this is the index

23:30:44

name done now it will uh convert your

23:30:48

data to embeddings and it will store to

23:30:50

the pine cone okay maybe that's it yeah

23:30:53

now let me execute this file and show

23:30:55

you whether it is able to uh push my

23:30:58

data or not so I'll execute this

23:31:00

particular file I'll

23:31:03

clear and I will execute this particular

23:31:05

file python

23:31:07

store index

23:31:10

dop so again it will take some time

23:31:12

because how many chks we have guys

23:31:14

yesterday you saw

23:31:21

remember anyone remember remember the

23:31:23

Chang

23:31:24

size how many Chang size we use uh

23:31:27

pushed yesterday in our Pine con

23:31:32

database uh yeah 7020 7020

23:31:36

right no no it's 7 not 700 7020

23:31:41

7,20 20 chunks we had okay okay okay

23:31:46

great now it will take some time first

23:31:48

of all it will uh load the data then it

23:31:51

will create the chunks after after that

23:31:54

uh it will uh convert everything to the

23:31:56

embeddings then it will push to my Pine

23:31:57

con let me see it has started or not let

23:32:00

me refresh the

23:32:08

page not started yet let's wait for some

23:32:11

times in between I will take some

23:32:13

queries guys if you have some query you

23:32:15

can ask

23:32:20

me anyone having any query you can ask

23:32:22

me in

23:32:44

between okay uh should

23:32:49

start huh see it started guys okay now

23:32:52

it has pushed

23:32:54

576 vectors can we use this same

23:32:58

projects template for creating Finance

23:33:00

related project as well yes right side

23:33:03

you can use it no

23:33:05

issue G push error where is G push Adder

23:33:09

maybe this is your problem with your git

23:33:12

AR is you can check

23:33:18

it uh no wores I will push my code you

23:33:21

can get from there

23:33:23

okay Karan Karan sorry Karan uh uh you

23:33:26

can also use this template for your

23:33:28

Finance related project as well okay

23:33:30

this is the common template you can use

23:33:31

it as it

23:33:33

is uh when we are creating medical B

23:33:37

Medical book

23:33:39

chatbot uh will it response to the

23:33:41

normal message like hello and how are

23:33:43

you uh yes it can answer maybe yeah it

23:33:46

can answer because you are using the

23:33:48

Preen llm now so yeah it will answer

23:33:51

I'll show you

23:33:56

and if you want you can also uh like

23:33:59

fine tune that particular model as well

23:34:01

it is also possible okay and uh in our

23:34:04

paid courses we have already integrated

23:34:05

guys if you don't know so this is our

23:34:08

paid version of this gentic B course so

23:34:11

in this syllabus we have added so many

23:34:13

topics let's say if you want to learn

23:34:15

how to F tune and all everything we have

23:34:17

added here even Lama index then uh we

23:34:21

we'll be also covering like some more

23:34:22

Vector DB okay we have some more

23:34:25

interesting project here so everything

23:34:26

would be covered detail here

23:34:30

okay so if you are interested you can

23:34:32

enroll for the

23:34:44

course let me see the progress okay

23:34:51

2,680

23:35:03

it's taking too much time to give answer

23:35:06

of any questions is my system I got

23:35:08

response 6 Minute for this uh for

23:35:11

allergies Anu what is your system

23:35:14

configuration you can let me know

23:35:16

because for me I'm using 16 GB RAM and

23:35:19

code i7

23:35:21

processor uh yeah so if you want to uh

23:35:25

decrease the response time so what you

23:35:26

can do guys let me show you so I think I

23:35:29

already showed you the model right so

23:35:31

this is the model

23:35:33

link so here I was using 4bit model

23:35:37

maybe 2 bit model is also available let

23:35:39

me

23:35:42

see 4bit 4bit 8 bit 6bit huh 2 bit model

23:35:47

is also aailable can you see Q2

23:35:50

kin you can uh download this particular

23:35:53

model so this is the smallest version of

23:35:54

the model and you can see the size so

23:35:57

those who are having 8 GB of RAM and the

23:36:00

Codi 5 processor you can go with this

23:36:02

particular model um a 2 bit model OKAY

23:36:06

in this case actually I'm using 4bit

23:36:07

model you can see I'm using 4bit model

23:36:13

Q4 yes definitely you need it uh you can

23:36:16

also execute on the Neal LA but I'm not

23:36:19

able to do because it's taking so much

23:36:21

time for me to upload the model here

23:36:23

okay so what you can do you can start

23:36:25

uploading the model once this model is

23:36:27

uploaded you can uh write the same code

23:36:30

here also because Neal laab will provide

23:36:33

more Rams and all if you are having less

23:36:38

RAM and you can also do do it on the

23:36:41

Google collab as well but flas code

23:36:43

won't be running there you can only do

23:36:45

the experiment part The Notebook

23:36:46

experiment we did

23:36:49

yesterday so these are the alternative

23:36:51

you can follow I think

23:36:53

uh you can see guys uh one thing

23:36:55

actually you can do after the session

23:36:58

those who are having low configuration

23:36:59

PC you can go with this model two bit

23:37:07

model no see here you don't use any pkl

23:37:10

file okay ANUK it's

23:37:21

a

23:37:35

uh hello everyone am I

23:37:42

audible uh give give me a confirmation

23:37:45

guys am I audible to all of

23:37:51

you

23:37:52

okay sorry actually my system got hang

23:37:55

and I got

23:37:57

disconnected uh sorry sorry sorry

23:37:59

because like too many software I opened

23:38:02

that's why my OBS Studio got hang okay

23:38:05

and I got

23:38:06

disconnected connection was fine today

23:38:09

okay there is no issue with the

23:38:12

connection because live streaming like

23:38:15

uh it takes little bit

23:38:21

yeah

23:38:25

okay fine so maybe my this thing has

23:38:28

also stopped let me again do

23:38:44

it okay now I think again it will

23:38:49

start yeah so what I was talking about

23:38:52

about I was talking about uh if you are

23:38:55

having let's say less memory so what you

23:38:58

can do in this case you can use this uh

23:39:00

eight uh two bit model guys okay two bit

23:39:02

model from the from

23:39:21

here

23:39:26

okay now maybe

23:39:29

uh it is

23:39:33

running okay let's store till this point

23:39:35

I will stop the

23:39:37

execution so let's say I have already

23:39:40

stored my Vector so let's store till

23:39:44

5,728 okay so you can complete the uh

23:39:48

like this Vector upload operation um

23:39:51

until it gets over okay till your

23:40:01

720

23:40:03

fine now let me push the code so I'll

23:40:08

quickly push the code

23:40:10

so uh store store index

23:40:20

edit

23:40:26

now I think you will able to see the

23:40:31

code or maybe I can what I can do

23:40:38

um um whenever I'm implementing this

23:40:41

thing so in between I can start my

23:40:48

progress I'll upload all the data again

23:40:50

just a minute

23:40:53

or let's keep it let's let's try it if

23:40:54

it is not giving correct response then I

23:40:56

will again store

23:41:19

it and guys uh if you don't know

23:41:22

actually there is a webinar of the

23:41:24

generative AI uh you don't know U or not

23:41:29

let me show you so there is the webar

23:41:33

guys so it would be happened this is the

23:41:35

date so let me share the registration

23:41:37

link as well so please join this webinar

23:41:40

guys so Krish S and sudans S would be

23:41:43

there so they will be discussing so many

23:41:45

things about generative AI so this is

23:41:47

the uh link I can give

23:41:50

you

23:41:54

so this is the webinar link so let me

23:41:56

open this one so you can register

23:42:03

here you can uh give your name email

23:42:06

address mobile number and which state

23:42:08

you are from and you can submit the

23:42:12

form and here is the video you can go

23:42:20

through

23:42:22

all

23:42:26

right okay now let's complete the

23:42:28

project guys because we are almost done

23:42:30

now what I need to do we have completed

23:42:32

our store index okay now we are able to

23:42:34

store our Vector to our Vector database

23:42:37

now what I need to add I need to add my

23:42:40

uh app component okay because I need to

23:42:42

uh create my front end right now so for

23:42:45

this actually what I need to do um just

23:42:47

a

23:42:50

minute uh yes so so I just need to uh

23:42:54

first of all give the prompt here so I

23:42:57

think you

23:42:58

remember we created one prompt. Pi here

23:43:00

so let me open this file and yesterday I

23:43:03

prepared one prompt here so let me show

23:43:05

you the notebook so here is the prompt I

23:43:07

will copy this prompt as it is and in

23:43:10

the prompt. pi I will add this

23:43:19

one okay now what will happen actually U

23:43:22

you don't need to directly write the

23:43:24

prompt inside your code so instead of

23:43:25

that what you can do you can mention it

23:43:27

like that okay so it would be pretty

23:43:29

much good for you now once it is done I

23:43:31

will open my app.py and I will uh write

23:43:34

the rest of the code here so I'll just

23:43:36

copy paste the same code I created so

23:43:40

inside app.py first of all let me import

23:43:43

flask so

23:43:45

from uh

23:43:48

flask I need to

23:43:50

import

23:43:55

plusk then I also need something called

23:43:58

render template I will tell you why you

23:43:59

need random template why you need flask

23:44:02

okay everything I'll be discussing

23:44:07

about yeah now I also need something

23:44:10

called

23:44:12

Joni as of now let's import only

23:44:15

Joni and I also need something called

23:44:20

request

23:44:22

okay then uh here I also need to load my

23:44:27

uh embedding okay so for this I also

23:44:29

need to import this

23:44:31

embedding my download embedding uh

23:44:35

method we created then I also need to

23:44:37

initialize my pine cone because I will

23:44:39

be loading that particular index and I

23:44:41

will be extracting my Vector from there

23:44:43

so that's why I need I need this

23:44:45

particular Pine con package here then I

23:44:49

think you remember yesterday I was

23:44:50

importing some more things let me show

23:44:53

you uh where is The

23:44:55

Notebook let me open the notebook again

23:44:58

uh this is the notebook and let me close

23:45:01

these at the tab first of

23:45:02

all template I don't need uh store index

23:45:06

I don't need as of now helper I don't

23:45:09

need okay here here is The Notebook so

23:45:12

here if you see I was importing some of

23:45:14

the more Library called question answer

23:45:17

then C Transformer Ral question U and

23:45:19

prom template okay so this thing I need

23:45:21

to Al import here because I need to

23:45:23

create my Ral question answer object

23:45:25

okay to chat with my llm so let me

23:45:28

import

23:45:32

them so here is the

23:45:34

code now I also need myv because I need

23:45:38

to load my secret credential from that

23:45:41

file then I need to also load my prompt

23:45:45

okay this promp template so what I can

23:45:46

do okay so maybe it should

23:45:50

be hugging face sorry I deleted by

23:45:53

mistake yeah now I also need to import

23:45:56

this prompt template from my prompt so

23:45:57

what I can do I can just write from uh

23:46:01

SRC do

23:46:04

prompt import Star okay that means

23:46:08

whatever things actually I have inside

23:46:10

this prom. Pi everything just try to

23:46:12

import here okay now after that uh I

23:46:15

also need something called operating

23:46:17

system package so I'll just use uh

23:46:19

import o now at the very first I just

23:46:22

need to initialize my flask so app equal

23:46:25

to uh how many of you are familiar with

23:46:27

flask guys here have you ever worked

23:46:30

with flask like how flask Works how we

23:46:33

usually create the app with the flask

23:46:34

and all if you have some like little

23:46:38

little knowledge on this flask I think

23:46:39

this should be pretty much Clear how I'm

23:46:41

creating this application frontend

23:46:43

application you can let me know guys in

23:46:44

the

23:46:46

chat anyone uh worked with flask before

23:46:49

I think if if you have already worked

23:46:51

with with machine learning deep learning

23:46:53

so I think you know this flask little

23:46:56

bit no not okay so no issue I will

23:46:59

explain okay it's like very easy so

23:47:01

flask is a like framework in Python it

23:47:04

will give you uh the functionality to

23:47:06

create the web application here okay yes

23:47:09

and no need to worry about the like HTML

23:47:12

code and CSS code that code you can copy

23:47:14

paste from the website itself I will

23:47:15

show you some of the website even I copy

23:47:17

pasted the HTML and CSS code from the

23:47:20

website itself okay because I also don't

23:47:22

know like how to code in HTML and CSS no

23:47:25

need to worry

23:47:26

about so we usually Define the flask

23:47:29

object like that now what I need to do I

23:47:31

need to load my uh API environment so

23:47:34

what I can do I can open the store index

23:47:37

and this code I can

23:47:41

copy and I'll paste it here then first

23:47:45

of all I will load my embedding

23:47:50

model okay okay now what I need to do I

23:47:52

need to initialize my pine

23:47:55

cone so I think you remember how to

23:47:58

initialize the pine cone so here is the

23:48:00

code initializing the pine con so let

23:48:02

initialize our Pine con and it will take

23:48:05

your Pine con API and pine con API

23:48:07

environment so it is I'm reading already

23:48:09

from here now here you need to give the

23:48:11

index name so here this is my index name

23:48:14

I'll

23:48:15

copy and here I will give my index

23:48:20

name

23:48:22

done now if you have any existing index

23:48:25

okay in your Pine con let's say you

23:48:27

already have the index present and you

23:48:29

already have the vector there so what

23:48:31

you can do instead of creating it again

23:48:33

because we have already executed our

23:48:35

store index. pi and we have already

23:48:37

stored our Vector there now I just need

23:48:40

to load that I just need to load that

23:48:41

and I will be using that okay so for

23:48:43

this this is the particular code you can

23:48:44

use load index from the pine con see

23:48:48

Pine con do from existing index here you

23:48:50

need to give the index name in this case

23:48:52

this is my index name and this is the

23:48:54

embedding model I'm using this two

23:48:55

parameter you need to give okay once it

23:48:58

is done you need to copy the same code

23:49:00

yesterday you wrote here you need to

23:49:03

create the prom

23:49:05

template I think remember you need to

23:49:07

create the promt template then you need

23:49:08

to initialize your llm so now let's do

23:49:11

it I will open my

23:49:13

app.py and here is the

23:49:18

code here is the code so this is my prom

23:49:22

template and I'm just reading my prom

23:49:24

template from where guys from prom. PI I

23:49:27

think you remember because we have

23:49:28

already imported this thing inside my

23:49:29

app. Pi here okay now this is my prompt

23:49:32

it is coming from here and this is the

23:49:34

input variable user will give the

23:49:35

question and it will return me the

23:49:37

response and this is my model what is my

23:49:39

model model is present inside the model

23:49:41

folder and this is the location of the

23:49:43

model model type is llama maximum new

23:49:46

tokens it is uh just keep this default

23:49:49

number and temperature I'm setting to uh

23:49:52

0.8 that means I'm just taking the risk

23:49:54

and I'm taking also Randomness so

23:49:56

whenever it will give me some response

23:49:57

it will also take the risk and

23:49:59

Randomness then it will give me the

23:50:00

response so once I got this thing I need

23:50:03

to initialize my QA bot that means QA

23:50:08

object so this is the Code retrieval QA

23:50:13

from chain type and here you need to

23:50:14

initialize your llm chain type stuff and

23:50:17

this is the doc uh Dockers so doers I'm

23:50:20

getting from here my Pine con object

23:50:23

that's it now you need to create the

23:50:25

default route first of all of your flask

23:50:28

so this is the default route I can

23:50:30

create like that so here you need to in

23:50:34

uh like give this decorator called app.

23:50:36

route and if user is open your uh let's

23:50:40

say host okay or let's say the URL you

23:50:42

will be getting I will execute and tell

23:50:44

you how this thing will work so it will

23:50:46

open one particular HTML file which is

23:50:48

present inside template do uh which is

23:50:51

present inside template folder the name

23:50:53

of the file is chat. HTML okay so here I

23:50:56

need to write the HTML code as of now

23:50:58

this file is empty but I need to write

23:51:00

the HTML code like how your eyi will

23:51:01

look like this particular code you need

23:51:03

to mention here okay now let me show you

23:51:05

how this thing will

23:51:07

work so now I will initialize my

23:51:10

flask so it will uh execute your code

23:51:15

here now let's say inside the chat. HTML

23:51:19

I can copy some basic HTML code

23:51:22

welcome

23:51:25

HTML page I can copy the code from

23:51:31

here maybe

23:51:35

example so this is the code I think I

23:51:37

can

23:51:47

copy let's see what is this page I'll

23:51:51

paste it

23:51:56

here then I will run run my

23:52:00

app.py python

23:52:15

app.py now it will tell you just open up

23:52:18

your local host and port number 5,000

23:52:20

let's open my Local Host so Local Host

23:52:24

port number 5,000 it's running on port

23:52:27

number

23:52:30

5,000 uh see guys this is the screen I'm

23:52:32

getting from this code itself so now we

23:52:34

can also change the code now let's give

23:52:37

this

23:52:38

code uh let's give this HTML code what

23:52:42

happens if you know HTML and CSS so you

23:52:45

can create a beautiful website it's up

23:52:47

to you now if I again refresh see guys

23:52:51

coming soon I'm getting that means my

23:52:54

web app is working fine and I got one

23:52:56

API okay I got one API this is the API

23:52:59

guys my uh like project is running on

23:53:02

this uh host and Port okay this is the

23:53:06

host and this is the port you can also

23:53:08

change it so what you can do here you

23:53:10

can give host uh host is equal to host

23:53:14

is equal to uh you can give like that 0

23:53:18

point

23:53:19

0.0 uh

23:53:22

zero and Port is equal

23:53:24

to you can give let's say 8080 any kinds

23:53:28

of Port you can mention let's give 80 80

23:53:31

now if I stop the execution

23:53:33

again now if I again uh rerun my app. Pi

23:53:37

you will see it will run on port number

23:53:39

8080 right

23:53:48

now see guys it's running on port number

23:53:52

8080 now I'll give the permission now if

23:53:54

I open and here I will give my port

23:53:57

number

23:53:58

8080 now see guys your application is

23:54:00

running here got it now here what you

23:54:04

can do you can visit this website called

23:54:08

bootstrap

23:54:10

bootstrap uh sorry it should be

23:54:14

bootstrap

23:54:16

bootstrap so this is the website we

23:54:19

usually copy any kinds of template so

23:54:21

here I created one chatbot template so

23:54:23

here is the example so in the example

23:54:25

you will see lots of example would be

23:54:27

there any kinds of template you can copy

23:54:29

from here it will uh give you the HTML

23:54:30

and CSS code with respect to that either

23:54:33

what you can do you can search for

23:54:35

chatbot HML and

23:54:38

CSS

23:54:41

template free okay so there are some

23:54:44

website it will give you some of the

23:54:46

template you can just download from here

23:54:48

see this this kinds of chatbot actually

23:54:50

templ template you will get so you can

23:54:52

download it and it's completely free you

23:54:53

don't need to pay for anything if we

23:54:56

have to put this on any

23:54:57

website uh then where we need to provide

23:55:00

the details no see the same thing you

23:55:03

can do the deployment okay I think you

23:55:04

saw how we we we usually do the

23:55:07

deployment on AWS so that time it will

23:55:09

run on the AWS URL okay not in the Local

23:55:12

Host we'll show the deployment Vic okay

23:55:15

in our paid courses it already designed

23:55:18

see these kinds of chatbot template

23:55:19

actually will get

23:55:22

okay so what I have done actually I

23:55:24

already downloaded one particular

23:55:25

template and I already copy pasted the

23:55:27

HTML code let me show you how it will

23:55:29

look like so this is the code and you

23:55:31

don't need to worry about for the HTML

23:55:33

code so this thing actually you can

23:55:36

download from the internet if you don't

23:55:37

know anything so this is the HTML code

23:55:40

from the chatbot I'm using and with

23:55:42

respect to that you have one uh CSS file

23:55:46

as

23:55:47

well so the name of the CSS file is

23:55:52

style let me write

23:55:55

style.

23:55:57

CSS so let me show you the style.

23:56:03

CSS so this is the CSS code okay so from

23:56:07

that uh website you can download this

23:56:09

particular thing now if I go to my

23:56:12

website right

23:56:13

now and if I

23:56:15

refresh now see that's how my chat bot

23:56:18

look like isn't it uh B beautiful app

23:56:21

guys tell

23:56:23

me uh how this template look like to all

23:56:27

of you because I personally like this

23:56:29

template uh actually I just copy paste

23:56:31

the code from the Google itself so here

23:56:34

you can give your input message and it

23:56:36

will give you the

23:56:37

response yes I will give the code no

23:56:39

issue let me just comit the code as well

23:56:41

so what I can do I can

23:56:44

give

23:56:46

templates

23:56:49

added

23:56:52

so this is the medical uh chatbot kinds

23:56:54

of Bot I have added uh yeah so now see

23:56:58

how to change the photo of this one so

23:57:00

here is the like one Nar photo I have

23:57:02

added how we can do it you can open the

23:57:04

HTML code so here you will get one jpz

23:57:09

file see guys this is the jpz file PNG

23:57:13

file okay so this is the URL of the

23:57:16

photo actually so what I did I searched

23:57:19

the photo in Google and I just collected

23:57:21

the image URL see copy the image address

23:57:25

if you copy it now see you can use any

23:57:28

of

23:57:29

chatbot medical medical medical

23:57:33

logo you can open and you can copy any

23:57:36

kinds of photo URL and you can paste it

23:57:38

here so that photo will appear here

23:57:40

actually let me show you that photo will

23:57:42

appear

23:57:48

here uh yes you can use this code okay I

23:57:50

already uh committed the codee in my

23:57:52

GitHub you can uh clone from here you

23:57:55

can copy this template as it is guys

23:57:57

okay no need to worry about how to write

23:57:59

this thing because this thing is already

23:58:00

available on the internet okay if you

23:58:02

look for lots of template people are

23:58:04

giving free these are the free template

23:58:06

you can use it as it

23:58:19

is

23:58:23

okay all right now we'll be writing our

23:58:26

final

23:58:28

route so basically I'll be taking the

23:58:43

question

23:58:48

uh yeah and and see guys if uh you can

23:58:51

enroll for the courses and you can get

23:58:53

everything for free because we have lots

23:58:55

of template as well okay we'll also give

23:58:57

that rebuild

23:59:01

template okay now let's write our final

23:59:04

uh route so this is the final

23:59:10

route so here what I'm doing guys so

23:59:13

whenever user is giving any kinds of

23:59:14

masses okay so here whenever user is

23:59:16

giving any kinds of masses I'm just

23:59:19

taking the masses in the back as you can

23:59:20

see I'm just writing request. form and

23:59:23

it will give you the message and this

23:59:24

message will come here then I'm saving

23:59:26

the message to the input variable and

23:59:28

I'm also printing in my terminal after

23:59:30

that I'm just sending this input to the

23:59:32

QA QA object okay because QA object we

23:59:34

have already defined here okay then it

23:59:36

will give you the

23:59:37

response that particular response I'm

23:59:39

printing in my terminal as well and as

23:59:41

well as I'm also sending that particular

23:59:43

response to my UI here okay now let me

23:59:47

uh let me show you how it is working or

23:59:48

not so what I will do I will stop the

23:59:51

execution

23:59:53

again I will clear the terminal and

23:59:56

again let's execute my app.py sorry

23:59:59

python it should be python

24:00:15

app.py okay it's running now let's go

24:00:17

back and refresh the page again

24:00:26

uh I think I can open it again so Local

24:00:32

Host port number

24:00:36

8080 see now let's ask some questions so

24:00:40

here I can give uh what is

24:00:43

acne so the same question I asked

24:00:49

yesterday

24:00:51

and let's see see I asked the question

24:00:54

now uh it will take some time because

24:00:56

I'm uh doing the live streaming and all

24:00:58

so it will take some time to give me the

24:01:00

response okay but if I stop the

24:01:02

streaming so it will give me quick

24:01:19

response and the same thing we can do it

24:01:21

on the neural app so let me show you um

24:01:24

so what I will do I will copy this HTML

24:01:28

and CSS

24:01:30

code uh let's copy this HTML code and

24:01:33

open my Neal

24:01:36

LA and here I can give this

24:01:44

here also I need this static so inside I

24:01:48

have style. CSS

24:01:55

now let's copy the

24:02:05

code done now let's uh write the route

24:02:19

here

24:02:35

and uh this is the final

24:02:48

code

24:02:52

Pyon

24:02:54

app.py okay it's running now so now what

24:02:57

you need to do you need to copy this

24:02:59

URL and what is the port it is

24:03:03

using uh let me see it again it's 5,000

24:03:07

okay just paste it and give the port is

24:03:09

equal to

24:03:12

5,000 uh okay bad request it's telling I

24:03:16

don't know because maybe my uh okay I

24:03:19

got discon Ed maybe that's why okay I

24:03:21

need to again rerun it let me see the

24:03:24

execution here see guys it's giving me

24:03:27

the response is it

24:03:30

correct acne is the common skin disease

24:03:32

characterized by pimples on the face

24:03:35

chest and back it occurs when the uh

24:03:38

porous of the skin becomes clogged with

24:03:41

the well dead skin cells and

24:03:44

bacteria see the guys eyi it is also

24:03:47

extracting the time the current time

24:03:48

actually you are asking the question

24:03:51

is it great

24:04:03

guys now you can ask any G of question

24:04:06

here it's up to

24:04:18

you

24:04:23

why it's giving bad request let me

24:04:30

Che everything is

24:04:48

good

24:04:53

okay I got the response see I think uh

24:04:56

who has asked the question if I give any

24:04:58

casual message whether it would be able

24:05:00

to answer or not see I've given hello I

24:05:03

happy to help however I don't have any

24:05:04

access to the external information or

24:05:06

context beyond what is provided uh the

24:05:09

text you gave me without more

24:05:11

information I can provide the definitive

24:05:13

answer or to your question can you

24:05:15

please provide the more context to

24:05:16

clarify your question got it so

24:05:18

basically here is uh the chatbot we have

24:05:21

implemented this is already dependent

24:05:23

upon my custom data I have given okay so

24:05:25

here I haven't given any external data

24:05:27

sources okay so this is only relying on

24:05:30

this PDF file okay so that's why it's

24:05:32

giving some warning before starting with

24:05:33

the conversation got it now you can open

24:05:36

this book you can open this book and you

24:05:39

can ask any kinds of questions so let's

24:05:41

ask another question so I'll find one

24:05:43

dis is

24:05:48

here

24:05:55

evention not this one I'll

24:05:59

take let's copy this disease

24:06:02

okay I don't know what is this let me

24:06:04

search on Google first of

24:06:07

all okay this is a medicine actually so

24:06:10

let's ask about the medicine so this is

24:06:12

my

24:06:13

bot tell me

24:06:17

about this medicine

24:06:29

so anyone is running with me guys anyone

24:06:32

here everything is

24:06:48

working

24:06:59

so you can go through this book and you

24:07:01

can ask different different question

24:07:02

different different medicine like uh for

24:07:05

this disease what would be the diagnosis

24:07:07

okay everything you can ask

24:07:09

here and make sure you are uh storing

24:07:12

all the vectors because I already stored

24:07:14

5,000 something Vector here so make sure

24:07:18

you are storing all the 700 uh 7,000

24:07:21

and20 all the victory

24:07:27

here still running because my live

24:07:29

streaming is going on that's why a

24:07:30

little bit

24:07:36

slow okay this is the response see this

24:07:39

is used to rely many kinds of minor ax

24:07:44

and pains include headache muscles ax

24:07:47

back ax and tooth X so see this is one

24:07:50

kinds of medicine actually people use

24:07:52

for the

24:07:53

pain okay now you can see also this

24:07:56

medicine this is the

24:07:59

medicine now tell me guys how is this

24:08:02

project you like this project the

24:08:04

medical chatbot your custom medical

24:08:06

chatboard yes or

24:08:12

no because we are done with the

24:08:18

implementation

24:08:20

how is this project guys you can let me

24:08:21

know in the

24:08:36

chat all

24:08:41

right okay thank you thank you guys so

24:08:44

you can try and uh those who are having

24:08:47

uh less configuration you can use the

24:08:49

2bit model okay I already showed you the

24:09:12

sources and uh please implement this

24:09:14

particular project guys those who

24:09:16

haven't implemented and you can tag me

24:09:18

on LinkedIn so this is my LinkedIn

24:09:19

profile guys so here you can also tag me

24:09:22

after the implementation uh you can also

24:09:24

tag ion so we'll be happy to see that

24:09:26

like you have implemented

24:09:28

something

24:09:31

okay can I add this project in my resume

24:09:34

yes vikash you can add it because this a

24:09:36

good use cases okay in the generative AI

24:09:39

uh like field you can add this

24:09:42

project and please implement the project

24:09:44

guys please implement this project let

24:09:46

me commit the code as

24:09:48

well

24:10:01

and let me write down the further steps

24:10:03

to run this project so let me complete

24:10:05

the readme as

24:10:10

well so first uh first of all you need

24:10:13

to execute that stored index. Pi because

24:10:16

you need to store your index first of

24:10:17

all then after that you need to execute

24:10:24

app.py okay then you need to open up

24:10:26

your local host and

24:10:31

Port then I can mention the take stack I

24:10:34

used in this

24:10:36

project now let me comit

24:10:48

them

24:11:08

done okay so guys yes this was our

24:11:12

medical uh chatbot

24:11:14

implementation and I have showed you the

24:11:17

entire uh like process

24:11:20

sir may I know prerequisite for this

24:11:22

course please uh no need any

24:11:25

prerequisite okay uh you can still uh

24:11:28

still join the course if you don't know

24:11:29

anything so we'll give all the

24:11:48

idea

24:11:49

and guys uh there is uh exciting news

24:11:52

for everyone we are also coming with

24:11:54

mlof session okay on this uh Monday from

24:11:58

this Monday so please join the session

24:12:00

those who are interested in mlops so you

24:12:02

can join

24:12:07

here and if you are interested in Hindi

24:12:10

so in our Hindi Channel also uh this

24:12:13

medical chatbot implementation will come

24:12:15

so it will take by Sun sir so you can

24:12:18

join uh today

24:12:20

okay see you can uh just notify click on

24:12:22

the notify

24:12:25

button deep planning and machine

24:12:27

learning fails under the data science uh

24:12:30

yes this is under the data

24:12:38

science yeah and guys yeah you can

24:12:40

mention this project in your resume

24:12:42

there is no issue with that because this

24:12:43

is a good use

24:12:45

cases yeah so MLF session actually it

24:12:48

would be conducted on our this Inon

24:12:50

Channel okay so here actually you will

24:12:52

get the MLF

24:13:03

session and uh the detail of this MLF

24:13:05

course would be shared soon okay just

24:13:07

stay tuned with our Channel everything

24:13:09

would be shared here no this is not a

24:13:11

last session maybe couple of session

24:13:12

would be there after

24:13:14

that small uh language model is

24:13:18

different

24:13:19

uh t0 llm small mod small language model

24:13:23

is different t0

24:13:25

llm I didn't got your question

24:13:31

uh okay so uh sorry guys so there uh

24:13:34

today's the last last session of our

24:13:35

generative AI okay because we have

24:13:37

already covered everything okay we have

24:13:40

already covered everything if you go

24:13:41

here if you go to the live section so

24:13:44

from the day one

24:13:46

itself uh see uh from the introduction

24:13:48

itself itself actually everything has

24:13:50

been covered Lang chain covered Hing

24:13:51

face covered openi covered uh n2n

24:13:54

project has been also covered then

24:13:56

Vector database covered then uh yeah

24:13:59

open source llm is also covered then I

24:14:01

also showed you the how use uh how to

24:14:03

use open source llm and create the Inn

24:14:05

project as

24:14:13

well and uh and if you want to learn

24:14:17

more about generative

24:14:19

so that is a paid version of our course

24:14:21

so there actually we have added so many

24:14:23

things so let me again show you so this

24:14:25

is the page guys so let me share you the

24:14:27

link so if you are interested you can

24:14:29

enroll for the course and here we have

24:14:31

already covered uh we we'll be we'll be

24:14:34

covering lots of things here let's say

24:14:35

fine tuning llms and all so you can

24:14:38

visit the syllabus here okay it's a big

24:14:39

syllabus

24:14:46

guys metal Lama API is free to use or

24:14:50

paid like open meta Lama there is no

24:14:52

Lama API okay we have downloaded the

24:14:54

model

24:14:57

because so link is uh in the chat guys

24:15:00

so you can visit this courses you can go

24:15:02

through the cabus and you can enroll for

24:15:03

the

24:15:13

course and uh why this course would be

24:15:16

like more uh you can say interesting

24:15:18

because we are also giving the job

24:15:20

assistant if you see here if you go uh

24:15:22

read this description and all about so

24:15:24

it is starting from uh 20th

24:15:27

January and uh this course version is

24:15:30

English okay and duration is 5 month it

24:15:32

would be conducted uh 10 to 1 p.m. okay

24:15:36

IST Saturday and Sunday and this should

24:15:39

be live course okay this should be live

24:15:40

lecture actually and we'll be also

24:15:42

providing the job assistant doubt

24:15:44

clearing session okay so each and

24:15:46

everything would be there so let's say

24:15:48

if you having any issue okay with your

24:15:51

like resume and all job and all so we'll

24:15:53

be like conducting a session with you so

24:15:56

we'll also build your resume we'll give

24:15:57

you the carer advice okay everything

24:15:59

would be done

24:16:06

here is this course curriculum changes

24:16:09

on a new

24:16:11

model uh see if you go through the

24:16:13

course we have added so many open source

24:16:15

llm here also new model as well okay we

24:16:18

have added f con Google Pam okay so we

24:16:21

have also added this thing as of now you

24:16:23

learn like Lama 2 model okay but there

24:16:25

are also lots of Open Source model

24:16:27

available let me show you if I search

24:16:29

for open

24:16:30

llm okay maybe I already showed you list

24:16:32

of open llm so there are lots of llm

24:16:35

there are lots of llm you can use so

24:16:37

we'll be covering them also

24:16:47

here

24:16:58

and see guys uh here you you will get

24:17:00

like one year dashboard access and uh

24:17:03

assessment uh in all the modules okay

24:17:05

you will be getting assessment for all

24:17:07

the module and guidance by the expert

24:17:08

and mentors as I already told you if you

24:17:10

are having any issue with your career

24:17:12

and all if you're not getting any jobs

24:17:13

so we'll be giving the job assistant uh

24:17:15

like opportunity as well then course

24:17:17

resources definitely will get then live

24:17:20

lecture okay like live lecture you will

24:17:23

get from here and quizzes and assignment

24:17:25

you will be getting from each and every

24:17:27

lecture okay then you'll be getting free

24:17:29

neural lab access as well so we'll also

24:17:31

show like how we can use our neural lab

24:17:34

efficiently here because many of you are

24:17:36

having less configuration machine okay

24:17:38

so we'll also show you like how we can

24:17:40

use neurolab here as

24:17:44

well then uh here you will get dedicated

24:17:47

Community Support

24:17:54

promise I'm in this course duration is 5

24:17:57

month so in a 5 month jna is

24:18:00

boosting so much okay so we'll be taking

24:18:03

care that yes so let's say in this five

24:18:06

uh five month actually if any changes is

24:18:08

there if any new thing is coming we'll

24:18:10

also Showcase in front of you okay we'll

24:18:12

also tell you that thing no issue with

24:18:17

that yes we'll also integrate mlop Tool

24:18:20

uh like we'll also show like how to

24:18:22

integrate Docker this thing how to do

24:18:24

cicd deployment everything will show

24:18:27

there okay the efficient deployment

24:18:29

process will show

24:18:47

there

24:18:51

and guys this course is uh also for

24:18:54

students and working professional as

24:18:55

well even if you are an enterpreneur

24:18:58

okay who are looking for uh using this

24:19:00

latest AI technology in your day-to-day

24:19:02

business okay so for you also you can

24:19:04

refer this course okay so this course is

24:19:07

for everyone if you are a student if you

24:19:09

are job professional if you are let's

24:19:11

say enterpreneur anyone can refer this

24:19:13

course we'll be covering each and

24:19:15

everything in the field of generative

24:19:17

High guys okay after leing this course

24:19:19

you will become a champion in the field

24:19:21

of Genera VI this is the like guarantee

24:19:23

I can

24:19:29

give see building llm uh we don't do it

24:19:33

usually okay building llm is not a easy

24:19:35

easy

24:19:37

task power okay see llm building is not

24:19:40

a easy task for this you need resources

24:19:42

you need cost you need a good

24:19:44

configuration machine okay because we

24:19:47

have already llm okay now we just need

24:19:49

to use them we can fine tune them fine

24:19:52

tuning we will show like how to fine

24:19:54

tune on the custom data if this uh llm

24:19:57

is not working for your specific task

24:19:58

you can still fine tune

24:20:09

that okay and guys please join this

24:20:12

webinar everyone so there is the webinar

24:20:14

actually conducted by creation sudans s

24:20:17

so here is the link we have already

24:20:19

given let me share it again please

24:20:21

register uh of yourself here and please

24:20:24

join the this uh uh like webinar okay so

24:20:27

you'll be learning a lot lot from

24:20:31

here and here's the video guys so what

24:20:33

are the things actually he'll be

24:20:34

covering and all so you can go through

24:20:36

this particular video it is already

24:20:37

available in our Inon

24:20:44

Channel guys now if you are having any

24:20:47

doubt you can ask me in the chat I'll be

24:20:49

taking couple of Doubt then I will be

24:20:50

ending the

24:20:59

session any any doubt guys any question

24:21:02

you you are having you can ask me then I

24:21:04

will end the

24:21:14

session so guys uh so far how was your

24:21:16

session guys uh are you able to learn

24:21:20

something in the field of generate

24:21:21

because we have covered so many things

24:21:24

like it's completely free even you won't

24:21:26

be getting these kinds of content

24:21:29

anywhere Jin if it is there okay if they

24:21:33

already post the API and all okay we'll

24:21:35

be also covering JY okay no need to

24:21:37

worry about because this is the recent

24:21:39

research uh recently it has came to the

24:21:41

market okay they haven't announced so

24:21:43

like

24:21:47

yet

24:21:50

yeah thank you thank you

24:21:54

Karan and thank you for your

24:21:56

contribution yesterday also yeah thank

24:21:59

you thank you power

24:22:05

also and if you have any query you can

24:22:08

ask us anytime no issue okay perfect

24:22:11

guys so let me talk about the agenda

24:22:13

today okay now uh many people have been

24:22:17

talking about generative AI they've been

24:22:20

talking about open AI llm models they're

24:22:23

talking about open source llm models

24:22:25

like lama lama 2 you have mistol you

24:22:28

have lot of different different models

24:22:30

and every day probably someone is coming

24:22:32

up with some good llm models right but

24:22:35

when I talk about Google right Google

24:22:36

recently came up with something called

24:22:38

as gini right and uh it after seeing a

24:22:43

lot of practical application after

24:22:45

implementing multiple things uh I could

24:22:48

see that it really have a lot of

24:22:50

capabilities so that is the reason why

24:22:52

I'm keeping this entire dedicated

24:22:54

session specifically for gini and just

24:22:58

to make you understand today what all

24:23:00

things we are specifically going to do

24:23:02

I'm going to write down the agenda what

24:23:04

all things we are basically going to do

24:23:05

today right so let me just share my

24:23:09

screen and let me know whether you are

24:23:13

able to see my screen or not okay just a

24:23:17

second

24:23:20

so just let me know whether you are able

24:23:23

to see my screen just give me a quick

24:23:30

confirmation just a second uh my face is

24:23:34

not visible why I just try to change

24:23:37

things okay so everybody's able to see

24:23:41

my screen so which view do you like

24:23:44

better this view or this

24:23:47

View

24:23:49

this view is different which view this

24:23:51

view I hope everybody likes it better

24:23:55

okay yeah visible so I'm going to

24:23:58

basically talk about the

24:24:00

agenda and uh so first of all we'll

24:24:03

understand

24:24:04

about what this Google gin llm model is

24:24:07

all about okay so we'll understand this

24:24:11

we also say this as multimodel okay why

24:24:14

do we say it as multimodel we'll try to

24:24:17

understand this

24:24:18

multimodel um why it is good with

24:24:21

respect to vision and all that also

24:24:23

we'll try to discuss okay the second

24:24:26

thing is that we'll try to see a

24:24:28

practical

24:24:30

demo so we'll try to see a practical

24:24:33

demo using Google

24:24:36

giny okay we'll try to see a practical

24:24:39

demo using Google Jin Pro okay why

24:24:44

Google G Pro right now Google has just

24:24:45

provided this it also has huge capab

24:24:47

abilities and with the help of this you

24:24:49

can actually Implement both Text Plus

24:24:52

Vision use cases okay so you'll be able

24:24:56

to use both of them third thing after

24:24:59

this we'll try to create an end to

24:25:00

endend

24:25:01

project okay and we'll try to see this

24:25:04

end to end project ug Google gmany pro

24:25:08

okay so we'll do all these things in

24:25:10

this session we'll have a couple of

24:25:11

hours session we'll discuss step by step

24:25:14

what all things we are basically going

24:25:15

to do and considering this we going to

24:25:18

discuss more about this in terms of

24:25:21

practical implementation okay um till

24:25:25

now I think Google gini also like Google

24:25:27

did not I don't know about his research

24:25:29

paper that much information is not

24:25:31

available but a kind of brief idea you

24:25:34

can actually get it what exactly Google

24:25:36

Gemini does okay so everybody clear with

24:25:39

the agenda so please hit like if you are

24:25:42

liking this video I really want people

24:25:44

to be very much interactive right now

24:25:46

okay uh because end to endend project

24:25:49

everything I'll be explaining trust me

24:25:51

at the end of the Days end of this

24:25:52

session you will learn amazing things as

24:25:55

you go ahead you know and you'll get an

24:25:58

idea like how powerful this is and uh

24:26:01

with respect to text and vision use

24:26:03

cases this will be super amazing okay so

24:26:05

hit like and yes share with all the

24:26:07

friends out there if you have some of

24:26:09

the friends who are interested in this

24:26:11

things right so definitely do make sure

24:26:14

that you ping them right and uh over

24:26:17

there also you can actually do it okay

24:26:20

so in insta also we are live so again

24:26:22

for all the guys out there in insta and

24:26:24

in Twitter so we are live in four to

24:26:26

five platforms right now so please let

24:26:28

me know like how whether you're able to

24:26:30

hear me or not okay but all these things

24:26:32

we are going to discuss so Mohammad

24:26:34

mozak says hi Chris you're my role model

24:26:36

and I follow your videos I'm currently

24:26:38

working as an AI engineer UA Dubai

24:26:40

amazing amazing congratulation uh mazak

24:26:44

congrat I hope I'm pronouncing it right

24:26:46

okay so let's go ahead and let's further

24:26:49

discuss about the Google Gemini llm

24:26:52

model and why it is so good uh you have

24:26:56

to keep on motivating me to take more

24:26:58

and more more and more right so

24:27:00

definitely do hit like keep on putting

24:27:02

up your questions I'll take up all the

24:27:04

questions as once the session completes

24:27:06

and if there is some important thing

24:27:07

that I really need to answer it I'll

24:27:09

answer in between the session okay so

24:27:13

just give me a quick yes if you have

24:27:14

understood the agenda what all things we

24:27:16

are going to do in this

24:27:18

session yeah I hope everybody's got this

24:27:22

clear

24:27:25

idea yeah everyone a quick yes thumbs up

24:27:30

something okay agenda is very much Clear

24:27:33

we'll understand about Google giny we'll

24:27:34

see some demo then we'll do practical

24:27:36

demo we'll see how we can set up the API

24:27:39

keys and all and all these things okay

24:27:42

great so let's go first of all you need

24:27:45

to know about from where we are

24:27:48

basically teaching okay so here is the

24:27:50

entire in neuron platform uh if you

24:27:52

don't know about in neuron for the

24:27:54

people who do not know about Inon we do

24:27:56

come up with a lot of different courses

24:27:58

data plus web development every coures

24:28:00

as such and if you're interested in

24:28:02

learning any of the course from us okay

24:28:05

you can see you can just go ahead with

24:28:07

ion. just go and see different different

24:28:10

courses over here like generative AI

24:28:12

course we are coming up from this Jan

24:28:15

then we have machine learning boot camp

24:28:17

uh both English and Hindi and if I talk

24:28:19

about data analytics boot camp and mlops

24:28:22

production ready project so these are

24:28:23

the four uh four important courses that

24:28:27

we are specifically coming up with okay

24:28:29

so mlops production ready projects data

24:28:32

analytics boot camp machine learning

24:28:33

boot camp and finally generative AI so

24:28:36

if you are really interested to learn

24:28:38

from us you can go ahead and check out

24:28:39

all the courses okay um the other thing

24:28:43

is that in this

24:28:44

um if you do not have a a very powerful

24:28:48

system what we will do also is that you

24:28:51

can actually use neurolab okay because

24:28:54

today I'm also going to show you the

24:28:55

Practical implementation with the help

24:28:57

of neurolab what we will do is that we

24:28:59

will try to create our own environment

24:29:02

over here you can probably do the coding

24:29:04

that you specifically want okay so it it

24:29:07

gives you a entire working development

24:29:09

environment where you can write your

24:29:10

code and this all code will be running

24:29:12

in the cloud so if you do not have a

24:29:14

powerful system I would suggest go ahead

24:29:17

and check out about the neural laab

24:29:18

itself it is very much simple go to ion.

24:29:21

click on neurolab and start working on

24:29:23

this because at the end of the day when

24:29:25

I'm showing you practical implementation

24:29:26

we may be doing in this okay perfect so

24:29:31

welcome to the Gin era so I let me talk

24:29:33

about the story because initially people

24:29:36

made a lot of fun about uh you know

24:29:39

Google uh because of the demo that was

24:29:41

put up regarding gini Pro okay and I

24:29:44

hope many of you have heard about this

24:29:46

so gini's built from ground up for

24:29:49

multimodality reasoning seamless across

24:29:52

test images videos audios and code and

24:29:54

this was a demo that they had actually

24:29:56

put and I hope uh you have seen this

24:29:58

demo right I think they should have

24:30:00

removed this demo so this was the demo

24:30:02

that they had actually put okay and this

24:30:04

demo was not that true okay it was just

24:30:07

like taking images by image frame and

24:30:10

then probably combining and doing all

24:30:12

these things okay but at the end of the

24:30:14

day many people made fun of it you know

24:30:16

uh they came up with something amazing

24:30:18

and this was what they had the first

24:30:20

impression wow this looks quite amazing

24:30:22

it can probably do any kind of task you

24:30:24

ask it map it will tell you about map it

24:30:26

if you ask about any object it will tell

24:30:29

you about that particular object like

24:30:30

that right so still it is not that

24:30:33

powerful right now okay considering the

24:30:35

kind of demo they had actually shown but

24:30:38

the most important thing that we really

24:30:40

need to understand why we should think

24:30:44

right this Gemini is an amazing model it

24:30:47

can probably be the future of llms okay

24:30:51

first of all whenever we talk about

24:30:54

multimodality okay

24:30:57

multimodality so here when we say

24:31:00

multimodality okay so here one example

24:31:04

you can see that it is being able to do

24:31:06

the reasoning seamlessly across text

24:31:08

images video audio and code okay

24:31:12

recently if you probably talk about open

24:31:14

AI gp4 model right now it has come

24:31:17

combined everything di it has combined

24:31:20

uh for the data analysis part also it

24:31:22

has combined that code interpretor

24:31:24

functionalities and all right and

24:31:26

recently it was launched and over there

24:31:28

you can probably do tasks that are

24:31:30

related to images that are related to

24:31:32

text okay here in gini when we see right

24:31:36

you are able to combine everything text

24:31:38

images videos audios and code today I

24:31:40

will show you a lot of example with

24:31:42

respect to text and images okay we'll

24:31:44

see some amazing use cases you can also

24:31:46

do it with the the help of PDF you can

24:31:48

do with multiple things as such okay and

24:31:50

all the task that are related to NLP

24:31:53

like chat with your PDF and all you can

24:31:55

also do with this

24:31:57

now the most important thing why

24:32:01

gini is the most capable AI model that

24:32:05

is because of this result okay now see

24:32:09

here you can see something called as

24:32:11

human expert MML now what is this mmu

24:32:16

okay if you probably search for what

24:32:18

exactly is MML okay mlu if you see that

24:32:22

it is nothing but massive massive

24:32:24

multitask language

24:32:26

understanding so with respect to humans

24:32:30

right it is basically able to say that

24:32:34

over here it has achieved see Gemini is

24:32:36

the first model to outperform human

24:32:39

experts on

24:32:40

mlu massive multitask language

24:32:43

understanding one of the most popular

24:32:45

method to test the knowledge and

24:32:46

problems solving abilities of AI and

24:32:50

here it is also said that it has crossed

24:32:53

the crossed the Benchmark of GPT 4 also

24:32:57

right so if you probably see this see

24:33:00

understand Guys these all are very

24:33:02

important things to understand because

24:33:05

benchmarking is done on which thing that

24:33:08

you really need to get an idea about and

24:33:11

because of this benchmarking you will

24:33:13

get a clear idea and you can assume how

24:33:16

good this specific model is and any

24:33:19

model so tomorrow if you probably

24:33:21

talking about Lama 2 if you're talking

24:33:23

about Mistral it will be benchmarking

24:33:26

based on this capabilities so if you

24:33:29

probably want to work in the field of

24:33:30

generative AI I think this benchmarking

24:33:34

is super important and you should learn

24:33:36

about this okay or get an idea about it

24:33:39

because tomorrow if you're reading a

24:33:40

research paper how can you say that this

24:33:43

model is better than the other model

24:33:45

okay so here you can can probably see in

24:33:48

mlu it is nothing but representation of

24:33:50

questions in 57 subjects right it has

24:33:53

been able to get this accuracy 90% gp4

24:33:57

it was somewhere around

24:33:58

86.4 then in case of reasoning you can

24:34:01

see some results where it was greater

24:34:03

than GPT in two different things like in

24:34:06

big bench hard drop in h Swag like in

24:34:09

common sense reasoning for everyday

24:34:11

everyday task it did not achieve that

24:34:13

much accuracy when compared to gp4 Okay

24:34:16

so the reason see I'm telling you why

24:34:19

all these things you should know because

24:34:20

you should get an idea about it okay the

24:34:23

other thing is that with respect to ma

24:34:26

maths right basic arithmetic

24:34:27

manipulation final grade school math

24:34:29

problem it was able to uh get a good

24:34:32

accuracy of 90 4.4 but when you had

24:34:35

challenging math problem it is not able

24:34:37

to get that much accuracy right

24:34:40

somewhere around 53.2 but it is far more

24:34:42

better than gp4 gp4 was able to get

24:34:46

somewhere around 52.9 okay similarly

24:34:49

with respect to the code evaluation here

24:34:51

you can also see that it has crossed

24:34:53

this gp4 like python code generation

24:34:56

python code generation new heldout data

24:34:58

set human eval like not leaked on the

24:35:00

web right so completely a new generated

24:35:02

code right so in short it says that and

24:35:06

this is completely from the research

24:35:07

right gini surises the state of art

24:35:10

performance on the range of multimodel

24:35:12

benchmarks so you are getting this

24:35:14

specific information and there are other

24:35:17

information see this is something

24:35:18

related to text okay this is something

24:35:22

related to text now here if you go down

24:35:25

it is something related to multimodel

24:35:27

now whenever I say multimodel what does

24:35:29

that mean it is basically talking with

24:35:31

respect to images with respect to video

24:35:34

with respect to audio and here also you

24:35:37

can see that it has proven well with

24:35:40

respect to all the Benchmark when

24:35:42

compared to GPT 4V right so here you can

24:35:45

see 59.4 4 77.8 82.3 90.9 80.3

24:35:52

53.0 and here you can see all the other

24:35:54

readings right if you want to read the

24:35:56

technical report here you can probably

24:35:58

go ahead and read it entirely okay it

24:36:01

will be talking about how it has

24:36:03

basically done the fine tuning and all

24:36:05

and all and all it's just like a

24:36:06

research paper like why it is basically

24:36:08

said as a so here you can probably see

24:36:11

here is a solution of a physics Problem

24:36:12

by a student uh the information is given

24:36:15

over here that it was not able to get

24:36:17

the answer whether the answer is correct

24:36:19

or not all the information clearly you

24:36:21

able to see right again it is based on

24:36:24

Transformer only encoder decoder so that

24:36:27

is the reason right why I say in the

24:36:30

road map of generative AI if you want to

24:36:32

learn something you really need to have

24:36:34

a good base about Transformer and BT

24:36:37

right if you understand what is encoder

24:36:39

decoder how it works right then

24:36:42

definitely all the further things you'll

24:36:44

also be able to understand it right so

24:36:47

guys till here everybody's clear right

24:36:50

now we'll talk about what all different

24:36:51

sizes are there and which model is

24:36:53

available for us so if everything is

24:36:55

clear please do hit like if you're able

24:36:57

to hear me out and

24:36:59

all so uh shini says sir what is the

24:37:01

difference between B and gin see B like

24:37:05

how we have chat GPT application

24:37:07

similarly we have Google B in Google B

24:37:09

in the back end we used to use pal to

24:37:12

right now they can change Palm to Gemini

24:37:14

right where it will also support images

24:37:16

and text it's all together an

24:37:17

application so can I get a quick yes if

24:37:20

you able to

24:37:22

understand

24:37:24

yes something quick yes come on guys I

24:37:27

should be able to hear I think there's a

24:37:29

less energy over there come on let's

24:37:32

let's make this session amazing see my

24:37:34

main aim is to make this session a good

24:37:37

one for you right you should be able to

24:37:40

understand things your Basics

24:37:42

fundamental should be strong tomorrow

24:37:44

when whatever model you should see you

24:37:47

should be able to understand so hit like

24:37:49

okay hit like hit something give a

24:37:52

smiley I'll feel happy more energy will

24:37:55

come when I'm explaining because we also

24:37:56

need to do end to end project right now

24:37:59

okay now

24:38:03

um so one question is that how to

24:38:05

generate image data using Gemini still

24:38:08

those features have not been exposed

24:38:10

completely we'll talk about what all

24:38:12

features it specifically have okay don't

24:38:14

worry okay we'll be discussing about

24:38:17

now Gemini comes in three sizes one is

24:38:19

ultra our most capable and largest model

24:38:22

for high complex task one is pro our

24:38:26

best model for scaling around a wide

24:38:28

range of task okay and the Nano part

24:38:32

which is our most efficient model for on

24:38:34

device Tas so if you are

24:38:35

specifically working with gini Pro or

24:38:38

gini in devices you can use Nano in this

24:38:42

in for normal day-to-day task or general

24:38:44

task you can use gini Pro then you can

24:38:47

use ultra right now Gemini Pro is

24:38:49

available for everyone out there without

24:38:51

paying anything you can use it and you

24:38:53

can also hit 60 queries in a minute okay

24:38:56

at a time you can hit 60 queries right

24:38:59

now no charges are there later on when

24:39:00

Ultra will come the API will be

24:39:02

basically exposed okay and then you can

24:39:05

also use now gini can generate code

24:39:09

based on different inputs all these

24:39:11

capabilities are specifically there so

24:39:13

it is now better that we try to see some

24:39:15

handson okay and all the other

24:39:18

information you can probably check it

24:39:19

out which is I don't think so it is very

24:39:21

much important right now you can also

24:39:23

check it out with respect to B now I'll

24:39:26

give you a link

24:39:28

okay I will give you a link everybody so

24:39:32

let's take this link everyone and

24:39:35

provide this link in the chat okay so

24:39:37

please go ahead with this specific

24:39:41

link okay I've given you the link over

24:39:44

here

24:39:45

okay and in this link you'll be finding

24:39:48

this particular thing now we are going

24:39:50

to see a kind of demo right kind of demo

24:39:56

like how does geminii API work and we

24:39:58

are specifically going to use AP gini

24:40:01

Pro now in this first of all I also need

24:40:05

to worry about the API key how do we

24:40:08

create an API key gini Pro create an API

24:40:13

key we'll discuss about that right

24:40:15

second we will see multiple examples

24:40:18

with text images okay so both these

24:40:21

examples we'll see in this demo and

24:40:23

finally once we see multiple examples

24:40:26

then we will create an end to endend

24:40:28

project where I'm going to write the

24:40:29

code from

24:40:31

scratch write the code from scratch okay

24:40:35

I'll build a front end back end and then

24:40:37

probably show you

24:40:39

okay um sir a video called handson with

24:40:42

Gemini interacting with multiple was

24:40:43

fake yeah I told right uh they had

24:40:46

actually integrated images to image but

24:40:48

with respect to Performance I think it

24:40:49

is very very much good okay so let's go

24:40:53

ahead and now I will click on Google

24:40:55

collab now see guys over here Google

24:40:57

collab is there you can also work in

24:40:59

neurolab okay if you want okay but

24:41:02

always understand with respect to if you

24:41:05

want to use gini Pro the python version

24:41:09

that you really need to have is 3.9 and

24:41:13

greater okay 3.9 and greater so we are

24:41:18

still updating this neural lab right now

24:41:20

by default when you open this neural lab

24:41:22

it opens in 3.8 see

24:41:24

3.8.1 Z right so we will soon update

24:41:28

this by default you can also get an

24:41:30

option of changing this environment

24:41:32

because today I was actually seeing this

24:41:34

and it can probably also work in 3.9

24:41:37

okay so that is the reason we are

24:41:38

probably finding it out so everybody got

24:41:41

this link

24:41:43

everyone did you get this link so I will

24:41:46

post a

24:41:48

comment just check whether you are able

24:41:50

to get this link or

24:41:53

not everybody got the

24:41:58

link yeah so this is the link you have

24:42:01

to probably go ahead with you know so

24:42:03

you will get this page you have it all

24:42:06

the

24:42:08

options yeah you have all the options

24:42:11

like for go you have for nodejs you have

24:42:15

see it supports all everything right web

24:42:18

if you want to probably working on web

24:42:20

if you're working on Android device you

24:42:22

also have that you have that client SDK

24:42:25

right you have rest API right everything

24:42:29

if you want to work along with rest API

24:42:31

you can also get that as an example how

24:42:33

to get an API key I will just go ahead

24:42:35

and talk about it but now we are going

24:42:37

to focus on python okay so with respect

24:42:39

to python we are over here now do one

24:42:42

thing first of all guys when you're

24:42:44

running this before install installing

24:42:46

first of all let's go ahead and connect

24:42:48

to the GPU

24:42:50

okay and again if you Al want to do the

24:42:53

coding in neural La please go ahead and

24:42:55

do it okay but as I said uh it may give

24:42:58

you some issues because the bython

24:43:00

default version is 3.9 with respect to

24:43:02

gini Pro

24:43:04

okay but again I would suggest try with

24:43:07

this also good system all the code will

24:43:10

be saved over here and it will not get

24:43:12

deleted

24:43:13

okay great now

24:43:16

first thing first okay so we have

24:43:19

connected let's before executing

24:43:22

anything click on this get an API

24:43:27

key so get an API key will be there

24:43:31

somewhere like this and it will go to

24:43:34

this link makers. goole.com

24:43:37

slapp API ke so first of all we are

24:43:40

going to create an API key okay for API

24:43:43

key for a project okay so just give me a

24:43:46

a confirmation if you are in this

24:43:48

particular section because I'm going to

24:43:50

show you everything from scratch how you

24:43:53

can actually do it okay so please go

24:43:56

over here in this specific link did you

24:43:58

get that link did you get that link I

24:44:00

hope right just click on this link in

24:44:03

this particular uh notebook file you'll

24:44:06

be finding this specific link get API

24:44:09

key okay so click on

24:44:14

that and it will open just give me a

24:44:16

confirmation once this is

24:44:19

open

24:44:21

okay so see if you want to communicate

24:44:24

with this llm model it will be exposed

24:44:26

in the form of apis so when it is

24:44:28

exposed in the form of API you'll be

24:44:30

able to interact with it okay yes

24:44:33

everybody got this link okay I have

24:44:36

already created one so I'm going to

24:44:38

delete

24:44:39

this and I'll create a new one okay so

24:44:44

I'm creating an API key

24:44:49

now what

24:44:50

happened let's

24:44:52

see create a API

24:45:02

key the caller does not have a

24:45:04

permission I'm getting some error let me

24:45:06

see okay my account was changed okay so

24:45:11

I will just change my account so this is

24:45:13

my account okay now I will try to

24:45:15

execute it because if you doing with

24:45:17

other other account then it will be

24:45:18

creating a problem so let's go ahead and

24:45:21

create my API

24:45:23

key okay I will go over here now

24:45:26

everybody just click on this create a

24:45:28

API key still there is an issue

24:45:32

why is everybody able to create an API

24:45:35

key right now just

24:45:42

check are you able to create an API key

24:45:47

I will just open Google collab let's

24:45:59

see

24:46:09

okay okay it should not give an error I

24:46:12

don't know why it is giving an

24:46:15

error scholar does not have a

24:46:19

permission just a

24:46:25

second I think everybody should be able

24:46:28

to create

24:46:32

it just give me a second guys I'll just

24:46:35

try to create one API

24:46:45

key

24:46:46

just give me a second okay I think

24:46:49

there's some issues but I think

24:46:50

everybody may have got created it I'm

24:46:53

getting some error and I should know the

24:46:57

[Music]

24:46:59

reason just a

24:47:05

second just a

24:47:14

second

24:47:19

[Music]

24:47:36

the caller does not have a

24:47:40

permission anybody facing this

24:47:43

error I think it is due to I created did

24:47:46

the multiple keys for the task I created

24:47:49

the three app keys after that it is

24:47:51

giving Mana I guess

24:47:54

so

24:47:57

uh just a

24:48:03

second let me

24:48:06

see I'll just sign out

24:48:14

once close it and open let's

24:48:19

see maker

24:48:32

suit I got the create I was able to

24:48:35

create it yeah everybody's able okay

24:48:37

someone someone someone Someone okay

24:48:41

someone anyone ping me the key over here

24:48:43

I'll just have a look on this issue why

24:48:45

it is Happ happening with my email ID

24:48:47

okay I'll just get to know why it is

24:48:50

probably a problem but anyone just give

24:48:52

me an API key in the chat anyhow you can

24:48:55

actually request 60 request so anyone

24:48:57

someone give me the chat in the chat

24:48:59

I'll just check because this is the

24:49:01

first time I'm facing this error let's

24:49:03

see what is the issue

24:49:06

okay it should not give me an error

24:49:09

someone just uh ping it in the

24:49:13

chat let me see in whether any other

24:49:16

user ID will I be able to do it or

24:49:22

not

24:49:31

think okay so please make sure that I

24:49:34

think if you're able to create a

24:49:37

multiple okay finally I it has got

24:49:40

created I changed my login ID so now it

24:49:42

has got created now what I will do I

24:49:44

will go over here

24:49:46

okay I will keep this API key somewhere

24:49:48

here let me just keep it over here so I

24:49:52

will say OS do or let's say I will write

24:49:56

key is equal to and I will save it over

24:49:58

here okay so guys please make sure

24:50:02

that please please please make sure that

24:50:06

don't create multiple multiple this one

24:50:09

and delete keep on deleting it okay so

24:50:11

do not do that okay so don't after

24:50:13

creating one please save it somewhere

24:50:16

let's say I am saving it in my notebook

24:50:18

file okay so I have saved it over here

24:50:20

in my notebook file so that you don't

24:50:22

delete this okay don't delete it if

24:50:25

you're deleting it I think after three

24:50:27

times it will give you an is issue

24:50:29

otherwise just change your email ID okay

24:50:31

now let's start over here and let's

24:50:34

start working on it

24:50:36

okay so first of all I will go ahead and

24:50:39

connect it okay and then we'll go ahead

24:50:41

and discuss step by step

24:50:44

okay so just let me know whether you

24:50:47

have done all the steps or not you have

24:50:48

everybody has created their

24:50:50

keys

24:50:52

yes yeah everybody has created the

24:50:55

key okay now I have connected to my

24:50:59

collab

24:51:01

okay remember the requirements is that

24:51:04

you need to have python 3.9 plus okay

24:51:08

and installation of Jupiter to run the

24:51:10

notebook so 3.9 plus is the minimum

24:51:13

python version that it will work with

24:51:16

now first of all we will go ahead and

24:51:18

install this Google generative AI okay

24:51:22

so this is the library we are going to

24:51:24

create it okay so what I will do

24:51:28

parallely let me do one thing

24:51:32

parallely I will create a

24:51:35

project

24:51:37

okay let me let me create one

24:51:44

folder

24:51:47

so guys see I've created a folder gini

24:51:51

okay and in my local I will open a VSS

24:51:54

code because at the end of the day I

24:51:56

also want to create an end to endend

24:51:57

project okay so everybody follow along

24:52:01

with my steps okay now first of all it

24:52:05

is basically saying that I will be

24:52:07

having one requirement.

24:52:09

txt requirements.txt

24:52:12

yes everybody so everybody has vs code

24:52:16

can you give me a quick confirmation if

24:52:18

everybody has a vs

24:52:20

code yeah everybody has a vs code

24:52:25

yes yes so how do you open this vs code

24:52:29

just click in this particular folder

24:52:31

open with code right so I hope everybody

24:52:34

is basically having the vs code now I

24:52:37

have opened the vs code now the first

24:52:40

step over here you can see that we will

24:52:42

go ahead and install Google generate

24:52:45

ative AI right so I will copy this

24:52:47

entirely and I will execute it because

24:52:50

here I will show you the demo and there

24:52:52

we will try to create an endtoend

24:52:55

project okay so I will do this over here

24:53:00

so here you can see the installation has

24:53:02

taken place right and as you know the

24:53:04

first thing that we need to install is

24:53:06

Google generative AI so now I will go to

24:53:09

my vs code and here I will write it as

24:53:11

Google generative AI okay the next thing

24:53:14

I will also be requiring streamlet so

24:53:17

that I create my front end right so here

24:53:20

I need to create my front end okay so

24:53:23

these two libraries I'm going to

24:53:25

specifically use it okay now as said

24:53:30

what should be the python environment

24:53:32

that you are currently working

24:53:36

in what should be the python environment

24:53:39

that you should be working in can

24:53:40

anybody tell

24:53:42

me so I'll say cond deac activate

24:53:46

quickly tell me guys which python

24:53:48

environment we should keep on working on

24:53:52

it which python

24:53:54

environment at least greater than 3.9

24:53:58

plus so what we will do we will try to

24:54:01

create an environment so in order to

24:54:03

create an environment I will write cond

24:54:05

create minus P my environment name is V

24:54:10

EnV and which environment I'm going to

24:54:12

use Python equal to 3.9

24:54:16

or if you don't want 3.9 plus you want

24:54:18

so I will say 3.10 right 3.10 and here I

24:54:23

will by default give- y okay so

24:54:27

everybody clear I'm creating an

24:54:29

environment so that I will also be able

24:54:31

to work along with an end to endend

24:54:33

project so once I execute this over here

24:54:36

you'll be seeing this entire things will

24:54:38

get

24:54:39

executed okay and that is why you'll be

24:54:42

able to see one environment V and be

24:54:45

getting created see step by step we'll

24:54:47

do and I'll be able to make you

24:54:50

understand why I'm specifically doing

24:54:52

this because I want an environment so if

24:54:55

you're executing the local or in any

24:54:57

Cloud minimum requirement is that you

24:54:59

need to have python 3.9 plus that is the

24:55:03

reason I've taken python

24:55:05

3.10 okay so here you can see that we

24:55:07

noticed a new environment has been

24:55:09

created do you want to select it for the

24:55:11

workspace folder either you can select

24:55:13

yes or if if you want to activate that

24:55:16

environment what you will do you will

24:55:18

write

24:55:19

cond create sorry cond activate vnb Dash

24:55:26

okay so now here is my activated

24:55:28

environment

24:55:30

perfect clear

24:55:33

everyone can I get a quick

24:55:37

yes

24:55:39

yeah yes yes obviously you'll get the

24:55:42

recording also don't worry so

24:55:45

everybody if you are able to understand

24:55:48

please hit like and let me know if you

24:55:50

are getting all this information or not

24:55:53

okay we will do this parallell step by

24:55:55

step whatever things are happening we

24:55:57

will work in that specific way

24:56:01

okay great okay now here also we

24:56:05

installed Google generative AI

24:56:09

okay clear shall I go ahead

24:56:14

guys shall I go ahead

24:56:18

everyone shall I go

24:56:22

ahead come on give me a quick yes great

24:56:26

now what we are specifically going to do

24:56:29

okay is that we are going to install and

24:56:32

import some of the

24:56:34

libraries for google. generative AI see

24:56:38

this is what we had installed right

24:56:40

Google Das generative AI right and the

24:56:42

same thing we are importing over here

24:56:44

import Google generative AI as gen all

24:56:47

the functionalities Let It Be text let

24:56:50

it be uh Let It Be regarding other

24:56:53

things that is videos images audio this

24:56:57

gen aai will be the allias name which

24:56:59

will have all the functionalities and

24:57:01

this is present inside google.

24:57:03

generative AI okay now here you'll be

24:57:06

able to see

24:57:08

that there is something a way to secure

24:57:11

your API data I will show you how you

24:57:14

can basically do it but let's go ahead

24:57:15

and create my API data so here I already

24:57:19

copied my API so I will go ahead and say

24:57:23

okay my API uncore key is equal to in

24:57:29

this way I'll paste it over here okay so

24:57:33

here I will give my API key which I had

24:57:36

copied from there so this will basically

24:57:39

have my API key okay so this API key I

24:57:44

will further be using using okay so

24:57:46

everybody just create your API key field

24:57:49

and this is basically converting a text

24:57:53

into markdown so that you get a good

24:57:56

display in the jupyter notebook so not

24:57:58

that important so that is what next

24:58:01

thing we are basically going to do now

24:58:03

understand this API key that we have

24:58:05

created the same thing we'll try to do

24:58:08

it in our end to endend project the name

24:58:12

that we are specifically going to use is

24:58:15

nothing but Google API key so here when

24:58:20

I probably go over here and go to my

24:58:24

here I will create a

24:58:28

file okay a

24:58:32

file okay soem file and here what I will

24:58:37

do I will paste it Google API key and we

24:58:42

will try to paste the API key over over

24:58:45

here what was the API key that I got it

24:58:48

was nothing but this entire thing

24:58:54

okay so here it is okay so why we need

24:59:00

to create an API key to play banga we'll

24:59:03

do bhang with the API key Danes sa are

24:59:07

you in the session or are you away from

24:59:09

the session H do you want to play

24:59:13

banga come on I I made you understand

24:59:16

right why we require the API ke it is

24:59:17

very simple to communicate with the llm

24:59:20

models huh without the API key you'll

24:59:22

not be able to communicate with the llm

24:59:24

models right a better answer for you

24:59:27

will be to play banga okay let's play

24:59:30

banga in that

24:59:32

okay come on guys please be serious with

24:59:35

respect to all the sessions that we are

24:59:37

doing

24:59:38

right never never uh you know whenever

24:59:43

we provide you free content you do not

24:59:45

value that free content right please

24:59:47

focus on the session try to learn along

24:59:50

with me I'm going step by step I'm going

24:59:52

slow I'm explaining you each and

24:59:54

everything right please

24:59:58

Focus right please

25:00:00

Focus if you do not focus on the session

25:00:03

if you're just watching it then it will

25:00:05

become a problem okay so practice along

25:00:08

with me so here I've created one API key

25:00:11

that is Google API key h

25:00:15

um one question was that sir at the end

25:00:18

of the webinar could you please suggest

25:00:19

some real use cases of gen VI in finance

25:00:22

yeah today the end to end project that

25:00:23

I'm going to do is an real use case only

25:00:27

okay clear everyone so can I get a quick

25:00:32

yes API key basically means we have gini

25:00:36

llm models somewhere hosted in the cloud

25:00:39

to access that you require some some

25:00:41

some tickets let's say you want an entry

25:00:44

ticket that entry ticket will be given

25:00:46

by that API key itself right you if you

25:00:49

have the right API key you'll be able to

25:00:51

contact the Jin llm model you'll be able

25:00:53

to get the result okay so clear everyone

25:00:57

till

25:00:58

here

25:01:04

okay okay perfect

25:01:07

now we will go to the next step and here

25:01:11

I will go ahead and I'll just comment

25:01:13

out this code okay I don't want this

25:01:16

code okay and let's say I will write

25:01:20

gen. configure we need to configure this

25:01:23

key okay we need to configure the API

25:01:26

key so I will just comment out this code

25:01:28

and I'll show you in an end to end

25:01:30

project how you can call this variable

25:01:33

okay and I'm saying gen ai. configure

25:01:36

API key will be equal to this key okay

25:01:41

so once I actually execute it okay

25:01:46

here you can see that now our API key is

25:01:49

basically configured now we know our ke

25:01:51

is over here but it is not a good

25:01:54

practice to Showcase this API key like

25:01:56

this that is the reason in my project

25:02:00

you'll be seeing that I have created

25:02:02

this

25:02:04

file okay file and this file has this

25:02:09

API key and this EnV is nothing but

25:02:12

environment right when you go ahead and

25:02:14

deploy this this environment file will

25:02:16

not be visible okay and since it is not

25:02:20

visible in the environment in the

25:02:21

production you will not be able to see

25:02:23

this key so over there in production

25:02:25

also you have a different way of setting

25:02:27

the API key okay perfect now here we

25:02:31

have configured it okay now this gen AI

25:02:34

after configuring it provides you two

25:02:37

amazing models one is gini pro and one

25:02:40

is gini Pro

25:02:42

Vision gini Pro is is specifically for

25:02:45

optimized for text only

25:02:48

prompts and this is probably optimized

25:02:51

for text and images prompts okay text

25:02:55

and images so one is for text and the

25:02:58

other one is for text and images I hope

25:03:01

you able to understand it okay one is

25:03:04

text and one is text and images so if

25:03:07

you want to do any kind of work that is

25:03:09

related to text and images let me tell

25:03:12

you an example okay what kind of use

25:03:15

cases you can probably get from it okay

25:03:18

now see this guys if I have this

25:03:25

invoice let's say I have this specific

25:03:29

invoice now if I

25:03:32

want anyone to

25:03:35

probably take out information from this

25:03:38

invoice what do you think I can

25:03:40

basically do or let's let's take this

25:03:42

invoice okay some some of the invoice EX

25:03:44

example this invoice has some of the

25:03:46

data okay invoice sample I will take

25:03:52

okay let's say this is one of the sample

25:03:54

invoice and if I probably save this

25:03:58

image and I will save it in my downloads

25:04:02

everybody's able to see this

25:04:04

invoice now from this

25:04:06

invoice I want my llm application to

25:04:09

probably retrieve data from it okay if I

25:04:13

probably ask who was this invoice buil

25:04:16

to it should be able to take out this

25:04:19

information isn't it an amazing use case

25:04:21

just imagine as a human being will this

25:04:24

be a very steady task means it'll be a

25:04:27

very slow task right here you'll be

25:04:30

seeing what information is there then

25:04:31

you'll be writing all the information

25:04:34

what if if I say my llm model and I give

25:04:36

this image and I say that hey what is

25:04:39

the date that is issued for this invoice

25:04:42

and it should be able to give me the

25:04:43

answer 263 2021 isn't it

25:04:46

amazing tell

25:04:48

me will this be an amazing use case to

25:04:52

work on in a company where you automat

25:04:55

all the invoices are automated

25:04:58

automatically is it good or not tell me

25:05:01

guys come on yes or no something I hope

25:05:05

you are not sleeping I know it's late

25:05:08

but I'm going to take the session till

25:05:09

10: so that is the reason I'm asking you

25:05:13

are you able to hear me out or not right

25:05:16

so just imagine if you want to automate

25:05:18

the entire in invoice probably take out

25:05:21

all the info yeah PDF is also supported

25:05:24

not on images PDF is also supported PDF

25:05:26

you can convert that into bytes you can

25:05:28

take out the information you can even

25:05:30

chat with your PDF do whatever things

25:05:32

you want right so this is super right

25:05:36

this is this is amazing thing right you

25:05:39

will be able to get those information

25:05:41

and just imagine you have a task where

25:05:43

you need to automate all the data in an

25:05:44

Excel sheet and probably push that data

25:05:46

from into a different

25:05:48

databases right so here you'll be able

25:05:52

to see

25:05:54

that yeah I hope you able to get an idea

25:05:58

about it

25:05:59

guys clear so let's automate this let's

25:06:04

automate this entire thing where you can

25:06:06

give an image and I ask any question any

25:06:10

generic questions with respect to this

25:06:12

you should be able to get an answer

25:06:13

about that

25:06:15

okay so this is just like an invoice

25:06:17

extractor I'll say okay and in upcoming

25:06:20

projects we'll see about PDFs we'll see

25:06:22

about chatting with PDFs we'll see about

25:06:25

multiple things okay then then you'll

25:06:27

have a fun so this is what is the use

25:06:29

case that I'm going to probably solve

25:06:30

today okay now let's go ahead and let's

25:06:34

go ahead and probably talk more about it

25:06:36

okay now tell me one thing guys

25:06:40

everybody's writing the code along with

25:06:42

me I hope so if you are not writing I

25:06:44

will give you the code anyhow okay but

25:06:47

uh let's go ahead and do this okay now

25:06:50

this is done my EnV is created okay my

25:06:53

EnV is basically created I have my

25:06:55

Google API key everything is there uh

25:06:58

now let's go ahead and install these

25:07:01

requirements okay so first of all what I

25:07:03

will do I will go over here I will go

25:07:06

ahead and install these requirements in

25:07:08

requirements I have Google generative AI

25:07:10

streamlet right so I will go and write

25:07:12

pip install

25:07:15

minus r requirement. tht

25:07:19

right so now my installation is

25:07:22

basically taking place please go ahead

25:07:23

and do the installation everyone and

25:07:25

once you do the installation in your vs

25:07:28

code or in your neurol lab we will try

25:07:31

to probably install all the libraries

25:07:33

that are required okay because at the

25:07:35

end of the day we are going to create an

25:07:38

end to end project please do that

25:07:41

okay guys and uh for the people whom I

25:07:44

see lot of

25:07:46

participation I will give them an

25:07:47

opportunity to probably come along with

25:07:50

me in this live session and talk with me

25:07:53

okay so you really need to be activate

25:07:55

Okay so I'll give a couple of people

25:07:57

that specific chance okay so please

25:08:00

Focus okay and please be active because

25:08:03

this kind of session start valuing it

25:08:06

okay unless and until you don't value it

25:08:08

then it will not work out so hit like do

25:08:10

multiple things keep on posting call

25:08:12

your friends to join the session it'll

25:08:14

be quite some amazing okay so right we

25:08:18

are what we are basically going to do we

25:08:19

going to do this specific installation

25:08:21

it will take some time uh now what I

25:08:24

will do I will create my app.py

25:08:27

file Now understand one thing what we

25:08:31

are specifically going to

25:08:34

do I

25:08:37

will see what is our plan that we are

25:08:41

going to do I'll discuss about the

25:08:43

architecture so I will create one front

25:08:45

end application something like

25:08:49

this

25:08:52

okay I will what I will do I will upload

25:08:56

an image so then image will upload over

25:08:59

here okay and then I will write my own

25:09:03

custom

25:09:05

prompt so this will basically be my

25:09:09

prompt prompt basically means I will ask

25:09:12

who is this invoice will to I will ask

25:09:15

this question over here the image will

25:09:17

get uploaded over here and then I should

25:09:20

be getting my

25:09:22

output over here that saying that the

25:09:25

image was built to someone like built to

25:09:28

this particular company okay now this is

25:09:31

super amazing see now as soon as I

25:09:35

upload the image understand the

25:09:37

architecture

25:09:39

okay as soon as I upload the image right

25:09:44

so this image will get uploaded then

25:09:47

what I will do I will take this

25:09:50

image I will take this

25:09:53

image convert into

25:09:56

bytes convert into

25:09:59

bytes okay and then retrieve this image

25:10:03

over here so I will be having the image

25:10:06

info okay image info okay so this is

25:10:11

First Step as soon as I upload it the

25:10:13

image will get converted into bytes and

25:10:15

we'll be having all the image info all

25:10:17

the details inside the image because

25:10:20

Gemini

25:10:22

pro has a very strong OCR

25:10:27

functionalities OCR functionalities okay

25:10:31

so if you probably give this information

25:10:33

of the image info now in The Next Step

25:10:35

what I'll do I will take this prompt so

25:10:38

I will add this along with my

25:10:41

prompt and this entire info will be

25:10:45

going to

25:10:47

where where it will

25:10:50

go bites basically I'll show you that

25:10:52

bytes don't worry okay it is just

25:10:56

like image information it will probably

25:10:59

get converted into some encoded

25:11:00

character okay now this image info plus

25:11:04

prompt will now be we will hit it

25:11:08

to

25:11:10

Google

25:11:11

gini we will hit it to

25:11:17

we will hit it

25:11:18

to gini pro llm

25:11:26

model okay to gini pro llm model now

25:11:31

once we head it to the Gin pro llm model

25:11:34

it will look for two important

25:11:36

information one is the prompt and one is

25:11:39

the image

25:11:40

info and through that OCR

25:11:42

functionalities what this gin Pro it has

25:11:44

an internal OCR

25:11:46

functionalities it will try to compare

25:11:49

this two information and it is able to

25:11:51

get an output it will give an output

25:11:53

saying that let's say I've asked the

25:11:56

build uh who this invoice was built to

25:11:58

it'll say that the invoice was built to

25:12:01

so and so information that we are

25:12:03

getting from the

25:12:06

image okay and finally this will be my

25:12:09

output and this is what we are

25:12:11

specifically going to do we will Design

25:12:14

this we will write the code for this and

25:12:16

we will probably get this also okay so

25:12:20

finally we'll do all this Steps step by

25:12:22

step okay now let's quickly go over here

25:12:26

and I've already done the installation

25:12:29

let me clear the screen now you may be

25:12:31

thinking Krish you are not a front- end

25:12:33

developer how will you write the stream

25:12:35

late code on the Fly I will never write

25:12:38

I will use chat GPT I will use Google B

25:12:40

I'll say hey give me a stream L code

25:12:43

where I have an image upload button

25:12:45

where I have one text input box and I

25:12:48

have a submit button I will write like

25:12:50

that okay so let's go ahead and write my

25:12:53

code okay so first of

25:12:54

all I will write it over

25:12:57

here

25:12:59

invoice extractor okay now first of all

25:13:03

tell me

25:13:05

guys in my environment file I have my

25:13:08

API key right how do I call

25:13:11

this how do I call this environment

25:13:13

variable right so for that I will be

25:13:15

using

25:13:17

from EnV import load

25:13:22

uncore Dov okay so I require this load.

25:13:27

EnV what this specifically does load.

25:13:30

EnV it will help us to load all our

25:13:34

environment variables right but for this

25:13:37

I need to install it so here what I will

25:13:39

do I will go to requirement. txt I will

25:13:41

write python. EnV right and I'll save it

25:13:45

again I will go to my

25:13:46

terminal okay and I will say pip

25:13:51

install pip

25:13:53

install minus

25:13:57

r requirement. tht so this installation

25:14:00

will take place and finally you'll be

25:14:02

able to see the python. EnV will get

25:14:05

installed so here you can probably see

25:14:07

the installation has been done now it

25:14:09

will not give us an error whenever we

25:14:11

try to load this EnV okay so we have

25:14:15

specifically done this okay now after

25:14:19

importing to load all the environment

25:14:23

variables we will use this function

25:14:25

which is called as load. EnV so here it

25:14:29

will take load all environment

25:14:34

variables from dot

25:14:38

EMV okay clear everyone yes can I get a

25:14:43

quick

25:14:45

yes yeah I will show you everything

25:14:47

don't worry follow along with me I will

25:14:49

try to show you how you can convert

25:14:51

image into bytes how you can get the

25:14:53

image info everything as such I will

25:14:55

show you okay okay everything I will

25:14:59

show you but here till here I hope

25:15:01

everybody's very much able to understand

25:15:04

and they able to understand in a very

25:15:06

good way okay clear okay perfect so let

25:15:10

me go to the next step now and we'll

25:15:12

discuss further like what we are

25:15:14

specifically going to do now after this

25:15:16

I will go ahead and import

25:15:19

streamlet as

25:15:21

St so we are going to use streamlet as

25:15:24

we imported that okay we will import

25:15:29

OS because I need to call my environment

25:15:32

variables so here I'll be using OS and

25:15:35

then since I'm using images I will use

25:15:37

from

25:15:38

P import image okay this image will

25:15:43

actually help us to get the info from

25:15:45

the image okay now as you know from the

25:15:49

requirement. txt we have also installed

25:15:51

Google generative AI right so we will be

25:15:55

importing importing Google do generative

25:16:01

AI as gen AI okay so we are also going

25:16:05

to use this specific thing that is

25:16:07

google. generative a gen now as usual

25:16:12

first of all you know that we need to

25:16:14

load our API key right and we need to

25:16:17

configure it so here for configuring I

25:16:20

will write over

25:16:21

here

25:16:24

configuring configuring API key okay and

25:16:29

here I will basically write

25:16:31

gen do

25:16:34

configure API uncore key and now where

25:16:39

is my environment variable it is

25:16:41

basically present in this specific key

25:16:43

right in this specific key so in order

25:16:46

to call this I'm already calling load.

25:16:48

EnV so here I will write OS dot get ENB

25:16:53

that is get environment

25:16:55

variable get environment variable here I

25:16:58

will go ahead and use my API key done so

25:17:03

this way I'm able to configure the API

25:17:06

key

25:17:08

right

25:17:09

yes everybody clear here right

25:17:14

everybody clear so I hope you're getting

25:17:15

a clear idea what we are doing step by

25:17:18

step I've imported all these things I

25:17:21

imported streamlet I have imported Os Os

25:17:23

why I had imported because I need to get

25:17:25

the environment variable right and this

25:17:27

G environment variable is basically

25:17:29

present INB file whatever name it will

25:17:31

go okay now here you'll be able to see

25:17:34

that I have configured each and

25:17:36

everything okay so along with me you can

25:17:38

write the code if you liking the video

25:17:40

please hit like uh share with all your

25:17:42

friends as usual because all the steps

25:17:44

I'm showing you completely from scratch

25:17:46

Basics because once you understand this

25:17:48

it's your idea do whatever things you

25:17:50

can do image detection image

25:17:53

classification whatever images you want

25:17:55

okay you can basically do it now

25:17:58

done now my next step will be that I

25:18:02

will write a

25:18:04

function so I will create a

25:18:08

function

25:18:10

to load Gemini

25:18:14

provision

25:18:16

model and get response okay so I will

25:18:20

create this function so I will write

25:18:22

definition get gini

25:18:26

response okay

25:18:29

response and here I will require two

25:18:31

important information one is the input

25:18:35

right what specific input that I am

25:18:38

basically giving okay second is image

25:18:43

and third is basically prompt I'll talk

25:18:46

about this what is this differences

25:18:48

between this input and prompt because

25:18:50

both are almost similar but prompt is

25:18:53

something different and image is

25:18:55

something different this prompt or this

25:18:58

sorry this input will be the message

25:19:01

that the llm model will behave like okay

25:19:05

this prompt will be my input that I'm

25:19:08

giving what kind of information I want

25:19:10

okay so this three information I'm

25:19:13

giving it over here now I will go ahead

25:19:16

and call my model so I will write model

25:19:18

gen Dot and here I will call my

25:19:23

generative generative model so inside

25:19:26

this

25:19:28

functionalities basically to call that

25:19:31

gini provision model I have to use the

25:19:33

gen. generative model and here I will

25:19:37

call my Gemini

25:19:40

Pro Vision okay so I'm going to

25:19:44

basically call this right gini Pro

25:19:47

Vision and finally once I call this this

25:19:50

way I will be loading my model so I'll

25:19:53

give you a message over here saying that

25:19:55

loading the Gen AI model right the

25:20:00

Gemini model I can also say it as Gemini

25:20:04

model okay now after loading it I need

25:20:08

to get the response so I will write

25:20:10

response is equal to and I will say

25:20:13

model

25:20:16

dot

25:20:18

generate model. generate underscore

25:20:22

content and here in a list

25:20:25

format this is how you have to basically

25:20:28

give the input to the model so in the

25:20:30

list format the first parameter I'm

25:20:32

going to give is input images will be in

25:20:35

the form of list all the information

25:20:37

we'll get in the form of list so I'll

25:20:39

write image of zero comma it it'll be in

25:20:43

the form of list and then finally I'll

25:20:45

write prompt so once I get this

25:20:47

information then I will return

25:20:50

response and there will be a parameter

25:20:52

inside response which is basically

25:20:54

called as

25:20:57

text so all this information we are

25:21:00

getting it from the Gin right so what we

25:21:04

are doing in this specific

25:21:07

function we are creating a function

25:21:11

which will load a gity provision model

25:21:15

and then model. generate content will

25:21:18

take the input and it will give us the

25:21:20

response so here we are getting three

25:21:21

inputs I'll talk more about these inputs

25:21:23

what all it is and then finally we will

25:21:26

be getting the response. text everybody

25:21:29

clear yes yes everybody

25:21:34

clear can I get a quick yes if you able

25:21:37

to understand till here come on yes or

25:21:40

no give some heart sign give some

25:21:42

symbols

25:21:43

yes no anything it is up to

25:21:47

you

25:21:50

yeah learning is very much important as

25:21:52

I said so

25:21:54

please give your spread your love right

25:21:57

everywhere learning will be fun great

25:22:01

now what we are going to do next step

25:22:04

okay next step what I said see as soon

25:22:07

as see this part is done if I talk about

25:22:10

this part hitting through the Gemini Pro

25:22:12

with all the info image info and prompt

25:22:15

this is done and I get the response this

25:22:17

part is done but this part is not yet

25:22:20

done image upload convert into bytes and

25:22:22

probably get this info this is not done

25:22:25

so what we will do we will go ahead and

25:22:26

write that function so here I will write

25:22:30

input

25:22:32

image set

25:22:34

up and here I will say provide my

25:22:37

uploaded file so whatever uploaded file

25:22:39

I'm going to get I'm going to give it

25:22:41

over here the image I'm going to give it

25:22:42

over

25:22:44

okay now initially I did not know the

25:22:47

code for this okay how to probably get

25:22:50

the uh image data in the form of bytes

25:22:53

something like that right so what I did

25:22:55

I I I went ahead and asked chat GPT and

25:22:59

then chat GPT gave me this solution okay

25:23:03

I asked it that I'm giving an

25:23:06

image okay uh just a

25:23:09

second I'm giving an image so if

25:23:11

uploaded file is not none then it took

25:23:14

this data uploaded file and it did dot

25:23:16

get value from the dot get value it got

25:23:19

the bite data and then it gave me image

25:23:21

Parts in two different format one is the

25:23:24

mime type and one is the data okay so

25:23:28

don't worry I will give you this entire

25:23:30

code in the GitHub repository if you

25:23:31

want the GitHub repository also I can

25:23:34

give it to

25:23:36

you okay so here is the uh I'm I'm

25:23:39

putting the comment uh so everybody body

25:23:42

will be able to see the comment over

25:23:44

there in LinkedIn also I think I will go

25:23:46

ahead and put

25:23:48

it okay so this will basically be the

25:23:51

GitHub file okay so everybody will be

25:23:54

able to see this okay so what we are

25:23:57

doing over here we are taking this image

25:23:59

we converting that into bytes okay then

25:24:02

the image part will be based on two

25:24:03

parameters one is mim type where the

25:24:06

uploaded file. type is there and the

25:24:08

data by data I just asked it to chat jpt

25:24:11

and it gave me this specific answer okay

25:24:14

and then we are returning this image

25:24:16

part so by this what is exactly

25:24:19

happening this part that you have

25:24:21

created is completed see step by step we

25:24:24

created this gin Pro load it this part

25:24:28

is created image info we are

25:24:30

specifically getting it now we need to

25:24:32

get prompt and we need to get input okay

25:24:35

where it is pasted in GitHub link so in

25:24:38

vision. piy file you'll be able to see

25:24:40

that the code is given Okay so so you

25:24:42

can actually use it from

25:24:44

there perfect everybody clear so this is

25:24:48

my second task that I have actually done

25:24:50

shall I go with the third

25:24:52

task yes or

25:24:56

no yes or

25:24:58

no third task is nothing but it is

25:25:01

basically our streamlit app so here you

25:25:04

can probably

25:25:06

see I will now create my stream L app

25:25:09

see initialize our stream L app we use

25:25:12

st. page config the page title is gini

25:25:16

image demo so let's say I'm going to

25:25:18

write some other functionality over here

25:25:21

I will go and say uh image or invoice

25:25:28

extractor okay this is a Gemini

25:25:31

application I use one text box the text

25:25:34

box this text box is nothing but my

25:25:36

input okay input that I'm getting I'm

25:25:40

giving what kind of information I

25:25:41

specifically want from

25:25:45

my from what what kind of input I

25:25:48

specifically want from my invoice yeah

25:25:52

that

25:25:53

information and then uploaded file will

25:25:56

be st. file uploader now here I'm saying

25:25:59

choose an image the type should be jpg

25:26:02

jpg PNG if you want PDF you can also

25:26:04

write PDF over there but the format will

25:26:07

be little bit different so I have

25:26:09

created a file uploader over here and

25:26:11

I'm saying if uploaded file is not none

25:26:14

then what will happen it will open the

25:26:16

uploaded file and it will display the

25:26:19

file over

25:26:21

here it'll display the file over H image

25:26:25

right so some amount of knowledge in

25:26:27

streamlet is required for this if you

25:26:30

don't have knowledge be dependent on

25:26:31

chat GPT because this code entire code

25:26:34

was given by chat GPT okay so here what

25:26:37

I did I used an input box I created an

25:26:41

uploader file for image

25:26:42

and then I'm displaying the specific

25:26:44

image as soon as the upload is done okay

25:26:47

so this three input information I did it

25:26:50

okay and

25:26:53

finally I will create a submit

25:26:56

button and I will say St do

25:27:03

button and here I will

25:27:06

say tell me about the

25:27:11

invoice

25:27:15

done and finally I will give some prompt

25:27:19

I I I need to

25:27:20

say I need to say how my Google Gemini

25:27:24

pro model needs to behave so for that I

25:27:27

will give some kind of input prompt and

25:27:30

I'll say

25:27:31

hey let's say I'm going to use

25:27:33

multi-line

25:27:36

comment and here I'll say okay let's

25:27:39

give a message a default message you you

25:27:42

are an

25:27:44

expert in understanding

25:27:50

invoices okay you will

25:27:55

receive you will receive input

25:28:00

images as invoices I'm writing a message

25:28:04

and you will have

25:28:07

to

25:28:09

answer

25:28:11

questions B based on the input

25:28:14

image so I'm giving some prompt right

25:28:18

some prompt template like kind of stuff

25:28:20

so that I'm saying hey you need to

25:28:22

behave in this way okay you are an

25:28:25

expert in understanding invoices you

25:28:27

will receive an input image and invoices

25:28:29

and you'll have to answer question based

25:28:31

on the input image right so this is my

25:28:36

in by default you can basically say a

25:28:38

default instruction to the gini pro

25:28:41

model that you need to behave like this

25:28:44

okay now finally if submit button is

25:28:49

clicked now what should happen now let's

25:28:51

go ahead and understand with respect to

25:28:53

this when this submit button is clicked

25:28:56

first of all the image should get

25:28:57

converted into bytes I should be able to

25:28:59

get the image info then image info along

25:29:02

with the prompt should hit the germini

25:29:04

pro model right this is what we really

25:29:06

want to do so here I will say if

25:29:10

submit if I am submitting

25:29:14

if the submit button is clicked first

25:29:16

thing first what I will be requiring my

25:29:18

image data the image data will call

25:29:21

which function this function only no

25:29:24

input image setup okay so here it will

25:29:27

basically call the input image setup and

25:29:30

here we will go ahead and write my

25:29:31

uploaded file right the uploaded file

25:29:34

that I get and now I got the image data

25:29:36

right now all I to need to call is my

25:29:38

response and I will go ahead and call my

25:29:40

get gini response and and here I will

25:29:43

give my three information what three

25:29:44

information is basically going uh over

25:29:47

here input image data and

25:29:51

prompt so input is uh this input prompt

25:29:54

so I will copy

25:29:56

this then you have this image

25:30:00

data image data okay this image data you

25:30:04

have and third one is basically what is

25:30:07

your input right so your input is over

25:30:11

here so what whatever input you are

25:30:12

basically writing in this okay so all

25:30:16

this three information has basically

25:30:18

gone right so I hope everybody's clear

25:30:22

with this and finally I get my response

25:30:24

right now once I get my response all I

25:30:27

have to do is that display this specific

25:30:30

response okay display this specific

25:30:33

response so for this I will go ahead and

25:30:35

write St

25:30:37

Dot

25:30:40

subheader and I will write the

25:30:43

response

25:30:45

is and here I will write ht. WR and here

25:30:50

I will display the response okay

25:30:53

whatever response is coming over here

25:30:55

let's

25:30:57

see excited so done the project is done

25:31:01

so there is three functionalities one is

25:31:04

this one is the image

25:31:06

processing then one is simple streamlit

25:31:09

app creating your input prompt and done

25:31:12

now shall we run this how excited are

25:31:15

you will we get an error or shall we

25:31:19

just directly run it tell

25:31:21

me should we run it

25:31:25

or shall we run it

25:31:29

everyone so let's go ahead and run it so

25:31:32

here I will write

25:31:33

streamlet

25:31:35

run

25:31:37

app.py so I'm running this allow exess

25:31:43

and here we

25:31:45

go do you see this

25:31:51

everyone yeah now let me go ahead and

25:31:54

browse the file one of the invoice that

25:31:56

I downloaded it looks something like

25:31:58

this see am I able to see the sample

25:32:03

invoice right Cho let's see bigger

25:32:09

information it will obviously be able to

25:32:10

give it okay

25:32:15

okay let's take out this information can

25:32:18

we take out this information what is the

25:32:20

deposit requested in the invoice let me

25:32:23

ask what is the deposit requested come

25:32:28

on you can see the answer what is the

25:32:31

deposit

25:32:32

requested okay so I will just go ahead

25:32:35

and this is my prompt that I'm giving

25:32:39

now I will go ahead and click on tell me

25:32:41

about about the invoice now let's see

25:32:43

whether it will run or

25:32:46

not so it should be able to give me the

25:32:49

answer it is

25:32:51

running do you see the answer

25:33:10

169.99

25:33:13

yes or

25:33:14

no right let's go ahead and see

25:33:17

something who is this invoice build

25:33:21

to who is this

25:33:24

invoice build

25:33:28

to and I will go ahead and click on tell

25:33:32

me about the invoice so who is this

25:33:34

invoice build

25:33:40

to

25:33:44

who is this invoice build to let's see

25:33:47

it's

25:33:56

running L by answer low

25:33:59

see all the same

25:34:03

information

25:34:07

good now tell me how strong this is you

25:34:11

see like do

25:34:13

like Give Love share love spread

25:34:20

love yeah any more question okay let's

25:34:24

try multil

25:34:26

language Hindi

25:34:28

invoice

25:34:31

format let's try some Hindi invoice

25:34:34

no let's save

25:34:36

this will it be able to work Hindi

25:34:40

invoice let's go ahead and browse

25:34:44

it yes we can also save the data

25:34:48

anywhere we want in databases and

25:34:51

all okay how many of you know

25:35:01

Hindi response times took little long

25:35:04

yeah we can optimize it it is a free API

25:35:07

no okay let's let's ask some complex

25:35:10

question in Hindi okay

25:35:12

I will ask in English only what is the

25:35:15

HSN see over here you find HSN HSN is

25:35:19

over here right of Lenovo 5125 I okay

25:35:25

what is the HSN

25:35:26

of

25:35:31

Lenovo

25:35:33

Lenovo the item I'm writing in English

25:35:36

see Lenovo 5125 I 5125 5 I let's try

25:35:45

tell me about the

25:35:52

invoice we can optimize this if this is

25:35:54

the format right we can optimize

25:35:58

it do you see this

25:36:00

number is it same 301

25:36:06

0 yeah so I know in many companies

25:36:09

they'll be requiring this

25:36:13

see it is written in English

25:36:17

Hindi

25:36:20

okay let me just go ahead and write what

25:36:22

is the billing address

25:36:24

okay what is the billing

25:36:29

address okay tell me about the

25:36:35

invoice

25:36:38

right tell me about the invoice

25:36:42

take SCB building building defense

25:36:49

State Gino Maharashtra see all the

25:36:52

information is

25:36:55

here good enough see Maharashtra also it

25:36:59

is

25:36:59

taken

25:37:01

right okay see dinak is written now so

25:37:05

let's see I will write what is the date

25:37:08

of the

25:37:10

invoice

25:37:15

what is the date of the

25:37:22

invoice

25:37:24

tick 1227

25:37:29

0221

25:37:33

good now try any invoice let's see what

25:37:37

is the cgst okay let me go ahead and

25:37:40

write

25:37:42

what is

25:37:43

the

25:37:48

cgst let's go ahead and see about the

25:37:55

invoice there is no limit of the image

25:37:58

you can upload as cgst is 80% where it

25:38:01

is

25:38:02

written okay it is given see okay GST

25:38:06

18% is the cgst is 18% okay

25:38:13

okay uh let's see what I'll write what

25:38:17

is the

25:38:19

total what is the total

25:38:24

bill what is the total bill I'm just

25:38:26

writing anything let's see where it

25:38:28

tries

25:38:30

to yes yes you can do 500 PDF 100 PDF in

25:38:34

my next session I will show you working

25:38:36

with PDF

25:38:37

okay 1 170 392 see guys

25:38:43

amazing

25:38:45

right

25:39:02

so yeah 500,000 how much you all results

25:39:06

got correct sir

25:39:08

yes yeah nag as I'm saying any number of

25:39:11

pages take one lakh pages also it is

25:39:14

possible there we can use Vector

25:39:17

database to save

25:39:19

it so guys good

25:39:23

video hit like shower Your Love share

25:39:26

with all your friends and this was about

25:39:29

today's

25:39:36

session so tell me how was the session

25:39:39

see at the end of the day okay one more

25:39:41

thing that I really want to share so

25:39:43

that you don't miss

25:39:49

things so guys uh we are happy to

25:39:51

introduce one amazing course for you

25:39:54

that is regarding generative AI so we

25:39:56

will be building this kind of

25:39:57

application we show you how to do the

25:39:59

deployments and all so this is the

25:40:02

mastering generative AI course you can

25:40:03

go ahead and check it out in ion. page

25:40:07

okay so I'm giving you the link in the

25:40:10

comment section if you like it please go

25:40:12

ahead and watch it so here we will be

25:40:15

developing all these kind of projects

25:40:16

we'll be using Google gini we'll be

25:40:18

using open AI Lang chain Lama index you

25:40:21

can check out and again at the end of

25:40:23

the day mentors you'll be seeing myself

25:40:25

Sunny bappy so everybody will be taking

25:40:28

a part of it if you have not seen the

25:40:30

community sessions in Inon so definitely

25:40:33

go ahead and watch out and see the

25:40:34

talent of all the mentors that are there

25:40:36

but at the end of the day the projects

25:40:38

level that we going to develop is much

25:40:40

more complex with respect to this so go

25:40:43

ahead and check it out and if you have

25:40:45

any queries please do call to our team

25:40:48

counseler team which is over here in the

25:40:51

bottom of the page you'll be able to see

25:40:52

them right and uh anything that you have

25:40:56

a queries regarding you can probably

25:40:57

contact us okay so this was one of the

25:41:00

thing not only that if you are

25:41:02

interested in learning machine learning

25:41:04

deep learning anything as such or data

25:41:07

analytics we also have that there's also

25:41:09

mlops production ready projects you can

25:41:11

also join that

25:41:12

okay so yes this was from my side I hope

25:41:16

you like this particular

25:41:18

session my final takeaway is that uh in

25:41:22

the field of AI it is it is really

25:41:24

really evolving every day you really

25:41:27

need to learn if you think that you're

25:41:29

just going to learn today get a job

25:41:31

tomorrow and after that your learning

25:41:33

stops that is not at all possible Right

25:41:36

learning is continuous and you really

25:41:38

need to learn continuous you need to

25:41:39

find out ways you need to find of

25:41:41

creativity in doing the projects and uh

25:41:44

at the end of the day you work for the

25:41:46

benefit of the society right so uh this

25:41:51

is the main and amazing thing that I

25:41:52

have probably seen in this AI field is

25:41:55

that the amount of learning is amazing

25:41:56

it is quite well and the kind of things

25:42:00

that we have actually done right in the

25:42:03

AI field like everybody throughout the

25:42:05

world right it is amazing right I I can

25:42:09

definitely say like it's wow okay so uh

25:42:15

yes this was it from my side at the end

25:42:17

of the day I would again

25:42:19

suggest uh keep on looking on different

25:42:23

things that you can do with this just

25:42:24

imagine today we just did this entire

25:42:27

invoice extractor tomorrow you can think

25:42:30

of multiple use cases think in the

25:42:32

different domain Healthcare domain right

25:42:35

and uh let's see where you'll come and

25:42:38

definitely do share this content

25:42:40

everywhere in LinkedIn show your talent

25:42:42

show your things what more additional

25:42:45

thing you can basically do on top of it

25:42:47

okay so yes uh this was it from my side

25:42:50

guys I hope you like this particular

25:42:52

session if you liked it all the

25:42:53

recordings will be available also I

25:42:55

would suggest please see in the

25:42:56

description of the YouTube channel all

25:42:58

the community link will be given over

25:42:59

there uh and if you want to learn any qu

25:43:02

any courses from us you can check out

25:43:04

in. page and I will see you all in all

25:43:07

the sessions and class till then I will

25:43:09

see you all in Next Friday with one more

25:43:10

amazing

25:43:11

sessions where we'll discuss more

25:43:13

amazing use cases this was it from my

25:43:15

side have a great day bye-bye take care

25:43:18

keep on rocking keep on learning thank

25:43:20

you everyone and yes at the end of the

25:43:23

day keep sharing your knowledge with

25:43:24

everyone right uh okay so sir please

25:43:28

tell me if there is any prerequisite for

25:43:30

this course don't worry about any

25:43:31

prerequisite it will get handled only

25:43:33

thing that you really need to know about

25:43:35

generative AI is about python okay so

25:43:38

probably When You Learn Python if you uh

25:43:41

you need to have some amount of

25:43:42

knowledge of python for that also we

25:43:44

have put recorded videos in the course

25:43:45

so that you can actually check it out

25:43:47

okay uh thank you so much for your

25:43:50

wonderful efforts thank you thank you

25:43:52

thank you uh how can we integrate into

25:43:55

databases and then ret information that

25:43:57

I will show you in the next class we'll

25:43:59

use some kind of um uh we we'll try to

25:44:03

use some kind of vector databases okay

25:44:07

it'll be fun it'll be fun it'll be

25:44:09

amazing okay

25:44:22

okay let's see some more okay I'll take

25:44:23

some more

25:44:25

question sir every time we click on run

25:44:28

it trains the model with the image

25:44:29

provided then extract no it need not

25:44:32

train itself the model is already

25:44:34

trained so you give the necessary bite

25:44:37

information over there it'll be able to

25:44:39

extract all the details like OCR

25:44:42

right excellent session thank you sir as

25:44:45

I said how can we integrate with

25:44:47

databases and we will be using Vector

25:44:49

databases okay that I'll show you in the

25:44:51

next class it'll take one hour

25:44:53

session yes sir we have a lot of learned

25:44:55

from Krishna thanks to give top

25:44:57

knowledge sharing with us thank

25:45:01

you I really enjoyed my Friday evening

25:45:04

with this new learning every day like

25:45:06

every Friday I will come over there and

25:45:08

I'll teach you

25:45:09

something

25:45:15

okay it's okay so please try to learn

25:45:17

from others also because there is some

25:45:20

experience that is basically displayed

25:45:22

over

25:45:23

there

25:45:35

okay NLP is important to learn

25:45:38

generative AI yeah so let me just share

25:45:40

my screen again so that you get an idea

25:45:43

if you probably see what all things

25:45:45

you'll be

25:45:47

learning so if you go ahead and see our

25:45:50

generative AI course sorry this is

25:45:52

machine learning boot camp so in the

25:45:54

generative AI course the prerequisits

25:45:56

are uh only python is there and we will

25:45:59

be teaching you all NLP so this is

25:46:01

basically NLP we'll be teaching you all

25:46:03

these

25:46:04

things right uh NLP NLP NLP so basics of

25:46:08

NLP then we'll go with RNN and and we'll

25:46:11

try to learn

25:46:25

this

25:46:33

okay guys the team has shared some Link

25:46:36

in the

25:46:38

chat let's see

25:46:41

so which are the best books for genda

25:46:44

see guys I not suggest right now to

25:46:46

follow any books because this is not

25:46:49

fixed every day some changes are there

25:46:52

right so guys there is a temporary URL

25:46:56

link that we could see over there let's

25:46:58

see I think uh NLP is important to learn

25:47:02

generative AI new

25:47:05

comments can you make an one end to

25:47:07

tutorial on rag yes I will do that in

25:47:09

the next class

25:47:26

okay perfect so hit like guys if you

25:47:31

like this

25:47:32

session and uh there are lot many things

25:47:34

that is probably going to come in the

25:47:36

future

25:47:37

okay sir say up data scientist B so this

25:47:42

question is good

25:47:49

enough

25:47:51

sir dat

25:47:55

SST this is just for testing purpose

25:47:57

guys in front end there are lot many

25:47:59

things other than

25:48:02

this

25:48:05

Okay click on the link and join the

25:48:08

session with Chris sir

25:48:12

link so this is the link

25:48:18

right is this the

25:48:39

link

25:48:52

okay

25:48:54

uh so we are not getting any

25:48:57

notification about jobs see guys jobs uh

25:49:01

things like how you can specifically

25:49:03

apply And all I'll will be discussing

25:49:04

more about it as we go ahead okay um

25:49:09

just give me a day session time I'll

25:49:12

probably talk about this with respect to

25:49:14

resumés with respect to building profile

25:49:16

and all so all those things I will

25:49:18

discuss

25:49:21

okay can we do prediction using tabular

25:49:24

data in gen what kind of

25:49:28

predictions is it something related to

25:49:30

text text you can basically do

25:49:39

it

25:49:49

okay anybody wants to

25:49:52

join this

25:50:00

session yeah prakash if you have any

25:50:02

questions please do let me

25:50:05

know you

25:50:08

can you can un mute yourself if you want

25:50:11

to

25:50:15

talk yeah Prashant do you want to talk

25:50:18

sorry prakash he got

25:50:39

disconnected okay okay

25:50:41

perfect uh are you adding feret in

25:50:44

course I will just try to see that think

25:50:47

the documentation that is available and

25:50:49

I think this is an llm model from

25:50:51

Microsoft I guess

25:50:54

right so Mahesh has joined Mahesh do you

25:50:57

want to talk

25:50:59

anything yeah hi sir it's a pleasure to

25:51:02

uh talk to you yeah hi hi mes yes please

25:51:06

tell me you want to show your face you

25:51:09

can also on your

25:51:11

video uh so actually I'm not in a

25:51:14

position to show my face uh I'm me

25:51:17

outside uh actually I'm a student of in

25:51:21

neuron and to be frank sir I'm just I

25:51:25

was just clueless initially when I

25:51:27

started to learn this uh data science

25:51:30

part so again my education background is

25:51:33

I'm from

25:51:34

biology mhm okay so I don't have any

25:51:38

background on mathematics but but to be

25:51:41

frank when I just started to learn the

25:51:44

things from in neuron so without any uh

25:51:49

excuse me so without any um knowledge on

25:51:52

mathematics also I still I'm able to

25:51:55

learn lot of things and I can just I'm

25:51:59

just getting more confidence when it

25:52:01

comes to data science topic as well as

25:52:04

I'm just getting more confidence so that

25:52:07

I can just get play in future

25:52:10

mhm

25:52:11

mhm so you're saying that how first of

25:52:15

all how is your learning things going on

25:52:17

right

25:52:17

now yes sir I'm just uh building in

25:52:20

projects and uh I started to implement

25:52:23

melops in my own architecture means like

25:52:27

implementing the mlops from scratch sir

25:52:30

I just did are you are you working

25:52:32

somewhere right now yeah I'm working as

25:52:35

a data analyst but my working nature is

25:52:38

not exactly as data analyst but somewhat

25:52:42

similar to data

25:52:43

analyst okay my suggestion in this case

25:52:46

right uh in your current company if you

25:52:48

see any ideas and if you see anything

25:52:50

that is probably coming up right try to

25:52:53

participate in that try to see that what

25:52:56

all things you can basically do over

25:52:57

there you know try to see whether you

25:52:59

can apply any data science knowledge

25:53:01

because that is the experience that you

25:53:02

can probably put as a p project in your

25:53:04

resume right and later on with respect

25:53:08

to with respect to that kind of work

25:53:10

you'll be able to tell that in the

25:53:11

interviews right in any interviews that

25:53:14

you specifically go yeah yes sir and um

25:53:19

I just want to thank you for uh being a

25:53:22

good Mentor and I'm really thankful for

25:53:26

anuron for giving me S such an good

25:53:29

support in my career so I'm just always

25:53:33

talk so I'm really excited I'm not able

25:53:36

to

25:53:37

talk okay no worries no worries so drink

25:53:40

some water and be chilled okay and keep

25:53:42

on working hard okay thank you sir thank

25:53:45

you very much

25:53:48

hello I am so much excited to talk to

25:53:51

you uh your your videos are so much uh

25:53:54

informative and uh I'm really uh glad to

25:53:58

talk directly with you like this uh I

25:54:01

used to follow your ml series and DL

25:54:04

series and uh they're very informative I

25:54:06

have enrolled to gender course also uh

25:54:10

just I would like to uh know few

25:54:12

questions sir um please kindly answer

25:54:15

I'm um I'm poor at a data stres and

25:54:18

algorithms uh will that be uh requ for

25:54:21

this generate course may know please no

25:54:23

no no no it's okay like basic inbuilt

25:54:26

data structures will be

25:54:27

sufficient um it's more about how you

25:54:30

can use generative AI to solve

25:54:32

applications right Basics that is

25:54:35

specifically required you need to be

25:54:36

good at that for cracking interviews

25:54:39

okay okay I'm I'm six years of

25:54:42

experience as a tester uh okay uh is it

25:54:45

okay just means if I get into this field

25:54:49

does companies accept my profile as a

25:54:51

tester and switching to this uh

25:54:53

transforming to this carer as a tester

25:54:55

whatever projects you're currently doing

25:54:57

make sure to apply some data science

25:54:59

stuff over there it can be automation it

25:55:01

can be anything as such because that

25:55:04

same thing you'll be able to explain in

25:55:05

the

25:55:06

interviews okay yeah yeah okay sir thank

25:55:09

you so much sir yeah thank

25:55:12

you one more question fet Apple released

25:55:16

one fet llm right are you going to add

25:55:18

this in general a course uh fet right

25:55:22

now the entire documentation is not

25:55:24

available so once let's say once we

25:55:26

probably go and we see lot of use cases

25:55:28

then we'll try to add it okay okay sir

25:55:31

any update that will probably coming

25:55:33

then and there we'll try to add it okay

25:55:35

okay sir yeah thanks yeah thank

25:55:38

you yeah yeah Mahesh please unmute

25:55:43

yourself yes sir sir is this session

25:55:45

being

25:55:47

recording

25:55:48

yeah okay fine and uh sir is there is

25:55:52

there any option for me to visit anuron

25:55:55

so that we can just meet um yeah sure

25:55:59

you can come Inon in the working days

25:56:02

right yeah Monday to Friday anytime H

25:56:06

yeah sure sir okay so that I can just uh

25:56:09

talk to personally so uh maybe maybe

25:56:12

within that within two or 3 months I

25:56:15

might be getting uh place I'm applying

25:56:17

for the jobs so once I just transing

25:56:20

means I'm just placing in a new company

25:56:23

so I'll be coming uh to IUN and directly

25:56:27

meeting to you okay sure sure sure

25:56:31

definitely okay you thank you

25:56:35

much yeah Danish

25:56:38

SA you can unmute yourself yeah hello

25:56:42

sir yeah hi

25:56:48

yeah yeah

25:56:50

yeah please is it okay

25:57:08

for

25:57:29

students

25:57:38

thank

25:57:40

as a

25:58:08

fresher

25:58:22

[Music]

25:58:34

M definitely sir I want

25:58:37

to sir may

25:58:50

[Music]

25:58:55

defitely be

25:59:08

there

25:59:12

and thank you so much for sir thank you

25:59:16

thank you yeah thank you definitely

25:59:38

thank

26:00:01

yes thank you sir thank you thank you

26:00:03

sir

26:00:04

yeah yeah thank

26:00:08

you

26:00:10

okay

26:00:13

uh

26:00:16

Joy

26:00:19

rubul P

26:00:23

questions please

26:00:25

P

26:00:30

Jo sir from past three years I'm

26:00:32

following your YouTube channel sir M uh

26:00:36

Mission learning I studied your mission

26:00:38

learning sir my my aim is I'm following

26:00:42

generative AI course now sir can you

26:00:43

please provide a free in your YouTube

26:00:46

channel sir 8,000 is too much sir for us

26:00:50

so that's why I'm asking

26:00:53

sir anyhow sir we have done live

26:00:56

Community session about generative AI a

26:00:58

lot of free content we have uploaded

26:00:59

already and more free content whatever

26:01:02

will be coming we still be uploading

26:01:04

don't worry about it sir

26:01:08

okay

26:01:10

yeah but llama model these models is not

26:01:13

uploaded in your YouTube channel right

26:01:15

sir it will get uploaded sir give some

26:01:17

time then we'll try to upload that also

26:01:19

but it needs to take time no sir we also

26:01:21

need to create uh we need to get time

26:01:24

for recordings and all we'll be doing

26:01:26

that kind in live session let's say next

26:01:28

Friday I'll do about llama index and all

26:01:33

okay sir uh M course era is there now

26:01:37

sir which which course we want to follow

26:01:40

out for generative AA llm models because

26:01:43

I am the beginner of this I learn

26:01:46

machine learning from your YouTube

26:01:47

channel if I follow want to follow

26:01:49

course era which uh because course era

26:01:52

is offering for our University free so

26:01:54

that's why I'm

26:01:55

askre sir I did not check out corsera

26:01:58

all the courses sir yet you know I did

26:02:00

not check it out like which one is there

26:02:02

but I think some or the other will

26:02:04

you'll be able to find it over there sir

26:02:06

okay but I did not check it out and that

26:02:08

is the reason I I usually learn from

26:02:10

documentation

26:02:16

githubschool but I don't have any idea

26:02:20

about corsera

26:02:22

Sir okay sir thank you sir while you are

26:02:25

while you are explaining in your YouTube

26:02:28

channel sir first explain the

26:02:31

documentation for me also so that next

26:02:33

time we will read little bit the

26:02:35

documentation while we are reading the

26:02:37

documentation we did not get the content

26:02:39

if you tell the keywords now then only

26:02:42

we will understood that we will digest

26:02:44

while we are I mean reading the research

26:02:47

paper like that sir sure sir sure I'll

26:02:50

do that sir

26:02:54

sure thank you sir okay yeah next

26:03:01

question yeah please go ahead

26:03:06

yeah very big very big thanks for thanks

26:03:09

to you uh so I I am your fan since you

26:03:14

started I new run so after that only I

26:03:18

come to know that you are teaching so

26:03:19

many uh courses belongs to a machine

26:03:23

learning everything so initially I'm

26:03:27

worrying about which one I need to

26:03:29

choose so whether I need to choose

26:03:31

machine learning or whether I need to

26:03:33

choose that and so I want to learn in

26:03:36

multiple things but I cannot

26:03:39

on single things okay by luckily uh my

26:03:43

my in my work space I have a opportunity

26:03:47

to work on gener P one years when the

26:03:50

open a released okay sir so I know

26:03:54

something about that so I I know

26:03:58

something about the open a what are the

26:03:59

features it can do so I have a handon

26:04:02

training on that one so now you announce

26:04:05

this generative a course so it will help

26:04:07

me a lot so I'm choosing your way that I

26:04:10

need to break a leg on this General ta

26:04:14

so I admire you and I like your videos

26:04:17

so I already purchased your course so I

26:04:20

am excited to start on January 18

26:04:22

onwards so very big thanks to you but

26:04:25

what you are um so I'm learning like a

26:04:30

surviving language only so whatever the

26:04:33

whatever the mean my Works needs so I'm

26:04:37

go and picking those kind of stuff

26:04:39

reading the stuff then I'm working on it

26:04:41

like the way so whatever the things you

26:04:43

example you saw in today's session I

26:04:46

have have completed those scenarios when

26:04:48

the J announced that you can use you can

26:04:51

build this application on WE that you

26:04:53

you put some video right the next day

26:04:56

itself I explored all the things so only

26:04:59

that I'm excted to do is that video part

26:05:01

only but nobody I don't see any video

26:05:05

video

26:05:06

paring yeah video paring yeah yeah don't

26:05:08

worry we will I'll create a video on

26:05:10

that also so don't worry okay so exact

26:05:13

exact to work on Inon no sir our data

26:05:16

science team has already done that okay

26:05:19

okay super passed 20,000 videos so we

26:05:23

have created a support system which is

26:05:24

pass 20,000 videos for the support

26:05:27

Channel very great very great to know I

26:05:30

ex from you yeah we'll speak to you sir

26:05:33

thank you thank you thank you for yourk

26:05:35

you thank you for your s and you are you

26:05:38

are boosting our confidence more more

26:05:41

thank you thank you prashan thank you

26:05:44

yeah kimah

26:05:47

yeah hello sir hello hello H hello sir I

26:05:52

am from

26:05:53

Pakistan yeah hi hi sir I'm your big p

26:05:58

and I I have a

26:06:01

question I am a student of electrical

26:06:03

engineering and I want to learn machine

26:06:05

learning and deep

26:06:07

learning I want to Chase your course uh

26:06:10

uh which course you would suggest for me

26:06:13

sir just go to ion. website there will

26:06:16

be a counseler number okay uh just try

26:06:19

to contact them in WhatsApp they will

26:06:21

help you out with all the information

26:06:23

right there is a ml boot Cam that is

26:06:24

probably coming up you can join that

26:06:26

course that will be completely from

26:06:29

Basics okay so there you can probably

26:06:31

join that but again go to ion. for more

26:06:35

better communication I think you can

26:06:37

contact the there'll be a number for The

26:06:39

Counselor or you just fill up the form

26:06:41

the counselor will try to contact you

26:06:43

sir oh thank you sir yeah thank you

26:06:47

thank you yeah Dean

26:06:51

josi sir sir hi uh sir I'm engine I'm

26:06:57

btech engineering first year student and

26:07:01

my specialization in AI n

26:07:03

DS so I'm I'm asking with you that sir

26:07:08

AI in the AI my college was not studying

26:07:13

this AI specialization they were already

26:07:17

uh the basic languages python uh C+ and

26:07:21

this then sir I'm what language I'm

26:07:26

beginning to start begin to start so uh

26:07:31

are you guide me for the AI and DS and

26:07:34

the

26:07:36

best okay so python

26:07:39

is the programming language you have to

26:07:40

probably start with okay in this field

26:07:44

because nowadays the cloud platforms

26:07:46

everywhere the libraries everything is

26:07:50

something that is related to Python and

26:07:52

that is only coming up in the future

26:07:54

okay yes sir

26:07:57

sir can I speak in Hindi h z z I'm not

26:08:02

in the proper way to speak in

26:08:05

English yeah yeah it's okay Hindi

26:08:16

a

26:08:18

only in jaur skit

26:08:22

College only a but I'm

26:08:27

watching

26:08:37

Dr

26:09:07

starting beginning

26:09:37

tops

26:10:07

sir

26:10:35

mainly

26:10:37

basic

26:10:49

B right okay sir

26:11:03

yeah thank

26:11:06

Youk thank you thank you

26:11:10

yeah Aman Kumar Helm yes sir J sir J

26:11:15

jind

26:11:23

by dat science machine learning

26:11:37

learning

26:11:51

[Music]

26:11:57

UK based remote job but machine learning

26:12:01

deep learning

26:12:04

basically data entry or some research

26:12:06

work or LCA related

26:12:13

basally data science machine

26:12:30

learning

26:12:36

full start applying for

26:12:45

both preparing for government

26:12:48

job I started learning about data

26:12:52

science data

26:13:07

analytics

26:13:09

okay

26:13:11

sir internship like we will get like

26:13:15

free free

26:13:21

internship

26:13:25

[Music]

26:13:31

11a

26:13:36

descrition okay sir sir okay thank you

26:13:40

sir thank you

26:13:44

sir hel yeah go ahead yes uh good

26:13:48

evening it's good morning here in the

26:13:50

United States I hope it's okay that I'm

26:13:52

not from India I

26:13:55

wanted wanted to thank you for the the

26:13:58

videos you posted for Gemini Pro I I did

26:14:01

all of them and I was on the road so I

26:14:05

couldn't watch this one um or follow

26:14:07

along but I will watch the recording and

26:14:11

do it as well I subscribed or I enrolled

26:14:13

to the class the master class that is

26:14:16

coming up so wanted to ask if Gemini Pro

26:14:19

will also be covered yeah yeah we'll add

26:14:22

that up because see any updates that

26:14:24

will probably come up with respect to

26:14:26

any llm models we'll try to update that

26:14:29

okay and which we feel that it is

26:14:30

important and it can really be a

26:14:32

breakthrough for developing my

26:14:33

application we will keep on updating it

26:14:37

wonderful one other question as far as

26:14:40

machine learning deep learning NLP it

26:14:43

sounds like NLP you're going in depth to

26:14:46

some quite a bit will there be any

26:14:49

machine learning or deep learning that

26:14:50

we should study up on before the

26:14:53

course uh whatever is the prerequisite

26:14:56

we'll try to teach in the course

26:14:58

whatever is necessary for that okay but

26:15:01

again at the end of the day if you

26:15:03

really want to become a full-fledged

26:15:04

data scientist who has capabilities of

26:15:06

machine learning deep learning

26:15:08

and generi I think you need to also

26:15:10

learn about machine learning and deep

26:15:12

Lear SE okay to that point I'm I don't

26:15:15

think I'm I want to become a machine

26:15:18

learning engineer I want to more be on

26:15:21

the on the front lines creating

26:15:24

applications but I want to know enough

26:15:27

with what I do I don't I don't have any

26:15:29

uh computer uh programming background I

26:15:32

just started learning pythons you know

26:15:34

four months ago then this course will be

26:15:36

perfect for you I think uh then then you

26:15:38

don't have to probably work worry about

26:15:40

that it depends on the kind of work that

26:15:42

you're specifically doing okay wonderful

26:15:46

well thank you very much again really

26:15:47

appreciate it thank you thank you

26:15:50

sir so when will the course start I

26:15:52

think you can go ahead and check out in

26:15:54

the course dashboard uh the dates are

26:15:56

basically given it is 28th Jan 2024

26:16:02

ni okay guys so because of time

26:16:04

constraint it's almost 10 uh this was it

26:16:07

from my side I hope you like this

26:16:09

session I hope you liked it uh please do

26:16:11

make sure that you hit like share with

26:16:13

all your friends share your learning

26:16:15

develop the application from your side I

26:16:17

will see you all in the next video next

26:16:18

Friday session we'll do some more

26:16:20

amazing things we'll try to use Vector

26:16:22

databases we'll try to create more

26:16:24

projects and we'll implement it some

26:16:26

same thing so thank you have a great day

26:16:28

and keep on rocking keep on learning and

26:16:30

have a happy weekend that is coming up

26:16:32

thank you guys bye-bye take care perfect

26:16:35

uh now let's go ahead towards the agenda

26:16:37

so what is the agenda of this particular

26:16:39

session what are we specifically going

26:16:41

to discuss right and uh what is the end

26:16:44

to- end project that we are going to

26:16:46

develop over here so it is very simple

26:16:49

the agenda is that we will be developing

26:16:52

a text to

26:16:54

sequal application or I'll say llm

26:16:57

application now just by the name you

26:17:00

think that text to sq may be simple here

26:17:03

we will be having a specific database

26:17:05

we'll write some queries we'll insert

26:17:07

some records

26:17:08

and then we try to develop llm

26:17:10

application wherein the main task of

26:17:12

this llm application will be that take

26:17:15

the text whatever text or prompt that

26:17:17

you give let's say I I ask uh hey tell

26:17:21

me tell me in this particular classroom

26:17:23

how many students are there right so

26:17:26

this text will be sent to the llm model

26:17:29

and here the llm model will be Gemini

26:17:32

Pro okay and this Gemini pro model will

26:17:35

specifically give you a query right and

26:17:39

this query will try to execute and read

26:17:41

from my SQL database okay so this is the

26:17:44

entire project that we are going to do

26:17:47

right we need to have a c database we

26:17:48

need to have a table over there and this

26:17:52

entire project will be buil in this

26:17:53

specific way itself right so this text

26:17:56

that you will be seeing this is nothing

26:17:58

but it is a prompt okay so this will be

26:18:00

my input prompt in English language and

26:18:03

then this will be sent to the llm llm is

26:18:05

nothing but our Gman pro model this will

26:18:08

in turn convert this into a query and

26:18:11

then with the help of SQL libraries

26:18:12

we'll go ahead and hit the SQL database

26:18:14

and get the response okay so this is the

26:18:17

entire agenda of this specific project

26:18:19

and we'll also try to see how we can

26:18:21

actually deploy this okay so everybody

26:18:24

clear with the agenda what you are going

26:18:26

to do in this specific project itself

26:18:28

yeah can I get a quick yes if you are

26:18:31

able to hear me out I hope you are able

26:18:35

to understand this project that we are

26:18:36

going to do and this is is going to be

26:18:38

done by Google gini pro okay we will do

26:18:41

the line by line coding from scratch so

26:18:43

just give me a quick yes if you got the

26:18:46

entire agenda of the specific project

26:18:48

yeah and we'll develop part by part so

26:18:51

just quickly give me a quick yes guys

26:18:53

come on come on be somewhat active you

26:18:56

know you need to be active then only the

26:18:59

session will be fruitful okay so I would

26:19:01

suggest please be active and try to say

26:19:04

yes give some symbol give some thumbs up

26:19:07

that would be quite amazing okay perfect

26:19:11

so let's go ahead and let's start this

26:19:13

particular project now here how we are

26:19:16

going to implement things right

26:19:17

implementation part so the first step

26:19:20

what we are going to do is that you can

26:19:22

use any SQL database as such here I'll

26:19:25

be suggesting to use sqlite so that

26:19:27

we'll be able to show everything in the

26:19:29

demo itself and this is just not

26:19:31

restricted to sqlite or SQL database you

26:19:33

can also do it in a no SQL database you

26:19:35

can do it in Cassandra DB you can do it

26:19:37

in mongodb whatever database you

26:19:39

specifically want second uh we'll do

26:19:41

this setup we'll insert some records

26:19:44

okay we'll insert some records and again

26:19:47

this all things will do with my Python

26:19:49

programming language okay so Python

26:19:51

programming language will be used to do

26:19:53

this the second thing after we implement

26:19:56

this we will start creating our llm

26:19:58

application and inside this llm

26:20:00

application we'll create a simple UI

26:20:03

where you can specifically write the

26:20:04

query and this llm application will

26:20:07

probably communicate with gini Pro and

26:20:10

then it will communicate to the SQL

26:20:12

database to give us the answer okay I

26:20:15

just written two steps over here so you

26:20:17

may be thinking that this may be simple

26:20:19

but it is not that simple you will be

26:20:21

seeing there will be a lot many things

26:20:22

that will probably be coming over here

26:20:24

okay and uh uh again at the end of the

26:20:29

day please code along with me uh see

26:20:31

what all things we are specifically

26:20:33

writing in this what all requirements

26:20:34

are there you know and step by step

26:20:36

we'll go ahead and do the implementation

26:20:39

perfect uh so everybody has got the

26:20:42

agenda and the implementation part so

26:20:43

let me go ahead and open my vs code okay

26:20:46

now for opening the vs code over here

26:20:49

you'll be able to see the first step you

26:20:52

know when we start any project is that

26:20:54

what we really need to do please answer

26:20:56

someone we really need to create a

26:20:59

environment right now a interview

26:21:01

question may come for you like why you

26:21:03

specifically require environment or why

26:21:05

do you create an environment for every

26:21:06

project that you probably create right

26:21:08

there's a simple fundamental in this is

26:21:11

that every project has a different

26:21:13

dependencies you really require

26:21:15

different libraries over there right so

26:21:17

that is the reason you have to create

26:21:19

different different environment for this

26:21:21

again create an environment I will just

26:21:23

go ahead and open my terminal okay so

26:21:26

this is my terminal you can also do it

26:21:27

in Powershell you can do it in command

26:21:30

prompt so the first prerequisite is that

26:21:32

you really need to have Anaconda

26:21:34

installed okay so here is my

26:21:38

uh in this particular location I have my

26:21:40

project so let's go ahead and quickly

26:21:42

create my environment so go ahead and

26:21:44

write cond create minus P VNV python

26:21:49

okay always remember as I said that

26:21:52

Google gini pro works well with 3.10

26:21:55

right sorry greater than 3.9 version so

26:21:57

that is the reason I'm going to use 3.10

26:22:00

and it is going to ask me for a

26:22:02

not request saying that whether it

26:22:05

should go ahead with the installation or

26:22:06

not so I give that preand that symbol AS

26:22:09

why why basically means yes so let me

26:22:12

quickly go ahead and create this so you

26:22:14

also can parall start creating it guys

26:22:17

okay go ahead and create it uh everybody

26:22:21

go ahead and create the environment

26:22:23

itself so be work along with me then

26:22:26

you'll be able to understand

26:22:30

everything go ahead and create the

26:22:32

environment and let me know once the

26:22:33

environment is created come on and hit

26:22:36

like if each and every step you are able

26:22:38

to work out and at the end of the day I

26:22:40

will also give you the entire GitHub

26:22:42

code so that you'll be able to see it

26:22:44

okay so quickly just tell me whether you

26:22:48

will you are able to create a new

26:22:50

environment or not I'll wait I'll wait

26:22:52

slowly uh like I want everybody to

26:22:55

execute it and probably you can go along

26:22:58

with me and you can actually execute

26:23:00

each and every line of code along with

26:23:02

the project okay so at the end of the

26:23:04

day I don't want you to just see the

26:23:06

code but also

26:23:07

Implement along with me okay so perfect

26:23:11

over here so nanu is along with me he's

26:23:13

also implementing things that's

26:23:16

great everyone come on create the

26:23:20

environment along with me and give a

26:23:21

quick confirmation if you are able to do

26:23:23

it okay there are 64 people watching I

26:23:26

want everyone of you to do it along with

26:23:28

me come on quickly let's do this

26:23:33

okay

26:23:35

great so in M done okay okay sir yes yes

26:23:40

yes okay so I hope everybody has done

26:23:43

the first step now as usual I will go

26:23:45

ahead and clear the

26:23:47

screen and now what we are going to do

26:23:50

in the next step is that here you'll be

26:23:52

able to see my V andv environment is

26:23:53

created okay in this specific

26:23:56

environment we will go ahead and start

26:24:00

installing all the libraries so for this

26:24:02

we need to activate the environment so I

26:24:04

will go ahead and write p activate VNV

26:24:09

right so cond activate VNV I'm giving

26:24:12

this specific folder location over here

26:24:14

and once I execute it here you'll be

26:24:16

able to see that my path has changed now

26:24:18

it is inside my VNV environment okay so

26:24:21

this is the second step step by step we

26:24:23

are specifically doing it so please

26:24:26

participate in this start implementing

26:24:28

things you know give me a confirmation

26:24:30

it would be really great okay sir can

26:24:34

was this actually I could not complete

26:24:35

ml it's okay you can also watch this the

26:24:37

prerequisite is only python okay uh

26:24:40

perfect so this is done which

26:24:42

application you are using what do you

26:24:44

mean by application I'm using a vs code

26:24:46

so there only I'm probably writing the

26:24:48

code itself okay perfect so done we have

26:24:53

activated the environment now let's go

26:24:54

ahead and create our requirement.

26:24:57

txt

26:24:59

requirements.txt file okay now

26:25:02

requirement. txt what it says it it

26:25:06

basically says that what all libraries I

26:25:09

may specifically require you know so for

26:25:12

this let me go ahead and write all the

26:25:14

libraries that I'm actually going to use

26:25:16

one is streamlet okay because we are

26:25:18

going to create the front end with

26:25:20

streamlet the other one is Google

26:25:22

generative Google generative

26:25:25

AI now this Library also we require

26:25:28

because at the end of the day we are

26:25:29

going to use Google gini pro the another

26:25:32

one is python. EnV now why we require

26:25:36

this Library so that we can load all our

26:25:37

environment variables and as you all

26:25:39

know that we are going to create a

26:25:41

Google gini pro uh API and then we are

26:25:45

going to insert that in our environment

26:25:46

variable okay um along with this uh I

26:25:51

think this three libraries will be more

26:25:53

than sufficient to start with perfect

26:25:56

okay great so this three libraries I'm

26:26:00

going to use over here now once I have

26:26:02

actually written all these libraries

26:26:03

over here then what I'm going to do is

26:26:06

that

26:26:07

go ahead and write pip

26:26:12

install minus r requirement. txt okay so

26:26:16

once I go ahead and write pip install

26:26:18

minus r requirement. txt you'll be able

26:26:21

to see that all the installation of all

26:26:23

these libraries will happen okay and

26:26:25

this is actually happening in the v EnV

26:26:27

environment so please go ahead and do

26:26:29

this step create your requirement. txt

26:26:33

and then after that start doing the

26:26:35

installation and this is the basic

26:26:37

initial step that we really need to do

26:26:40

in every project so till here

26:26:42

everybody's clear give me a thumbs up

26:26:44

give me some symbol some something

26:26:46

laughing emoji right hit like and if you

26:26:50

have chances call all your friends in

26:26:52

this live session okay come on this kind

26:26:54

of sessions you'll not get it anywhere

26:26:56

live that also I'm coding along with you

26:26:58

live so that you understand all these

26:27:00

things come

26:27:01

on

26:27:05

so

26:27:07

great sir all of the requirements for

26:27:09

this project are free yes absolutely

26:27:11

free you don't even have to put credit

26:27:14

card that much free okay so uh the

26:27:18

installation is basically happening

26:27:19

please let me know whether the

26:27:20

installation is done from your end or

26:27:23

not okay and hit like come on you need

26:27:27

to probably see the entire

26:27:29

session and code along with me that is

26:27:32

the main purpose of coming life you have

26:27:34

to code along with me okay so this was

26:27:38

one of the question sir all of the

26:27:39

requirements for the projects are free

26:27:41

yes it is completely free I believe in

26:27:43

open source so that you don't have to

26:27:45

pay anything over there okay perfect the

26:27:48

installation has been done we are good

26:27:51

to go over here now great can you give

26:27:54

me a thumbs up if the installation if

26:27:56

you have done at least partially you

26:27:58

have done the installation come on let

26:28:00

me

26:28:03

know great now we will go ahead and

26:28:06

create ourv file now for our EnV file

26:28:10

environment file we require Google gini

26:28:13

pro API okay so what I will do I will

26:28:16

quickly go ahead

26:28:18

and go to this website which is called

26:28:21

as maker maker suit. goole.com

26:28:25

slapp API key okay I just change my

26:28:28

email ID because I've created my API key

26:28:31

and another email ID okay so go to this

26:28:34

particular website which is called as

26:28:35

maker suit . google.com /a/ API key okay

26:28:41

all keys needs to be put yes so just go

26:28:44

ahead and click on this create API key

26:28:46

new project so this will basically

26:28:48

create your API key for Google giny okay

26:28:52

so go ahead and click this right once

26:28:54

you probably click it you'll be able to

26:28:56

see this kind that is getting created

26:28:58

the API key I've already created it so I

26:29:00

will go ahead and copy it from here okay

26:29:02

so I have copied it from here okay so

26:29:05

everybody are you able to do this step

26:29:09

just let me know and if you're following

26:29:11

let me know okay I want everyone of you

26:29:14

to implement along with me please that

26:29:17

is a request then this session will be

26:29:19

fruitful okay if I keep on teaching like

26:29:22

this if if you say that no I'll do the

26:29:24

implementation later on trust me later

26:29:26

on nothing will happen you not be able

26:29:28

to do it you know if you give excuses

26:29:31

and keep on postponing things uh that

26:29:33

will not work out you know when you have

26:29:35

an opportunity when you're seeing this

26:29:37

live please go ahead and Implement along

26:29:39

with me great so can you add the link

26:29:44

okay perfect let me go ahead and add it

26:29:46

over here let me go ahead and add from

26:29:50

stream key

26:29:52

okay so I am adding this link over

26:29:57

there perfect is everybody able to see

26:30:00

the link

26:30:02

now

26:30:04

yeah yes yes

26:30:10

great now from this link you have to

26:30:13

create your API key once this is done go

26:30:17

to the environment variable now and now

26:30:20

for this API key you really need to

26:30:21

create a key itself right so how do you

26:30:24

create a key over here so here I will

26:30:26

keep it in the form of key value pairs

26:30:29

so here you can see that I've use the

26:30:31

key that is Google API key and then this

26:30:34

is my key that I've actually copied it

26:30:36

from there okay so please keep in this

26:30:39

format with respect to the key value

26:30:41

pairs okay and initially you definitely

26:30:43

require this because if you don't have

26:30:45

the right key your application is not

26:30:47

going to work

26:30:49

perfect great now this is done our

26:30:52

environment key is set we have activated

26:30:54

the environment we have installed all

26:30:56

the requirements okay now let me go to

26:30:58

my

26:31:00

notepad now the first thing with respect

26:31:03

to the implementation as I told you that

26:31:04

we will take a database like cite right

26:31:07

and we'll insert some records to just

26:31:09

show that there are some records there

26:31:11

is a table there is a database there is

26:31:14

there is a sqlite over there you know so

26:31:16

that you can query you can query from

26:31:19

those particular SQL database itself

26:31:21

okay so for this what I'm actually going

26:31:23

to do quickly I'll go ahead and create

26:31:25

one file let's say this file name is

26:31:27

sqlite dopy okay so here I'm going to

26:31:30

write my code and this code will be

26:31:34

responsible in inserting any records in

26:31:37

the sqlite database okay so I'm going to

26:31:40

close this over here and now I'm going

26:31:42

to start writing my code and remember

26:31:45

one thing guys over here whatever code

26:31:47

I'm writing this is something also this

26:31:50

will also help you to understand how we

26:31:52

can connect python with sqlite and how

26:31:54

we can insert records and all okay so

26:31:57

first of all uh to start with I'm going

26:31:59

to import sqlite so sqlite is again a

26:32:03

lightweighted database okay sorry sqlite

26:32:06

right uh three so we are going to by

26:32:09

default in Python 3 right you have this

26:32:11

imported already okay now we will go

26:32:14

ahead and

26:32:16

connect connect to the cite database

26:32:20

okay cite

26:32:23

database now for this I usually write

26:32:25

the code AS connection is equal to I

26:32:28

will go ahead and write

26:32:31

connection connection is equal to sqlite

26:32:35

3 do

26:32:38

connect and the I will keep a database

26:32:40

name let's say the database name is

26:32:42

student. DB okay so this is my database

26:32:46

name I'm going to create my database in

26:32:48

this specific name okay so in short what

26:32:52

we are doing is that we connecting to

26:32:53

this particular database so if this

26:32:55

database does not exist okay then it is

26:32:58

going to create this new DB okay so this

26:33:00

is the first step the second step is

26:33:03

that we'll create a

26:33:08

cursor object to insert records to

26:33:12

insert and create tables let's say to

26:33:14

insert records or create table because

26:33:17

inside a database we going to create a

26:33:19

table right so till here I hope

26:33:22

everybody's clear what we are

26:33:23

specifically doing because this will be

26:33:25

a this will be another py file which

26:33:27

will be responsible in creating your

26:33:29

database it will also insert all the

26:33:32

records okay so please do along with me

26:33:34

so that you'll be able to understand

26:33:36

perfect now what we are going to do over

26:33:39

here is that quickly we will go ahead

26:33:41

and create a cursor object so for this

26:33:43

we will go ahead and write

26:33:46

cursor cursor is equal to

26:33:51

connection connection dot cursor so that

26:33:54

basically means inside this particular V

26:33:58

database connection right whatever I'm

26:34:01

basically using this particular function

26:34:02

this method will be responsible in

26:34:04

traversing the entire table going

26:34:06

through all the records and all whenever

26:34:08

we try to insert or retrieve the records

26:34:10

okay so this method will be responsible

26:34:13

for doing all those things now we will

26:34:15

go ahead and create the table right now

26:34:18

with the help of this cursor object we

26:34:20

will try to create the table now here

26:34:22

will be my table

26:34:24

info let me go ahead and create my table

26:34:27

info and I will say this will be three

26:34:29

columns okay and let me start writing my

26:34:32

query name so here I will say create

26:34:35

table

26:34:37

student I'll try to write it in capital

26:34:39

letter and inside this I will use first

26:34:43

first parameter or first uh variable

26:34:45

right name and here I'm going to use

26:34:48

this as we care and let me go ahead and

26:34:51

write to 25 character so that basically

26:34:53

means name is a field okay and in that

26:34:57

it supports variable character you can

26:34:58

write numbers integers uh values string

26:35:01

anything that you specifically want to

26:35:03

write so this will be my first first

26:35:06

First Column you can basically say in

26:35:07

that way in that particular table second

26:35:10

one is let's say I go ahead

26:35:13

and uh go ahead and write something

26:35:15

called as class okay so I'm writing the

26:35:18

student information in which class he or

26:35:21

she may study um and this class will

26:35:25

also be a Vare and inside this I will go

26:35:28

ahead and write this will be my two 2 25

26:35:30

characters okay and the third parameter

26:35:33

I'm going to specifically use is

26:35:34

something called as

26:35:38

let's say I'm going to write this as

26:35:42

section so this will basically be my

26:35:44

section and here also I'm going to use

26:35:45

my VAB and this will also be 25

26:35:48

character so once we do this we will

26:35:50

close this entire command that the query

26:35:54

that we specifically have so simple

26:35:56

query initially we'll just go with

26:35:59

simple one so that you'll be able to

26:36:01

understand it so sqlite 3 wasn't in

26:36:04

requirement file Yeah by default with

26:36:06

python 3.10 cite 3 comes installed so

26:36:09

this is going to work okay I've already

26:36:11

tried it out fine we have done the table

26:36:15

info over here and you'll also be able

26:36:17

to see that now what I'm going to do is

26:36:19

that I'm going to create this specific

26:36:21

table okay so for creating this specific

26:36:24

table I will go ahead and write

26:36:26

cursor dot

26:36:29

execute table okay so this this table

26:36:34

info cursor do execute so as soon as

26:36:37

this line gets executed this table is

26:36:39

going to get created with the name of

26:36:41

student okay perfect now we will go

26:36:44

ahead and insert some more

26:36:47

records okay now for inserting this

26:36:51

records how do you write an insert

26:36:53

statement so here I will go ahead and

26:36:56

write cursor.

26:36:59

execute okay let me go ahead

26:37:03

and create this multi-line comment

26:37:06

and let me say that what is the command

26:37:08

I will say insert into

26:37:12

students student of student student

26:37:16

values insert into student

26:37:23

values inser into student values and the

26:37:26

values will be the three parameters that

26:37:29

I'm going to give name class and section

26:37:31

okay so here I'm going to use the name

26:37:34

as

26:37:35

crish then let's say the section or the

26:37:38

class that he is probably studying is

26:37:40

data science okay and over here you'll

26:37:44

be able to see I'm also going to use a

26:37:46

section let's say section is a okay so

26:37:49

this three information you'll be able to

26:37:51

see as soon as I execute this will

26:37:54

basically be inserting this record in

26:37:56

the data science like with this

26:37:57

information the name the class and the

26:38:00

section okay so I will copy this

26:38:01

entirely so this will be my first record

26:38:04

second record third record fourth record

26:38:06

five records let's let's go ahead and

26:38:08

see with respect to five records okay

26:38:10

here I will change keep on changing the

26:38:12

data right now when I say I'll keep on

26:38:15

changing the data that basically means

26:38:17

I'm going to use my second record as

26:38:19

let's say I here I will write sudhansu

26:38:22

okay so Dano data science and I will say

26:38:25

this belongs to section B okay uh let's

26:38:30

go ahead and write more over here let me

26:38:32

go ahead and write darus so Darius is

26:38:35

also in data science SS and let's say

26:38:36

he's also in section A okay I will go

26:38:40

ahead and write one more record because

26:38:42

let's say because is in another section

26:38:45

which is called as devops and this is

26:38:47

section A and let me go ahead and one

26:38:50

more record like the I will go ahead and

26:38:52

write

26:38:53

thees and this time I will keep thees

26:38:56

also in

26:38:58

devops okay and let let it be in section

26:39:01

A so this information I am probably

26:39:04

inserting in in this specific table okay

26:39:08

all this information will be basically

26:39:09

inserted in the specific table now as

26:39:12

soon as it is inserted we will display

26:39:15

all the

26:39:17

records okay here I will say

26:39:21

print the

26:39:23

inserted records are okay and let me go

26:39:28

ahead and write data is equal to

26:39:32

cursor.

26:39:34

execute okay and let me go ahead and

26:39:37

write this triple code statement so that

26:39:40

it can be multi-line also select star

26:39:44

from

26:39:46

student okay the table name is capital

26:39:49

so once I probably execute this I will

26:39:51

have all the information over here in

26:39:53

the data and then what I will do I will

26:39:55

write for Row

26:39:58

in

26:40:00

for for Row in data I will go ahead and

26:40:04

print

26:40:06

my row okay so this is what we are going

26:40:09

to do so this becomes my entire query

26:40:12

with the help of Python programming

26:40:14

language where I am creating a database

26:40:17

I'm creating a table I'm executing this

26:40:20

particular table info I am inserting

26:40:22

records I'm displaying all the records

26:40:25

everybody clear with this can you get me

26:40:28

can you tell me whether you're able to

26:40:30

understand till

26:40:32

here quickly come on let me know till

26:40:35

then I I'll drink some

26:40:45

water yeah

26:40:49

everyone come on quickly yes or

26:40:53

no sudu says yes Prashant says yes what

26:40:57

about others come on guys you are not

26:41:00

implementing is sad you know so if you

26:41:03

do not show interest then there will be

26:41:05

no of doing this live session right div

26:41:07

also says yes what about others 84

26:41:10

people are watching please do hit like

26:41:13

let's make it a target of at least 100

26:41:15

likes in this session you know because

26:41:18

if this session we teach in some batch

26:41:20

you know it'll be so fruitful for us

26:41:22

come on we are doing this completely for

26:41:24

free for the entire Community you really

26:41:26

need to show some proactive measures

26:41:28

okay either be active otherwise drop off

26:41:32

if you feel that this is not important

26:41:34

for you okay

26:41:36

done perfect now let me go ahead and

26:41:39

open the terminal and now this time what

26:41:41

I will do I will execute this file and

26:41:43

let's see once we execute this

26:41:45

particular file that basically means uh

26:41:48

we will be able to see our database that

26:41:51

is created okay database that is created

26:41:55

so in order to execute this file I will

26:41:58

go ahead and write python sqlite dopy

26:42:02

okay so if I execute this my data should

26:42:06

get created my table should get created

26:42:08

and at the end of the day so here you'll

26:42:11

be able to see right at the end of the

26:42:13

day One DB file should be created over

26:42:14

here and the name should be student. DB

26:42:17

okay so let's see whether we'll be

26:42:19

getting any error or it'll just execute

26:42:21

perfect the inserted records are chrish

26:42:23

data science a sudu data science B

26:42:26

Darius data science a vikash devops a

26:42:29

the dev off say so student. DB file is

26:42:31

also created that basically means my

26:42:34

insertion has happened perfectly well

26:42:37

right now all the data has been inserted

26:42:40

into my DB and this is the student. DB

26:42:42

file that you'll be able to

26:42:43

see now

26:42:47

this completes

26:42:50

our sqlite insert some records Python

26:42:52

Programming this completes our first

26:42:55

step now in the second step we will try

26:42:57

to create an llm

26:42:59

application and now the same DB see that

26:43:02

DB is already created now what my llm

26:43:04

application should be able to do is that

26:43:06

whenever I give some English

26:43:08

text it should be able to retrieve the

26:43:12

records from those

26:43:14

database you may be thinking how that

26:43:17

will be possible I will just show you

26:43:19

just stay along with me and code along

26:43:21

with me right step by step I will show

26:43:24

you each and everything okay so just be

26:43:26

along with me and just stay over here

26:43:28

right so let me go back to my code and

26:43:31

now I will start writing my code with

26:43:33

respect to this uh in my SQL py file now

26:43:36

this file will be responsible and again

26:43:39

I'm repeating this file will be

26:43:40

responsible for creating our llm

26:43:43

application okay so let me go ahead and

26:43:46

write first of all we will go ahead and

26:43:48

import from

26:43:50

EnV import

26:43:54

load.

26:43:57

envv okay and then to load all the

26:44:00

environment

26:44:02

variables I will go ahead and write like

26:44:04

this and let me go ahead and write take

26:44:08

environment or or

26:44:10

load all the environment

26:44:13

variables okay and that is the reason we

26:44:16

have also installed those now the next

26:44:19

thing is that we will go ahead and

26:44:21

import

26:44:23

streamlit

26:44:25

as

26:44:27

St we are going to import streamlit I'm

26:44:29

going to import

26:44:34

OS I'm going to import OS along with

26:44:37

this I'm also going to import site 3

26:44:41

okay site 3 because we are going to

26:44:44

specifically use this again and then I

26:44:47

will go ahead and input from Google dot

26:44:50

generative AI

26:44:52

import gen okay so I'm going to use this

26:44:56

gen and as usual first step is to set

26:45:00

our API key so in order to sorry import

26:45:04

as okay

26:45:06

as J now in my next step what we are

26:45:09

going to do is that we going to

26:45:10

configure so here I'm going to write

26:45:15

configure

26:45:17

gen AI key okay so for this I will write

26:45:22

gen do

26:45:25

configure and here I'm going to

26:45:27

specifically use my API key so here I

26:45:30

will go ahead and write my API key is

26:45:32

equal to OS do get

26:45:36

EnV os. get EnV and here I'm going to

26:45:41

give my key name okay so whatever is the

26:45:44

key name and you know that my key name

26:45:46

I've kept it as Google API

26:45:48

key okay perfect everybody clear till

26:45:53

here are you following

26:45:56

everyone come on let me know whether you

26:45:59

feel following each and every

26:46:02

step yes yes or no so till here I have

26:46:06

set up the environment variable okay now

26:46:09

is the main thing that we will start our

26:46:10

coding with so if hit like if you're

26:46:12

able to understand till here and uh

26:46:15

you're able to follow each and

26:46:16

everything with respect to sqlite SQL

26:46:19

everything that we have actually created

26:46:23

okay

26:46:25

perfect now let me go ahead and show you

26:46:28

the next step what we are going to do

26:46:29

over here now

26:46:32

okay now we'll try to create a function

26:46:39

function to load gen AI generative AI

26:46:43

model or Google gin

26:46:46

model Google gin model okay now one

26:46:51

thing that you really need to understand

26:46:53

two information will definitely go in

26:46:56

this function right The Prompt that we

26:46:58

are specifically giving and what the

26:47:02

Google gin model needs to behave like

26:47:04

right

26:47:05

so over here I will create a function

26:47:08

and I'll say getor

26:47:11

Gore

26:47:15

response and inside this response I will

26:47:17

give my question and prompt like what

26:47:21

what the gini pro model needs to behave

26:47:23

like okay this prompt we will be writing

26:47:26

question is the input that we are giving

26:47:28

let's say if I go ahead and ask hey how

26:47:30

many people are there in the data

26:47:31

science batch right let's say something

26:47:34

like this so so let me go ahead and

26:47:36

create model is equal

26:47:37

to gen do generative model so this will

26:47:43

be my model Now understand one thing

26:47:45

over here we're going to use gini Pro we

26:47:47

are not going to use gin Pro Vision gini

26:47:49

Pro is for text gini Pro Vision is for

26:47:52

uh images video frames and all so here

26:47:55

I'm going to specifically use gin Pro

26:47:57

and then let me go ahead and create my

26:47:59

response my response will basically say

26:48:02

model dot generate content and now this

26:48:05

is the most important thing I need to

26:48:07

give two information to this right the

26:48:10

first is that what the model should act

26:48:13

like so for that I will go ahead and

26:48:14

create my prompt I'll give the first

26:48:16

parameter as prompt and this will go in

26:48:19

the form of a list so prompt the second

26:48:22

thing that I'm going to probably give is

26:48:23

my question okay now I can also give

26:48:26

multiple prompts if I want okay that

26:48:28

also I will try to show you like how

26:48:30

multiple prompts can also be given okay

26:48:33

so this is what my model is B basically

26:48:35

given so I will go ahead and write

26:48:36

return response

26:48:39

dot response.

26:48:42

text

26:48:43

okay so here this entire information so

26:48:47

this model will be responsible in giving

26:48:49

the query okay let's say if I say that

26:48:52

hey how many people studies in the data

26:48:54

science batch or data science class so

26:48:56

this entire function will be responsible

26:49:00

in giving you the query so function to

26:49:02

load Google jiny model and

26:49:05

provide queries okay as response so this

26:49:10

is the function that it is going to do

26:49:12

understand one thing right because first

26:49:14

when we hit when we write any input our

26:49:17

llm model should be able to generate the

26:49:18

query and then that query will get go

26:49:21

and hit to the cite database where you

26:49:23

get this response right so I hope

26:49:27

everybody is able to hear till here

26:49:28

right so guys there is no such

26:49:30

prerequisite for Google gin Pro you

26:49:32

really need to know Python programming

26:49:33

language and you should know how API is

26:49:36

basically used over here right so can I

26:49:38

get a quick yes if you're able to

26:49:40

understand till here and why I have

26:49:41

created this specific function okay just

26:49:44

give me a go- ahead and please keep on

26:49:46

hitting like at least we'll try to make

26:49:48

it 100 in the live session itself and

26:49:50

understand at the end we are also going

26:49:52

to have some live discussion you can

26:49:53

come and ask me questions by voice and

26:49:56

I'll be happy to provide a response to

26:49:58

you okay now this is what we have done

26:50:01

now second function that we are going to

26:50:03

create function to

26:50:09

retrieve query from the database okay so

26:50:15

this is what we going to do in the

26:50:16

second function so for this let me go

26:50:19

ahead and Define my function so here I

26:50:20

will write definition

26:50:23

read SQL

26:50:25

query okay the first parameter will be

26:50:28

SQL right whatever SQL query this model

26:50:32

gets create this model provides a

26:50:35

response as and the second parameter

26:50:37

will be my DB name right whatever DB

26:50:39

that I have now if you really want to

26:50:42

convert this into a rail World scenario

26:50:44

we can just make sure that we can put

26:50:46

our databases in the cloud and how to

26:50:48

read it and all already so many videos

26:50:50

has been created both in my YouTube

26:50:52

channel and in ION channel also so you

26:50:54

can probably go ahead and watch in that

26:50:56

specific way but here the main idea is

26:50:59

to integrate multiple tools and show you

26:51:01

how powerful an llm application can be

26:51:03

with the help of Google mini pro now the

26:51:06

next thing will be that I will try to

26:51:08

create a connection so sqlite 3 dot

26:51:12

connect I will write and this connect

26:51:14

will be with respect to my DB okay and

26:51:17

then I will go ahead and create my

26:51:18

cursor so let me go ahead and write con

26:51:20

do

26:51:22

execute sorry con do cursor I will try

26:51:25

to create my cursor now this cursor will

26:51:28

be responsible in executing our query

26:51:33

right now what query the SQL query right

26:51:36

and once I get all the results once I

26:51:38

execute this uh uh you know the SQL

26:51:41

query inside this itself C dot if I do

26:51:46

fetch all it is going to fetch all the

26:51:48

records with respect to that right so

26:51:51

this is the prerequisite that you really

26:51:52

need to know a brief idea about how you

26:51:54

can work with SQL databases and this

26:51:57

will basically be my row okay I will get

26:51:59

all the rows over here now to retrieve

26:52:01

or print the rows what I can do I can

26:52:03

write for Row in

26:52:08

rows I can print the rows so that you

26:52:10

can also see the rows over here what all

26:52:13

records I've been uh generated okay um

26:52:18

the next thing what I'm actually going

26:52:19

to do is that return all the rows okay

26:52:23

return all the

26:52:24

rows perfect everybody clear with

26:52:28

this

26:52:31

yeah yes so this is the the function

26:52:35

which will be retrieving the query from

26:52:37

the database so whenever I give a SQL so

26:52:40

in short what is happening the output

26:52:42

query that is getting generated by this

26:52:44

model it will get sent to the database

26:52:48

and from this database we will get the

26:52:51

records okay so this is done now this is

26:52:55

my function that is got created right

26:52:56

now now the next step what we are going

26:52:59

to do is that do our setup of a

26:53:01

streamlet app now before doing our stre

26:53:04

setup with respect to the streamlet app

26:53:07

this will be the most important step

26:53:10

that is defining your prompt so now we

26:53:14

are going to Define your prompt now this

26:53:17

prompt because of this prompt this

26:53:20

entire application will work so

26:53:23

efficiently trust me in that it will

26:53:25

work very much efficiently right now

26:53:28

what is the specific prompt that I'm

26:53:29

going to create and as I said I can

26:53:31

create multiple prompt so I will give it

26:53:32

in the form of list okay

26:53:35

so my first prompt let me go ahead and

26:53:38

use triple

26:53:40

quotes because it will be a multiple

26:53:43

prompt itself okay I'm going to copy and

26:53:46

paste one important prompt that I have

26:53:49

written over here now this is the main

26:53:52

game of the prompt guys without this you

26:53:55

won't be able to write or you won't be

26:53:58

able to make the llm work in a better

26:54:00

way so here what is this prompt all

26:54:03

about see you are an expert in

26:54:06

converting English question to SQL code

26:54:09

or I can also write SQL query

26:54:13

okay converting a English text also you

26:54:16

can write question also you can write to

26:54:18

SQL query the SQ database has the name

26:54:23

student and following columns name class

26:54:26

and section for example example one how

26:54:30

many entries of records are present the

26:54:32

SQL command will be something like

26:54:34

select count star from student right

26:54:38

similarly I can go ahead and write

26:54:39

example

26:54:40

two let's say I go ahead and write

26:54:43

example two so this is just one query

26:54:45

understand one thing guys this is just

26:54:47

one query right I can write like this

26:54:50

multiple queries so this this is my

26:54:52

example one

26:54:55

okay let's say I copy this in a similar

26:54:58

way and I go ahead paste it over here

26:55:00

okay let's go ahead and write example

26:55:03

two you can write many number of

26:55:04

examples as such uh let's say how many

26:55:08

how many

26:55:09

people how many

26:55:12

students

26:55:14

study

26:55:16

study in data science

26:55:20

class if this is the query if this is my

26:55:23

English statement query tell me what

26:55:25

will be the

26:55:28

command select count star from

26:55:31

students

26:55:33

or let me just change this okay tell me

26:55:38

all the

26:55:39

students studing in the data science

26:55:43

class right so in this case what will be

26:55:46

my query my query will be select star

26:55:48

from student

26:55:51

where

26:55:53

class is equal

26:55:56

to where class is equal

26:55:59

to data science data science I have

26:56:04

written it in small

26:56:05

right where class is equal to data

26:56:09

science so I will go ahead and write it

26:56:11

over

26:56:14

here okay so this becomes my query right

26:56:18

and we will end this query also like how

26:56:20

we have end it over here right like a

26:56:23

colon something like this so this is

26:56:25

also ending in this way right so now I

26:56:29

hope everybody will be able to

26:56:30

understand this yes you are getting it

26:56:32

right and after this I'm also saying

26:56:33

also the code SQL code should not have

26:56:36

this kind of in the beginning at all

26:56:38

I've given some more additional

26:56:39

statement for the clean one okay does

26:56:42

this make sense

26:56:47

everyone

26:56:49

yeah so this basically is your

26:56:53

prompt okay and let me paste it over

26:56:55

here so that you can also work

26:56:57

accordingly with

26:57:02

me so

26:57:05

this is the entire

26:57:11

prompt see okay this entire prompt has

26:57:14

been divided into multiple sections

26:57:19

okay just see to this okay but this is

26:57:22

how things are I'll will give you some

26:57:24

time go ahead and write

26:57:26

this okay go ahead and write this

26:57:29

because this will be the magic this is

26:57:30

the most magical thing right and that is

26:57:34

how you'll be able to see that how

26:57:36

powerful these llm models are right so

26:57:39

here you can see you are an expert in

26:57:40

converting English questions to text or

26:57:43

English text to SQL query the SQL

26:57:45

database has the name student and has

26:57:47

the following columns name class section

26:57:49

for example this how many entries of

26:57:51

records are present the SQL command will

26:57:53

be something like select count star from

26:57:55

student example two here you can

26:57:57

specifically use in this particular way

26:58:03

right

26:58:11

clear

26:58:12

everyone okay you want it in code

26:58:17

share I will also do it in code share

26:58:20

just

26:58:26

a let me see whether I'll be able to see

26:58:29

in code share or

26:58:32

not but don't ch change the prompt okay

26:58:35

and don't delete the prompt once I

26:58:36

probably share

26:58:39

it okay

26:58:42

share so I will share the link everybody

26:58:45

can copy it from

26:58:48

there

26:58:50

okay everybody got it in the code

26:58:53

share

26:58:55

yeah so in that code share I have given

26:58:58

this entire thing you just can copy it

26:59:00

from there and uh start seeing it okay

26:59:06

clear everyone can I get a quick yes

26:59:08

because this will be the most important

26:59:11

step creating your own

26:59:13

prompt right so please do hit like till

26:59:17

here if you are able to understand each

26:59:19

and everything trust me this is an

26:59:21

amazing application by this you will get

26:59:23

multiple ideas multiple ideas trust me

26:59:26

in this okay so this becomes my

26:59:29

prompt now the next step obviously the

26:59:32

next step is basically to set up our

26:59:34

our streamlit app so let's start our

26:59:37

streamlit

26:59:39

app and understand this prompt will tell

26:59:42

Google J how it needs to add

26:59:46

okay so first of all I will go ahead

26:59:50

and create my std. Sate page page config

26:59:57

and here I'm going to give my page title

27:00:01

as

27:00:02

text

27:00:04

or I can say I can

27:00:10

retrieve any SQL

27:00:13

query okay so this will basically be my

27:00:16

P page config and then I will go ahead

27:00:18

and write s.

27:00:23

header gemin app to

27:00:28

retrieve SQL data

27:00:32

okay now I've have given some examples

27:00:34

guys see this prompt you can take it to

27:00:36

any extent even write complicated

27:00:38

queries you know once I probably show

27:00:41

you the result you'll be able to

27:00:43

understand why I'm saying like this okay

27:00:44

now I will create a text box which will

27:00:47

probably take the question from my side

27:00:48

so here I will write question is equal

27:00:50

to st. textor input and this will

27:00:56

basically be my

27:00:59

input let's go ahead and Define my input

27:01:02

and key I'm going to write it as as

27:01:04

input okay we can basically write any

27:01:07

key according to you then we will go

27:01:10

ahead and create a submit button only

27:01:12

two things we specifically required

27:01:13

submit button and let me go ahead and

27:01:15

write St do

27:01:17

button and here I can basically write

27:01:20

ask ask the

27:01:23

question

27:01:25

done now if submit is

27:01:30

clicked so I'm I'm using one field a

27:01:33

text box and I'm specifically using

27:01:38

one I'm using one text field text field

27:01:41

and I'm using one submit okay perfect

27:01:51

everyone

27:01:54

yeah

27:02:01

everybody good enough everybody

27:02:04

can I get a quick yes if you're

27:02:06

following everyone

27:02:09

okay perfect simple now if submit is

27:02:13

clicked I will go ahead and do all the

27:02:15

activities that I specifically want

27:02:18

okay great so let's go ahead and see the

27:02:21

next step now in the next step if submit

27:02:23

is clicked I will write if

27:02:28

submit I will go ahead and write

27:02:31

response is equal to

27:02:34

get Gemini response and here I'm going

27:02:37

to give my question comma prompt right

27:02:40

now question comma prompt if I give this

27:02:43

prompt is in the form of list so when

27:02:46

I'm going over here I will just make

27:02:47

this as prompt of zero the first prompt

27:02:51

that I specifically want to give you can

27:02:53

also give multiple prompts and by that

27:02:54

you can give in that specific way let's

27:02:57

say I have three buttons in the first

27:02:59

button I want to behave it in a

27:03:00

different prompt in the second button I

27:03:01

want to probably behave it in a

27:03:03

different prompt so here I'll write

27:03:04

prompt of zero okay once I get the

27:03:07

response I will say St do

27:03:11

subheader the response

27:03:14

is okay and then I will write for Row in

27:03:20

response print

27:03:23

row I'll print all the rows okay and if

27:03:27

it is printing in my field let's say I

27:03:29

will go ahead and write something like

27:03:30

this St Dot

27:03:35

header and I will display all the row

27:03:38

elements over

27:03:39

here done guys almost done now it's like

27:03:44

whether this will work or not we need to

27:03:45

check if it does not work we need to

27:03:47

play with this prompt okay remaining all

27:03:50

code you know see first step is probably

27:03:54

taking with respect to get Gemini

27:03:56

response based on question and prompt it

27:03:58

will generate a SQL query and that same

27:04:00

SQL query uh what will basically happen

27:04:03

over here so question and prompt

27:04:05

response what I'll get over here just a

27:04:08

second I think um get Jin

27:04:13

response generate

27:04:16

content and then I have to probably go

27:04:18

ahead and read my SQL query okay so just

27:04:22

give me a

27:04:32

second

27:04:39

wait wait wait wait wait wait I will get

27:04:41

the

27:04:42

response and I have to probably call

27:04:44

this read SQL

27:04:47

query because here it is not getting

27:04:53

called so I'll go ahead and write my

27:04:56

response

27:04:57

read SQL

27:05:01

query now inside this SQL quy I'll give

27:05:04

my

27:05:05

SQL whatever SQL response I'm getting

27:05:08

over

27:05:09

here comma whatever is my DB name my DB

27:05:13

name is basically what student.

27:05:21

DB

27:05:25

student. perfect now I should be able to

27:05:28

get the response I

27:05:30

guess does this look good everyone

27:05:41

yep

27:05:45

everyone second is the response of it

27:05:55

response now let's see whether it will

27:05:57

run or

27:06:00

not DB is student. DB perfect

27:06:04

now it is clear I guess response is also

27:06:06

there this response it will go over here

27:06:09

and do done now let me go ahead and run

27:06:11

it and I hope so it runs absolutely fine

27:06:14

if it does not run we'll try to debug

27:06:16

okay so in order to run it I will write

27:06:22

streamlet

27:06:24

run SQL

27:06:28

dopy so this will run let's

27:06:32

see

27:06:34

now here is the thing let me go ahead

27:06:37

and write a require tell me the

27:06:41

student

27:06:44

name and data

27:06:47

science class let's

27:06:49

see I will go ahead and ask this

27:06:51

question as you all know how many

27:06:53

students are there over here in this

27:06:55

particular

27:06:56

class 1 2 3 so Kish soans and darus

27:07:02

right so let me go ahead and execute

27:07:04

this I hope so it

27:07:06

works so I'm not getting the response so

27:07:11

this is not good

27:07:14

oh something is

27:07:16

happening oh I did not receive anything

27:07:21

why let me execute this once so the

27:07:26

cursor did I execute SQL py so

27:07:31

sorry it should be s equal py now just a

27:07:43

second no it was working fine I

27:07:51

guess let me see once

27:07:55

again but last time we did not get

27:07:58

anything tell me the student name

27:08:03

in the data science

27:08:07

class if this is not getting executed

27:08:11

there should be okay operational where

27:08:14

syntax the problem is coming let's see

27:08:16

what kind of query it has generated let

27:08:19

me print the query

27:08:21

also print print print print the

27:08:24

response okay I will go ahead and print

27:08:27

the response let's see whether we are

27:08:29

getting any error or we need to

27:08:32

change

27:08:35

okay so I'm just doing some kind of

27:08:37

debugging guys so

27:08:39

please be with me okay we will try to

27:08:42

run

27:08:46

this select the name of the student

27:08:49

where class is equal to data science

27:08:50

this looks perfectly

27:08:54

fine select name from

27:08:57

student name from student where class is

27:08:59

equal to data science this looks fine

27:09:02

when I executing this DB this DB is

27:09:06

there student.

27:09:09

DB response I'm giving it over

27:09:14

here fetch

27:09:20

all okay this is coming as an error let

27:09:23

me see why this error is

27:09:25

coming execute

27:09:32

SQL

27:09:34

current

27:09:36

dot con. cursor

27:09:45

SQL there's some error with the

27:09:47

retrieving the query just a second

27:09:54

guys connect DB DB name is this

27:10:01

one let me see one

27:10:03

second let me debug

27:10:06

this the query is generated correctly

27:10:09

when we hitting this particular database

27:10:11

it is not working let me see

27:10:14

test.py okay SQL

27:10:17

dopy import sqlite

27:10:20

3 and I'm going to use this command

27:10:24

let's see it will work or

27:10:32

not

27:10:43

cursor.

27:10:46

execute select star from

27:10:51

student let's

27:10:53

see DB name

27:10:56

is student.

27:11:00

DB come on

27:11:05

so some error in executing this let me

27:11:08

open my terminal let's see whether this

27:11:10

will get executed or

27:11:12

not

27:11:16

Python and once I execute this I will

27:11:20

just go ahead and write this three

27:11:27

records we'll just go ahead and print

27:11:30

this records let's

27:11:31

see

27:11:43

python

27:11:46

test.py

27:11:54

from nothing is getting

27:12:01

printed why is not getting

27:12:19

printed now it should work let's

27:12:23

see still not getting printed but it is

27:12:26

getting executed select star from

27:12:30

student but this record should be

27:12:32

visible

27:12:33

just a second I will just delete this

27:12:36

once and let me go ahead and write

27:12:39

python sqlite

27:12:43

dopy the record is done student.

27:12:47

DB oh student student student I'll close

27:12:50

this

27:12:53

requirement try printing line number

27:12:58

five line number

27:13:01

five

27:13:06

oh this is fine now let me go ahead and

27:13:10

write test.py still it is not getting

27:13:12

printed that basically

27:13:15

means is not able to read this

27:13:25

why

27:13:27

print

27:13:29

rows let's try this also just a second

27:13:32

can rows are coming as empty why

27:13:36

student. DB is

27:13:38

there I could see over here the insert

27:13:41

statement has happened and is displaying

27:13:44

all the

27:13:51

records okay why it is coming as

27:14:00

null select star from student is

27:14:04

done while I'm

27:14:15

reading what is the mistake over

27:14:23

here select start from

27:14:28

student I'll I'll try to fix it guys

27:14:30

just give me a

27:14:31

second select start from

27:14:36

student c table

27:14:39

[Music]

27:15:01

info

27:15:03

let's

27:15:06

see no nothing is

27:15:09

coming where did my database

27:15:18

go select star from student is my

27:15:21

student spelling wrong or

27:15:25

what

27:15:31

student we need to welcome this gu this

27:15:33

helps us to the opportunity line by line

27:15:37

yes

27:15:40

student just a second guys let's fix

27:15:44

this

27:15:47

issue oh I feel there is one problem

27:15:50

over

27:15:52

here let me delete this once

27:15:57

okay working for godam says working for

27:16:01

me

27:16:06

student. DB I will delete this let me

27:16:08

create another DB over here wait I will

27:16:11

go ahead and write test. DB let's

27:16:21

[Music]

27:16:22

see SQL py this is done now if I go

27:16:27

ahead and execute test. py let's

27:16:31

see

27:16:34

python

27:16:38

test.py okay sorry so this should be

27:16:43

test.

27:16:48

DB no it is not able to read

27:17:01

why

27:17:20

object is

27:17:31

coming

27:17:35

so some major error in connection.

27:17:42

commit is that

27:17:46

so oh is the cursor not closed so that

27:17:50

I'm getting the

27:18:01

problem

27:18:10

I'll do one

27:18:11

thing I'll commit the

27:18:15

connection so print row and I will say

27:18:18

okay I got a problem what was that

27:18:20

commit your changes in the

27:18:24

database con do

27:18:29

commit so here I've have created my

27:18:31

connection connection.

27:18:34

commit now along with this I will also

27:18:38

say CN

27:18:41

do connection. close now I think it'll

27:18:45

work so let me go ahead and delete this

27:18:49

let me go ahead and delete this now I

27:18:52

will go ahead and change my name to

27:18:53

student now I think it should

27:18:55

work I think I did not close the

27:18:58

connection that is the main

27:19:00

reason equal. py so this is done

27:19:03

student. DB is created now let me go

27:19:06

ahead and write streamlet streamlet SQL

27:19:10

py no I think it should

27:19:12

work definitely it should

27:19:16

work tell me the students tell

27:19:20

me all the students

27:19:25

name from data science

27:19:31

class

27:19:33

let's go ahead and ask the

27:19:41

question now let's

27:19:48

see quer is

27:19:50

Right

27:20:01

29th

27:20:13

still I do not get the

27:20:15

response now this

27:20:20

is here also I have to probably close

27:20:22

the connection I guess so let's close

27:20:24

the connection here

27:20:31

also

27:20:38

so I did not close the cite connection

27:20:40

at the

27:20:42

end Connection cursor. close

27:20:48

Okay cursor is over

27:20:59

here we don't have to close the cursor

27:21:02

connection if it is closed I think it is

27:21:24

sufficient

27:21:26

anybody prompt is giving the response

27:21:29

from stimulate app this worked for

27:21:31

me

27:21:34

read the S

27:21:39

rows for rows in print rows return rows

27:21:42

so the same function I think I've

27:21:43

written over

27:21:45

here for Row in rows return

27:21:54

rows so you have not close the

27:21:56

connection now I've closed the

27:21:57

connection I think now I think you

27:21:59

should not have that

27:22:01

issue

27:22:02

anybody's facing this issue

27:22:09

still now once I close the connection I

27:22:12

have my student DB in my

27:22:17

SQL I'm giving my student.

27:22:23

DB cursor connection

27:22:30

C

27:22:36

for reading I don't have to probably do

27:22:39

anything as

27:22:41

such so this work for

27:22:44

me yes still same data science

27:22:47

Capital no no the query is getting

27:22:50

created perfectly the problem is in this

27:22:52

read SQL

27:23:00

query

27:23:03

I don't think so I need to write this

27:23:05

but I'm just trying it out let's

27:23:09

see sqlite May commit and close is done

27:23:13

this is also

27:23:15

done no no I have the data no so data is

27:23:18

getting printed over here see so this

27:23:21

was the data that was got printed

27:23:26

right let's see once again

27:23:30

rerun

27:23:34

oh now finally now I get the response

27:23:38

see so I just did

27:23:41

this

27:23:43

I just go ahead and write

27:23:46

it okay so I have to close the

27:23:48

connection over here

27:23:51

also okay so now you can see Krish

27:23:54

sudhansu and darus is

27:23:58

visible minor mistake I can understand

27:24:01

but again a good error to fix tomorrow

27:24:04

if you get any error over here you can

27:24:06

probably check it out okay everybody got

27:24:12

this

27:24:17

yeah all happy enough tell me any more

27:24:27

queries tell

27:24:29

me tell me the CL class

27:24:34

where sudano let's say I'll say tell

27:24:39

me tell me Sudan Shu I written his full

27:24:45

name or

27:24:46

not I think I've written just his single

27:24:49

name right uh SQL

27:24:52

py

27:24:53

sqlite okay tell me sudano's

27:24:57

class tell me Sano section let's say if

27:25:00

I write like this

27:25:02

ask the

27:25:04

question see the b b section is coming

27:25:07

over here and the best thing will be

27:25:09

that you'll also be able to see what

27:25:11

query it is generating select section

27:25:14

from student where name is equal to

27:25:16

sudhansu right and here you can probably

27:25:19

clearly see right this is this is really

27:25:22

really

27:25:27

nice right

27:25:30

so

27:25:40

let's see what CL tell me the class of

27:25:43

vikas and

27:25:47

dpes whether it'll be able to write this

27:25:49

queries also or not we'll

27:25:52

see devops tell me the class of vikas

27:25:56

and D devops devops

27:25:58

see now how many queries see select

27:26:01

class from student wear name in vikash

27:26:03

and

27:26:04

thees so this is good right see this

27:26:07

kind of queries also it is able to

27:26:08

generate now the more amazing thing we

27:26:11

basically write in the prompt template

27:26:14

right in the prompt more complex queries

27:26:16

we specifically write and here you can

27:26:18

probably see vas and thees was in devops

27:26:22

right tell me the student name from

27:26:28

section

27:26:30

A

27:26:35

Krish Darius vikash Dees everybody

27:26:39

sudhansu is missing so sudhansu is

27:26:41

another section I guess see sudhansu is

27:26:44

in B section so did you like this

27:26:47

project guys everyone so if you liked it

27:26:49

please do make sure that you hit

27:26:51

like and uh yeah between there was some

27:26:54

challenges because I did not close the

27:26:55

connection okay it is good to close this

27:26:58

specific connection okay uh so close

27:27:02

this connection make sure that you close

27:27:03

this connection okay otherwise you'll

27:27:05

get an error because see if you don't

27:27:06

close this connection right the DB will

27:27:08

be open right and uh there you'll not be

27:27:11

able to do it now the most amazing thing

27:27:13

is about how you write this prompt in a

27:27:15

better way you can check with Google bar

27:27:17

you can check with different different

27:27:19

ways you know whenever you write a query

27:27:21

you'll be able to and this definitely

27:27:23

works for advanced advanc SQL queries

27:27:26

Also let's say if there are two tables

27:27:28

and all you can also probably write it

27:27:29

over there tell me any query any

27:27:31

complicated query that you feel that we

27:27:33

can write and try it

27:27:35

out

27:27:38

[Music]

27:27:39

um tell me all the students who are from

27:27:42

class data science who are from section

27:27:44

A and B let me go ahead and write in

27:27:46

this

27:27:48

way from section A and B I think this

27:27:52

should this should be an easy one itself

27:27:54

I don't think so it'll be the response

27:27:56

is Krish sudans darus Vias dipes

27:28:00

okay

27:28:03

let's say if I probably go ahead and

27:28:05

write one more column name like marks I

27:28:07

can still write more complicated text

27:28:10

over here right let's see okay fine

27:28:13

marks also will do it okay so I will go

27:28:15

ahead and create one

27:28:17

more one

27:28:19

more marks and this will basically be

27:28:23

int and what I will do I will just go

27:28:25

ahead and create this once

27:28:29

again so let's say marks will will be

27:28:31

over here as

27:28:33

90

27:28:37

100 uh darus I will write it as

27:28:42

86 because I will go ahead and say

27:28:47

50 the I will go ahead and say 35 okay

27:28:52

so I will use this all and now let's see

27:28:56

whether this will work I will delete

27:28:57

this

27:28:59

database control C

27:29:04

C python site.

27:29:08

py so the database is created now let's

27:29:11

go ahead and run my SQL query so

27:29:17

streamlet

27:29:19

run SQL

27:29:22

py now tell me what sentence should I

27:29:28

ask tell me all the student

27:29:32

name whose

27:29:35

marks marks is greater

27:29:39

than

27:29:41

90 so if I ask this

27:29:45

query will it

27:29:47

work sudhansu see sudhansu it is

27:29:51

basically showing so let's go ahead and

27:29:53

see the query greater than 90 how much I

27:29:57

have got 90 see greater than or equal to

27:30:00

90 I sent and my name should also come

27:30:04

right if I say greater than

27:30:11

80 uh there is one

27:30:14

question hello from the generative AI

27:30:16

course starting next week how often will

27:30:18

the doubt section be checked I noticed

27:30:19

the community version has not respond to

27:30:21

often see right now we have come up with

27:30:24

an amazing support uh system so every

27:30:26

day within 24 hours you'll be able to

27:30:28

get the response

27:30:30

okay

27:30:32

every day within 24 hours you'll be able

27:30:34

to get the response so guys this is

27:30:36

amazing right

27:30:38

happy now you write any complicated

27:30:40

queries just give some examples over

27:30:43

here right so Kish sudans and Darius is

27:30:46

having greater than 80 if I probably go

27:30:48

and see what is the query that is

27:30:50

generated here you can probably see

27:30:55

select or I I I'll I'll just do

27:30:57

something okay greater

27:30:59

than greater than or equal to

27:31:05

90

27:31:06

and less than 50 let's see whether this

27:31:10

query is also possible or

27:31:15

not okay here now the problem is because

27:31:18

we have not given those kind of

27:31:19

scenarios I don't know what select name

27:31:22

from student where marks is greater than

27:31:24

or equal to 90 and marks is less than 15

27:31:26

this is good but

27:31:28

the but the column name is is what let's

27:31:33

see the column name marks I think this

27:31:35

should have got executed

27:31:39

oops select name from student where

27:31:41

marks is greater than and marks is less

27:31:44

than

27:31:45

50 okay both the condition is not

27:31:47

getting

27:31:48

matched less than 50 we had one right

27:31:52

thees okay please ask to give rank on

27:31:55

basis of

27:31:59

marks tell me

27:32:06

tell

27:32:17

me let me do one

27:32:20

thing Marx is greater than or equal to

27:32:24

equal to

27:32:27

90 greater than or equal to 90 greater

27:32:30

than less than

27:32:41

50 okay and uh less than so I have

27:32:47

written the condition in a way that I

27:32:50

have to reverse this okay till let's try

27:32:53

this one tell me the

27:32:56

student

27:32:58

rank tell me the student name based on

27:33:02

Marx rank let's see I try like this

27:33:06

something like

27:33:08

this again you can try multiple things

27:33:11

so see sudhansu Kish Darius vikas and

27:33:15

dipes this is nice let's see the query

27:33:18

select name from student order by

27:33:26

[Music]

27:33:30

marks

27:33:31

so previous condition I'll say tell me

27:33:34

the student name where marks is lesser

27:33:40

than 90 and greater than

27:33:48

50 see darus is there

27:33:57

okay if I say marks is great greater

27:34:02

than

27:34:04

90

27:34:07

or lesser than

27:34:10

50 let's try this also so danu should

27:34:14

come and thees should come Perfect all

27:34:17

good

27:34:21

everyone tell me students having marks

27:34:24

greater than also tell me the number

27:34:26

okay yeah you can write

27:34:29

this fetch me the topper of all the

27:34:33

classes fetch me the topper of all

27:34:44

classes

27:34:46

see section B Sudan is the topper vikash

27:34:49

why it is showing devops a branch yeah

27:34:53

uh fetch me okay one more give me the

27:34:55

third highest rank by sudano let's see

27:34:58

give me the third highest

27:35:04

rank third highest rank

27:35:08

marks usually this is an interview

27:35:12

question okay there is an error let's

27:35:16

see what it has

27:35:19

generated operational error

27:35:23

mhm first I'll print the response wait

27:35:26

over here some error has come over here

27:35:29

so uh print response get Gin

27:35:34

response select name from name section

27:35:37

marks over by as marks from table as

27:35:40

table where rank is equal to three so

27:35:43

this is the problem guys right so let me

27:35:45

write it in a better give me the third

27:35:47

highest rank give me the

27:35:51

name give me the student

27:35:54

name of

27:35:58

third of third highest mark

27:36:03

something like

27:36:08

this

27:36:10

Darius right so here you can probably

27:36:13

see Darius is coming now so this way so

27:36:16

we also have to write prompt in a better

27:36:18

way right so here you can see select

27:36:20

name from student order by class limit 2

27:36:23

comma

27:36:24

1 so Q song says one more way of writing

27:36:29

this query tell me

27:36:31

how about tell me who is the third best

27:36:32

student on

27:36:35

marks Darius perfect so this is working

27:36:38

really

27:36:42

good oh my God this this is nice people

27:36:46

are creative in writing prompts okay so

27:36:49

this is can you provide a list of

27:36:50

student categorized as first class if

27:36:52

their marks are greater than 60 and

27:36:54

categorize the second class if their

27:36:56

marks are between 50 and

27:36:59

60

27:37:01

so let's ask this question first class

27:37:04

Kish first class sudhansu first class

27:37:08

Darius let's see the query the query is

27:37:11

quite complicated in

27:37:13

this so here oh big nested quer is there

27:37:17

select case where marks is greater than

27:37:19

first class then marks is between 50 to

27:37:21

60 second class else null nice see the

27:37:24

output is coming

27:37:26

up try to run the rank with the table

27:37:29

name

27:37:32

uh s give the query give the prompt it

27:37:36

will be

27:37:38

better but this is nice guys see this so

27:37:41

complicated query it is being able to

27:37:43

give the marks over

27:37:45

here will this replace human why it is

27:37:49

going to replace

27:37:51

human see first class first class first

27:37:54

class Vias is second

27:37:59

class

27:38:09

give me the second okay give me

27:38:18

the give me the second last rank student

27:38:21

name from student

27:38:23

table so danu second last

27:38:27

rank second last rank it should

27:38:32

be select name from

27:38:35

student why is giving

27:38:43

error let's see if it's a let's run

27:38:54

this give me the second last rank

27:38:57

student name from student table

27:39:03

near offsets I think some error is

27:39:05

coming over here let's

27:39:10

see now it is getting complicated

27:39:13

writing so this query may not work

27:39:16

select name from student Group by null

27:39:18

order by

27:39:19

count so this makes me feel I'm learning

27:39:23

SQL for 3 months okay

27:39:27

perfect anything other than this you

27:39:29

want to try everyone

27:39:34

one so hit like if you like this video

27:39:38

and tell me how was it did you

27:39:41

enjoy shall we do the deployment for

27:39:46

this everyone wants to do the

27:39:49

deployment so let's go to hugging face

27:39:52

okay go to

27:39:54

spaces and create a new space just let's

27:39:58

go ahead and write text to SQL

27:40:02

generative

27:40:05

AI

27:40:06

generative

27:40:08

AI okay text to SQL generative

27:40:11

AI license you can probably use Apache

27:40:14

License streamlet I'm going to use and

27:40:16

this provides

27:40:17

you uh CPU basic uh 2 CPU 16GB free

27:40:23

public and all I will go ahead and

27:40:24

create the space now for this what you

27:40:26

really need to do is that I will close

27:40:28

this till then

27:40:30

I will close this I will rename this

27:40:33

particular file SQL to app.py app.py

27:40:40

oops okay I'm just going to rename it

27:40:42

because this takes app.py and

27:40:44

requirement. tht is there okay I will go

27:40:47

ahead and open in the reveal in the file

27:40:51

explorer and I will go ahead and create

27:40:53

this

27:40:54

space please match the requirement okay

27:40:57

text to SQL okay go ahead and H what is

27:41:04

happening no

27:41:07

spacer text to SQL generative

27:41:12

AI let's create this space now after

27:41:16

creating the space what we can

27:41:18

specifically

27:41:19

do so this is the space that has got

27:41:22

created I will go to the files and here

27:41:25

is my entire file so I will go ahead and

27:41:27

upload this three files student DB

27:41:30

this this this okay so I will go ahead

27:41:33

and add upload files and probably drag

27:41:38

and drop these three files okay so this

27:41:41

is dragged and drop I will go ahead and

27:41:43

commit the changes to the

27:41:45

main so here it is now you just go to

27:41:47

the app it will start

27:41:50

running it internally creates a

27:41:52

Docker the deployment of this llm app

27:41:55

will be very simple uh the DB is there

27:41:57

obviously in the real term scenario we

27:41:59

have database is in some Cloud so when

27:42:02

we are using Docker we have to probably

27:42:03

give the IP address and all okay so here

27:42:05

you can probably see that everything is

27:42:07

happening in front of you the

27:42:08

installation of requirement. txt and all

27:42:11

so let's continue this very

27:42:19

simple so guys overall everything is

27:42:22

good did you enjoy the

27:42:29

session

27:42:34

yeah so application startup let's see if

27:42:37

everything works fine this is getting

27:42:40

builded once this building will be

27:42:42

happening and you can probably execute

27:42:43

it

27:42:47

okay I hope it was fun okay now we'll

27:42:51

have a doubt clearing as soon as this

27:42:53

application

27:42:55

works all good the streamlit app is

27:42:59

running

27:43:03

m is not running let's see so here it is

27:43:05

now just let's go ahead and write the

27:43:07

query what query was that last I had

27:43:08

written okay everybody was giving so

27:43:11

many different different queries right

27:43:13

so we'll run one of the

27:43:16

query let's run the more complicated

27:43:18

query

27:43:20

okay can you provide a list of student

27:43:22

categorized In First Class second class

27:43:24

and all I think this should work

27:43:26

absolutely fine oh one thing is

27:43:28

remaining this will not work

27:43:30

I have to go ahead and put my API key

27:43:33

okay so if you go down in the settings

27:43:36

so just click on settings over here and

27:43:39

there will be something called as

27:43:40

Secrets right so I will go ahead and

27:43:41

create a new secret my secret key name

27:43:44

will be Google API key I will copy this

27:43:48

paste it over here and we will go ahead

27:43:50

and paste this also over here the value

27:43:54

and I will remove the

27:43:56

codes save

27:43:59

it

27:44:00

okay this is done now let's go back to

27:44:02

my

27:44:03

app now again it'll build and again

27:44:05

it'll do all the installation again as

27:44:08

soon as I probably do each and

27:44:09

everything that is required okay so now

27:44:12

this is my

27:44:14

input okay now I'll paste it over here

27:44:17

oh not this what I was

27:44:20

pasting I will paste this

27:44:26

query so this is the thing can you

27:44:29

provide a list of of students

27:44:30

categorized as first

27:44:35

class so I will go ahead and ask this

27:44:38

question it should be able to give me

27:44:40

the response okay your default

27:44:42

credential were not found to set up

27:44:44

default credential this is that why this

27:44:48

is not working let's

27:44:52

see it should

27:44:54

work my settings is

27:44:57

there and

27:45:02

Google API

27:45:10

key save it over here let's see

27:45:19

again let's see whether it will work or

27:45:21

not till then

27:45:24

uh my team will provide a link in the

27:45:27

chat section if you want to join and ask

27:45:29

any queries that you have you can

27:45:32

specifically ask me

27:45:34

okay so Prashant you can share the link

27:45:37

in the chat

27:45:41

okay okay perfect guys it's running so

27:45:44

it's running in the hugging phas as I

27:45:46

said in order to set up the secret key

27:45:49

just go over here down there will be

27:45:52

something called as secrets and variable

27:45:54

create a new secret write the Google API

27:45:56

key and write the value over there

27:45:57

that's it okay and here is the entire

27:46:00

app it is working absolutely

27:46:03

fine okay perfect

27:46:10

everybody yes yes yes yes yes yes yes

27:46:14

yes or

27:46:15

no please make sure

27:46:19

that you write the quote over there

27:46:27

okay okay guys so please join with me in

27:46:30

the session and I will allow you to ask

27:46:32

any queries if you have but I hope you

27:46:35

like this session altoe guys yes or

27:46:39

no so if you specifically want the code

27:46:44

uh the GitHub link I will provide you

27:46:46

the GitHub link of the code over here

27:46:52

okay so go ahead and join the link guys

27:46:54

if you have any question if you want to

27:46:56

ask me anything and regarding all the

27:46:58

paid courses in n neon you can probably

27:47:01

see the description of this particular

27:47:02

video so we are coming up with Gen AI

27:47:06

course mastering generative AI machine

27:47:08

learning boot

27:47:09

camp uh in both in English and Hindi we

27:47:12

are coming also with data analytics boot

27:47:14

camp and mlops production ready data

27:47:16

science project everything is basically

27:47:18

coming up you can probably check in the

27:47:19

description of this particular video

27:47:21

check out the

27:47:22

course and if you are interested right

27:47:26

because this kind of projects what I

27:47:28

have actually discussed right now

27:47:30

this is still I will say basic to

27:47:31

intermediate we'll still discuss more

27:47:33

advanced project when we are doing in

27:47:34

the course itself okay so yes this was

27:47:38

it so how did you like the session first

27:47:39

of all was it good

27:47:41

bad

27:47:46

yeah yeah Vishnu Khan please go ahead

27:47:49

with your

27:47:58

question

27:48:01

mishuk Kant can you hear

27:48:03

me unmute

27:48:11

yourself vishant Vishnu Kant if you have

27:48:14

any questions you can ask me okay what

27:48:17

about next people who want to

27:48:19

join hi sir am I audible to

27:48:22

you yeah tell me sir my question is that

27:48:26

how to fix that response error which you

27:48:28

have fixed I was trying to fix that

27:48:31

still it's not showing the

27:48:33

response response first of all see

27:48:36

whether your SQL quer is getting

27:48:37

generated or not is it getting generated

27:48:41

no

27:48:42

sir then I would suggest just check the

27:48:45

GitHub link that I've actually sent with

27:48:46

the code okay try to run that code once

27:48:51

okay okay I've sent you the GitHub link

27:48:52

so this is the GitHub code that we have

27:48:57

okay so just try to run this I will try

27:49:00

to edit this over here itself in front

27:49:02

of

27:49:02

you sure whatever things we have ran

27:49:06

everything I'm going to put it over here

27:49:08

okay uh SQL light. py so this will

27:49:13

basically be my insertion

27:49:17

database I will commit this

27:49:20

up I'll commit this

27:49:24

changes and uh in SQL py I will go ahead

27:49:28

and use this code that uh I have written

27:49:32

app.py

27:49:34

okay so you can go ahead and check it

27:49:37

out okay sure

27:49:42

sir yes please next

27:49:50

question

27:49:55

yes jbin AI will be able to generate

27:49:58

images yes yes it will be we have

27:50:01

discussed about that in the last

27:50:04

session yes the session was informative

27:50:08

live coding session helps us to

27:50:10

understand in a better way I would

27:50:12

appreciate if you could continue adding

27:50:14

more interview questions and answering

27:50:16

videos sure I'll do

27:50:20

that any more question guys if you want

27:50:22

to probably join please make sure that

27:50:24

you join the link that is given by our

27:50:28

team okay okay if you want to talk with

27:50:30

me if you have anything as

27:50:35

such you have to go to this link and you

27:50:38

can join it along with me

27:50:58

okay yes any more questions guys just go

27:51:01

ahead and ask very good everything is

27:51:04

fine so please create one more session

27:51:07

for generative AI images okay fine I

27:51:09

will try to create that in my next

27:51:11

session we'll try to create a health

27:51:12

management app okay and then we will

27:51:15

work on

27:51:26

that sir please can you tell gen is in

27:51:29

job oriented course yes obviously

27:51:32

whatever things are people are using in

27:51:35

the industry that same thing we are

27:51:36

teaching in the course

27:51:44

okay is gini better than chat GPT I

27:51:48

would still

27:51:50

suggest I'll say

27:51:52

suggest that many

27:51:55

people we cannot just come to a

27:51:57

conclusion right now okay

27:52:05

we cannot come to a conclusion right now

27:52:07

with respect to that but when the high

27:52:08

Advanced model will come then we can

27:52:10

probably see so guys use the link that

27:52:12

is probably given over here we have put

27:52:14

that in the comment section you can join

27:52:16

directly to my streamyard and here I

27:52:18

will allow you to probably talk with me

27:52:21

and if you have any questions we can

27:52:28

discuss

27:52:29

please go ahead join the streamyard link

27:52:33

and if you have any question you can ask

27:52:35

me I said

27:52:38

right what are the timings of the

27:52:40

generative AI

27:52:43

course so if you probably see over

27:52:47

here if you click this link the timing

27:52:51

is given

27:52:52

10 10: a.m. to 1: p.m.

27:52:56

IST okay every Saturday and Sunday this

27:52:59

course will go for five

27:53:02

months yeah STI please uh tell me your

27:53:07

question uh sir K great talking with you

27:53:11

uh I enrolled for gender course uh for

27:53:13

python uh actually as a beginner I just

27:53:17

know till oops Concepts not much in data

27:53:19

structures and uh much more advanced

27:53:22

concepts uh even I'm not a developer I

27:53:25

am from uh non-developer background and

27:53:28

just doing some uh like manual testing

27:53:30

and all uh will that help me this gener

27:53:33

course can land me other than testing uh

27:53:36

jobs just want to know yes ma'am so the

27:53:39

thing is that the more first of all the

27:53:41

prerequisite in our course is Python

27:53:42

programming language so that is the

27:53:43

reason we have given already recorded

27:53:45

videos also in our curriculum okay the

27:53:48

more you go become better in Python

27:53:50

programming language the more better

27:53:51

courses you'll be able to I mean the

27:53:53

more better projects you'll be able to

27:53:55

develop okay so I would suggest still

27:53:57

focus more on python and then probably

27:54:00

start learning all these things and how

27:54:01

to create uh entire llm application

27:54:04

which you need to focus in the class

27:54:06

after that try to do some internships

27:54:08

try to do try to see in in your work can

27:54:11

you do something something related to

27:54:13

that you know all those things will

27:54:15

matter okay actually actually I enroll

27:54:17

for this course because I don't want to

27:54:20

be in testing domain anymore so uh if

27:54:24

even if I am not a developer uh can I

27:54:29

get some hands if I get handson in this

27:54:31

project can I switch my from domain from

27:54:34

testing to any

27:54:36

other yes ma'am but again you need to

27:54:38

follow some steps over there you know do

27:54:40

multiple projects see currently in

27:54:43

testing also many things can be used llm

27:54:45

task can be used that is what I'm trying

27:54:46

to say you know so if you're able to use

27:54:49

this that experience you'll try to put

27:54:51

in your resume okay if you already

27:54:53

working that is what I meant but yes

27:54:55

definitely there is an opportunity with

27:54:57

respect to that okay if I if I am not

27:55:00

able to understand how to put this

27:55:02

knowledge in testing can uh get get can

27:55:05

I get mentorship from Team uh so that I

27:55:08

can implement this in the classroom

27:55:10

we'll discuss of those kind of use cases

27:55:13

see right now I did I I'm not a let's

27:55:16

say I'm not a good SQL Developer but

27:55:18

still I'm able to write queries right

27:55:21

yes sir from this application you saw

27:55:23

right now in testing also you you have

27:55:26

you do manual testing you do automated

27:55:28

testing right

27:55:29

yes so in that also you can do something

27:55:31

with respect to that there are lot of

27:55:34

different different things which you can

27:55:35

specifically do with this llm models

27:55:37

okay sure sir sure daily I will be

27:55:40

waiting for your videos okay today Chris

27:55:42

will be giving new video on which topic

27:55:44

I'm curiously every day waiting for your

27:55:46

videos your videos are so great and

27:55:49

helpful thank you ma'am thank you

27:55:52

thanks Kish this mju here yeah hi mju

27:55:57

yeah so what I'm looking for is like uh

27:56:00

I required uh company oriented realtime

27:56:03

projects for computer vision and large

27:56:05

language which you already teaching but

27:56:07

I I'm looking for a project which on

27:56:09

computer vision uh thing so will your

27:56:13

team will be helping on that already

27:56:15

already in our data science uh full

27:56:18

stack data science batch we are already

27:56:20

doing all those things end to endend

27:56:22

projects that are related to computer

27:56:23

vision and everything if I want to get

27:56:26

only the related to project because I

27:56:27

know all the things which is required

27:56:29

prequest for data sence I know all the

27:56:31

stops in that so now I only want the

27:56:33

project so so so so sir I I'll tell you

27:56:36

what we have come up with okay so are

27:56:39

you able to see my screen yeah yes I can

27:56:42

see now here you are able to see my

27:56:45

screen right so in I neuron right we

27:56:47

have something called as one neuron okay

27:56:50

now inside this one neuron we are

27:56:51

creating this data science project

27:56:53

neuron right so here you'll be able to

27:56:56

see computer vision set of projects

27:57:00

mhm right so this this entire neuron is

27:57:03

specific to projects only right here we

27:57:06

are not teaching anything from scratch

27:57:08

but instead focusing on solving projects

27:57:10

and these are like end to endend

27:57:11

projects with

27:57:13

deployment okay okay okay so just go to

27:57:16

one neuron and there is a data science

27:57:17

project neuron

27:57:19

sir oh okay Kish yeah thank you for that

27:57:23

yes

27:57:27

please yeah more question

27:57:34

guys I think mju had asked right right

27:57:36

now hello yes yes

27:57:39

mju okay any more question mju yeah but

27:57:43

seriously one thing I want to tell you

27:57:45

man you you are amazing honestly

27:57:46

speaking like you are making the things

27:57:48

like you know anybody can pick up things

27:57:50

and become a know any any from any

27:57:54

background and they can become a

27:57:55

programmer and move to the carer so the

27:57:59

way you are doing the way you are

27:58:00

teaching is you know you are reaching to

27:58:02

the worldwide you are not limited to

27:58:04

India like across the world people are

27:58:05

recognizing you that that is a level but

27:58:07

you need to give one motivation speech

27:58:09

like how you came from a know you are

27:58:11

from Karnataka from Karnataka so how you

27:58:14

grown up how you made yourself know that

27:58:16

one kind of know motivation video you

27:58:17

have to give like how you built your

27:58:21

know profile to to this level like to

27:58:23

you can reach out to the world that is

27:58:25

really amazing I'm very proud that you

27:58:27

are from my state

27:58:29

thank you thank you Manju definitely

27:58:31

we'll do a specific Meetup where in know

27:58:33

closed

27:58:34

audience specific office in Bangalore or

27:58:37

anything yeah yeah so in Bangalore we

27:58:39

have office so it's near uh this brigade

27:58:42

and we our building name is Brig

27:58:45

signature Tower oh okay okay yes try to

27:58:48

come up see at the end of the day U

27:58:51

again the main Vision over here is to

27:58:53

democratize AI education you know uh the

27:58:56

way that we are selling courses because

27:58:58

this courses adds values right uh it

27:59:00

helps you to get jobs it helps you to

27:59:02

make Transition it help you joined

27:59:04

multiple other I spent a lot of money

27:59:07

and learning but I see always I get a

27:59:09

very small like you always do in the

27:59:11

jupyter notebook know jupyter notebook

27:59:13

thing is a outdated stuff like where you

27:59:15

cannot use it in the company now we are

27:59:17

moving to the you need to build an app

27:59:18

company is looking for that because I'm

27:59:20

I'm working on that I'm already in the

27:59:21

industry I have a 10 plus experience and

27:59:24

I'm using it because you need to need to

27:59:26

build a app end to end so that that is

27:59:28

what industry is looking so there your

27:59:31

you stand out from rest of the crowd

27:59:33

which you are teaching so that is really

27:59:35

amazing continue to do M see we are

27:59:37

already coming from that background you

27:59:39

know so we know see my total years of

27:59:42

experience if I say it is somewhere

27:59:43

around 13 to 14 years okay and uh if I

27:59:46

talk about I we started at 2019 right so

27:59:49

that till that experience we were

27:59:50

already 8 to nine years experience

27:59:52

specifically me now I know like what

27:59:55

things are required in the company

27:59:56

working in company getting into a

27:59:58

company transition making a transition

28:00:00

in the company what in a project what

28:00:03

what skill sets you specifically require

28:00:05

right so hardly you'll be seeing any

28:00:07

Jupiter notebook session but instead we

28:00:08

focus on creating an end to- end project

28:00:11

or a module you know which will be very

28:00:13

much applicable in the sessions but

28:00:15

thank you for your uh amazing words that

28:00:18

you have actually said uh this is really

28:00:21

Heartfield you know because I I hear

28:00:23

from the people who are in us and

28:00:24

Australia different countries right they

28:00:26

they speak they watch your videos that's

28:00:28

you know from such a background like

28:00:30

where you are reaching today that is

28:00:31

really amazing it's it's inspiration for

28:00:33

everyone you know thank you thank you

28:00:36

mju again at the end of the day I need

28:00:38

to add values in others life and that is

28:00:40

what we our team in auron are doing with

28:00:43

the same vision we are working on thank

28:00:46

you uh

28:00:47

hello yeah yes sh

28:00:50

sh yes sir actually uh so what we are

28:00:54

doing is generally uh we are fine tuning

28:00:56

the llm and based upon our own data set

28:01:00

and we are getting that as some text

28:01:02

okay so is it possible to integrate the

28:01:05

uh you know so Panda's AI so to get that

28:01:10

plots uh sir I will just have a look

28:01:12

onto the Panda's AI I I've kept a point

28:01:15

over here first let me explore that you

28:01:17

know so once I probably explore that

28:01:20

then I can definitely come with that

28:01:22

thing okay so first of all let me

28:01:24

explore because I've never explored that

28:01:25

Panda's AI okay it is a kind of

28:01:29

yeah sure sure thank you yeah

28:01:33

yeah good evening next

28:01:37

question sir can yeah sir can you create

28:01:41

some Transformer projects or you explain

28:01:43

the two hours transform how it is going

28:01:45

on attention can you create some

28:01:48

projects sir so I seen your YouTube

28:01:51

channel

28:01:52

because uh llm and lstm projects is not

28:01:56

there in your playlist uh can you create

28:01:59

some projects within two weeks I mean or

28:02:02

else this month sure sir sure definitely

28:02:05

I'll do that sir you are creating the so

28:02:07

many projects right can I can I do that

28:02:10

projects to I mean fin year projects

28:02:13

like fin year projects yeah yeah you can

28:02:15

do it you can do it I mean how to uh sir

28:02:19

in my laptop you said that K python

28:02:22

version 3.10 right K is not available in

28:02:25

your laptop

28:02:27

it

28:02:29

you have to

28:02:30

install sir I install anakonda sir but

28:02:33

you have not you may have not set the

28:02:35

path that may be the problem the default

28:02:37

path will be there now that you have not

28:02:40

can I use can I can

28:02:43

I so without see if you try to do

28:02:46

without K it is possible by using pip

28:02:48

but again there'll be a lot of clashes

28:02:50

within your environments it will not be

28:02:52

at one specific place you know where all

28:02:54

the tracking of those environment is

28:02:55

done so it is a good idea to in your

28:02:58

YouTube channel sir actually I did not

28:03:01

see this actually I did not see this

28:03:03

live uh you upload one video on the

28:03:06

morning right I seen that two hours

28:03:08

video uh I follow your YouTube channel

28:03:11

very much as compared to this uh can I

28:03:15

uh downloading that uh K it is there in

28:03:18

your YouTube

28:03:20

channel yeah it is there but don't worry

28:03:23

I may also create another video where

28:03:25

you can directly use Python and create

28:03:27

an environment okay

28:03:28

okay can I see the okay sir I'm not

28:03:32

created yet I'll create those videos I'm

28:03:33

saying yeah no sir you to this I struck

28:03:37

in the starting only sir I entire thing

28:03:39

I writing the notes because I struck

28:03:41

there when I stuck there I did not come

28:03:43

the interest to go further so I writing

28:03:46

the notes so that's why I'm asking the

28:03:49

doubt okay don't worry see it's more

28:03:51

about creating python environment if

28:03:57

you hm

28:04:00

V see I'll I'll show you one link over

28:04:04

here okay just give me a

28:04:08

second sir one more idea is uh iuran you

28:04:13

are connecting that 16,000 right sir

28:04:16

mean gen CES mhm

28:04:20

16,000 5

28:04:22

8,000 huh sir that much money I did not

28:04:26

bother sir because my friend also want

28:04:28

to contribute me can I both join ion

28:04:34

sir just talk to the just talk to the

28:04:36

team like let's see what team can

28:04:38

actually do okay just talk to our

28:04:40

counselor team how how I want to contact

28:04:43

to the team sir uh see in the website

28:04:46

itself right you will have the number

28:04:48

see over here talk to our

28:04:51

counselor

28:04:53

bottom their number is given you can

28:04:55

talk to them okay so see over here

28:04:57

creation virtual environment uh this

28:05:00

entire documentation is given okay you

28:05:02

can use this and create an virtual

28:05:04

environment just follow the steps

28:05:07

automatically you'll be able to do it

28:05:09

okay okay sir I don't know the internal

28:05:12

parts how YOLO is working from where I

28:05:14

want to study that wo V8 that all I

28:05:17

don't know I mean where I want to

28:05:20

study see YOLO documentation is given in

28:05:23

a amazing way over there if you have

28:05:26

seen

28:05:27

YOLO

28:05:29

V8 right if you see this specific

28:05:31

documentation right I think most of the

28:05:33

things are given step byep installation

28:05:35

everything is given over there but don't

28:05:37

worry in ion no we'll be coming up with

28:05:39

live classes with respect to deep

28:05:40

learning also okay

28:05:43

from YouTube paid live session in paid

28:05:48

code also if you want to join there is

28:05:50

already but in YouTube also we'll have

28:05:52

live session going on okay yeah can you

28:05:55

explain you sir how internal parts is

28:05:58

working math behind that sure definitely

28:06:02

okay thank you sir thank you yeah thank

28:06:05

you yeah next

28:06:08

question hi sir yeah hi Hari uh sir

28:06:14

uh yeah nice to meet you sir sir uh I

28:06:18

have a question so in machine learning

28:06:20

and deep learning how we use uh graph

28:06:23

modeling sir I mean uh I uh I mean I I

28:06:28

saw the one article regarding graph

28:06:31

modeling but depends on what kind of use

28:06:34

case right graph modeling can be used in

28:06:36

multiple use case uh it is

28:06:38

AA fraud detection uh I mean like

28:06:44

that so see again you can use this

28:06:48

techniques but sometimes right you also

28:06:50

need to think which algorithm is very

28:06:52

much feasible to use with respect to a

28:06:54

project okay okay yes your uh uh the

28:06:59

algorithm with respect to this will

28:07:00

speeden up the process but again try to

28:07:02

understand this I've not yet created any

28:07:05

videos with respect to that you know let

28:07:08

me have a look onto that and see if I'm

28:07:10

able to create one project I'll try to

28:07:11

upload that in my channel okay okay sir

28:07:14

actually uh I mean uh last couple of uh

28:07:18

days

28:07:19

weeks I watched your video sir and uh uh

28:07:23

I uh mention those uh project Basics

28:07:26

projects regarding the generate U uh in

28:07:29

my uh resume and I I got a call I mean

28:07:33

the interview call and I clear the first

28:07:36

round I have technical rounds right now

28:07:39

and so I I don't know exact exact I mean

28:07:44

how how we'll go so can I get the some I

28:07:48

mean like knows like how the interview

28:07:51

is going to go always make sure that

28:07:53

when you have a technical round prepare

28:07:55

well your projects right it should be

28:07:57

till deployment

28:07:58

what all things you have done in that

28:08:00

you have to explain that properly so

28:08:01

that you know you guide the interviewer

28:08:03

what what should be the next question

28:08:05

that he should ask you know try to try

28:08:08

to make sure that you have the control

28:08:10

of the interview not the interviewer you

28:08:12

know so the information that you have

28:08:13

portraying in front of him right try to

28:08:16

provide him some some things that you

28:08:18

have actually done which may be

28:08:19

something new for him because see

28:08:22

interviewer would like to just

28:08:23

understand that what all things you know

28:08:25

so how well you specifically speak with

28:08:27

respect to a project the more the better

28:08:29

it is okay okay sir actually I uh I

28:08:33

enrolled the I mean Genera a clause sir

28:08:36

uh I mean the but I mean I I mean l i

28:08:40

mean the S I mean sa also teaching the

28:08:44

generate UI I mean the community section

28:08:46

so I watched those videos and I took one

28:08:49

project uh I mean he I mean what he's

28:08:52

teaching and I uh mentioned that project

28:08:55

in my resume and I'm not expert in a

28:08:58

Genera right now so I'm very scared of

28:09:01

that what how will go the don't be don't

28:09:04

be scared of it see if you know how to

28:09:06

use apis that's it you just need to be

28:09:09

scared whether you know Python

28:09:10

programming language or not the more

28:09:12

better you know Python programming

28:09:13

language the more better you'll be able

28:09:15

to create this llm application okay okay

28:09:18

sir so don't worry see anyhow you are in

28:09:20

the course and uh when you are in the

28:09:22

course you don't have to worry with us

28:09:24

okay okay

28:09:26

sir yeah thank you sir

28:09:28

yeah next question

28:09:31

please hi sir

28:09:33

rendra rendra you're my inspiration

28:09:36

basically to be frank sir can you make

28:09:39

some in your playlist based upon llm sir

28:09:41

large language modules with python

28:09:43

custom

28:09:44

gpts from scratch you're saying yeah yes

28:09:48

sir see I will take llama 2 model okay

28:09:51

so llama 2 is there it is a very good

28:09:53

open source model on top of that I will

28:09:55

try to show you fine tuning okay by

28:09:57

using this or clor method okay yeah okay

28:10:00

sir and I have one doubt sir regarding

28:10:02

YOLO before doing NM I mean non maximum

28:10:06

sub Su we do some something called we do

28:10:11

sorting desing order before that we do

28:10:14

something we give some threshold values

28:10:15

and if it is less than 0.3 threshold

28:10:17

threshold we we make it as zero Suppose

28:10:21

there is a some small object tiny object

28:10:24

is there suppose there's a tiny object

28:10:26

which it has a score of 0.2 in the sense

28:10:29

so we may lose the data in we may lose

28:10:31

the data in that case so rinda just give

28:10:35

some days okay what we will do is that

28:10:37

we'll try to create a dedicated video

28:10:39

for that okay I'll tell my team also

28:10:41

with maths don't worry everything will

28:10:44

broke break break into math smaller

28:10:46

smaller parts so that you'll be able to

28:10:48

understand okay directly explaining

28:10:50

right now will be difficult so let's

28:10:51

wait for one video okay from our end

28:10:54

yeah I purchased the dlcv NLP from inur

28:10:57

sir I have completed the course I have

28:11:00

completed the course I have this this

28:11:02

just have qued to the neuron support

28:11:05

team and one small can you explain da

28:11:09

data

28:11:10

argumentation see data argumentation is

28:11:12

like let's say you have one of my image

28:11:15

okay now to train a model you know what

28:11:19

I can do is that I can change my face

28:11:21

like this like this and give the model

28:11:22

give the model different different

28:11:24

images to identify me data augumentation

28:11:26

what it does is that it takes all the

28:11:28

images it tries to horizontally rotate

28:11:30

it vertically rotate it expand it zoom

28:11:33

in zoom out so it tries to creat a

28:11:35

variety of the same images so that the

28:11:38

vision model whatever Vision model you

28:11:40

are actually creating it'll be able to

28:11:42

understand that image very much

28:11:45

easily so you're just trying to create

28:11:47

multiple images by applying some

28:11:49

techniques some transformation

28:11:51

techniques where it can probably zoom in

28:11:53

zoom out horizontal flip vertical flip

28:11:56

it can do multiple things in the image

28:11:57

and create a new one okay uh the day

28:12:00

before yesterday I was doing a project

28:12:02

based upon deing sir I was trying to

28:12:04

read I have created a folder and I

28:12:06

created some dogs photos of dogs I have

28:12:09

downloaded and some photos of cats when

28:12:12

I was trying to read that in the collab

28:12:14

it's not getting running it's showing an

28:12:17

error for me sir why better drop US mail

28:12:20

to the support provide the collab link

28:12:22

over there okay and let them have a look

28:12:25

with respect to that okay so we have a

28:12:27

dedicated team who will take care of all

28:12:29

these things okay try to do L

28:12:34

from

28:12:36

python thank you sir that's yeah

28:12:40

thank sir I sir I have one question sir

28:12:44

uh currently Vision language models are

28:12:46

coming up are you going to include that

28:12:48

in our course generative course sir mean

28:12:51

I'm not sure whether the document papers

28:12:53

released or not but Vision language

28:12:55

models are coming up right so are you

28:12:57

going to include that in generative

28:12:59

course yeah sure see the thing is that

28:13:02

at the end of the day whatever things

28:13:04

are coming in generative AI let's say

28:13:06

the vision language model you basically

28:13:07

saying large image models right so uh

28:13:10

the gini Pro Vision whatever

28:13:12

functionalities whatever projects will

28:13:13

be developing over there also we'll take

28:13:15

that in the class H okay sir and I heard

28:13:19

one of the uh student asked that about

28:13:22

python may I know what level of python

28:13:25

is required sir because as I asked you

28:13:27

before data structures and algorithms I

28:13:29

am very poor at data structures and

28:13:30

algorithms until what level I have to

28:13:33

Learn Python may please the python you

28:13:35

definitely need to note in modular

28:13:37

programming language you know oops

28:13:39

inheritance classes all these things

28:13:41

that is the reason we have given that as

28:13:43

a prerequisite along with that we have

28:13:45

given the entire recorded videos in the

28:13:47

curriculum okay yeah I'm aware of till

28:13:49

oops sir but data structures and

28:13:51

algorithms like in advanced uh tree

28:13:54

graphs and all uh is that will not be

28:13:57

required to create projects okay that

28:13:58

will not be

28:13:59

required okay sir thank you and in in

28:14:02

Project do we get some real time

28:14:05

industry level uh how they are

28:14:08

using all the deployment techniques

28:14:10

we'll teach you all the deployment

28:14:12

techniques you know what all things are

28:14:14

currently happening and in the future

28:14:16

let's say when the curriculum is going

28:14:17

on when the course is going come when

28:14:19

anything new comes we will also take

28:14:21

care of that you are going to add in

28:14:23

that course sir not add but at least

28:14:26

we'll discuss that modules in the last

28:14:28

okay first we'll complete the entire

28:14:30

curriculum and then we'll try to include

28:14:32

that yes definitely I want to get into

28:14:35

this uh generative uh field because I

28:14:40

have only the hope is about this only

28:14:42

this course sir after this course I I

28:14:45

don't have any other way to switch to in

28:14:48

testing I have only hope is this gener

28:14:50

course sir I try your best yes sir thank

28:14:55

you sir thank

28:15:01

you okay guys so it's already 10: so 2

28:15:04

hours of session I hope you like this

28:15:06

session please do hit like uh and as

28:15:10

usual uh keep on supporting and again I

28:15:12

will be coming in the next week Friday

28:15:14

live session we will be discussing more

28:15:16

about amazing projects and all uh again

28:15:19

let's see what all things are basically

28:15:21

coming till the next week I'll come up

28:15:22

with that and we'll have a good one so

28:15:25

thank you this was it for my side so if

28:15:27

you are new please make sure that you

28:15:28

subscribe the channel subscribe all the

28:15:30

Ion channel share with all your friends

28:15:32

share share share the post like whatever

28:15:34

things you specifically do tag me over

28:15:36

there I'll be happy to answer or

28:15:39

probably comment down like what kind of

28:15:41

works you have specifically done uh yes

28:15:46

uh at the end uh I would always like to

28:15:50

say one thing guys uh see there are new

28:15:54

things that are coming in the market

28:15:55

right the reason why we are teaching all

28:15:58

this new stuffs is that it actually

28:16:00

increases your effic efficiency

28:16:03

productivity at the end of the day the

28:16:05

more you work the more you put effort

28:16:08

the more you become a successful right

28:16:10

you go in any company you go anywhere

28:16:13

right the more knowledge you gain and

28:16:15

trust me in anything that you do in your

28:16:17

life if you spending two hours in

28:16:19

learning if you are spending three hours

28:16:21

in learning if you are not learning also

28:16:23

right some or the other thing you

28:16:24

specifically learn with respect to each

28:16:26

and everything

28:16:28

right

28:16:29

and one more thing that if I probably

28:16:32

talk about in neuron right so this in

28:16:35

neuron support if you want to really see

28:16:37

a real practical example okay so let me

28:16:42

just show share my screen so in this

28:16:45

example you'll be able to see there is

28:16:47

something called as support system right

28:16:50

the main llm we have integrated in this

28:16:53

entire support application right so let

28:16:56

me just go through this so that you get

28:16:58

an clear understanding what all things

28:17:00

are basically there let's say once you

28:17:02

join a batch let's say you are in

28:17:04

generative AI so mastering generative AI

28:17:07

batch is over

28:17:08

here you can join the group in this

28:17:11

particular batch right so let's say I'm

28:17:14

in machine learning boot camp okay or

28:17:16

I'm in this particular boot camp in all

28:17:18

the all the batches I've probably joined

28:17:20

let's say there is data science

28:17:21

interview batch going on okay now you

28:17:24

may be asking various question like can

28:17:27

we probably communicate with our team

28:17:29

members can we have a onetoone session

28:17:32

can I probably study in a group so for

28:17:34

this let's say I in this specific batch

28:17:36

if you go ahead and join over here there

28:17:38

is something called a join group as soon

28:17:40

as you join group right then here you'll

28:17:43

be able to see that this group will be

28:17:45

added right let's say over here the

28:17:46

machine learning boot camp is over here

28:17:48

I've joined this the data science

28:17:50

interview back so all your team members

28:17:52

will be in this specific group you can

28:17:54

ask any question as like as you like you

28:17:56

know you can ask any any question as you

28:17:58

want right over here like you can

28:18:00

probably ping hi all the members you'll

28:18:03

be able to see you'll be able to ask any

28:18:05

question if you want to probably do a

28:18:07

group study everything will be in one

28:18:09

platform itself right apart from this if

28:18:11

you want to communicate with anyone

28:18:14

right if you want to probably

28:18:15

communicate with anyone here right you

28:18:17

can also do that now see karik Kash

28:18:20

basically says that why one 121 support

28:18:23

is stopped because this was when we are

28:18:25

developing things right so here you can

28:18:27

probably see thanks Chris not sure if

28:18:29

this is Chis in human or chish the chat

28:18:32

bot I'm the human over here right now

28:18:34

let's say if you want to get more

28:18:36

queries and right now there are many

28:18:38

people who pay some pay they pay $20 to

28:18:41

chat GPT but by using this Megatron you

28:18:44

don't have to pay anything you can

28:18:45

directly chat it over here let's say

28:18:47

give me the python

28:18:49

code python

28:18:51

code

28:18:53

to create a floss cap okay if I write

28:18:57

like this if I execute it I'll be able

28:18:59

to get the entire

28:19:01

code right so here what we have done by

28:19:03

using see over here in the Megatron we

28:19:05

have used llm but the other entire

28:19:08

application looks more like a WhatsApp

28:19:10

message right where you can probably do

28:19:11

one to one group chat you can have any

28:19:13

kind of discussion now see all the

28:19:15

questions are basically there right not

28:19:17

only that once you probably go to the

28:19:19

knowledge ocean let's say if you have

28:19:20

any query right you can go ahead and

28:19:22

write the query right so it'll you have

28:19:25

to probably select the batch where you

28:19:26

are in let's say I'm in mastering

28:19:28

generative Ai and I say hey what is

28:19:31

generative AI right now before when we

28:19:35

were giving the support sometimes

28:19:37

because of huge queries we are not able

28:19:40

to solve that in 24 hours but now by

28:19:42

using the support system we'll be able

28:19:44

to solve within 24 hours let's say I'm

28:19:46

asking what is generative AI okay and

28:19:48

I've asked this question and I post it

28:19:51

over here right so here when you go to

28:19:54

knowledge session you'll be able to see

28:19:56

new to Old what is generative AI you'll

28:19:59

be able to see over here wait new to Old

28:20:01

this is old to

28:20:02

new um let me just go ahead over here in

28:20:06

the homepage so you'll be able to see

28:20:08

all the queries that people have asked

28:20:10

now this is where uh the most amazing

28:20:13

thing will be that as soon as you

28:20:14

probably click over here you'll be able

28:20:15

to see all the responses from the

28:20:16

students right large language models are

28:20:19

this this this this let's say if some if

28:20:22

none of the student provides a response

28:20:24

over here then what will happen is that

28:20:26

our our llm model will provide the

28:20:28

response within 24 hours it will first

28:20:31

of all go ahead and filter and see which

28:20:33

question is not been answered and then

28:20:36

we probably what we do is that we

28:20:37

provide a response over here itself

28:20:39

right normally none of the vendors

28:20:41

allows to talk with other batment in the

28:20:43

join course yes but we allow the reason

28:20:46

is that people waste their time people

28:20:49

waste their time joining multiple groups

28:20:51

right someone will be joining telegram

28:20:54

someone will be joining WhatsApp and

28:20:56

other than

28:20:57

studies other than studies you know they

28:21:01

will talk all rubbish things right

28:21:03

they'll not talk more about studies but

28:21:04

other than that everything they'll talk

28:21:06

right so this is one specific place

28:21:09

where you can have a discussion about

28:21:10

each and everything right and not only

28:21:13

that let's say you want to provide if

28:21:15

you have any queries and you want to

28:21:16

probably write a mail to us you can

28:21:19

compose the mail here itself you don't

28:21:20

have to open a Gmail probably go ahead

28:21:22

and write query at theate ion. a or

28:21:25

support at theate ion. AI right

28:21:27

everything and in the future what is

28:21:29

going to happen right in the future

28:21:32

you'll be able to see that right now we

28:21:34

have this chat right in the future our

28:21:36

Megatron will be so strong since we are

28:21:39

processing with two 20,000 videos see we

28:21:42

have highlighted over here 20,000 videos

28:21:45

has been

28:21:46

processed along with that it has

28:21:48

generated 6,000 question and its answers

28:21:50

so any question that you specifically

28:21:52

ask either you can get a video or either

28:21:55

you can get any kind of answer from our

28:21:57

Megatron itself or from our this

28:21:59

specific chat B right so that is how

28:22:02

strong it is going to have become in the

28:22:05

future so at the end of the day this we

28:22:07

are specifically doing because you'll be

28:22:09

able to communicate with your batchmates

28:22:11

you'll be able to do group study you'll

28:22:12

be able to do projects you'll be able to

28:22:14

do internships multiple things all at

28:22:16

one place and if I probably show you

28:22:20

ion. every tab that you see over

28:22:23

here every tab right this altogether has

28:22:27

a complete different story let it be

28:22:30

with respect to internship portal let it

28:22:32

be with respect to job portal neuro laab

28:22:35

neurolab why did we come with neurolab

28:22:37

because many people did not have that

28:22:40

strong laptop or machine to do the

28:22:42

coding so that is the reason we came up

28:22:44

with this Virtual Lab wherein you can go

28:22:46

ahead and probably uh you know open any

28:22:50

IDs probably work with flask work with

28:22:52

python it provides you an entire

28:22:54

development environment which is running

28:22:55

in Cloud so you don't face that specific

28:22:57

lag then support system was one of the

28:23:00

challenges which you are trying to fix

28:23:01

from past two to three years now this is

28:23:04

completely fixed and still we are making

28:23:07

it much more better you're going to

28:23:08

provide lot of features as I said all

28:23:11

these things are basically coming over

28:23:12

here the best thing is that you don't

28:23:13

have to pay any money for this right if

28:23:15

you are part of a course you will be

28:23:17

able to use this right that is the most

28:23:20

powerful thing and again why we are

28:23:22

doing this this is for our community we

28:23:24

really want to build our community in

28:23:26

such a way that you learn you learn in

28:23:29

an amazing way and at the end of the day

28:23:31

get placed somewhere make Transitions

28:23:34

and yes obviously help others also

28:23:36

whenever you get that particular

28:23:37

opportunity okay so thank you uh this

28:23:41

was it from my side uh I hope you like

28:23:43

this entire things that I've actually

28:23:45

shared okay and yes this was it for my

28:23:50

side keep on rocking keep on learning um

28:23:53

other than this please go ahead and

28:23:54

check out all the courses in the Inon

28:23:56

and will be provided in the description

28:23:57

of this particular video uh and yes I

28:24:00

will see you all in the next video have

28:24:01

a great day thank you take care bye-bye

28:24:04

everyone Tata at least say Tata I know

28:24:06

you did not ask answer much question

28:24:08

over there okay but yes a good happy

28:24:12

weekend for all of you out there thank

28:24:13

you guys thank you so if you able to see

28:24:17

my screen just give me a quick

28:24:18

confirmation everyone so we will go step

28:24:20

by step we'll go with the agenda we will

28:24:22

try to understand many things as such

28:24:24

you know topic by topic I will be

28:24:27

writing in front of you wherever Google

28:24:29

is required I will take the help of

28:24:31

Google I will show you research papers

28:24:33

and many more things as well okay so let

28:24:36

me just see in LinkedIn also whether I

28:24:38

am visible or not so I'm just going to

28:24:40

see in multiple

28:24:41

places uh so I'm excited about this sir

28:24:46

as an India llm for large language will

28:24:47

be taking flight off yes many many

28:24:49

companies are specifically using in use

28:24:51

cases and all so it'll be quite amazing

28:24:53

so let me see whether we are live ion

28:24:57

LinkedIn page or not okay just give me a

28:24:59

second okay perfect I can see myself

28:25:02

over here there are chats there are

28:25:05

messages that are probably coming up

28:25:06

okay

28:25:10

great okay let me hide the current

28:25:12

comment okay so what is the agenda of

28:25:15

this specific session what all things we

28:25:17

are specifically going to discuss so the

28:25:19

first topic as usual is to

28:25:23

understand what is generating

28:25:28

AI okay so we are going to first of all

28:25:32

understand what is generative AI okay

28:25:36

because you may have heard about machine

28:25:37

learning deep

28:25:39

learning you may have heard about

28:25:41

natural language processing where does

28:25:43

it exactly fit okay so we'll also be

28:25:45

able to understand it then after

28:25:48

completing this we will try to

28:25:50

understand how

28:25:53

llms model are trained

28:25:59

so what what does llm model basically

28:26:01

mean large language model okay we'll

28:26:04

also understand what is large language

28:26:06

model when we are discussing about

28:26:07

generative AI so the third thing we will

28:26:10

be discussing about open

28:26:17

source we will be discussing

28:26:20

about open

28:26:22

source and paid llm models

28:26:30

and which one you can specifically use

28:26:32

if you don't have money enough what you

28:26:34

have to really take care of see at the

28:26:36

end of the day these all are models okay

28:26:39

and uh if you have powerful gpus and is

28:26:42

it possible that you can also train your

28:26:43

llm model from scratch yes so everything

28:26:46

is possible I will be taking up making

28:26:48

sure that I'll explain each and

28:26:49

everything okay right now the models

28:26:54

that are very much famous that are in

28:26:56

the industries right now right so you

28:26:58

may be hearing about chat GPT right so

28:27:01

chat GPT I will just write the model

28:27:02

name let's say gp4 right we will discuss

28:27:06

about some some of the good open source

28:27:08

models like Lama 2 we will be also

28:27:11

discussing about gini Pro right why gini

28:27:15

pro why gini Google Gemini right I'm not

28:27:18

talking about Palm or B Google BS and

28:27:21

all right gini Pro um recently Google

28:27:24

has launched this three amazing llm

28:27:26

models right three versions of gini

28:27:28

models right and geminii pro right now

28:27:31

is available for everyone out there to

28:27:33

use it to create an end to end project

28:27:35

and it is completely for free right you

28:27:37

can probably use 60 queries per minute

28:27:40

you know you can you can actually give

28:27:42

somewhere around 60 queries per minute

28:27:44

for uh for using it in your use cases

28:27:47

yes soon it will also be coming up with

28:27:49

uh paid models uh if you want more

28:27:52

queries to hit right so it is good to

28:27:54

start with all these things I'm just

28:27:56

given some list of llm models over here

28:27:59

other than this there are a lot of llm

28:28:01

models also open source llm models like

28:28:03

Falcon Mistral right so I hope everybody

28:28:06

has heard about all the specific things

28:28:09

okay so let's see how many topics I will

28:28:12

be able to cover step by step and if

28:28:14

something is remaining again we will

28:28:15

continue in the next week Friday session

28:28:18

so first of all let's go ahead and

28:28:20

understand about generative AI okay so

28:28:25

the first topic we will go ahead and

28:28:27

discuss about what is generative AI okay

28:28:31

so everybody understood about the agenda

28:28:34

what we are specifically looking at

28:28:37

right agenda we'll also be discussing

28:28:39

about large image models also that

28:28:41

question will also be coming up okay so

28:28:44

there's a question a little bit about

28:28:46

llm models and open AI I will discuss

28:28:48

about it okay

28:28:51

um okay I have a good knowledge of

28:28:54

python okay I'll take up questions okay

28:28:55

so but I hope everybody's clear with the

28:28:57

agenda that we are actually looking at

28:28:59

so now let's go ahead and understand

28:29:01

with respect to generative AI now before

28:29:04

understanding generative Ai and where

28:29:05

does it fall in this entire universe of

28:29:09

artificial intelligence you know so if I

28:29:11

probably consider this as an example

28:29:13

let's say and this this diagram probably

28:29:15

I've I've taught in many of the classes

28:29:18

I've explained you all and all let's

28:29:19

let's consider the entire universe and

28:29:22

this universe I would like to say that

28:29:24

this is nothing but this is this is

28:29:26

artificial

28:29:27

intelligence okay this is nothing but

28:29:29

this is artificial intelligence right

28:29:32

and what is the main of aim of

28:29:34

artificial intelligence is that whether

28:29:36

you work as a data scientist whether you

28:29:38

work as a machine learning engineer

28:29:41

whether you work as a software engineer

28:29:43

who specifically wants to harness the

28:29:45

power of machine learning deep learning

28:29:49

at the end of the day you creating

28:29:50

applications those are smart application

28:29:53

that can perform its own task without

28:29:55

any human intervention so that

28:29:57

specifically is called as artificial

28:29:58

intelligence right so what is exactly

28:30:00

artificial intelligence it's just like

28:30:02

creating smarter application that are

28:30:04

able to perform its own task without any

28:30:07

human intervention okay so that is what

28:30:10

AI specifically means so tomorrow you

28:30:13

work as a data scientist you work as a

28:30:15

machine learning engineer or you work as

28:30:16

a software engineer who wants to harness

28:30:19

the power of machine learning deep

28:30:20

learning techniques at the end of the

28:30:22

day you will try to create an AI

28:30:24

application only right some some of the

28:30:26

examples with respect to this AI

28:30:27

applications as I've already told

28:30:29

earlier Netflix right Netflix is one

28:30:33

streaming platform let's say movie

28:30:34

streaming

28:30:35

platform here an AI module is integrated

28:30:39

right so there is an AI module that is

28:30:42

integrated now this AI module I would

28:30:44

like to say it is nothing but movie

28:30:45

recommendation system right movie

28:30:48

recommendation

28:30:50

system movie recommendation right

28:30:53

Netflix is already a software product it

28:30:55

is a movie streaming platform but we are

28:30:57

trying to make it much more smarter so

28:30:59

that it will be able to give us or

28:31:01

provide us movies right recommend us

28:31:04

movies without any human intervention

28:31:06

see our human inputs will get captured

28:31:08

over there what movies you like like

28:31:10

action movies whether you like sentiment

28:31:13

movies comedy movies all those

28:31:14

information is getting recorded right

28:31:17

but we are not asking human to to to

28:31:20

take some decision in short this AI app

28:31:23

will take its decision by itself right

28:31:25

so so this is what artificial

28:31:26

intelligence is all about now coming to

28:31:28

the second one if I probably consider

28:31:30

the second one that is nothing but we

28:31:33

basically talk about machine learning so

28:31:35

what exactly is machine learning here I

28:31:37

will be talking about ml okay now with

28:31:40

respect to ml right what what exactly is

28:31:43

machine learning machine learning

28:31:45

provides you what it provides you stats

28:31:50

tools stats tools it provides you stats

28:31:53

tools to

28:31:57

analyze

28:32:01

data right to analyze data to to create

28:32:05

models and these models will be

28:32:07

performing various task it can be

28:32:10

forecasting it can be

28:32:12

prediction it can be feature engineering

28:32:14

anything as such right but all these

28:32:18

activities that you are specifically

28:32:20

doing in this I would like to consider

28:32:23

all those as stats tools it is provided

28:32:25

ing this tool to do or to perform this

28:32:28

work right so here you'll be seeing that

28:32:31

we learn about different things like

28:32:34

supervised machine learning unsupervised

28:32:35

machine learning we learn about

28:32:37

techniques wherein you create models

28:32:41

that models are able to do

28:32:42

classification regression problem

28:32:43

statement forecasting Right Time series

28:32:45

prediction right different different

28:32:47

tasks can be performed with the help of

28:32:50

machine learning right and machine

28:32:52

learning initially what was famous if

28:32:55

probably say five to six years back

28:32:57

everybody used to probably use machine

28:32:59

learning techniques and now also they

28:33:01

use it for most of the use cases they

28:33:03

use it right but now because of

28:33:05

generative AI now they able to think

28:33:07

much more with respect to different

28:33:08

different business use cases right so at

28:33:11

the end of the day with the help of

28:33:12

machine learning we are trying to do

28:33:13

that okay still now coming to the next

28:33:16

one what about deep learning right so

28:33:20

deep

28:33:20

learning is another part of or I can

28:33:23

also say it as a subset of machine

28:33:26

learning now what was the main aim of

28:33:27

deep learning over here here we had to

28:33:30

create multi-layered neural

28:33:33

network

28:33:36

multi-layer neural

28:33:38

network okay multi-layered neural

28:33:41

network now multi-layer neural network

28:33:43

why we specifically

28:33:45

require multi-layer neural network see

28:33:48

we human being wants the application to

28:33:50

perform like how we human being think

28:33:53

right let's say I want an application to

28:33:55

perform like how I am able to teach how

28:33:57

I am able to study in that similar way

28:33:59

if I want to make a machine also learn

28:34:02

in a similar way I have to use

28:34:03

multi-layer neural network right and

28:34:05

that is where deep learning was becoming

28:34:07

famous and this is from 1950s but right

28:34:10

now we have huge amount of data and if I

28:34:13

compare the differences between machine

28:34:15

learning and deep learning is that the

28:34:16

more data I have and I train a deep

28:34:19

learning model the performance also

28:34:21

increases the same thing does not happen

28:34:24

with respect to machine learning

28:34:26

right so that is the reason we are

28:34:27

discussing about multi-layer neural

28:34:29

network and this is where deep learning

28:34:31

come into picture and again they are

28:34:33

different techniques that we have

28:34:34

already learned about you know Ann CNN

28:34:38

RNN these are the basic building blocks

28:34:41

other than this you have seen about many

28:34:43

things like you have object detection

28:34:44

rcnn you have YOLO algorithms in RNN you

28:34:47

have lstm RNN Gru right Transformer B

28:34:51

encoder decoder all these things you

28:34:53

have specifically learned that all are

28:34:55

are part of deep learning these are

28:34:57

solving some specific use cases some

28:35:02

specific use cases right these are

28:35:06

solving some specific use cases right so

28:35:09

this is again deep learning is a part or

28:35:12

subset of machine learning okay now

28:35:15

comes I hope everybody's clear till here

28:35:17

because this I already taught it earlier

28:35:19

also to all of you the reason why I'm

28:35:21

teaching you over here is to make you

28:35:23

understand where does generative I fall

28:35:25

into picture so if you if you are able

28:35:28

to understand till here please give me a

28:35:30

confirmation by writing in the chat yes

28:35:32

no something you're able to understand

28:35:34

over here right so just give me a

28:35:37

confirmation give me a thumbs up okay

28:35:39

give me something hit like for this

28:35:41

specific video so that it reaches many

28:35:43

people to so that you'll be able to

28:35:46

understand because nowadays from the

28:35:48

students who have already made

28:35:49

transition specifically in uron they're

28:35:52

working on generative AI they're working

28:35:54

on llm application they're creating some

28:35:56

amazing application to solve different

28:35:58

different business use cases so that is

28:36:00

why I am basically discussing about all

28:36:02

these things right so I hope everybody

28:36:05

is able to understand tiia perfect so I

28:36:07

I'm able to get the confirmation they

28:36:09

good signs like this and all so

28:36:11

everybody uh is able to understand it

28:36:15

amazing now let's go ahead and

28:36:17

understand where does generative AI fall

28:36:19

into picture again guys now if I

28:36:22

consider generative Ai and what exactly

28:36:24

generative AI we'll discuss in some time

28:36:27

but generative AI will be falling as a

28:36:30

subset of deep learning okay as a subset

28:36:33

of deep planning so this circle that I

28:36:36

am considering is nothing but it is a

28:36:38

generative AI okay now why it falls why

28:36:42

it falls as a subset of deep learning

28:36:45

because at the end of the day we are

28:36:46

using deep learning techniques also most

28:36:49

of the llm models that you'll be seeing

28:36:52

is nothing but is based on two models

28:36:54

one is Transformers another one is Bert

28:36:57

okay these two models are super amazing

28:37:00

models I hope you may have heard about

28:37:02

something called as attention is all you

28:37:05

need right attention is all you need

28:37:12

right so attention is all you need there

28:37:15

you have these amazing models

28:37:17

Transformers and birds this are also

28:37:18

called as encoder decoder sequence to

28:37:20

sequence models these are the base of

28:37:24

many many many gener AI models or llm

28:37:26

models that we will be seeing

28:37:29

okay so all these things you should

28:37:32

definitely know it because these are the

28:37:35

basic building block today we have so

28:37:38

many models in the market we have chat

28:37:40

GPT we have GPT 3.5 we have GPT 4 now

28:37:44

GPT 4 Turbo is also coming right you

28:37:47

have llama models you have Falcon you

28:37:49

have Mistral you have gini right jini

28:37:52

Pro you have Google B pal models many

28:37:55

many models are there in the Market at

28:37:57

the end of the day they most of them

28:37:59

most of them I know most of them has

28:38:01

this as the base model that is

28:38:03

Transformers of bir right and many more

28:38:06

things over here now considering this

28:38:09

people or companies what they do they

28:38:12

train with some different techniques

28:38:13

they add reinforcement learning they do

28:38:15

some type of fine-tuning to to make

28:38:18

their model become much more better so

28:38:20

that is the comparison that is basically

28:38:22

made now recently Google came up with

28:38:25

with gini Pro so it started making

28:38:26

comparison okay it is so much better

28:38:28

than chat GPT sorry GPT 3.5 it is so

28:38:31

much better than this particular model

28:38:33

it is it is able to uh reach mmu of this

28:38:37

much accuracy right human understanding

28:38:39

accuracy is this much reasoning accuracy

28:38:42

is this much all this particular

28:38:44

information is basically the metrics

28:38:46

right at the end of the day the base

28:38:48

that you're specifically using is either

28:38:51

Transformer bird in short you're using

28:38:53

this advanced architecture of the neural

28:38:56

networks and you're training or you're

28:38:58

pumping you're training this models with

28:39:00

huge amount of data and that is where

28:39:03

someone will come and say hey this model

28:39:05

has somewhere around billions of

28:39:06

parameter everybody will get shocked wow

28:39:09

billions of parameter wow amazing nice

28:39:11

great we are going to get a good model

28:39:13

then right but understand the context

28:39:16

when we say billion of parameters that

28:39:18

basically means how much how much

28:39:19

weights is basically considered how many

28:39:21

weights parameter are there how many

28:39:22

bias parameter there how many so many

28:39:24

things are there there and many more

28:39:25

things right I'll be discussing about

28:39:26

gini Pro as I go ahead okay and I will

28:39:29

be showing you some of the accuracy

28:39:30

metrics also as we go ahead once I see

28:39:33

reach the research paper but what

28:39:34

exactly is generative AI I will discuss

28:39:36

about it in some time now there is also

28:39:39

one more thing which is called as llm

28:39:41

models right where large language models

28:39:44

see in generative AI also we have llm

28:39:47

models we have large image

28:39:49

models L IM okay llm and LM llm

28:39:54

basically means large language models

28:39:57

that basically means it will be able to

28:39:59

solve any kind of use cases that is

28:40:02

related to text very much simple so

28:40:05

whenever I talk about llm in short we

28:40:08

are talking about text whenever I'm

28:40:10

talking about large image model we are

28:40:12

talking about

28:40:14

images okay any use cases with that is

28:40:17

with respect to images or video frames

28:40:19

or anything as such okay so this is

28:40:21

nothing but this is called as large

28:40:26

image

28:40:28

models right there is one more thing

28:40:31

where many people may have heard about

28:40:33

it okay and recently gini Pro right it

28:40:36

Google says that gini

28:40:39

Pro is a multimodel what does multimodel

28:40:43

mean multimodel what does it mean it

28:40:47

basically means that it is able to solve

28:40:49

use cases for both that is text and

28:40:53

images text and images it is able to do

28:40:57

both this task okay so that is why it is

28:41:00

basically called as multimodel right

28:41:03

most of the I hope everybody has heard

28:41:06

about a tool called as mid Journey which

28:41:08

is able to generate amazing

28:41:10

images mid Journey right mid journey is

28:41:13

what it is an Li large image model right

28:41:18

mid Journey it is able to create image

28:41:20

it is when you write a text it is able

28:41:22

to create an image gin Pro what it does

28:41:25

is that you give a image it'll be able

28:41:26

to do all the object detection within

28:41:28

then it'll be able to write a blog for

28:41:30

you right so all amazing things are

28:41:32

basically happening now why this is

28:41:34

beneficial for companies because

28:41:35

companies don't have to waste time

28:41:37

startups don't have to waste time to

28:41:39

quickly create some applications that

28:41:41

solves a problem statement before

28:41:44

everything used to happen from scratch

28:41:47

they used to create projects they used

28:41:48

to create models they used to do

28:41:49

finetuning they used to worry about data

28:41:52

they used to do multiple things but now

28:41:54

it has really becomes simplified okay so

28:41:57

I hope everybody is able to understand

28:41:59

about generative AI what exactly is

28:42:01

generative AI I'll just discuss about it

28:42:03

understand this term generative okay and

28:42:07

we will discuss as we go ahead di di is

28:42:09

a large image model yes di is definitely

28:42:13

a large image model yes perfect right so

28:42:18

guys still here if you have understood

28:42:19

please make sure that you hit like it

28:42:21

will motivate me because you want me to

28:42:23

come in the next week also right right

28:42:25

every week Friday we will do a session

28:42:27

where I will be teaching you all the

28:42:29

specific things right so do hit like

28:42:32

let's target that till the end of the

28:42:34

session we should make the like button

28:42:36

hit more than 500 okay I want that right

28:42:39

more than 500 come on you can do it huh

28:42:42

see so nice handwriting in front of you

28:42:44

you should be motivated by seeing this

28:42:46

handwriting not your like a college

28:42:48

professor and writing right I'm using

28:42:49

multiple cols making it much more

28:42:51

interactive and the best thing is that

28:42:54

everything will be available to you I

28:42:55

will also upload this um if you Pro

28:42:59

probably find in the description there

28:43:00

will be a webinar link over there

28:43:02

everything I will try to provide you

28:43:03

over there itself

28:43:05

okay so chat GPT is llm yes chat GPT is

28:43:09

using GPT 3.5 GPT 4.0 those are llm

28:43:13

models large language models if Chad GPT

28:43:15

is using di that basically becomes a

28:43:17

large image model okay perfect great now

28:43:22

let's go ahead and let's talk about so

28:43:24

this is what I gave a brief idea where

28:43:27

does generative AI fit into okay now

28:43:30

let's understand what exactly is

28:43:31

generative AI okay still we are able to

28:43:35

Now understand now what is generative

28:43:39

AI okay let's let's go

28:43:42

ahead I'll talk about Lang chain why

28:43:45

Lang chain chain lit Lama index where

28:43:47

does it fall first of all let's start

28:43:49

with some Basics okay and here again two

28:43:53

things are obviously going to come

28:43:57

large

28:44:00

language

28:44:02

models and the second one is

28:44:06

large image models okay so let's go

28:44:10

ahead and let's discuss about

28:44:16

this great

28:44:19

now when we are discussing about large

28:44:21

language models and large image models

28:44:23

so first of all the question question

28:44:25

that you should be asking fine

28:44:28

Krish what exactly is generative AI why

28:44:31

why the word

28:44:33

generative why the word generative at

28:44:35

the first instance so see some years

28:44:39

back we used to use traditional machine

28:44:41

learning algorithm see over here first

28:44:44

of all we started with something called

28:44:47

as

28:44:48

traditional ml

28:44:52

algorithms okay we started like this so

28:44:55

in this ml algorithm what we did is that

28:44:59

we had to perform feature engineering we

28:45:02

had to probably create a model right

28:45:04

train

28:45:05

model right we had to probably do fine

28:45:08

tuning

28:45:11

right right and then as we went we

28:45:14

finally did the deployment now from

28:45:16

traditional machine learning algorithm

28:45:18

why did we first of all move to deep

28:45:21

learning algorithm again traditional I'm

28:45:24

I'm writing over here as traditional DL

28:45:30

algorithms okay now we move towards

28:45:34

traditional deep learning

28:45:36

algorithms okay why did we move over

28:45:40

here we saw that when we were increasing

28:45:45

the data set even though we increase the

28:45:48

data set and the best way to show this

28:45:52

diagram is basically to create like this

28:45:54

see

28:45:55

so this is my machine learning let's say

28:45:57

this is my graph this graph is with

28:46:00

respect to two thing data set and

28:46:06

performance okay data set and

28:46:10

performance now over

28:46:12

here with machine learning algorithm

28:46:15

with traditional machine learning

28:46:16

algorithm you could see that when data

28:46:19

was increasing after one point of time

28:46:22

the performance of the traditional

28:46:23

machine learning algorithm started

28:46:26

bending in this way that basically means

28:46:27

even though I increased the data at

28:46:29

certain point of time right then also my

28:46:33

performance was not

28:46:34

increasing right but now this was the

28:46:39

problem now with deep learning

28:46:40

algorithms when I say deep learning

28:46:41

algorithms I'm specifically using over

28:46:43

here multi-layered neural network okay

28:46:47

multi-layered neural network now with

28:46:49

respect to multi-layered neural

28:46:51

network as I started increas increasing

28:46:54

the performance or as I started

28:46:56

increasing the data set the performance

28:46:58

also started

28:47:00

increasing and this was with DL

28:47:07

algorithms and this

28:47:10

was with

28:47:13

traditional ml

28:47:18

algorithms this was with traditional ml

28:47:22

algorithms now that is the reason deep

28:47:25

learning become became very very much

28:47:28

famous so most of them started solving

28:47:32

problems such as

28:47:35

supervised

28:47:37

unsupervised machine learning techniques

28:47:39

or deep learning techniques or problem

28:47:40

statement with the help of deep learning

28:47:42

algorithms and now you know right from

28:47:45

object detection to NLP let it be any

28:47:48

task from computer

28:47:51

vision to

28:47:53

NLP to any task you're also able to do

28:47:57

with the traditional deep learning

28:47:59

algorithm

28:48:01

right now till here everything was good

28:48:03

companies were working nice hugging face

28:48:05

had so many deep learning algorithms

28:48:07

probably now it has deep learning

28:48:09

algorithms for any task that you want

28:48:11

any task let it be any any task for any

28:48:15

task you have a traditional deep

28:48:17

learning algorithm available where you

28:48:19

can download the model where you can do

28:48:21

fine-tuning where you can use transfer

28:48:23

learning techniques and you can probably

28:48:25

create your own application now this is

28:48:28

where one amazing thing

28:48:31

happened and I'll tell you that was the

28:48:33

time you know uh where blockchain was

28:48:36

also becoming very famous when

28:48:38

blockchain hype was there you know

28:48:40

mainly all the people were

28:48:42

focused Mo most of the audience most of

28:48:44

the people most of the researcher were

28:48:46

also focused on web3 but they were also

28:48:47

some good set of researchers who are

28:48:50

focusing on something called as

28:48:52

generative AI now now here is what I'm

28:48:55

going to draw a diagram for you to make

28:48:57

you understand what exactly is

28:48:59

generative AI first of all I will go

28:49:02

ahead and write deep learning over

28:49:04

here as you know generative AI is a

28:49:06

subset of deep learning

28:49:09

right now in generative AI with all the

28:49:13

traditional deep learning

28:49:15

algorithms we usually say this

28:49:19

as

28:49:22

discriminative now you'll understand

28:49:24

what is the difference between

28:49:26

discriminative models and generative

28:49:32

models so mostly all the Deep learning

28:49:35

algorithms is divided based on these two

28:49:38

important

28:49:39

techniques one is the discriminative

28:49:41

technique one is the generative

28:49:43

technique okay now in discriminative

28:49:46

technique which all task you are focused

28:49:50

on

28:49:52

doing first most of our task like

28:49:56

classify

28:49:59

predict right or object

28:50:04

detection or any supervised unsupervised

28:50:08

technique here the data

28:50:13

set these models are basically trained

28:50:18

on trained on labeled data

28:50:23

set

28:50:25

right and this

28:50:27

discriminative is with

28:50:31

traditional DL

28:50:34

algorithms okay traditional deep

28:50:37

learning algorithms over here we

28:50:39

specifically use traditional deep

28:50:42

learning algorithms now let's understand

28:50:46

about generative model and this is where

28:50:48

your I you will get a clear idea about

28:50:50

it what exactly I'm going to talk about

28:50:53

in generative models the task I'm just

28:50:56

going to write the task here the task is

28:51:00

just to

28:51:03

generate new

28:51:07

data trained

28:51:10

on trained

28:51:13

on some

28:51:17

data okay here what is the main task of

28:51:21

generative model is that the word

28:51:23

generative now you'll understand the

28:51:26

main importance of this word generative

28:51:28

here you are generating new data trained

28:51:31

on some data set okay

28:51:35

example write a write an essay on

28:51:41

generative AI if I ask this

28:51:44

question it will be able to answer let's

28:51:47

say it has been trained with some huge

28:51:49

amount of data that is available in the

28:51:50

internet now I will go ahead and ask

28:51:53

write an essay on generative AI should

28:51:55

be able to give me the answer now let me

28:51:58

go ahead and talk about one simple

28:52:02

example so that you get a clear

28:52:05

understanding what exactly I'm talking

28:52:07

about with respect to generative AI a

28:52:10

real world example because people

28:52:12

usually like this kind of real world

28:52:13

example okay and with this real world

28:52:16

example you will be also able to

28:52:18

understand multiple things right so

28:52:21

let's go ahead and understand it with

28:52:23

real world examp example and that is

28:52:25

where you'll be able to understand about

28:52:26

generative AI so how does a generative

28:52:31

AI task look like okay let's imagine

28:52:35

okay Kish is over here

28:52:40

okay let's imagine not let's not take

28:52:43

Kish let's take some person is over

28:52:50

here and this is relatable okay

28:52:54

this person is in 12th

28:52:57

standard let's say it clears NE exam

28:53:01

neat exam and now it is basically doing

28:53:05

mbbs mbbs mbbs is specifically for

28:53:09

becoming doctor okay now over here you

28:53:13

will be able to see that how many years

28:53:16

this person will probably learn in the

28:53:20

college 4+ 1 right I guess 4 plus 1 four

28:53:23

years of learning learning one year of

28:53:25

internship so after learning for 4 plus

28:53:28

1 years will it be trained or will it

28:53:31

learn from multiple book sources at

28:53:33

least thousands of

28:53:35

books yes or

28:53:38

no will it will this person learn from

28:53:40

many books at not tell me guys just give

28:53:43

me a quick confirmation can you just

28:53:45

read one book and become a doctor no

28:53:47

thousands of books right thousand of

28:53:51

books right so this person will be

28:53:54

spending those five years reading

28:53:56

thousands of books and after reading

28:53:59

thousand books okay don't fight on the

28:54:01

number if I'm saying thousands that

28:54:03

basically means many books okay I know

28:54:06

some people will say sir how come

28:54:07

thousands are in my whole life I did not

28:54:09

learn thousand okay many

28:54:13

books

28:54:14

okay many books so once he or she or

28:54:19

this person learns from many books

28:54:21

spends those 4 plus one year one year

28:54:23

here with internship so internship

28:54:25

knowledge is also going to come over

28:54:26

there now what is the final aim this

28:54:30

becomes the this person becomes a

28:54:33

doctor so let's consider this is my chat

28:54:38

GPT with

28:54:40

doctor doctor chat

28:54:43

GPT okay now tell me if you go and ask

28:54:48

this doctor any

28:54:51

question any question related

28:54:54

to any medical

28:54:57

problem generic medical

28:55:00

problem generic medical problem will you

28:55:03

be able to get the

28:55:06

answer will you be able to get the

28:55:09

response yes yes or

28:55:12

no now is it necessary the doctor will

28:55:14

say only with accordingly to the books

28:55:16

only no it can create his own answer

28:55:19

you'll say that hey I'm feeling I'm not

28:55:21

feeling well you know I'm having this

28:55:23

kind of symptoms the doctor will come up

28:55:24

with his own word because he has all the

28:55:26

knowledge from all those books all those

28:55:28

experience that he has put in his

28:55:29

internship all the people he has

28:55:31

actually treated in those five

28:55:34

years right it will be able to provide

28:55:37

the response right so what what what is

28:55:41

this doctor right now can I say this

28:55:43

doctor can act like an llm model

28:55:46

now large language model who is an

28:55:49

expert in

28:55:52

medicine

28:55:54

who is expert

28:55:55

in medicine right this is just like a

28:55:59

large language model who is an expert in

28:56:01

medicine and this is what recently openi

28:56:03

is trying to do right what is open

28:56:05

trying to do over here openi is planning

28:56:08

to come up with something called as GPT

28:56:12

store have you heard about this GPT

28:56:14

store GPT store basically means what you

28:56:17

can now create your own llm

28:56:20

models and train it with your own custom

28:56:26

data right and on the go you can create

28:56:29

this particular app right in open that

28:56:32

option is already there right I have

28:56:34

also tried it out and it works

28:56:36

absolutely fine I will tell those model

28:56:39

how it has to

28:56:42

behave now here you're spending 4 plus 1

28:56:45

years and you are becoming a doctor now

28:56:48

this becomes an llm model who's an

28:56:49

expert in medicine now the next step of

28:56:53

this doctor is to become an MD now there

28:56:55

are some questions which this doctor

28:56:57

will not be able to understand which the

28:57:00

doctor will not be able to give the

28:57:01

proper answer it may give you a generic

28:57:04

answer so what we need to do we need to

28:57:06

train this llm model again with more

28:57:08

data and this time the

28:57:11

specialization right you want to become

28:57:13

an MD in cardiology you want to become a

28:57:15

MD in Ortho you want to become a MD in

28:57:18

some other field so that expertise will

28:57:20

again G when this person will be trained

28:57:23

with more three to three two to three

28:57:25

years of books

28:57:28

right along with experience where you

28:57:32

given those kind of task I hope you're

28:57:34

getting it right guys I'm trying to use

28:57:36

many more examples that is the most

28:57:38

important thing the more examples you

28:57:41

see the more well you'll be able to

28:57:43

understand so at the end of the day what

28:57:46

this doctor is doing it is able to

28:57:47

generate its own response based on the

28:57:50

problem statement it sees

28:57:54

yes based on the problem

28:57:58

statement so this is how we are trying

28:58:00

to learn it tomorrow all you have to do

28:58:03

if you're working in any business in any

28:58:05

companies tomorrow what you will do you

28:58:07

will take any model you can f tune with

28:58:10

your own data set and that particular

28:58:12

model can behave accordingly based on

28:58:14

the company's use case at once right so

28:58:17

this is how things goes ahead right so

28:58:19

if you have understood till here please

28:58:21

give some thumbs up sign I hope

28:58:22

everybody's able to understand please

28:58:24

give it a thumbs up say something Krish

28:58:26

I'm happy I want to see some happy faces

28:58:29

please do hit like please do make sure

28:58:31

that you subscribe the channel and I

28:58:33

want from every one of you you have to

28:58:35

share these videos

28:58:37

everywhere right we are trying to

28:58:40

democratize AI education over here

28:58:42

everybody should know the importance of

28:58:44

AI because tomorrow trust me you going

28:58:48

to use it somewh the other way right

28:58:51

anywhere you are going to use it no one

28:58:53

is going to say that you cannot use it

28:58:55

you have to use it right many people

28:58:59

will say hey there is no job by use it

28:59:02

in your personal personal day-to-day

28:59:05

activities and don't worry about job if

28:59:07

you're good at something whether you are

28:59:09

from any technology you will be able to

28:59:11

get jobs all you have to do is that have

28:59:14

that knowledge right if you're able to

28:59:16

have that specific things trust me it is

28:59:18

very good easy to learn and it is

28:59:20

absolutely when you also try to convey

28:59:23

this information to someone right then

28:59:25

you'll be able to understand that how

28:59:27

important all this technology is

28:59:28

tomorrow in a company a business use

28:59:31

cases getting solved and you provide a

28:59:33

solution wherein you don't have to spend

28:59:35

much money in those use cases right

28:59:39

those people will keep you instead of

28:59:41

anyone right and they'll give you most

28:59:42

of the problems to solve right so in

28:59:45

this way so please make sure that you

28:59:46

hit like share with all the all the

28:59:48

friends some or the other way someone it

28:59:51

may be helpful for anyone who will be

28:59:52

learning over here okay now let's go

28:59:56

ahead to The Next Step where here we

29:00:00

have understood about generative AI so

29:00:02

what is the main aim of generative AI

29:00:03

the main aim of generative AI is to

29:00:05

generate some content now let me talk

29:00:08

about some of the use cases right so use

29:00:11

cases I will be talking about and use

29:00:13

cases we will discuss with respect to

29:00:14

both techniques one is discriminative

29:00:17

technique discriminative technique

29:00:19

whenever the name comes discriminative

29:00:21

it is going to discriminate based on the

29:00:24

data it will give you some kind of

29:00:26

output right some classification problem

29:00:29

regression problem something right so

29:00:31

first technique is nothing

29:00:33

but discriminative technique in this

29:00:36

discriminative technique let's say I'm

29:00:39

taking a use case I have a data set

29:00:42

which which says types of

29:00:46

music types of music so here I will try

29:00:51

to create

29:00:54

a discriminative ml discriminative model

29:00:58

discriminative DL

29:01:00

model and this work will be to basically

29:01:04

classify whether this music belongs to

29:01:07

rock whether this music belongs to

29:01:10

classical or whether this music belongs

29:01:13

to

29:01:15

romantic right so this is basically

29:01:18

discriminative technique right now

29:01:21

coming to the next one which is B

29:01:23

basically called as generative

29:01:27

technique generative technique let's

29:01:30

consider I have a music again same use

29:01:33

case only we'll try to do let's say this

29:01:35

is my music okay it looks like a hard

29:01:37

bit but I'm considering it as a music

29:01:40

and this music I will train it my my

29:01:44

generative model how the training will

29:01:46

happen I will talk about it so let's say

29:01:48

this is my generative model and now the

29:01:51

generative model will talk askask is to

29:01:53

basically generate a new

29:01:58

music this is just one use case of

29:02:00

generative AI I'm not worried about

29:02:02

whether it is large image model large

29:02:04

language model and all I'm just showing

29:02:06

you with respect to do same use cases

29:02:09

what discriminative models will do and

29:02:11

what generative models will specifically

29:02:12

do right so in short we are generating

29:02:16

new content this is super important this

29:02:18

is what this is new content clear every

29:02:22

everyone

29:02:24

happy yes

29:02:28

everyone just give me yes or no if you

29:02:31

able to understand this

29:02:34

things yeah so till here everybody's

29:02:37

clear I hope you got an idea with

29:02:39

respect to discriminative and generative

29:02:42

technique okay now is the main question

29:02:46

how llm models are trained now you'll

29:02:49

understand

29:02:51

this

29:02:54

okay guys don't worry Lang chain Lama

29:02:57

index I will teach what exactly it is

29:03:00

okay

29:03:02

how

29:03:04

llm models are

29:03:10

trained just wait B till the end of this

29:03:14

session you'll understand all these

29:03:16

things right and once you understand it

29:03:18

it will be very good amazing you'll get

29:03:21

a clear idea and that is what is my

29:03:22

target Target today tomorrow if somebody

29:03:24

ask a question related to generative llm

29:03:26

models you should be able to understand

29:03:29

it okay perfect now how are llm models

29:03:33

trained so let me just go ahead and use

29:03:37

one open source model llama 2 paper Okay

29:03:41

so llama 2 is a model that

29:03:44

is that is generated by meta okay So

29:03:47

Meta has trained this model and this is

29:03:49

the research paper

29:03:51

okay this is this is the research paper

29:03:53

the reason why I'm showing you this

29:03:54

research paper because based on this

29:03:58

model only I will teach you how this

29:04:00

model may have also trained

29:04:03

okay yeah yeah this video will be

29:04:05

available in the future in the YouTube

29:04:07

in the dashboard along with all the

29:04:09

materials that I'm writing that I'm

29:04:11

showing to you okay so don't worry focus

29:04:13

on the class now over here see there are

29:04:17

three important information that you can

29:04:19

see from this content okay one is the

29:04:24

pre-training right it talks more about

29:04:27

the pre-training data it talks about the

29:04:29

training data details and it talks about

29:04:32

Lama to pre-train model evaluation the

29:04:35

next one is it talks about fine tuning

29:04:37

see fine tuning here we are going to

29:04:40

discuss the supervised finetuning please

29:04:42

remember this word okay supervised

29:04:46

finetuning super important super amazing

29:04:49

technique altoe and I will break down

29:04:51

this technique and make you understand

29:04:54

how training usually happens everything

29:04:56

will be taught in this session then the

29:04:58

third one is something called as

29:05:00

reinforcement learning with human

29:05:02

feedback R

29:05:05

lhf please remember this techniques

29:05:07

because same technique is also used chat

29:05:09

GPT models supervised fine-tuning

29:05:13

reinforcement learning with human

29:05:15

feedback along with there is something

29:05:18

called as reward system also which I

29:05:20

will be

29:05:21

discussing so the reason why I'm showing

29:05:24

you this research paper because this

29:05:27

research paper are very easy to

29:05:29

understand if you have some prerequisite

29:05:31

knowledge about Transformer about

29:05:34

something about some accuracy concept

29:05:36

some performance metrics concept if you

29:05:38

know that much that will be more than

29:05:40

sufficient okay so let me go ahead and

29:05:43

show you so if I go to introduction see

29:05:47

large language model that is talking

29:05:49

about this this this Lama 2 now llama 2

29:05:52

has been it scales up to 70 billion

29:05:56

parameter okay there was three specific

29:05:59

models in Lama 2 which we'll discuss uh

29:06:02

it is with respect to 7 billion 13

29:06:04

billion and 70 billion

29:06:06

parameters here I am just trying to show

29:06:08

you some important information and based

29:06:11

on this only I will teach you okay now

29:06:14

let's understand

29:06:16

this so this is how entirely it happens

29:06:20

you have pre-training data you have self

29:06:23

supervised learning you have Lama 2 you

29:06:26

have sft supervised finetuning you have

29:06:30

rejection sampling proximal policy

29:06:32

optimization because everything will be

29:06:34

taught this is nothing but reinforcement

29:06:37

learning with human feedback and based

29:06:39

on this particular feedback we assign

29:06:43

something called as safety reward model

29:06:45

and helpful reward model everything I'll

29:06:47

teach you don't worry just see the

29:06:49

diagram focus on the diagram and try to

29:06:51

just see this

29:06:54

okay okay over here so every component

29:06:58

that you're seeing I will break it down

29:07:00

and I'll explain you now where does this

29:07:03

model take the predating data from so

29:07:06

here you can probably see our model

29:07:10

right is everybody able to see

29:07:13

this when we say it parameter train from

29:07:16

17 billion yes so everybody's able to

29:07:19

see

29:07:21

this

29:07:23

yeah so on pre-training data includes a

29:07:27

new mix of data from publicly available

29:07:30

sources so from where they have taken

29:07:33

the data from publicly overed sources

29:07:35

which does not include data from meta

29:07:37

products or

29:07:38

Services okay we made an effort to

29:07:41

remove data from certain sites known to

29:07:43

contain a high volume of personal

29:07:44

information about private

29:07:47

individual so from where it has taken

29:07:49

the data in short this is all lie I gu

29:07:52

yes they have taken the data from

29:07:54

wherever it is they are saying we made

29:07:56

an effort they're saying we made an

29:07:59

effort to remove data from certain sites

29:08:02

effort you know how much effort it is

29:08:04

there okay so understand okay efforts

29:08:08

then we trained on two trillion tokens

29:08:10

of data as provides a good performance

29:08:13

cost trade up so two trillion tokens of

29:08:17

data it has been trained in okay so here

29:08:21

the next thing see see see see see we

29:08:24

adopt most of the pre-training setting

29:08:26

and model architecture from Lama 1 we

29:08:28

use the standard Transformer

29:08:31

architecture they by Transformer

29:08:35

architecture see tomorrow if you give me

29:08:38

a chance I can also create a I can also

29:08:40

create an llm

29:08:42

model creating an llm model is not very

29:08:46

difficult but the main problem will be

29:08:50

cost of the GPU

29:08:54

how much cost of the GPU it will take

29:08:56

what should be a team size to do

29:08:57

reinforcement learning over there

29:09:00

everything in that particular thing that

29:09:01

cost will be doing so you'll be able to

29:09:03

see only big companies can only afford

29:09:06

all these things who have billions and

29:09:08

billions of dollars in fundings and all

29:09:11

tomorrow if you say whether I can also

29:09:14

do it yes the answer is you should have

29:09:16

just money to do it because you require

29:09:19

those huge gpus the gpus cost training

29:09:22

time it will cost how much data you

29:09:24

require they will you'll also require

29:09:26

people for working for you who will be

29:09:28

doing that annotation task labeling task

29:09:30

indexing task reinforcement

29:09:33

task right but for this you require a

29:09:36

huge amount of money tomorrow if someone

29:09:38

comes and say hey take this much money

29:09:39

create your own model we can do that no

29:09:42

worries right but in India we don't

29:09:45

Focus much on Research right we focus

29:09:47

much

29:09:48

on we focus much on what solving

29:09:51

business use case and trying to earn

29:09:53

Revenue out of it okay research I have

29:09:56

not seen much companies who are doing

29:09:57

research that much okay so

29:09:59

infrastructure cost is there so see

29:10:00

Transformer architecture so if anybody

29:10:02

knows about Transformer architecture

29:10:04

done you'll also be able to do it apply

29:10:07

pre-normalization some techniques will

29:10:09

be there code will be available you can

29:10:10

also do it okay now if Lama 2 is an open

29:10:14

source you can also use the same code

29:10:15

and try to do it okay then we trained

29:10:18

using adamw Optimizer see these all

29:10:20

videos I've already created explained

29:10:22

you like anything what Adam Optimizer

29:10:25

how does it work this this everything is

29:10:27

Basics I'm not teaching I'm not showing

29:10:30

you anything

29:10:31

new right beta 1 is there beta 2 is

29:10:34

there this is there we we use a cosine

29:10:36

learning rate what is cosine learning

29:10:38

warm-up step DK final running rate

29:10:40

everything is same nothing new it's like

29:10:44

build sand sand sand and make a castle

29:10:47

okay I have sand I have bricks I will

29:10:50

combine them and make a uh make a five

29:10:53

star hotel in short right and everybody

29:10:56

cannot make a five star hotel right who

29:10:58

has money they can make it who has money

29:11:00

they can make a huge Bungalow right a

29:11:03

Maharaja Palace something right they can

29:11:05

do that so I hope you're able to

29:11:07

understand all this things you need to

29:11:09

have money for that okay so here are

29:11:13

there Lama one had come up with 17

29:11:14

billion 13 billion 33 billion 65 billion

29:11:16

now Lama 2 is coming up with 7 billion

29:11:18

13 billion 34 billion 70 billion now why

29:11:21

this billion is increased inreasing why

29:11:23

this parameters are increasing some f

29:11:25

tuning will be done more data will be

29:11:27

added more data will be included more

29:11:29

reinforcement will be done multiple

29:11:32

things will be put up over there and

29:11:34

that is how your parameters will

29:11:36

increase and there is no other way the

29:11:38

parameter is not going to increase over

29:11:40

there right parameter will increase over

29:11:42

here itself right something you do in

29:11:45

that more parameters will get added more

29:11:47

weights more bias it's all about more

29:11:50

weights and more bias okay less Dropout

29:11:54

more Dropout more normalization less

29:11:56

normalization that that way only

29:11:58

parameters are getting added you may be

29:11:59

thinking parameters is getting added I

29:12:01

think they have put a rocket launcher

29:12:03

inside that model no nothing like

29:12:06

that just they have added more data set

29:12:08

maybe more fine-tuning techniques and

29:12:11

because of that more weights more bias

29:12:13

are getting added that's it right don't

29:12:16

think that no something is happening the

29:12:18

model will now go to Mars no nothing

29:12:20

like that okay so this is what is all

29:12:23

about Lama 2 okay

29:12:25

now this is my training loss you have

29:12:28

seen in many many videos in deep

29:12:29

learning how the training loss will be

29:12:31

shown over here right so training loss

29:12:34

is over here see training Hardware we

29:12:36

trained our models on meta research

29:12:38

super

29:12:40

cluster meta research super cluster okay

29:12:43

by this name only gpus both clusters use

29:12:46

Nvidia a00 let's let's see what is

29:12:48

NVIDIA a00

29:12:51

cost

29:12:53

let's see

29:12:55

okay Nvidia 800 powering many of this

29:12:58

application this is just roughly $10,000

29:13:02

chip just $10,000 chip just

29:13:07

imagine see 27 L 27 lakhs dollar is

29:13:12

NVIDIA Amper

29:13:14

800 who will be able to do which startup

29:13:17

will be able to do this much money will

29:13:18

be able to invest this much

29:13:20

money tell me

29:13:23

the reason why I'm showing you this

29:13:24

because the research paper talks more

29:13:26

many things about it right so over here

29:13:29

they have used Nvidia a00 you SE in the

29:13:32

cost of

29:13:33

it amazing right how much is this cost

29:13:36

27 lakh I guess sorry

29:13:41

27,000 and more chips if you try to put

29:13:43

up more chips over there the cost will

29:13:45

keep on increasing right we are still we

29:13:49

are our laptop has RTX 490 that

29:13:52

basically means we are our laptop is

29:13:53

very powerful there will be electricity

29:13:55

cost involved there will be multiple

29:13:56

things

29:13:57

involved

29:13:59

right so everything is over here you can

29:14:02

probably see with respect to this right

29:14:04

it is somewhere around 27k sorry not 27

29:14:06

lakh it is 27k as as I just saw 0. I did

29:14:11

not leave that part okay so but you can

29:14:15

just understand the cost is keep on

29:14:16

increasing okay so here you can see that

29:14:19

RSC uses Nvidia Quantum in Infinity band

29:14:22

where product cluster is equipped with

29:14:24

Roc you can probably see

29:14:27

this C see see see CO2 emission during

29:14:30

pre-training you have to also give this

29:14:32

information if you want to publish the

29:14:33

research paper total GPU time required

29:14:35

for required for training each model

29:14:38

power consumption PE power Peak capacity

29:14:40

per CPU device for gpus see how much

29:14:43

carbon is emitted right 7B is this

29:14:47

much power consumption 400 watt 400 watt

29:14:51

350 watt 400 wat total total GPU hours

29:14:56

take 33 lakh 31,000 no no 33 laks 11,000

29:15:02

hours GP

29:15:05

hours who has this much time guys if a

29:15:07

startup in India will spend this much

29:15:09

time in training

29:15:12

done I don't know this is how many years

29:15:15

let's say 24 into 12 uh 24 into 365 just

29:15:20

do how many hours will be there how many

29:15:22

years it has basically trained right

29:15:25

carbon P for print pre-training and all

29:15:27

these information are basically there

29:15:29

right and then here also you can

29:15:31

probably see the comparison size Code

29:15:33

common sense reasoning World Knowledge

29:15:35

reading comprehension math mlu mlu is

29:15:37

basically human level understanding uh

29:15:39

BBH and AGI right now I've have told all

29:15:42

this information now let's understand

29:15:45

how this models are basically trained

29:15:47

how llm models are trained okay so till

29:15:50

here everybody happy

29:15:53

yes everybody happy with the teaching

29:15:56

that I'm actually doing so now we are

29:15:58

going to move towards how llm models are

29:16:00

trained and we will discuss it step by

29:16:02

step so guys clear or

29:16:05

not clear or not just tell me give me a

29:16:09

quick

29:16:10

information so here I'm going to

29:16:12

basically write the stages

29:16:19

of stages of

29:16:28

stages of training so first information

29:16:31

here I specifically

29:16:35

have I will just

29:16:38

draw the stage

29:16:42

one so this is my stage one based on

29:16:45

that research paper I'm basically going

29:16:47

to draw okay so this is nothing

29:16:50

but generative

29:16:53

pre

29:16:55

tring okay generative pre-training

29:16:59

second

29:17:09

stage so second stage is nothing but

29:17:16

supervised

29:17:18

fine tuning which we also say it as SF

29:17:21

the same information what is written

29:17:24

over there that research paper same

29:17:26

thing I'm writing third

29:17:31

stage third stage is

29:17:34

what

29:17:40

reinforcement

29:17:44

through human feedback this is my third

29:17:49

stage Okay so initially in this stage in

29:17:54

generative

29:17:56

pre-training we give huge data so this

29:17:59

can be so any any llm model basically

29:18:03

takes internet Text data or any document

29:18:07

Text data in PDFs in all all those

29:18:10

formats and here we specifically create

29:18:13

or use this generative pre-

29:18:15

technique now generative pre-training

29:18:17

basically means here specifically we use

29:18:20

transform architecture

29:18:25

model Transformer of bir architecture

29:18:27

model the outcome of this is what the

29:18:31

outcome of this

29:18:34

is the outcome of this is we basically

29:18:38

say it

29:18:39

as

29:18:41

base let's say if I probably

29:18:46

consider if I probably

29:18:50

consider so I will write this is my

29:18:54

base Transformer

29:18:59

model what is this the base Transformer

29:19:02

model okay now this base Transformer

29:19:05

model is then base Transformer model

29:19:07

basically means whatever Transformer I

29:19:10

basically trained on I will basically

29:19:11

say this as base Transformer model okay

29:19:14

now the base transform model is in turn

29:19:17

connected with supervised fine tuning

29:19:19

because same model will be taken and and

29:19:21

supervised fine tuning will be done on

29:19:23

top of it

29:19:25

okay top of it right now this understand

29:19:28

this base transform model will be able

29:19:30

to do various task like text

29:19:31

classification text summarization

29:19:34

multiple things it will be able to do

29:19:36

okay now here only we will not keep it

29:19:38

in case of uh llm model we will take it

29:19:41

to the next step the next step is

29:19:44

supervis finetuning now here what we are

29:19:47

specifically going to do we are going to

29:19:50

use

29:19:52

human trainers

29:19:55

also we are going to involve human

29:19:58

trainers to put some kind of

29:20:04

conversation some kind of conversation

29:20:06

and here we will create some more custom

29:20:09

data this is important to understand

29:20:12

here we will try to create some more

29:20:14

custom

29:20:16

data right so some more custom data will

29:20:19

be created in this case in this

29:20:21

particular step and those custom data

29:20:25

which is created it is created basically

29:20:27

by whom by human trainers I will talk

29:20:30

about what exactly is human trainer when

29:20:32

I probably Deep dive more into it okay

29:20:36

then it based on this custom data we

29:20:38

will train the specific model and the

29:20:40

outcome of this

29:20:42

model outcome of the model will

29:20:46

be okay just a

29:20:49

second oops it got closed let's see

29:20:52

whether it is saved or

29:20:57

not I hope so it should be saved oh my

29:21:03

God okay apologies the system got

29:21:06

crashed I don't know what happened

29:21:09

because of that the entire material got

29:21:15

deleted

29:21:18

sad can't help

29:21:21

okay so how much content I had actually

29:21:23

written I don't know whether it's the

29:21:25

system got crashed or the scribble

29:21:28

notebook automatically got

29:21:30

deleted sad to hear about it but it's

29:21:34

okay I don't think so anywhere it

29:21:38

is okay I don't

29:21:43

know generative AI the materials got

29:21:47

deleted I'm extremely sorry I don't know

29:21:50

what happened over here but I'm not able

29:21:53

to see

29:21:54

that materials got deleted yeah okay no

29:22:01

worries anyhow you'll be able to see in

29:22:03

the recordings so don't worry about that

29:22:05

uh let me continue

29:22:09

okay let me continue okay okay now let's

29:22:12

go step by step I was just talking about

29:22:14

some important things over there so

29:22:17

first step I will go with respect to

29:22:18

stage one okay so stage one

29:22:28

generative

29:22:30

pre training okay this is basically my

29:22:33

stage

29:22:34

one now what all things we basically

29:22:37

discussed in

29:22:40

this okay in generative pre-training

29:22:44

what we specifically do is that we use

29:22:47

Transformer architecture okay so here

29:22:50

what we are doing

29:22:51

we basically

29:22:53

use

29:22:59

Transformers Super beneficial for NLP

29:23:01

task and then along with this we take

29:23:05

Internet Text data and document Text

29:23:08

data so this is nothing but

29:23:12

internet Text

29:23:14

data

29:23:16

and

29:23:18

document Text data

29:23:22

okay and this is what is my stage

29:23:26

one okay stage one now once we train

29:23:29

with this specific Transformer we what

29:23:32

we get we get

29:23:35

base

29:23:37

Transformer

29:23:39

model we get base Transformer model now

29:23:43

what this base Transformer model is

29:23:46

basically is Cap capable of right what

29:23:50

this base Transformer model is capable

29:23:52

of you need to understand this specific

29:23:54

thing okay this base Transformer

29:23:58

model is capable of doing

29:24:01

task here I will write down all the

29:24:05

task number

29:24:06

one text

29:24:17

summary I will save this saving this is

29:24:20

always better so that if it gets deleted

29:24:23

I can open it so the task which is able

29:24:26

to do is like task text

29:24:30

summary sentiment

29:24:35

analysis third task can be something

29:24:38

like text

29:24:43

uh word

29:24:45

completion I'm writing some

29:24:48

task fourth task is basically like text

29:24:53

translation so all these things it will

29:24:55

be able to do it all this task this

29:24:59

model will be capable to do it but what

29:25:02

is our maining when we make sure that we

29:25:05

have a generative AI our expectation is

29:25:09

basically to create a model which will

29:25:12

be able to do chat and

29:25:15

conversation right this is what is our

29:25:17

main

29:25:18

name right but what we have achieved we

29:25:22

have achieved this right by using this

29:25:24

technique we have achieved this but what

29:25:27

is our goal our goal is to achieve this

29:25:31

right this is my goal so that is the

29:25:34

reason we just don't stop in stage one

29:25:38

we go to next stage that is stage two

29:25:42

now in stage two see stage one it is

29:25:44

very much simple we have used amount of

29:25:46

data we make sure that we do that

29:25:48

labeling whatever is required we train

29:25:50

it with the Transformer we create a base

29:25:53

Transformer model this base Transformer

29:25:55

model is able to do this thing but it is

29:25:58

not able to do this but this is our goal

29:26:02

goal of generative AI is this one right

29:26:04

this is what is our main aim goal of

29:26:07

generative AI right this is what a

29:26:09

generative AI does agree

29:26:13

everyone this is what generative AI does

29:26:16

and this is what is my goal agree or not

29:26:18

everybody do you agree if you AG agree

29:26:21

please do make sure that you hit a

29:26:22

thumbs up okay now to make a generative

29:26:25

AI on top of this I need to do some more

29:26:27

thing and that is where I go to my stage

29:26:30

two so this second step is basically

29:26:34

my stage

29:26:37

two what exactly stage two now what

29:26:41

exactly stage two stage two I've already

29:26:43

told you it is nothing but from the

29:26:45

research paper also I've told you it is

29:26:47

nothing but it is basically super

29:26:52

supervised fine tuning which we also say

29:26:55

it as

29:26:58

sft now what exactly supervised fine

29:27:01

tuning what exactly this is this is the

29:27:05

second round now in supervis fine tuning

29:27:08

what happens now see this is the most

29:27:11

important step

29:27:14

okay we require humans in this

29:27:19

step

29:27:23

humans now in human what we

29:27:26

do we create request we make some set of

29:27:31

people sit over here so this will be my

29:27:33

human

29:27:35

agent this human agent will send some

29:27:38

request just like in a chat bot how we

29:27:41

send it and based on this

29:27:45

request based on this

29:27:48

request we generate an idle response and

29:27:52

this idle response is given by another

29:27:54

human

29:27:56

agent it is just like a chat

29:27:59

conversation let's say I have I have

29:28:02

I've set I have made one person sit over

29:28:05

here one person sit over here when this

29:28:07

person asks a question this person will

29:28:08

answer the

29:28:10

question then similarly next request

29:28:12

will be created then next response will

29:28:16

be

29:28:17

created then next request will be

29:28:20

created then next response will be

29:28:22

created so what is basically happening

29:28:25

this human agent is basically giving the

29:28:29

request this human agent is basically

29:28:31

giving the

29:28:33

response right idle response when I say

29:28:35

idle basically means whatever is the

29:28:37

question based on the question we are

29:28:39

giving some kind of answers this way we

29:28:42

will set up our

29:28:45

sft training data

29:28:49

set so this will be a label data set now

29:28:52

this data set has what this is my

29:28:56

request this is my

29:28:59

response this is my

29:29:01

request this is my

29:29:04

response this is my

29:29:06

request this is my

29:29:09

response this is my complete data set

29:29:12

yes or no this is my data set that we

29:29:15

are going to create from this

29:29:17

process request and response request to

29:29:20

response request and response whatever

29:29:23

these human beings have had a

29:29:24

conversation with right now we going to

29:29:28

take this data set and further send this

29:29:32

data set to

29:29:34

our base Transformer

29:29:41

model

29:29:42

base Transformer model along with this

29:29:46

we will do some fine tuning or we'll use

29:29:49

a optimizer let's say we have using Adam

29:29:52

W Optimizer this Optimizer was done is

29:29:54

in the Llama right in the Llama itself

29:29:58

right and then

29:30:00

finally I get a

29:30:03

sft Transformer

29:30:09

model why Optimizer is used to reduce

29:30:12

the loss this is an Optimizer right this

29:30:15

is specifically an

29:30:18

Optimizer okay

29:30:21

everybody clear so this is the step that

29:30:24

is basically happening in the second

29:30:26

one sft is done by real human being

29:30:29

human

29:30:30

agents right and that is how things are

29:30:33

going ahead right and this way you are

29:30:36

able to create your own data so this

29:30:38

will basically be my data or labeled

29:30:41

data during the sft

29:30:46

process

29:30:47

okay and the same data will be used to

29:30:50

train your base Transformer model after

29:30:53

training you will basically create a saf

29:30:56

Transformer model okay now what will

29:30:59

happen still this model you'll be

29:31:01

thinking okay it'll be able to give me

29:31:02

more accurate result but still this

29:31:05

model will be facing hallucination it

29:31:08

may not give you good correct accuracy

29:31:11

because there may be also some kind of

29:31:12

request and response which this model

29:31:14

may have never seen

29:31:15

it okay so for that case what we need to

29:31:19

do we need to probably go with our next

29:31:22

step or stage three and that stage three

29:31:25

is specifically called

29:31:29

as where we will be using

29:31:32

reinforcement okay and that step is

29:31:35

basically stage three in the stage three

29:31:38

we

29:31:41

use

29:31:46

reinforcement

29:31:49

learning

29:31:54

through human

29:31:57

feedback because we also need to do

29:32:00

human feedback and without this

29:32:02

reinforcement learning this model is

29:32:06

probably it will face hallucination it

29:32:08

will make give you rubbish answer and

29:32:10

all okay now what happens in

29:32:12

reinforcement learning let's discuss

29:32:14

about this okay let's say this is my sft

29:32:17

train model Okay so so this is my

29:32:21

sft Transformer

29:32:28

model now in this sft Transformer model

29:32:31

what happens after training whenever a

29:32:35

human gives any kind of respon

29:32:38

request whether a human gives a request

29:32:41

after the model is trained we can get a

29:32:43

response

29:32:45

from from whom from

29:32:48

sft ch bot right we'll be able to get

29:32:52

some kind of response the SF Transformer

29:32:55

model okay now what we are going to do

29:33:00

now based on this request I may also get

29:33:02

multiple response now that is where

29:33:05

you'll be understanding reinforcement

29:33:07

okay let's say this sft chatbot we will

29:33:11

try to record its multiple response

29:33:13

let's say this is response a this is

29:33:16

response B this is response C

29:33:21

this is response

29:33:24

D and this is multiple response like

29:33:27

this okay now once you probably get this

29:33:31

response so let's say this is my

29:33:32

response a as said this is my response b

29:33:35

as said this is my response C this is my

29:33:38

response d right multiple responses

29:33:42

there

29:33:44

okay now for this

29:33:47

response a human being will do some

29:33:51

ranking and this is where reinforcement

29:33:53

is applied

29:33:56

ranking okay now this ranking of this

29:34:01

response like for this request this

29:34:03

should be given first rank that

29:34:05

basically mean this should be the idle

29:34:06

response this should be the second idle

29:34:09

response this should be the third idle

29:34:11

response like that a ranking is given by

29:34:14

another user

29:34:17

agent another user

29:34:21

agent okay see this step by step First

29:34:25

Step then Second Step then ranking is

29:34:27

done okay and what this specific ranking

29:34:31

is basically going to do just imagine

29:34:33

this okay ranking is just going to say

29:34:36

that my response a rank should be

29:34:40

greater than response B rank should be

29:34:44

greater than response D let's say d is

29:34:47

greater than C okay

29:34:50

so this ranking will get applied okay

29:34:54

and once we

29:34:55

specifically assign this kind of ranks

29:34:58

these are my ranked responses what we

29:35:00

can do we can train after this what this

29:35:04

is done is that we train a fully

29:35:07

connected neural

29:35:11

network fully connected neural network

29:35:14

in this neural network let's say these

29:35:15

are my nodes like this and this is my

29:35:19

output

29:35:26

like let's say like this so here my

29:35:30

inputs will be my conversation

29:35:36

history my conversation

29:35:38

history and my outputs the real outputs

29:35:41

are my ranks ranks

29:35:45

responses so based on this I will be

29:35:48

training my entire neural network and

29:35:52

this model is basically called as reward

29:35:56

model okay so in this step in

29:36:00

reinforcement what are specific things

29:36:01

we are doing we creating an SF

29:36:04

Transformer model based on multiple

29:36:06

responses we are applying reinforcement

29:36:08

where we are giving a human feedback so

29:36:10

here in short we are giving a human

29:36:16

feedback human feedback based on this

29:36:19

human feedback Fe back we will be

29:36:21

specifically getting which response

29:36:22

should be greater than the other

29:36:23

response we assign a rank and then we

29:36:26

create a fully connected neural network

29:36:28

with conversation history and ranks so

29:36:31

that based on this ranks we will be able

29:36:34

to provide rewards rewards to what this

29:36:37

Transformer

29:36:39

model I hope you're able to

29:36:43

understand

29:36:45

yes yes yes

29:36:48

everyone yes if you're able to

29:36:51

understand hit like please make sure

29:36:53

this is the most important thing in

29:36:55

generative AI right of creating this

29:36:58

entire llm models right and trust me to

29:37:03

understand these things because after

29:37:05

understanding this reading research

29:37:06

paper will be very very much easy okay

29:37:10

and that is where my reward model is

29:37:12

basically created in my stage three

29:37:18

okay so this is the most important thing

29:37:22

okay I will use one image to show you

29:37:25

the next model okay and this is the most

29:37:28

important

29:37:35

one um just a second

29:37:48

everyone

29:37:54

just a second everybody I think my

29:37:57

system is hanged

29:38:02

okay okay till then let me go ahead and

29:38:04

continue it

29:38:15

okay so finally after we have this

29:38:19

entire reward model and all okay we also

29:38:23

make sure that we create some kind of

29:38:29

models see at the end of the day once we

29:38:31

create all these things that basically

29:38:33

means what happen this three steps helps

29:38:36

us to create any llm model as such what

29:38:38

is the difference thing that is

29:38:40

basically going to happen right your

29:38:43

training data needs to be created right

29:38:48

the more the training data the more

29:38:50

better thing is second thing is the

29:38:52

reinforcement

29:38:57

learning reinforcement

29:39:00

learning

29:39:02

with human

29:39:06

feedback right this is also important

29:39:10

coming for the third thing the fine

29:39:12

tuning

29:39:14

part right the fine tuning part

29:39:17

specifically with respect to sft

29:39:20

what kind of

29:39:22

request and

29:39:24

response the human being are taking and

29:39:28

reinforcement the most important thing

29:39:30

is that how the ranking is done right

29:39:34

these are the main things and obviously

29:39:36

the architecture that we are

29:39:37

specifically going to use over here is

29:39:39

nothing but

29:39:42

Transformers okay so this is very much

29:39:45

important with respect to all the things

29:39:47

that we have discussed how was was the

29:39:51

understanding scenario guys with respect

29:39:52

to all these things have you understood

29:39:54

or not please do let me

29:39:57

know please do let me know are you able

29:40:01

to understand everything or not with

29:40:02

respect to whatever things we have

29:40:04

actually done or discussed over here

29:40:08

just let me know

29:40:16

guys got it got it yes yes yes yes yes

29:40:20

yes so everyone is giving me a right

29:40:22

answers over

29:40:24

here great great great great great great

29:40:27

now going forward what you really need

29:40:30

to focus on okay what you really need to

29:40:33

focus on see as a person who is

29:40:37

interested to get into generative AI

29:40:40

okay what are things you should

29:40:41

basically focus on the road map if you

29:40:44

really want to start the road map to

29:40:47

generative AI

29:40:53

road map

29:40:56

to generative

29:41:00

AI okay now in order to understand the

29:41:04

road map of a generative AI or how you

29:41:07

can also start the

29:41:10

prerequisites prerequisites what are the

29:41:13

prerequisite obviously one programming

29:41:15

language

29:41:18

okay one is python okay second you

29:41:24

really need to be strong at NLP so when

29:41:27

I say NLP machine learning concepts with

29:41:30

respect to

29:41:31

NLP right where you learn different

29:41:34

texes of embedding techniques let's say

29:41:37

what is embedding here you specifically

29:41:39

learn how you can convert a text into

29:41:42

vectors right now converting a text into

29:41:45

vectors has many things in mind okay so

29:41:48

guys there is also one St page uh that

29:41:50

is after this okay probably I will

29:41:53

explain you that because my another

29:41:54

screen have got stuck okay so what I'm

29:41:56

actually going to do is that probably

29:41:58

one more thing is something called as

29:42:00

proximal policy optimization I will

29:42:03

create a a live video on this next week

29:42:07

we basically say this as

29:42:10

prox let me just write it down for you

29:42:14

after creating the reward model we

29:42:17

basically use this in

29:42:21

proximal policy optimization we will

29:42:24

discuss about this for this I will come

29:42:26

next week live or probably in whatever

29:42:29

next live session we will discuss about

29:42:31

this entire thing this is an another

29:42:33

important algorithm altogether okay but

29:42:36

after this our final llm model will be

29:42:39

cleared and this is super important

29:42:41

because this will assign rewards this is

29:42:44

responsible for assigning rewards based

29:42:46

on various responses that we are giving

29:42:50

or my llm model will give okay so uh I

29:42:54

will probably cover this because this is

29:42:57

another long topic uh in the upcoming

29:42:59

classes we'll see any live sessions

29:43:01

we'll discuss about this also okay now

29:43:04

let's go ahead and understand the NLP

29:43:05

now as as I said that right the

29:43:07

prerequisite is that in machine learning

29:43:09

you need to understand how a words are

29:43:12

converted into vectors and they are

29:43:14

multiple techniques uh I hope you have

29:43:16

heard about bag of words you have heard

29:43:18

about TF IDF you have heard about

29:43:22

embeddings you have heard about uh word

29:43:25

to right word to V so all these

29:43:28

techniques are specifically used in

29:43:31

converting uh the words into vectors so

29:43:35

that the machine when it is trained

29:43:37

based on input and output it'll be able

29:43:38

to understand the entire context so

29:43:40

basics of machine learning I still say

29:43:42

this as basics of machine learning you

29:43:46

really need to have a good amount of

29:43:48

idea with some of the algor knowledge

29:43:49

and all third thing when I say you

29:43:52

really need to understand deep learning

29:43:54

techniques

29:43:56

also in deep

29:43:58

learning you need to understand about uh

29:44:02

Ann hown Works what are

29:44:05

optimizers what is loss function what is

29:44:09

loss

29:44:10

function what is uh let's say what is uh

29:44:16

overfitting right uh what is activation

29:44:19

for

29:44:20

functions what is multi-layer neural

29:44:22

network what is forward propagation

29:44:24

backward propagation so many different

29:44:26

topics are there so these are again the

29:44:28

basic building

29:44:31

block the basic building

29:44:35

blocks okay so the basic building blocks

29:44:39

with respect to all these particular

29:44:40

topics is super important so please make

29:44:42

sure that you have to be really good at

29:44:45

this I'm not saying that someone cannot

29:44:47

directly jump to generative a

29:44:49

they can if you are a developer if you

29:44:51

are developing some kind of application

29:44:53

without knowing all these things any one

29:44:55

programming knowledge you can directly

29:44:56

go ahead and probably use the API

29:44:58

consume it build application but these

29:45:00

are for those people who specifically

29:45:02

wants to work as a data scientist as a

29:45:05

generative AI engineers in the companies

29:45:08

right for them they really need to

29:45:10

follow this without this basic knowledge

29:45:12

they cannot probably learn generative AI

29:45:14

why I'll tell you if you directly jump

29:45:16

to generative AI you may be able to

29:45:20

develop application but when you go

29:45:21

ahead and with the interviews there

29:45:23

people are going to ask you basic things

29:45:26

right basic things over here and if you

29:45:28

are not able to answer that they'll not

29:45:29

directly start with generative AI first

29:45:31

of all they'll see how good your basic

29:45:33

skills is if you good at something then

29:45:36

only they'll further go ahead and ask

29:45:37

some more questions right so it is super

29:45:40

important to understand you cannot

29:45:41

directly jump it jump into things okay

29:45:44

so the fourth topic that you will

29:45:46

probably be seeing after deep learning

29:45:48

uh is advaned deep learning techniques

29:45:50

so here we focus on on RNN lstm

29:45:55

RNN Gru so all these neural networks you

29:45:58

really need to understand Gru uh encoder

29:46:02

decoder encoder decoder Transformers as

29:46:06

I said Transformer attention is all you

29:46:08

need all these architectures you should

29:46:10

be able to understand because in the

29:46:12

interview again they are going to ask

29:46:13

you this they'll tell you that design or

29:46:15

write a code on a basic

29:46:17

Transformer okay and they'll tell see

29:46:19

how things are basically done whether

29:46:21

you are able to write it or not all

29:46:23

those information will be basically

29:46:25

asked in the interviews because

29:46:27

everything with respect to generative AI

29:46:29

is built on top of Transformer right now

29:46:33

the fourth Thing Once you this I usually

29:46:37

consider as a prerequisite to get into

29:46:39

generative AI right it's okay it's okay

29:46:42

if you have some good some basic

29:46:44

knowledge on all these things right but

29:46:47

it is always good to have this so that

29:46:49

you will be having an indepth knowledge

29:46:52

in-depth knowledge of working in

29:46:53

generative AI okay then coming on to the

29:46:55

fifth part right here where I'm going to

29:46:58

focus on different different libraries

29:47:00

open AI open AI has come up with this

29:47:03

gpts model right GPT 3.5 GPT

29:47:07

4.0 GPT uh 4 Turbo all these specific

29:47:11

models you can use to develop

29:47:14

applications llm applications not only

29:47:17

this you can also use other Frameworks

29:47:19

like Lang chain Lang chain is quite

29:47:20

popular right now because many people

29:47:22

are using this to create llm application

29:47:25

and the best thing about Lang chain is

29:47:26

that it has created this framework in

29:47:28

such a way that you can use paid apis

29:47:30

also you can use open source uh open

29:47:33

source llm models also and you can

29:47:35

perform any task that is basically

29:47:36

required along with prompt engineering

29:47:39

there is one more framework which is

29:47:40

called as Lama

29:47:42

index so Lama index is also a very good

29:47:45

framework and this is specifically used

29:47:47

for quering purpose

29:47:50

quering vectors right so this also is

29:47:53

very important framework right now and

29:47:56

as you all know right now Google gini

29:47:58

gini has basically come up with this

29:48:00

amazing model Google has come up with

29:48:01

this and right now jini Pro is

29:48:04

available so you can also use gini Pro

29:48:06

it has its own libraries and you can

29:48:08

specifically use for performing any llm

29:48:11

applications right now we don't have the

29:48:13

documentation of how fine tuning is done

29:48:15

but in some days that too will also come

29:48:19

right now in all these libraries all

29:48:21

this open source open source as I said

29:48:23

right open source models llm

29:48:29

models in this open source models also

29:48:31

you can also do fine tuning but again at

29:48:34

the end of the day for fine-tuning you

29:48:36

really need to have huge gpus it's see

29:48:39

open source models are readily available

29:48:40

you can directly download it you can

29:48:42

quantise it you can make it in a form

29:48:44

where it will be of less size you can

29:48:46

directly find tuning with your own data

29:48:48

set for that you require hug gpus for

29:48:50

inferencing purpose also you require

29:48:53

good machines in short right so in short

29:48:57

if you are good at all these things

29:48:59

trust me you able to work with

29:49:00

generative AI but again it is a process

29:49:03

where you have to probably learn all

29:49:05

these things okay in the future we'll

29:49:07

also try to uh I'll try to take a

29:49:10

session where we'll discuss about all

29:49:11

these prerequisites in depth and we'll

29:49:13

try to understand all the mathematical

29:49:15

intuition okay CNN is not at all

29:49:17

required see CNN is required if you are

29:49:20

interested in large image

29:49:22

models but here most of the use cases

29:49:26

that are probably coming up are on large

29:49:28

language models right but if anybody's

29:49:30

interested in this you can learn about

29:49:32

CNN if you want but I feel uh if you are

29:49:36

interested in Tech side llm you have to

29:49:38

focus on all these things right so guys

29:49:41

how was the session all together good

29:49:45

enough good or

29:49:47

not

29:49:59

oh

29:50:15

great just a second I will take up

29:50:18

questions

29:50:19

my screen has got

29:50:40

stuck okay so let's take some questions

29:50:43

till

29:50:44

then uh yeah every week okay great

29:50:50

you are able to hear me out so please uh

29:50:52

let me know about more

29:50:55

things how was the session if you liked

29:50:57

it please make sure that you like it

29:50:59

guys uh it takes a lot of effort to keep

29:51:01

this kind of sessions and uh we are

29:51:03

planning for every Friday this sessions

29:51:05

so it'll be amazing to teach and all

29:51:08

it'll be

29:51:09

great okay got something new to learn

29:51:13

great amazing sir salute valuable great

29:51:17

great great great I I hope everybody's

29:51:19

happy so uh please make sure that you

29:51:22

share it with your friends in all the

29:51:25

platforms that is specifically required

29:51:28

because trust me at the end of the

29:51:30

day these all are free content our main

29:51:33

aim in in neuron is to democratize AI

29:51:35

education

29:51:41

we so at the end of the day please try

29:51:43

to learn in that specific way try to

29:51:46

understand these techniques and then try

29:51:47

to build application

29:51:49

okay can a non-developer also learn this

29:51:51

yes anyone can learn this anyone okay

29:51:54

anyone because it is very much simple

29:51:56

with respect to

29:52:04

coding

29:52:12

okay what is the boundary of sft and

29:52:15

interface for quering is only

29:52:17

sampling

29:52:19

so tell us about the course you're

29:52:21

launching on generative AI on in neuron

29:52:24

so guys uh we are launching generative

29:52:26

AI course it is probably from next month

29:52:29

you can find all the details in the

29:52:31

description of this particular video or

29:52:33

visit iron. page okay there generative

29:52:36

AI course is basically coming up

29:52:40

uh So based on that uh you'll be able to

29:52:43

see to it and check it out okay check it

29:52:46

out in the description of this

29:52:47

particular video so video recording

29:52:49

today's class yeah it'll be available in

29:52:50

YouTube it will be available in the

29:52:52

dashboard that is given in the

29:52:56

description

29:53:14

okay okay perfect so hit like

29:53:17

guys

29:53:20

any more questions any

29:53:43

queries hi sir can you tell me about the

29:53:47

differences great sessions are really

29:53:49

and really appreciate so guys just give

29:53:52

me a 5 minutes break and then we will be

29:53:54

taking up the questions my system is

29:53:56

hanged so I will restart the system till

29:53:58

then okay so just give me another 5

29:54:01

minutes break uh we will go ahead and

29:54:02

take a five minutes break so Prashant uh

29:54:05

you can just uh stop sharing if possible

29:54:08

I will just take five minutes break

29:54:11

and okay and I will be talking about

29:54:14

that thank

29:54:17

you

30:02:03

[Music]

30:02:20

[Music]

30:02:33

[Music]

30:02:46

n

30:03:16

e

30:03:46

e

30:04:16

e

30:04:30

okay am I

30:04:35

audible am I

30:04:37

audible hello

30:04:42

hello okay 2 minutes 2 minutes 2

30:04:46

minutes okay audible right perfect

30:04:53

sorry

30:04:56

okay so let's take so first of all

30:04:59

people were saying about what is the

30:05:01

differences between generative Ai and

30:05:02

gini pro

30:05:05

okay so generative AI as I said guys

30:05:09

large language models are a part of

30:05:11

generative AI similarly large image

30:05:13

models are also part of generative AI

30:05:16

okay so generative AI is already a

30:05:19

subfield of deep learning our main aim

30:05:22

is to create new content based on the

30:05:24

data that we have trained right so we

30:05:26

have all these kind of llm models

30:05:36

okay okay let's let's take this

30:05:39

questions so great session sir really

30:05:41

helpful and really appreciate your

30:05:43

initiative of democratizing gener uh

30:05:46

generative AI learning thank thank

30:05:49

you so going forward all ml or DL

30:05:53

techniques will not be in use we will

30:05:54

focus more on llm plus

30:05:57

finetuning yes it depends on companies

30:05:59

to companies right so if there is a

30:06:02

company where we are focusing on

30:06:04

creating use cases quickly and they

30:06:06

don't have that cost issue they can

30:06:08

directly use this because see at the end

30:06:10

of the day if you're also creating any

30:06:11

application with respect to machine

30:06:12

learning or deep learning you have to do

30:06:13

everything from scratch

30:06:16

yeah

30:06:22

okay let's take more

30:06:26

question so how much large data set of

30:06:29

request and response is created by human

30:06:30

agents under sft as manually to create

30:06:32

such large data set is impossible yeah

30:06:35

if they put 100 people every day that

30:06:37

many task is there then just imagine how

30:06:39

much data we'll be able to create right

30:06:41

huge amount of data you'll be able to

30:06:43

create okay what all task we will

30:06:46

perform from J Pro everything text

30:06:48

summarization Q&A document text uh

30:06:51

document Q&A embeddings everything is

30:06:54

possible right so one session I also

30:06:57

I'll plan for gmin pro

30:06:59

okay why focuses more on llm in gen AI

30:07:03

because you're able to do task you're

30:07:05

able to create solve business use cases

30:07:06

in a much more accurate way right so it

30:07:10

is very

30:07:15

good how can gender a used for solving

30:07:18

real life business problem there are lot

30:07:20

of real world business problem that is

30:07:22

specifically required by companies from

30:07:24

chatbot to text summarization to

30:07:26

document classification to everywhere it

30:07:29

is specifically used uh in in inur also

30:07:32

we are trying to automate the entire

30:07:33

support system along with human

30:07:36

intervention both we are trying to

30:07:38

include and over there also we will be

30:07:39

using llm models too

30:07:42

right for assignment generation we are

30:07:44

planning to use llm models many as such

30:07:46

so okay so in uron also we have built

30:07:49

our own models itself

30:07:56

right so can you show how to finetune a

30:07:59

GPT model using API yes it is possible

30:08:02

but uh again we need to make sure that

30:08:04

we have some good configuration

30:08:07

configurable system uh if you want to do

30:08:09

it with open source llm if you want to

30:08:11

go with paid that also we'll try to do

30:08:13

it in the upcoming

30:08:15

sessions okay

30:08:22

okay tell us more about generative AI so

30:08:25

here is my page I'm going to share my

30:08:27

page over here ion website so if you are

30:08:31

interested you can go ahead

30:08:34

and so I'm going to share my

30:08:37

screen

30:08:40

okay so I hope everybody is able to see

30:08:42

my screen please uh give me a

30:08:45

confirmation

30:08:50

can you see my

30:08:52

screen give please give me a

30:08:54

confirmation so I will just try to

30:08:55

answer this specific

30:09:00

question okay so here you'll be able to

30:09:03

see as soon as you go to the homepage

30:09:04

the first course that we are launching

30:09:06

on generative AI mastering generative AI

30:09:08

open AI Lang chain and llama index also

30:09:11

from 20 January 2024 okay this will be a

30:09:16

3 to 4 4 months course altogether one

30:09:19

year dashboard access is there this is

30:09:20

for everyone out there whether you are a

30:09:22

college student working professional

30:09:24

along with this we will also be

30:09:26

providing you access to the Virtual Lab

30:09:28

of uron okay here what all things we are

30:09:31

going to learn we are going to master

30:09:32

everything that is related to open Lang

30:09:34

chain and Lama index okay and

30:09:36

specifically developing application end

30:09:39

to end till deployment okay we will show

30:09:42

you multiple things over there now when

30:09:45

this batch is starting 20th Jan 2024 the

30:09:49

language is English 5 months duration 10

30:09:51

to 1 p.m. Saturday Sunday class timing

30:09:53

it will be live instructor lead okay uh

30:09:56

you have onee dashboard access

30:09:58

assessment in all modules the reason why

30:10:00

we are putting one year dashboard access

30:10:01

is that because this content will get

30:10:04

upgraded every six months I guess right

30:10:07

there are a lot of upgrades in the field

30:10:08

of generative AI right so that is the

30:10:11

reason is no use of giving you lifetime

30:10:12

or anything as such okay so neural laab

30:10:15

access is there dedicated community

30:10:17

support these all things are there

30:10:19

mentors will be myself sudhansu s Savita

30:10:22

and bppi right so some portion I will be

30:10:26

taking some portion Sanu will be taking

30:10:28

some portion s Savita will be taking

30:10:29

some portion bmed B will be taking okay

30:10:33

and you have already seen they have

30:10:35

they're doing the live sessions on

30:10:36

generative AI in the in the in in in the

30:10:39

YouTube channel of ion itself okay so

30:10:42

you can definitely check it out over

30:10:43

there then if you have any queries you

30:10:46

can talk to a counselor or you can also

30:10:48

contact the ivr number that is given

30:10:50

over here right in the website itself so

30:10:52

if uh any question that you have

30:10:54

regarding counseling anything and this

30:10:56

is the entire syllabus we are going to

30:10:58

start from Basics what road map I have

30:11:01

shown you today based on that road map

30:11:04

only we are going to start see bag of

30:11:05

words TF IDF word to F test engrs Elmo

30:11:09

bird based right then large language

30:11:12

model what is BD GPT T5 Megatron right

30:11:16

GPT 33 3.5 how chat GPT train

30:11:19

introduction to chat GPT 4 right and

30:11:21

then we are going to probably learn

30:11:23

about hugging pH we are going to see

30:11:25

different different models open source

30:11:26

then we are going to talk about llm

30:11:28

power application we're going to create

30:11:29

end to end projects then we are going to

30:11:31

use open AI this this this all every

30:11:34

everything that is available in open aai

30:11:36

because many companies are also using it

30:11:38

then we are also going to cover prompt

30:11:39

engineering Lang chain Lang chain

30:11:42

completely L chain in depth we'll try to

30:11:44

complete then we will also be completing

30:11:46

l Lama index all these

30:11:48

Frameworks right so everything will be

30:11:50

covered up and finally you'll also have

30:11:52

lot of end to end projects in every

30:11:54

section lot of endtoend projects is

30:11:55

there and these all projects are with

30:11:57

respect to

30:11:58

deployment so all these things are there

30:12:00

you can probably check it out in the

30:12:02

cabus okay uh all the information will

30:12:05

be given in the description of this

30:12:06

particular video as I said if you have

30:12:08

any queries talk to the counselor okay

30:12:10

they'll help you

30:12:13

out what Hardware is required to learn J

30:12:16

no need of any hardware we will be in

30:12:19

uron lab itself you'll be able to

30:12:21

execute all your code you'll be able to

30:12:23

do it if anything is required we'll let

30:12:24

you know in the latest stages okay but

30:12:26

whatever is in the flea platform

30:12:28

available in uron Virtual Lab and all

30:12:31

you'll be able to do this so please tell

30:12:33

is there any prerequisite yeah Python

30:12:35

programming language so for that also we

30:12:37

are giving you pre-recorded videos so

30:12:39

python you should know only python you

30:12:41

should know remaining all is

30:12:45

fine

30:12:50

Community

30:12:53

Edition difference please uh Community

30:12:57

session is only up to some level okay

30:12:59

you can probably say 100% of what we are

30:13:02

teaching over here it is hardly 10 to

30:13:04

15% okay will we require opening API key

30:13:08

yes we will show you a way how to do

30:13:10

that okay um but yeah at the end of the

30:13:13

day if you want to do fine tuning and

30:13:14

all you'll be requiring open API ke h

30:13:19

so do you have projects Hands-On course

30:13:20

for machine learning and data science so

30:13:22

again I'll let me share my screen for

30:13:23

that also we have launched it so let me

30:13:27

share my

30:13:32

screen so for project Hands-On course uh

30:13:36

if you probably go over here we have

30:13:38

also launched this one which is called

30:13:40

as production ready data science project

30:13:43

so if you click over here production

30:13:45

ready data science project this is a one

30:13:48

month course where we are solving end to

30:13:50

end five projects five five and it

30:13:54

includes machine learning deep learning

30:13:57

natural language processing and

30:13:58

generative AI so this is completely end

30:14:01

to endend and this is with

30:14:03

mlops machine learning operations right

30:14:06

all the tools the timing again this is

30:14:08

from 27 Jan the timing is 88 to 11:00

30:14:11

p.m. Monday Wednesday Friday so in one

30:14:14

week we will be completing one project

30:14:16

okay three days and it will be live all

30:14:20

the sessions will be live it is live

30:14:22

instructor lead so again you can go to

30:14:24

ion. a page check it out if you want to

30:14:27

talk to the counselor talk to them

30:14:29

mentors again all these things s Savita

30:14:32

bapi will be the main mentors over here

30:14:33

will will be taking this entire session

30:14:36

Monday Wednesday Friday will be the

30:14:37

session 8 to 11: at night now here what

30:14:40

we have done is that best thing we have

30:14:42

included mlops everything that is

30:14:44

basically required right mops mlops

30:14:47

mlops right let it be so what all things

30:14:49

you'll be covering in this open a AWS

30:14:51

GitHub Docker Azure lanin Jenkins along

30:14:54

with this we will be seeing Circle CI

30:14:56

we'll be seeing uh GitHub action cicd

30:14:59

pipeline Dockers kubernetes everything

30:15:03

that is required is covered in this so

30:15:04

it is a complete mlops syllabus right

30:15:08

DVC dockerization AWS Jenkin cicd

30:15:11

pipeline so every project that you'll be

30:15:13

seeing right you will be seeing over

30:15:15

here we are using some some of the other

30:15:16

things let's say Industry Safety here

30:15:19

also we'll be doing dockerization AWS

30:15:21

GitHub action cicd right and if I go

30:15:23

with name entity here you'll be seeing

30:15:25

DVC dockerization Azure Circle cicd so

30:15:29

everything will be covered with respect

30:15:30

to that and then I've also we have also

30:15:33

included uh the generative AI project

30:15:39

okay

30:15:40

great so I'm stopping and anything any

30:15:43

info that you require you can probably

30:15:45

go ahead and ask ask in the

30:15:48

uh just contact the ivr number over

30:15:50

there

30:15:54

okay okay perfect so how was the session

30:15:57

all together did you like

30:16:02

it so do we need to do projects on mldl

30:16:05

to get job in gen aai yes obviously

30:16:09

mlops mlops mlops see the generative AI

30:16:12

projects also that we are going to do in

30:16:13

gen AI course there we are going to

30:16:15

include lot of mlop activities also it's

30:16:18

more about creating

30:16:20

applications

30:16:23

okay okay

30:16:31

perfect course fees and all you can find

30:16:33

out in the course page itself

30:16:36

okay perfect guys so thank you this was

30:16:40

it I think we have completed the 2hour

30:16:42

session uh from coming Monday we are

30:16:45

also coming up with the mlops community

30:16:48

series from coming Monday so please make

30:16:51

sure that you subscribe the channel

30:16:52

press the Bell notification icon that is

30:16:54

super important um we will be starting

30:16:57

from next week itself okay you can

30:16:59

probably check it out uh all the

30:17:01

reminders everything will be found out

30:17:03

in the channel itself there will be

30:17:04

dashboard exess materials everything

30:17:06

that you actually require so thank you

30:17:09

uh this was it from my side if you like

30:17:12

the video please make sure that you hit

30:17:13

like subscribe share with all your

30:17:15

friends

30:17:16

this was it from my side okay and I will

30:17:20

see you all in next week Friday session

30:17:22

we will be discussing more things but

30:17:24

again we have lot many things that are

30:17:26

coming from Inon itself we'll be having

30:17:28

mlops entire Community session and it is

30:17:31

from uh next week uh Tuesday is going to

30:17:34

probably start and we'll be discussing

30:17:36

about all those things how an end to-

30:17:38

end project is basically created Let It

30:17:39

Be an LP project machine learning geni

30:17:42

project how mlops can be used and many

30:17:44

more things so thank you uh have a great

30:17:48

day and keep on rocking if you like this

30:17:51

session please do hit like and yes I

30:17:52

will see you all in the next session so

30:17:54

thank you guys have a great day bye-bye

30:17:56

take care and keep on rocking thank you

30:18:00

bye

Continue with YouTLDR

Analyze another video with Pro

Process a new video, search every timestamp, compare sources, and keep the result in your library.

Get Pro — $12/month30-day money-back guarantee

More transcripts

Explore other videos transcribed with YouTLDR.