DAY-8: Introduction to Vector Database for AI & LLM

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay so I think I'm Audible and visible to all of you guys please do let me know in the chat if you can hear me if you can see me then yes or no yeah good afternoon good afternoon to all so today is day 8 and today we're going to start with a new topic but before that uh we'll try to deploy our application whatever application we have created in our previous uh class so please do let me know if I'm visible and audible to all of you great so yeah I think I'm visible also I'm audible also and uh yeah now here guys see today is a day eight for this uh committee session now uh first of all let me give you the brief introduction about the dashboard and all uh because uh maybe someone has joined the first time so definitely the complete guidance is required regarding the dashboard and the recorded video quizzes and assignment so first of all Let me give the complete walk through of the dashboard so I will take uh like 2 minute only and then I will come to the topic now here guys uh you will find out so let me show you the community dashboard so here is a dashboard and uh let me refresh this dashboard first of all so just a second yeah so here is my dashboard now you will find out all the lecture all the session over the dashboard only now you can uh check uh with our uh chat also so we have uploaded we have given you this particular link inside the chat also you can click on that particular link and you can enroll to the dashboard this is a free community course uh here we are not uh like asking for any sort of a money it is completely free for all of you so U yeah just try to take a advantage of it and try to enroll yourself into this particular course and try to take a dashboard after anding you will get a dashboard immediately now see guys already I have covered seven lecture so there are different different topic uh you can see all the topic name along with the lecture so Day first I started from the introduction day two I discuss about the open AI day third I discuss about the Len chain and then I discuss the advanced concept of the linkchain here you can see the complete detail then uh at day six actually I have started from the project so here actually we are going we have implemented a project uh we have understood the use case and all and then uh at the day seven means in the previous class I uh did the entire modular coding and all so uh till day s actually I have completed one project along with a different different concept and today is a day eight where we are going to deploy our application and we'll try to start from uh from the advanced concept now so in today's class we're going to talk about the vector database so already uh I have created one slide for all of you there I will give you the quick guidance about the vector databases and I will try to explain you many Concept on top of the Blackboard where I will be writing each and everything each and every everything we're going to discuss and finally we're going to implement or finally we going to like create uh the finally like we going to implement also by using the python and we are going to create an application where uh we'll use this Vector database so here I think uh you got the link of the dashboard so please try to enroll into the dashboard if you haven't done so far now inside this dashboard you will find out as soon as you will click on the video let's say once you will click on this day seven so here you will find out the resource section so just click on this resource section and there you will find out all the resources regarding this lecture so whatever I have discussed I'm uploading here inside the resource section now apart from that let me show you the YouTube so here is what here is Inon YouTube channel uh so once you will search Inon or Inon Intelligence on your YouTube so you will get this particular Channel now just open the channel and click on this part particular uh option this live option okay just click on this live and here you will find out all the live classes all the classes basically which I took right so the same classes we are uploading in a dashboard and the same thing which is available over here as well means on top of the YouTube immediately right after the right after the live you will find out the recording over here and after some time maybe after 4 to 5 Hour the video will be uploaded over here on top of the platform and here you will find out the resources along with that right so I hope this two thing is clear to all of you now let me explain you a few more thing now once you will go through the dashboard or once uh you will uh visit to the Inon website now there you will find out many more thing not even the dashboard there uh we have given you the complete ecosystem so here you can see we have given you the neuro lab so whatever practical I'm going to do so I'm going to do here itself in the neural lab only uh and today only I will show you how you can set up the neural lab for upcoming project for the vector database implementation each and everything we are going to do here itself inside the neurol lab and apart from that you'll find out the job portal which is uh like coming okay so uh we are going to launch one newly job portal in some days you will get a notification regarding that now here you will find out one more option that's going to be internship portal now uh once you will open the internship portal so uh after sign in uh once you will click on the internship portal it will ask you for the sign in now here you will find out a complete dashboard okay so here you will find out the complete dashboard now uh just look into this particular option start a new project so just click on this start a new project after that you'll find out Tech so in whatever Tech you want to complete your internship now here uh we are going to upload this generative a related project also I created uh basically I given to my team so soon all those project will be available over here and the specific Tech also will be available the name will be a generative AI so inside the generative a you can complete your internship and if you don't if you want to do if you want to complete your inser internship in other Tech like machine learning uh computer vision in NLP so you can go and check and you can find out the project from here and yes we are going to update one more tag over here so in tomorrow session I will show you all the tag the tag basically and all the project related to that particular tag and the project is going to be related to a different different domains so here you will find out a domain so let's say if I'm going to select one tag I selected this big data now here you will find out a different different domain related to the big data so here let's say deep learning now let me show you the domain so these are the domain uh Aviation banking customer relationship education similarly you will find out related to a generative AI also so after learning from the lectures right so from here you can can complete your project you you can complete the internship so each and everything we we are giving you over the platform itself over the IR on website itself so no need to go anywhere just uh take a leverage just take advantage from the uh like from our website only each and everything is there from a job portal to internship to a lab right and even the lectures you can see over here we are uploading on top of the dashboard so I hope this thing is clear to all of you now uh let's begin with the agenda so tell me guys uh how many of you you implemented the project the project basically which I completed in the class itself please do let me know in the chat okay so here is a question that what will be the difference between this course and paid course yeah so let me show you one more thing so once I will go through with the Inon website so let me open the Inon website and here uh just a second yeah so here if you will go inside the course section so just click on the course and here you will find out the generative AI right so once you will click on the course you will find out this generative AI so just click on this generative Ai and here you will find out one course this course is going to be start from 14th of January now you can find out the introduction over here just click on uh this particular icon and there you will find out the introduction of the course now uh let me show you uh how this course is different from the comedy session now uh just check with the syllabus so the syllabus basically which we have uploaded so there we have uploaded a various module and here you will find out module one module 2 module 3 module 4 so just look into the first module so inside the first module what all thing we are going to cover so here we are going to cover each and everything each and every uh introduction or theoretic Theory basically related to the generative a and not from generative a we will start from the deep learning itself means we won't teach you the in depth mathematics and all regarding the Deep learning but for sure we'll give you the complete pipeline of the deep learning so we'll give you the complete introduction behind the generative Ai and that two will be in a live class right now here after the generative AI will come to this text preprocessing and the word aming there will try to discuss in a very detailed way that what is a word embedding what is a text preprocessing what all techniques we have for the encoding right so a frequency based technique or uh like we have integer based encoding we have a one hot encoding right or we have TF IDF apart from that you'll find out different different word embedding technique like word to back Elmo bird and Transformer and apart from that like globe globe is one of the technique so there you will find out each and everything along with the python implementation in this module 2 so just click on that and here you will find out a complete detail so what all things thing we are going to discuss over here right so each and everything whatever we have written so as it is we are going to complete in a session in a lecture now after that we'll come to the large language model where we going to talk about different large language model so we'll start from the RNN we'll talk about the lstm and Gru as well and then we'll explain you the concept of the attention mechanism that what is the attention and all why this encoder decoder has been invented then why this how what is the meaning of the self attention what what of changes they made inside the transform architecture so each and everything we're going to discuss and after that we'll be talking about what all anoder based architectures there what all decoder based architecture is there and not even the architecture will try to discuss the use cases application and and this use case and application will try to move we'll try to map to the different different domain also right so that thing those thing basically we're going to discuss in a live class and apart from that apart from this one you find out the hugging phase right so we'll try to discuss the hugging phase pipeline the Transformer Pipeline and then we'll come to the Len chain so what is the Len chain and after the Len chain basically we'll find out the uh llama index also so same uh like thing we going to do by using the uh llama index also now here uh same thing basically we are going to implement by using the Llama index and we'll try to discuss each and everything related to The Prompt engineering so what is a prompt engineering what all type of prompts we have and here you will find out a project so here are at least 10 project so throughout this course right so at least we are going to complete a 10 project so these are are some sort of a glimpse like these are some use cases basically you will find out related to the project and that is going to be an end to end project and not even AWS we are going to use a different different platform also like AO and gcp and there we are going to deploy our application by using a different different mlops tools and by using a complete C ICD pipeline right so just look into the uh just look into the syllabus and try to check it out so in between also see throughout the course we are going to complete 10 project so uh here is end to end project we are going to update more and here in between in uh module itself right in in between actually you will find out a project itself so after completing one module so we'll come to the project now again uh with check with the Len chain so we have we have kept so many projects over here and one project uh we have seen in a live class itself but with the uh minimum scale right so there I didn't use the extensive architecture and all there I kept it U like simplest one and today also we are going to talk about the deployment that also I will keep it simple so at least a beginner can understand and now from next project onwards we are going to implement uh we are going to start with the advanced one we are going to uh deploy the project the cicd and all everything we try to do over here itself so so just go through with the syllabus and try to check uh so you just need to uh check with the website and there go inside the courses go inside the generative AI uh just click on the generative Ai and look into the syllabus and the badge is going to be batch is going to start from 14th of January the timing will be from 10: to 1 p.m. istd and from 1: to 2 we have a live D live doubt session so 10 to 1 there will be a live classes and from 1: to 2 there will be a live doubt session and you can check about your Mentor also so here is your Mentor here is a Chris sir our favorite Chris sir and sudhansu Sir here is me and one more person so there's a buy right so I hope you know about the buby also so just check out uh the course just check out check uh about the curriculum and all right and whatever doubts and all you have then you can ask got it yeah now let's start with today's agenda and today we're going to talk about the deployment and then I will come to the vector databases yeah so if we are talking about this free course so here you can see we have a free course right so if you're going to complete this free course so you will get a certificate also so from the community course also you can generate a certificate right so by uh so here once you will enroll to the dashboard so right hand side just just see the uh certificate icon this one just click on that and then you can generate a certificate but the terms is that so until you are not going to complete entire project so it won't generate a certificate so first try to complete this like video try to complete this course and then you can generate the certificate at least 50% right at least 50% then you can generate it yeah uh fine now please explain how we can make download the generated McQ in PDF PF so in the previous session only I told you now how to generate up Excel CSV file then you can convert that CSV into a PDF right so that is easiest one now let's see the deployment deployment of the application got it so in the previous class we have already created a project now this is our end to end project and that two I have shown you in my neural lab right so I shown you the complete setup of the neural lab but don't worry in the upcoming project also I will do the same thing in a neurolab itself now the same project I have uploaded on my GitHub so here guys you can see this is the project which I uploaded on my GitHub now this was the McQ generator now let me show you how this project look lies and if you don't know about the project if you don't know about the sessions and all so please go and check with the dashboard already everything we have uploaded over there along with this project my GitHub link is already there you just need to click on the resource section and download the project so the project link you can see inside the uh like chat also so we have ping that sorry this dashboard actually we have pinged that so just click on that and enroll yourself over there fine now uh here guys uh this is my project now first of all let me show you how this a project looks like um let me run this particular project so for running this project let me write it down here uh let me clear the screen okay now here let me write it down streamlit s r e a streamlit run and here then I need to provide a streamlit file so streamlit . py streamlit run streamlit app.py this is my file name now as soon as I will hit enter so my application will be running so here uh guys you can see my application is running just a second yeah so my application is running and this is my application just a second just uh wait yeah so this is my application guys now here you will find out or we have a different different option so here you can upload your file and based on that data based on your uh based on that specific file you can generate a McQ you can provide a number like how many mcqs you want to generate here is a subject so whatever uh subject is there related to the data related to the file you can write on the subject and here is a complexity label so you would like to keep it simple hard or intermediate so let's try to upload one file over here so here already I I kept one file data.txt in my previous class only I shown you that now let me show you what we have inside this particular file so once you will open this data.txt uh so here actually this test.txt data.txt data.txt basically is what it was my in my another folder so I can take anyone or from anywhere I can take the data file so let's do one thing let's try to create one file okay from scratch data file and that two I'm going to create on my desktop so here uh let me create on new and here is my txt documentation now inside this particular file I'm going to paste my data so let's open the Google and here search about the AI so let me open my Google and let me search about the artificial intelligence now here I will get article related to artificial intelligence let's say I'm opening this Wikipedia and I'm going to copy the article from the uh from the Wikipedia itself now I copied this article and I'm going to keep it inside my desktop inside my text one right now I can save it also so let me save as uh let me save as as a AI document right so AI doc so this is what this is my document which I saved now let's say if you have any sort of a information inside your text file inside your PDF so you can upload it over here so let me show you where you can upload you can upload you can pass it to my application now just click on the browse file and take a data from the desktop and here already I I have this AI dog now open it and here guys you can see my file has updated now you can give the number of McQ now how many McQ you would like to generate so let's say I want to generate five McQ so here I'm giving number five so you can increase or you can decrease also from here itself now you need to provide a subject so here I'm writing artificial artificial intelligence right artificial intelligence so here is what here is my subject okay so here is a restriction of the word so let me keep it like this int G and C so I can increase actually I can increase from the back end or otherwise I can write it down like this AI right so AI is fine my subject is what AI in a short form I have written it from back end actually I have given this restriction you can check with my streamlet file there I have already mentioned I can increase the number and then it's going to take like more than 20 words right 20 character actually now here I can provide the label so here the label is going to be a simple right I'm just going to create a simple uh simple McQ simple 5 McQ now once I will click on this create McQ so you can see my model uh is running in backend and here it will give you the answer so let's wait for some time and yes it will give me the answer yes Vector database also will be covered in a live class yeah so if we are talking about the prerequisite right so I got one question actually so the prerequisite for the generative AI course is nothing just a python if you have basic understanding of the Python so just just look into the project see guys here I'm able to generate a question so here I'm able to generate the McQ just just look into the McQ so uh it's a sensible only right so what is the field of the study that develop and studies intelligent machine so here it has given you the various option like artificial intelligence machine learning computer science robotics now this is the second one which of the following is example of AI technology used in a self driving car so it is giving you the various option right so uh chat GPT bimo right Vio or YouTube Google search so like it is a sensible one and here you will find out the a correct answer so it is giving you the correct answer and it is evaluating the quizzes quiz also so here you can see the quiz evaluation now uh one question basically I got it's a good one so uh what is a prerequisite uh if you want to if you want to start with the generative AI so the just just look into the project guys what I have used over here just tell me if you have a basic knowledge of the Python if you just have a basic knowledge of the development so yeah um you can enroll into the generate Ai and even if you don't know about the python then don't worry our pre-recorded session of the Python will be available over the dashboard from starting to end and apart from that like you can see regarding the development each and everything we are going to teach you in a live class itself from various sketch from folder creation to deployment right so we are creating a folder in a class itself in a live session and we are doing a live coding in front of you and after the develop after developing our application we are deploying it also so from starting to advance right so from scratch to advance everything we are doing in a live class and the prerequisite is just a p just just python okay so don't worry about the uh this uh prerequisite and all already like uh the python and all will be available over there you can learn that first if you don't know and then you can proceed with a further thing right now here you can see this is the application which I'm able to create now what I want to do I want to deploy this application over the cloud right now here guys see this is the first application and many people are beginner one right and they don't know about the advanced concept advanc mlops concept Advanced devops concept cic and all so let's try to keep it simple let's try to deploy it over the AWS there I'm not going to use a cicd concept in my next project I will show you how you can uh use the cicd a concept how you can uh create a like continuous integration continuous deployment Pipeline and how you can deploy the application and even I will include the docker also here I'm keeping it simple simply I'm uh creating a server on top of my AWS machine and there I'm going to deploy my application so let's see how we can do it so for that guys see the first thing what you need to do the first thing you need to create your account on AWS the application we are going to deploy we are going to deploy on AWS so here what we are going to do guys tell me so here we need to create account on AWS now here you require a credit card debit card actually AWS does not ask you the credit card it ask it you can add the debit card also and it won't charge you anything directly right so believe me it won't charge you anything first it will ask you if it first it will tell you then this this this much of will like you have generated and like you can wave off also right or in the worst case you can delete the account so it won't like harm you it won't deduct any sort of a money from the account now the first thing which is required that is the ews now here in the AWS we are going to use the ec2 server for deploying our application so first we'll try to configure the ec2 server and here uh for uh in ec2 actually we are going to use the Ubuntu machine right ubu machine so that is the first thing basically which is required for the deployment now the second thing which is required that is a GitHub so just make sure that you have kept your project over the GitHub so what I'm going to do I'm going to upload my project over the GitHub I'm going to create a repository which I already did right I have like I have I have done in my previous session itself so there itself in my repository itself I have kept my project I have uploaded my project right so the first thing which is required which is a AWS the second thing which is required that is a GitHub that's it right so let me show you how to how to deploy this application over the AWS how to deploy this application or the ec2 instant where I'm going to use this Ubuntu Server right now uh GitHub so first of all let me give you the GitHub so at least you can follow me uh throughout this deployment process and here we have to run couple of command so I will give you those command also so at least you can run inside your uh instance inside your server right so here guys what I'm going to do I'm giving you this GitHub link just a second I'm going to paste inside the chat if you're not able to click on this link right so what you can do you can uh go through with the Google uh you can open the Google and you can search about s Savita GitHub so there you will get my GitHub ID and there just go inside my repository and open this project open this gen AI project this gen so now guys see I already kept my project on my GitHub if you don't know about the GitHub and all then you must uh uh visit my previous session there I have discussed each and everything from scratch I'm not going to repeat those thing otherwise we won't to Able we won't be able to cover the further thing further concept now here is what here is my uh here is my project right so I believe guys you all have you all kept the project in a GitHub itself you can uh download it from here as a jib you can clone it inside your repository everything is fine for me now but at least the project should be uh inside your system and then you need to upload in your GitHub right so this is my GitHub if you are opening it guys so this is my GitHub right so uh now what you need to do see if you going to Fork it that will also work okay that also you can do but the best thing what you can do just download it and keep inside your GitHub because uh whenever you are going to deploy it now so you're not deploying from my GitHub you are deploying from your GitHub so the project should be available over there because you will have to clone it now you will have to clone it right now uh here uh let me show you the ec2 instance right so how the ec2 instance looks like and all so the first thing guys what you need to do so I'm uh starting from very scratch no need to worry about it so just search about the ec2 so just open your uh AWS now let me show you about the AWS also um if you don't know about the AWS so here go open your Google and search AWS login so just simply search AWS login now here you will get a link so uh not this one actually this AWS . amazon.com just open this aws.amazon.com just click on that and here guys here you'll find out your AWS right now it is asking to you uh would you like to create the account or you want to log in so what I want to do I want to login because I already created an account and creating an account is not a difficult task on AWS it's very easy it's very simple you just need to provide your detail over here whatever they are asking and simply create the account and it will accept your debit card also if you have enabled the international payment into your debit card so definitely you can add on over here and it won't charge anything first it will ask to you and you if you will approve then only it's going to cut it cut down the payment but don't worry we can weev off also I will show you how you can weev off your money and you can delete the account if uh like uh you have launch so many instances and you generated like too long bill now here you can see this is what uh like this is a creating step like if you want to create an account now just click on the sign in Just click on the sign in and after clicking on the sign in right so here uh I already sign in so here it is giving me the homepage now guys uh what you can do so here you can search the ec2 instant just go inside this search box and here search the ec2 right ec2 now click on this E2 so after clicking on this ec2 right so it will give you the various this is the interface this this is the home interface right of the ec2 so here it will give you the various options so no need to do anything just CL click on this launch instance right just just click on this launch instance so here after clicking in the launch instance it will give you one form right you just need to fill up this form and you will be able to launch your instance so you just need to provide some details over here and that's it so tell me guys how many people are following me please write down the chat and let me look into the doubt also so how much long this free generative AI boot camp will be so this a free generative AI boot camp uh like uh we are going to continue till next week so this week and the next week right so there is couple of concept which we need to discuss and couple of project as well so one basic project one Advanced project and like few more concept do we need to learn ML and NLP learning for generative please advise no ML and NLP is not see let's say there's different different kind of person so let's say if you are beginner right and who don't know anything let's say who don't know anything and the person who want to start from the generative AI so for that person I already told you if you have a basic understanding of the Python then definitely you can start with the generative AI right so by learning the generative definitely you will be familiar with the basics of ml NLP and all automatically you will learn that but let's say there is one more person who is familiar with the ml statistic basics of ML and all right so yes the this is like a good thing he knows about the basics so definitely he can start with the generative a now there is one person who knows everything who knows about the ml DL NLP so that is well and good means U nothing can be better right so definitely the person uh can start with a generative AI so in every case you can start with a generative AI there here you just required a python knowledge and if you are if you have a knowledge of the mlop if you have a knowledge of the NLP DL ml so yeah your understanding will be much clear over there getting my point so for every person the scenario is different so just think uh about your scenario but I would tell you that in every case in every scenario you can go with a generative AI right even non-technical person can enroll who don't know about anything right anything about the programming and the development okay so guys uh how's the session so far are you enjoying it tell me did you open this AWS page if you have any doubt you can ask me in the chat and then I will proceed further do we cover any mlops topic yeah we are using the mlops concept only now tool wise yes we can use the tool so we can use DVC ml flow or different different tools like yeah we going to use Docker G already we are using right so uh whatever is required according to the infrastructure and all definitely we can use it and don't worry in the upcoming project we'll show you that also yes you will get a python video over the dashboard yes uh AMR fine so I hope uh here you can see uh like here I have the ec2 so here I have click on the ec2 and I click on the launch instance now here you just need to provide the name so if you like just provide the name any name over here so here I'm saying McQ generator right so here I'm writing McQ generator this is the name of my instance now once you will scroll down so here you will get a option uh like here they have provided you a different different machine right so they have provided their own machine own Linux system uh Amazon Linux they they are providing you the Mac OS they're providing you the Ubuntu Windows right redit is there so different different like varant different different variant you will find out of the Linux and even Windows server is there so here we are going to select this Ubuntu right so here we are going to select this Ubuntu so just click on this Ubuntu after clicking on this Ubuntu so here it is giving you the free tire but uh here my application actually I I cannot I cannot take a chance I'm not using the free tire over here so as of now what I'm going to do I'm taking any larger instance so here okay so free tire is fine now what I can do yeah free tire Let It Be Free Tire Okay so uh how to select the major instance let me show you that so here is the architecture so keep it as it is and keep it uh like free tire this one now here guys just just see free tire eligible just just click on that just just click on this drop down right and here instead of the t2 micro just select anything right apart from this T2 micro you can select uh either this is small or you can select this medium or large so here I'm going to select this large one because as of now I don't want to take any uh chance so let's say if I'm selecting this medium or maybe small so maybe uh with this particular system my uh like this app is not going to be launched or maybe if I'm installing the reord txt and all it is giving me some sort of error I'm not going to take any chance and here I'm selecting this T2 large but guys uh you can select U like this uh small one also and the medium one also right but in my case I'm taking this large where it is giving me where it is giving me this uh 8 GB memory and here you can see the pricing and all but don't worry after the uh like after the session I will stop the instance right I will show you how to stop the instance now after selecting this instance okay after selecting the instance type what you need to do here you need to create a new pair right so create a new key pair so here for creating a new pair so once you once you will click on that it will ask the name right so here I'm giving the name so let's say the name is what uh McQ keyp right so McQ key and here uh generate this a pem file right so private key file format if you want to do SSH or if you want to connect the this machine by using the puty or by using the SSH so here this a key will help you right here this key will help you now create the key pair and it will ask you for the download so yes download it somewhere inside your system so I'm going to save it and I am done now you did two three things first you selected this ubu machine the second you selected this instance type and the third one you created the pair over here that's it now keep rest see here one more thing uh the fourth one actually you just need to click on this one right so just just click on this one just allow HTTP https and HTTP traffic also and keep it anywhere not no need to provide the specific IP address over here keep it 00000000 it's a global one and keep it anywhere uh you won't face any sort of a issue right so now guys this is done and one more thing I can do over here is asking to me a storage so I can increase the storage as well so instead of the eight I'm going to take let's say 16 right so here is my storage right so here is my storage and I hope now everything is fine I just fill up the form and once I will click on this launch instance so it will be launching my instance so are you doing along with me are you launching the instance tell me guys now see guys it has launched the instance now once I will click on this one uh so it will uh show me the instance and here the status is ending as of now tell me guys uh are you doing it along with me are you writing are you doing are you deploying see I have already given you the code I already given you the GitHub you just need to download it and keep it inside your GitHub and then you can follow the steps I'm going very slow and don't worry I will give you all the step in a document format also yeah so let me refresh it and let me check it is working or not yeah it is running now so see guys my status is running right instant state is running now now just click on this ID just uh click on this ID and here click on this connect button right so what you need to do here tell me guys so once uh so click on the ID click on the instance ID and click on this connect button after that here it will give you the uh like option so here again uh like it will give you it will ask you for the connect connection so just click on this connect and now your machine has launched so this is the machine guys this is the machine which we have launched now we'll configure this particular machine according to our requirement right so this is a machine basically which I got from the uh AWS side which I launch over here now I will configure it right so for configuring this machine I have to run few step so the first step which I'm going to run over here the step is pseudo AP update right so here once I will write down the pseudo AP update so my entire machine will be updated right so here my machine is getting update and don't worry I will give you all this command I will keep keep it inside the GitHub itself uh so let me do it first of all let me show you and then I will provide you the command right so here guys you can see I have updated the machine or what I can do I can open the txt and there itself I can write it down so all the commands which whatever I'm running now the First Command which I rign that is that is what that is a s sudo AP update so that was a command which i r now after that I will run one more command uh so here on the terminal itself I'm going to run one more command that's going to be a Pudo Pudo a AP iph G update so this is a second Command right Pudo AP hyphen G this is nothing this is just a package manager right so this AP AP G so I'm updating it uh the machine so here now everything is up toate so sudo AP update and sudo AP hyphen get update now let me write it down here this two command so the next one was sudo AP hyphone G update right so this is the second command now the third command which I'm going to write it down here that's going to be a Pudo up AP upgrade okay upgrade upgrade hyphen y right so this is the third command which I need to run sud sudo AP upgrade hyphen y now let me open the machine and here I'm writing Pudo a upgrade g r d upgrade hyphen y right so here you can see my um like machine is getting upgraded so this three a command which whatever I have written over here you need to run it on your terminal for updating your machine right so yes it is running let's wait for some time yeah still it is running and it will take some time here is a command guys this one if you have launched the system uh if you have launched the machine so you can execute this three command sudo AP update sudo AP hyphen get update sudo AP update grade hyphen y right great so here my machine is updating and it will take some time until if you have any question anything you can ask me yeah so here actually I just need to hit the enter if you're getting getting this Waring so just hit enter and again you need to hit enter over here right so once you will hit enter it will be updating it so what's a meaning of this three command so just look into the command what we are going to do I'm saying Pudo Pudo means for the root user APD update right so APD is a package manager and what we are going to do we are going to update our machine by using this package manager right so here we are going to update and upgrade each and everything uh inside this particular machine and now everything is done now we have updated our machine here you can see we have updated our machine now I have to install something here right I have to install something over here now for that again we have a command the command is going to be Pudo a install right Pudo AP install I'm going to install this git I'm going to install the curl right I'm going to install this unip and here I'm going to install this tar make right and here I'm going to install this sud sudo Bim Bim is what it's a editor right now here does w get so these are the thing these are the like uh these are the thing basically these are the software we are going to install by using this sudo APD install we are going to install this git call unip tar make and this Bim editor and here is W get now once I will write down this hyphen y so here you can see everything is getting installed over here now here every thing is done so now if it is giving you this particular uh window so you just need to hit enter and let me do one thing let me enter yeah here also and yeah it is fine so it is done guys now let me check one more time let me copy and paste over here the same command and I'm checking everything is done or not yeah everything is done see here right this is giving me already the newest version newest version newest version right now see guys my machine is ready I have updated the machine I have installed every software whatever is required now what I will do here I will clone my repository right so here is my repository guys this one so here actually I kept the application the entire application whatever application I'm running inside my system now you just need to clone this repository over there on top of that server right so here is my ec2 instance and here if you will write it down this get clone right and just provide the link right just provide the link of your repository now here guys see uh here is a repository link and hit the enter so it will be it will clone your repository and you can check it also so just just type this LS and here you can see this is your repository now you will write CD here CD means what change directory so just write CD and check uh with this particular repository so here guys you can see I'm inside this folder I'm inside my repository now right LS so here you will find out out all the file so here we have a response streamlit experiment means one folder McQ generator my main file here you can see require. txt setup.py and test.py and test.txt so I have the entire file now guys see uh here actually we have we are using the open API if you look into the EnV environment EnV file so here actually what I'm doing I am creating one variable the variable name is what open a API key but here one we have an issue right so what is the issue you cannot upload you cannot upload this open AI API key you cannot upload this open a API key on GitHub right if you're going to update it so automatically it will delete right so this open actually don't know like what type of code they have written so if you're going to upload this uh like this key on any uh repository okay in any public repository automatically they will detect it and they will delete right so actually we cannot upload this particular folder this EnV folder on my GitHub right so there is a issue there is a issue so what I will do here so I'm going to create the EnV folder EnV file over here itself in my machine so for creating a file there is a command the command is what don't worry I will give you all the command first let me show you first let me run it so here is a command the command is touch right so here if I will write it on this touch and here if I will write en EnV do EnV so you can see uh let me show you so here I have created this EnV file right so it is not visible let me show you with ls hyphen a it is a hidden actually this dot file actually it's a hidden file now you will find out this EnV yes we have this EnV file now what I will do I will open this file by using the vi editor VI or VI editor so once I will write down this VI and here I will write down this do e and V now here guys see I have opened this file now after opening this file you just need to press press insert right in your keyboard there's a button the button name is insert just press the insert now you can insert anything over here now what I'm going to do so here actually in my local I have my openi key just copy the key from here and keep it inside your EnV so let me do it uh let me directly paste it over here after copy see guys so here open a key and I pasted it now after that what you need to do you just need to press escape button so press the escape button it will be saved now if you want to come out from here so for that you just need to press the colon colon and WQ so here you can see uh like in the bottom bottom left bottom so there I written colon WQ now hit the enter and you will be out from the vi editor right so here I have created a file the file name was EnV and inside that I kept my open a key now if I will write this cat Dov so here you can see whatever content is there inside the EnV file I am able to see on my my terminal right so open a API key and this is what this is my API key now guys what I will do here I will install all the requirements into my machine so here we have a re. txt file so what I will do here I will write a simple command and see guys if you are using Linux machine if you're using Mac OS so instead of writing pip or instead of writing python you all you must uh uh you must write over here pip 3 right so here what I'm going to do I'm going to write down pip 3 pip 3 uh install pip 3 install hyph R require. txt right so this is my file name now I'm installing all the requirement in my machine so here once I will hit enter so here you can see uh okay it is asking sudo AP install Python 3 fine guys so I forgot to install python over here it is giving me a command see as soon as I've return return this pip install hyph ron. txt it is giving me an issue it giving me error that pip 3 not found because I forgot to run one command here the command was for installing the python so let me write it down over here sud sudo sud sudo AP sud sudo AP install so here I'm writing sud sudo AP install and after installation after install what I will write I will write python python and Python 3 hyph pip okay so this is the command which you need to write it down sudo epd install Python 3 hyen pip so once you will hit enter now here you can see now here you can see we are able to install the requirement so yes we are going to install this python now once I will press yes here so now I'm uh able to install it and it is installing in my system yeah so if you getting this warning just press enter and here also now everything is done so see guys uh here is what here is my complete python which I downloaded in my system which I installed now let me do one thing here what I can do on my machine itself I can install the requirement file so for that let me clear it first of all and here I'm writing pip install iphr requirement. txt now let's see okay pip install the command is PIP install inss install I think now it is perfect yeah so see I'm installing all the requirements over here what is the the issue we faced yesterday on top of the neurol lab there was not the issue actually if you will use my updated code right so I updated everything over there so U like it will be running the issue basically it was the uh regarding dependency maybe it took python 3.8.0 because of that only it was giving me the library issue but if you are using uh now just do one thing use equal to equal to sign over there pip install sorry cond create hyphen uh cond create hyphen P environment name python equal to equal to 3.8 so it will take 3.8.8 right so it won't give you any such of uh any any issues and all right now here guys see I installed the require. txt now what I will do here I will run my application right after setting up the machine after installing the python after installing the requirements and all now here what I will do I will be writing stream late right so let let me give you the command there is a specific command for that now here is the command so let me copy this command and let me paste it over here so this is the command guys don't worry I will give you all the commands and I will revise this thing uh then I will give you that so here is a command Python 3 hyphen M streamlit run and here I need to provide my file name I'm removing this app.py and here I'm going to write down streamlit app.py right so here is a like file name streamlit app.py so this is the complete Command Python 3 hym streamlit run streamlit app. py right so let me hit enter now and here you can see my application is running now how you can access this application so for that let me show you so just go through with your instance right now here is the instance here you will find out the public IP address right so here you can see this public IP address just just copy this address and here just open your browser and um then paste your address after copying this address copy this um public IP address and uh put the colon and here you need to mention the port number so by default actually this uh this one this application running on 8501 right on 8501 now if I will hit enter will I be able to run it no actually we haven't configured this particular port number right so what I need to do here let me open my application now here just go inside this security right and uh here the just a wait so let me go back ec2 instance here is a instance yeah now open the instance by clicking on the ID now here guys you will find out so this inbound rule let me show you that inbound [Music] rule yeah so here just click on the security group right and after that you will find out the uh this particular rule so just click on this edit inbound rule this one after Security Group Security Group info and added inbound Rule now here add rule right now just keep it custom TCP and here you need to write it down your port number so your port number is what 8501 and then keep it C custom and click on this uh just select this one anywhere only now everything is done so here you need to keep it custom TCP then uh give your port number here and keep it anywhere that's it right now save the rules that's it okay and uh let me do one thing I think uh this is running so let me first press contrl C and again I can run this particular application so yeah now it's perfect uh so just go through with your application here and here itself you will find out the here itself you will find out the IP address so let me open the IP address just a second instance running now this is your instance McQ generator click on that and here is your IP this one 52 this one this is your IP right 52. 24104 and 155 now copy this ID and paste it over here in your browser so now let me check 155 yeah it is correct so just uh press the column and give 8501 now once you will hit enter so you will be able to find out your application over here just a second it is running I'll let's see yeah so here guys you can see I have deployed the application and now you all can access this particular application I'm giving you inside the chat and try to generate the try to generate the mcqs from here now let me do it I'm giving you this particular link inside the chat just click on that and try to generate it now here if I clicking on this browse file now it is asking to me it is asking me about the file so here I'm giving this AI do just open it and give the number of qes let's say I want to generate a four mcqs here uh write the subject name so my subject is going to be Ai and here write the simple and then create McQ and it is loading here you can see guys it is loading now see let's see it is able to generate or not are you doing it guys along with me have you uh like run any sort of a command don't worry let me give you all the command at a single place and then you can check you can run inside your system I will give you 2 minute of time yeah so here you can see I'm able to generate a quiz so what is the field of study that velops and study intelligence machines so these are the choices and here is the answer right whatever correct answer is there now review is also their review about the McQ now click on this uh so just just go through with this URL and you also can generate now someone was asking me sir how we can save it right for saving the Codex for saving this McQ in a PDF file in a CSV file so already I shown you the code in my previous lecture if you will go inside the iyb file so here I already kept the code so this is what this is what my code actually uh where is where it is where it is uh just a second just a second yeah so here was a code actually I converted into a data frame and here I'm converting into a CSV file now see uh I converting into a CSV file but you can convert the CSV file into a PDF or you can uh generate a direct PDF from here also right you just need to look into that and you can append this same functional inside your end to end application also so if you you you can give one option over there download option so whatever McQ you are getting now on top of your steamate application here itself see uh here uh whatever mcqs you are able to see over here right so you can provide one button over here right hand side download button so once the person will click on the download the script will be running in a back end and you can download this McQ in a CSV file or in the form of uh PDF right so this you can take as assignment where you can append one button one download button and you can write it down the code write down the functionality okay in a in a python actually you can uh like you can create one file or maybe inside that steam late itself you can uh like append this download functionality right you can you can append this download over there and whenever someone is hitting the download this all the mcqs will be downloaded in the form of CSV right so just take it as a assignment and try to do it and you can send it to me on my mail ID or maybe on my uh yeah so you can uh ping uh you can ping me on my LinkedIn and you can post it over the LinkedIn also right so after creating this if you are going to post it over the LinkedIn I think that that is well and good so uh and uh yeah so let's say this is your first end project and let's say first time if you're learning the generative definitely you should uh you must share the knowledge over the LinkedIn as well so you can uh post it over there and you can Tex me and all you can tag the Ino I think that would be fine now uh here see we are able to create the application we are able to deploy it I haven't shown you the cicd one I this is the manual approach which I shown you I kept the cicd for the next project I can show you here also I don't have any issue I can write it on the workflow I can deploy the application that's not going to be difficult but as a beginner first you should adapt the like basic approach you should understand the server and all and uh you should be familiar with the AWS and and then in the next project we are going to do it from scratch right so I will show you the complete cicd and yeah definitely in our course uh we have included so many projects so there uh we are going to deploy it over the different different platform AWS AO gcp and we are going to use AWS ECR okay or this AWS ec2 app Runner and this uh like different different services like elastic code commit uh elastic be stock code made even uh Lambda function right so different different uh thing different different Services of the AWS we are going to use and we show you how uh you can create or and an application and how you can create a production production based pipeline right so this thing is clear now if uh it is clear then definitely we can move to the next topic but before that let me give you all the command which is required and let me keep everything inside inside this uh txt itself so see the first thing what you need to do guys for deploying this application first login to AWS so first login to the AWS and here I'm giving you the link of the AWS so you can uh login with that particular link just a second AWS login now let me give you the link of the AWS yeah so here first you to log to the AWS second what you need to do guys you need to like launch the ec2 instance so search about the ec2 instance search about the ec2 instance now after searching the ec2 instance what you need to do the third place uh you need to you need to configure configure the Ubuntu machine UB to to machine machine right so that's the third thing now fourth one actually what you need to do after config the one to machine launch the instance right launch the instance that's the fourth step after launching the instance what you will do after launching the to instance so you need to update this by using a different different command so I will give you all those command three command I have already written over here let me write it down the uh further command so here is the thing update the update the machine right so update the machine and here is all the command let me give you further command uh here is upgrade now this is going to be a next one and here there is going to be a next you need to clone your GitHub repository and after that there is a next command so sudo AP install this is the next now here uh pip install rec. txt and and here this is going to be a next command for running your application so if you want to run the application now here is a command and the app name is what stream St stream lit app right so this is the command which you need to run right and then finally copy the IP and H uh then what you need to do guys you need to add the environment file EnV file also so for adding that uh there's a command now let me write it down over here if you want to add open AI API key so here the first thing create create do EnV file do en file in your server right so create Dov file in your server now here after creating this NV how will you will create it by using this particular command touch Dot en EnV now here what you will do you will insert you will press insert so press insert insert and then write it uh no after creating that you need to open it and actually by using the vi editor so VI and that WR Dov then you need to write it down some command so press insert from your keyboard and after that after pressing the insert you have to write it down something so copy your API key and paste it there and paste it there the next one actually the next is going to be so after the copy you need to save it so press escape and then colon WQ so colon WQ and hit enter right so hit enter so that's going to be a step now after adding the API key what you need to do so yeah this will be done then uh this is the step for adding the API key now yeah inbound rule so go with your security go with with your security and add the inbound rule right so here actually you need to add the inbound rule there add the port add the port 851 right this one so this is the complete detail of the deployment which I have written over here now let me copy it and let me paste it over here inside your inside my GitHub itself so here is my readme file uh I don't have read me file so don't worry I can edit create a new file my file name is what readme.md just readme.md and [Music] here yeah so this this is the entire command which I kept over here now let me click on the commit changes and here I'm going to commit it so see guys this is the entire process for the deployment okay now let me give you this link so you all can do it inside your system so this is the link guys uh which uh where I kept all the steps you can follow it and you can deploy your first end to end uh first application basically now tell me yes this file will be available inside the notes don't worry don't worry about it so let me check with more doubts this uh file you will get inside the dashboard see this is a dashboard guys this is a like gener VI dashboard now again I can give you this link inside the chat and already you can see my team has updated right so inside the chat if you will check with the pin command so my team team has updated the link of the dashboard right and just go through the Inon platform just just search about the Inon okay just open your Google search about the Inon and this is the homepage now here in the courses there is a section Community program so just click on the community program and here itself you will find out the category so just click on this generative AI so there you will find out all the dashboard so here you just need to click on the English one uh here we have a Hindi dashboard as well I'm taking the same lecture on on Hindi YouTube channel so yeah we we have a Hindi dashboard now here is a English dashboard and this is a community session of the machine learning so each and everything you can find out over the Inon platform let me give you the uh this particular link so that you can log in if you are new guys so that so please try to log in on this Inon portal how how we can apply llm for business inside chat like interacting with DB and perform complex competition task yeah that only we are going to discuss now so we'll talk about that how we can uh like create a complex application here the foundation I think the foundation is clear to all of you now we'll come to the advanced part where we'll include the databases where we'll try to create few more application like chatbot and all and uh yeah that thing will be clarified to all of you just wait for some time so tell me guys how's the session so far do you like it so please hit the like button if you are liking the session uh and please do let me know in the chat also how's the session so far because we have completed a one phase now we are entering into the second phase yeah waiting for a reply so please write it down the chat you are not getting any link uh linkwise don't worry my team will give you that give uh that particular link inside the chat itself if I'm not able to paste it then but I pasted actually I I can see here in my chat here we have already pinned one comment just just look into the pin comment so there you will find out a dashboard and you can navigate the entire dashboard and all entire website from there itself so just check with the PIN comand so deepend has given to me this uh IP and this uh Port so let me check it is working or not he's saying sir I'm following you and this is my IP and my port actually no see it's a wrong I think just check uh once the I think uh there is just like uh in ipv4 actually we have a four segment now so just look into your IP I think you pasted a wrong one see this is the correct right great so let's start uh with the next topic and that's going to be a vector database so we have completed a one phase of this uh Community session now it's a second phase of this community session where we going to start from the vector databases and then we'll try to do few more advanced uh like we'll try to solve few more advanced use cases so the first thing is basically what is a vector databases so how many of you know about the vector guys tell me do you have a basic idea about the vector what is a vector and have you learned in machine learning in a statistic great so I think uh we can start just allow me a minute great so let's start with the vector database few people are saying they know about the vector databases and the vector is nothing they have learned in a mathematics they have learned in NLP and all so uh let's try to understand the fundamental of the vector and the fundamental of the vector databases so so if we talk if we talking about this Vector database so here you will find out that so we have a data right so this data actually we are going to convert into a vectors so Vector is nothing just a set of numbers right it's just a set of number geometrically I will explain about the vector in a lit term also I will about I will explain about this Vector now here you can see this Vector actually we are going to store somewhere and that is called a vector database right so we have a data we are going to convert that data into a vectors and then uh basically this Vector we are going to store somewhere now here you can see one a specific term the term is called Vector database now apart from that like we have other database also like SQL base database right we have no SQL databases so why we are not using those databases for storing the embedding for storing this data what is a disadvantage if directly we are storing this data into this SQL based SQL based database or maybe in no SQL database so what will be the disadvantage why we are converting this data into a vectors and then we are storing inside the vector databases so first of all we need to understand this particular this this problem statement now uh for that what I can do let me move into the slide itself and here I have kept uh those uh thing now first of all uh let me uh show you that what all thing we are going to learn inside this Vector database so if we talking about the vector database so we're going to talk about what is a vector database why we need it what is the need of this Vector database how this Vector database is how will this Vector database work use cases of the vector databases some widely used Vector database that like different different databases we have now so we'll try to understand the use of those Vector database will understand the Practical demo as well practical demo using Python and Lang chain so so uh yes we are going to create an application there we are going to use different different Vector databases like Pine con and web at chroma DV there are a couple of name and more than uh like uh this one actually three so we have other databases also one uh from the open a side so we'll talk about each and every database here so uh here guys you can see uh what we are going to learn so already I clarify the agenda now see uh what is a vector database so a vector database is a database used for storing high dimension vectors such as word iding or image emitting right so either we can store images or we can store in in the form of we can store the images or we can store the text right so directly we are not storing over here we are storing in the form of Ming so first of all we'll try to understand the meaning of mding over here right so what is the meaning of the edding which I have written now what I can do I can open my uh Blackboard and here I can explain you the meaning of the embedding which I was talking about so guys see whenever we are talking about Vector so let let me write it down the few thing over here so let's say uh here I'm writing one number right so here I'm writing let's say uh two so what is this two tell me so if I'm writing two over here so this is what this is the scalar value right this is the scalar value now uh here if I'm going to write it down let's say uh something else let's say 100 so this is what this is all Al a scalar value right it's a single value it's a scalar value now if you if you want to like uh showcase this value in a geometrical in a geometry right in terms of geometry so what I will do I will create the axis so here let's say this is what this is my Axis and here somewhere actually my value will be available this data so here uh let's say there is a two there is a 100 something like that now uh here this is called the single value actually it is called a scalar value now if we are talking about the vector so what is a ve vector so before explaining the vector actually let me uh talk about so here I can give you one uh example so what I can do here just a second let me draw the AIS so here I'm going to draw the first AIS this is my first AIS and here is my second now let me take this particular Arrow just a second yeah so this is what this is my first AIS this one and here is what here is my second exis right now let's say uh here what I'm doing so I'm otting this thing this AIS with the uh direction right so this is my North this one and here this is going to be my South right this is my South Direction now here is what here is my East and this is what this is my West right so this is my East and here is what here is my West Direction right now let's say one person is here right so this one person basically one person is here right now how you will see uh let me show you one thing so let's say one person is going in this particular direction from here to here right so let's say one person is going here here here here here let's say there is some sort of a magnitude right so let's say the person is uh uh person is walking around 5 kilm right so this person is walking 5 kilm in which direction in each direction right so person is walking 5 km in each Direction in is Direction so here we have a magnitude magnitude along with that we have a direction right so along with that we have a Direction so what is the definition of the vector so Vector in the vector actually we have a scalar value and along with the scalar value we'll be having a direction also right so this is what this is my magnitude and here is what here is my direction the direction is e East now let's say if I'm going in this particular direction so from here from my origin this is my origin right now from here I'm going in this particular direction let's say I'm going to travel 4 kilm right 4 kilm so here I can say that I traveled 4 kilomet 4 kilm in North direction right so this is what this is my magnitude and here is what here is my direction right now let's say the person is going over here the person is here basically here here right so how you will calculate it right so how you will calculate the distance so simply I can do it by using the Pythagoras Theorem so what I will do if I want to calculate a distance from my origin to this particular point so what I will do I will uh like uh I will do it by using the Pythagoras Theorem now here uh you will find out see this is what this is my 5 km and here is what here is my 4 km this is my 4 km now uh this is what this is my 4 km this one this this particular which I took from here and here actually tell me guys what will be the distance from here to here so here I will simply use the Pythagoras Theorem this is going to be a 5² + 4² is equal to how much tell me 25 + 25 + 9 so sorry 25 + 16 so here actually we'll be having a 16 now 25 + 16 how much U 35 and 41 I think right so underscore 41 now here actually this is the magnitude of the person means from here to here now if we are talking about the direction right so what will be the direction of this person so here I can write it down like like this underscore underscore 41 and here I can write it down this northeast right Northeast Direction so this is what guys tell me this is my Vector in 2D so this is a vector in 1D this is a vector in 2D right so this is a vector in 1D this one this is also a vector in 1D and here you can see this is what this is a vector in 2D now here you can see this is what this is my magnitude magnitude of the vector and here is what here is a direction actually this is what this is the direction now you can see the direction any now let's try to understand this thing with our X and Y right so tell me guys this uh example is clear to all of you because I'm coming to the embedding and I I will explain you the embedding but before that the vector concept should be clear right if uh if you are not going to understand the vector so definitely won't be understand the concept the embedding tell me guys this thing is clear to all of you are you getting the concept of the vector here uh which I drawn which I uh clarify tell me guys fast I'm waiting for your reply if you can write it on the chat so that would be great and then I will proceed further yes the vector definition is clear to all of you great now here see let's try to understand the same concept by using the XY AIS so here what I'm going to do I'm going to draw the axis let's say this is my xaxis right and here is what here is my y- Axis this one is what this one is my y- Axis right this one now see uh what I can do just a second let me draw it one more time this is my Y axis now uh let me annoted this one so here is the X and here is what here is a y so this is my x one and this is my X y1 right so this is a negative this is representing a negative and this is also negative coordinate now see guys here uh let's say uh there is one point right at this particular location this is what this is my point right now will be having some coordinate regarding this point tell me x and y coordinate yes or no tell me yes so this coordinate actually this X and Y right in this 2D space right in this 2D space actually this coordinate is nothing this is a vector right this is a vector so if I want to represent right so if if I want see this is what this is my point in 2D in two Dimension space now from here to here there will be having some magnitude right so it is having some magnitude from here from Orizon to to this particular point so this magnitude plus this is what guys tell me this is the direction the direction which I shown you over here by using this north east west and by using this uh like north south east west right so here now instead of that I'm taking this X and Y just just look over here this is what this is my point and from origin to this particular Point actually we have some magnitude right so there is a distance and here is what guys tell me this is a this is what this is the direction this is a Direction X and Y so let's say let's say what I can do over here so this x and y coordinate I'm assuming that this x is around I think five and this Y is around let's say four so here I can write it down I can represent I can represent this particular Point like this I can write it down over here five and four and this is nothing this is my Vector so in mathematics what is a vector so in mathematics magnitude magnitude along with the direction right along with the direction now how we represent this a particular Vector technically so simply if I'm writing like this uh like if I'm writing like this X and Y right and whatever value we have of the X and Y so this is what this is nothing this is my vector and it's a 2d representation of the vector now let's say in my Vector I have I'm having X Y and Z let's say I'm having this three thing x y z so this a vector in 3D space right this is the vector in 3D space now instead of this one let's say if I'm writing uh X1 here I'm writing X2 here I'm writing X3 and up to xn so here I'm saying it's a vector in N Dimension space what is this guys tell me it's a vector in N Dimension space now the term Vector is clear to all of you what is a scalar what is a vector and how to represent this Vector it's a representation of the vector right and I started from here from this a particular direction and I clarify clarify this thing over here right so how to represent the N Dimension Vector so this is this X and Y is nothing it's a 2d representation of the vector this XY Z is nothing it's a 3D representation of the vector and this is nothing this is the nend dimension representation of the vector clear I think this part is clear to all of you now I'm coming to the next one here actually we are talking about the embeding now what is this embedding so let's talk about this embedding let me write it down here the name is embedding okay now see guys whenever we are talking about a model right so here actually as a model I'm using the llm model which model U I'm using the large language model llm means what large language model there are several large language models from open from hugging face from Google meta and all right you'll find out that now here actually I need to provide a data to this a particular model right let's say there is what there is my data which I'm going to provide to my model right now actually see this model is nothing it's just a mathematical equations right mathematical equations so we are talking about the llm model so this this llm model this large language model actually they are using uh Transformer architecture they are using Transformer architecture as a base architecture which architecture Transformer architecture as a base architecture so here in the Transformer architecture we have two things one is encoder and the second one is called decoder right now just think about this encoder and decoder here actually what we are doing tell me here actually see we have a attention mechanism we have a neural Network right we have a normalization so these all are nothing this is just a mathematical equations right ma mathematical operations we are going to perform now here the data let's say we are passing a text data right if you're passing this text data to my model so my equation actually they won't adapt this text Data directly they won't adapt actually this text Data directly right they won't be adapting it actually this text data now uh in b between actually what I I will do so in between I will encode it what I will do guys tell me I will encode this data right so what I will do I will encode this particular data now what is the meaning of encode so here in between actually I will perform the encoding now we have a various ways of encoding the data encoding is nothing it's just a numerical representation right it's just a numerical representation of the data right numerical representation of the data now we have two ways for encoding the data one is without so here uh the one is without without DL right which is simple frequency based method and the second is one with DL right with deep learning so we are talking about without deep learning so there are couple of methods for encoding the data right so the first method which I can write it down over here that is I think you already knows know about this particular method the first method is a document Matrix document Matrix right so uh we create a document Matrix the second one the second method that is one that is called T tfidf method right so by using this TF IDF method also you can do the encoding so document Matrix is there this is also called like uh bag of words right bag of words now here you will find out the and the third one let's say n g is there and the fourth one let me write it down here tfid is there andr is there document Matrix is there here you will find out one hot en coding right so this is also our technique now one more technique is there integer encoding integer encoding so this is actually uh like uh this is a without deep learning I'm converting a data into a so without deep learning I'm going to converting a data into a numeric I I'm creating a data into a u like I'm showing the data in a numeric U I'm doing a numeric I'm showing a numeric representation actually right so here we have a document Matrix DF IDF engram one encoding and integer encoding now there are a several uh there are some disadvantage of this particular technique then I will come to this with DL okay let me write down the name also like with DL technique so here you will find out what to back right word to back is there which is very famous technique the second technique uh which has been prop proposed by the f Facebook site that is a fast text now the third one you will find out that a Elmo right Elmo now here uh the fourth one word to back is there fast Tex is there Elmo is there even B is there by using the B and and coding we can do that right so DL based technique now there is one one more technique that is called this one glove Vector so actually glove is not DL based it's a metric Matrix factorization based right so Matrix factorization it's a matrix factorization uh method right so this glove Vector now we have so many technique for encoding a data right now here if we are talking about this uh this particular technique where we are just like talking about the frequency of the data so there are several disadvantage of this right so definitely we are going to convert our data right from text to numeric uh text to numeric value right we are doing it by using this particular method but here are several disadvantage the first disadvantage actually which I can write it down over here that is what that is a uh like by using this technique right so at uh we we are by using this particular Technique we are ending up with the sparse Matrix right so we are ending up with the sparse Matrix what is the meaning of the sparse Matrix so in the sparse Matrix you will find out there are more number of zero there is less information right so that is called a sparse Matrix now the second is what this is here actually you won't be preserve your context right so here actually you won't be able to preserve your context now you this this ambing this this number this a numerical representation basically which you are getting of your data this is meaningless L right this is meaningless so here this is going to be a meaningless and you won't be able to preserve any sort of a context right so if you are going to convert your data right if you are going to convert your uh data into a numeric value by using this particular technique I'm not going to I'm not going into depth actually I can show you the uh how to calculate and all but as of now I'm just giving you the overview advantage and disadvantage so by using this technique there is these there is a different different like disadvantage of it there is two major disadvantage which I have highlighted one is sparse Matrix and the second one is context contextless right so meaningless there is no there won't be any such meaning actually whatever vector and the numeric value which you are going to generate right now over here see if we are talking about our data let's say we talking about the text here is a what here is a text so text is nothing actually here it's a collection of sentence right sentences now it's a collection of the phrases don't worry I will show you each and everything practically by using the python and here in the sentence phrases actually you this is the collection of words or tokens this is called word or it is called a tokens right fine now whenever we create whenever we perform this uh particular whenever we use this particular technique so how we do that so let's say we have a data right we have a text so from that particular text what we do we generate a vocabulary right so we create our vocabulary and here let's say first what we what we do we create the vocabulary uh I hope the spelling is correct so we create our vocabulary and by using this vocabulary we perform the end coding right we perform the encoding so here we have a sentence we have a text we have a data now by using this data data after cleaning and all so we perform the cleaning so here we perform the cleaning and whatever data and all I get and uh we collect the data we we we call it as a we call it vocabulary actually and by using this vocabulary we create the end coding right we create the end coding now over here see uh okay this is fine but here I shown you that we have a several disadvantage now um like there was several disadvantage of this particular technique and the major disadvantage was uh contextless okay contextless or meaningless because of that actually we were not able to retain the information so here uh few more technique came into the picture this what two back actually it's a very famous technique this one okay it's the old one also it's a famous one also now here the the concept came into the picture the concept name was iding right so here see we were having the disadvantage inside this particular technique now the concept came into the P picture the concept was the iding concept so here what was the embedding concept so embedding also it's a numeric representation of the data so let's say we have a data now this data actually if I'm going to represent numerically so that is nothing that's my embedding right so this embedding is nothing actually this was a vector right this is what this is a vector and what is a vector vector is nothing it's a a set of numbers right so we are talking about the vector it is a set of number and how to showcase the vector how to represent the vector I already told you we represent the vector in this uh square bracket right technically if I have to represent the vector I represent like this and mathematically if I calculate it so yes so we talk about the direction plus magnitude so here m means what magnitude plus Direction so that is what that is a vector so we have a embedding so this embedding concept came into the picture now here also we are representing a data in terms of numeric value but the way was little different right so here actually we were able to achieve two thing first one actually we are able to achieve the dense Vector right we are creating a dense vector and the second thing was the second thing was we were able to uh like sustain the meaning also so context full right context so context t e XT context full meaning right context full or meaningful meaningful right so we were able to achieve this two thing by using this embedding now let's try to understand this embedding by using this word to back so here again I'm not giving you too much detail regarding this embedding and all regarding this word embedding es uh escap gr right or CBO method scheme gra method right so there are different different method we have inside the word to itself but here uh let me give you the high level overview that how it was working why I'm doing that because the next concept is directly to the embedding only if you are not able to get it uh if uh this Basics uh if the basics won't be clear here that definitely you will face a several issues so that's why first I'm clarifying this a basic thing so tell me guys are you getting it right so whatever I'm trying to explain over here regarding the vector embedding data different different technique of the embedding so are you getting my point yes or no tell me are you able to understand the concept if you are getting it if you are able to understand that please hit the like button please let me know in the chat yes tell me so I think people are writing now yes great okay fine so we are having the concept of the word to back now let's try to understand this embedding right now here uh what what I can do I can give you one one example so let's say here is my sentence right so here I can give you one example actually so by using that you will be able to understand the meaning of the spas and the dense vector and you will be able to understand why we are not able to sustain the uh context also right so the example is very very simple let's say here I'm writing my my name is sunny right so here I'm writing my name is sunny now the next one is let's say here I'm writing sunny sunny is a data scientist and here I'm writing Sunny is working Sunny is working for I neuron right so Sunny is working for I neuron so first thing what I will do so the first thing basically I will generate my vocabulary right vocabulary so for generating a vocabulary uh so here I will find out the unique words so there is my first word second word third word fourth word fifth word sixth word right now here a seven8 n so here what I will do I will create my vocabulary so in my vocabulary I'll will be having nine words so one is my one is name you can remove the unnecessary words and all by uh using the text cleaning techniques so here my name is sunny so this is my fourth word now here is a data science right now here word word and for and here we have a i neuron right here we have a i neuron so these are my vocabulary 1 2 3 4 5 6 7 8 9 right now let's say I want to create a one hot and coded Vector one hot and coded Vector for this particular sentence for which sentence guys tell me so I want to create it for this particular sentence for the first sentence now now if I want to represent the my inside this sentence what I will do here so here for my I will write it down the one and for rest of the value I will write down the 0o so 0 0 0 5 6 7 8 n so this is the representation of my first word then I will write down the second word so here is name so here for the name actually that is 0 1 0 0 0 right 0 6 7 8 8 9 so this is my second word like like this there will be my third word so here let's say this is my third word so the third word 0 0 1 0 0 0 0 5 uh 4 5 6 7 8 9 and here is what here is my fourth word so fourth word is sunny so 0 0 uh 0 1 0 0 so 1 2 3 4 5 6 7 8 9 so this is a this is my one sentence actually this is my first sentence which I uncoded which I uncoded so let me write it down over here this is what guys s be this first sentence which I encoded by using the what H encoder now see guys how much sparse this is how much sparse this is right and here there is lots of zero and this might be a context l in a longterm sentence right it might be a meaningless so here is a example of the one H and Gooden and whatever techniques you will find out yes a tfidf is a better one even Google was using this technique for a long time now it uh replace this tfidf technique by this embedding one only because this tfidf it's it's a research of the Google right document matrics it also work in a similar way like this one hot encoding somehow right so somehow it works with a one hot end coding right this uh document Matrix now we we have TF IDF TF IDF is a better one NR is also there I will talk about the NR and here is a integer en coding so we U like code this value with a integer number right now here is the example of the one H and coding now I will explain you the concept of the embedding by using this word to back that how this word to back is working so tell me guys is it clear to all of you so far yes or no h think it is fine so just a second great so I hope uh this still here everything is fine everything is clear and uh just a second yeah it is uh clear now yeah great so let's talk about this word to back I'm not going into the detail of word to I'm just trying to explain the concept of the embedding only here right so how it was working so here guys if we are talking about the word to bag see let me do one thing over here what I can do I can uh Show You by using the example one example right so see let's say we have some data right so let's say we have some data and from that particular data what I did I created my vocabulary this data is nothing it's a text data right it's a text data and from this particular data I'm going to create my vocabulary right so let's say this is what this is my uh data and here uh this is what this is my data data in the data basically you'll find out the vocabulary so we are going to generate our vocabulary so here will be my some words and all now see if we are talking about the embedding now inside the embedding what we are going to do so we are going to create some features right so the first thing actually the first thing is what the first thing we are going to create the wab and second thing is what we are going to create a features right features from this book app okay we are going to create a feature from this book app now let me give you one example that how the feature and the bab looks like so there is one famous example very famous example let me write it down over here so let's say there is my book app which I'm going to write it down over here uh in the bab let's say we have some data and from there I I have extracted this bab right vocabulary so in the bab actually we have some value let's say there is a king right let's say there is a queen this is very famous example that example only I'm going to write it down over here that uh we have a king queen we have a man right we have a woman and we have one more word let's say we have a monkey over here right so this is a like VAB actually which I have extracted from where from my data itself right you can assume that we have a data this what this is my vocabulary now here actually you will find out some feature right so my feature is what let me write down the feature also so the first feature actually uh that is what that is a gender right so here the first feature is what the first feature is a gender the second feature which I'm going to write it down over here that is what that is a wealth right the third feature which I'm going to write it down here that is going to be a power right the fourth feature is going to be a weight right weight and the third uh fifth feature is going to be a speak now see this vocab right and this feature right so every thing is being done by the neural network itself neural network will automatically take care of it right so actually we have to pass this uh book app and it will automatically look into the features right this particular feature actually the feature which I have written so here what I will do I will create my data in such a way there we'll be having a vocabulary and we'll be having a neural network we'll be passing that to my vocabulary and my feature will be create and in between basically whatever Vector I'm going to generate that Vector itself is going to be my embedding right so here how the vector looks like so this is the high level representation of that mathematical so whatever complex mathematics is there now it's a high level representation of that that's it now here let's say we have a king we have a queen we have a man woman and monkey this is my vocabulary and this is my uh feature now here see guys we are going to assign a weight right to this particular bab right we are going to assign a weight the weight value will be from 0 to one right so here I'm saying King King is having a Zender right so here I'm saying yes it is having a Zender means one now Queen is also having a Zender right so here actually uh what I'm saying King is having a Zender now Queen is also having a Zender right uh here I can write it down the one now here I can write it on male also so you can say uh let's say the gender is going to be male female so you can specify you can specify let's say if the gender is going to be male over here this one now in that case what you will say so for King actually you will write it down one right so here let's say the gender is specified that is male so what you will do for the king you will write it on the one and for the queen you will write on the zero right here the man yes it is one woman actually it's a zero and monkey let's say it's a one right I'm talking about the monkey it's a male one now if we are talking about the wealth right so again I will provide some sort of a number over here see to the vocabulary I will assign some number based on my feature okay so wealth yes King is having wealth so here what I will do I will assign one now Queen is also having wealth so I will assign one over here now if we are talking about the men so Men actually it's not a king right so men is not a king so they it might have a wealth or it might not have a wealth right so here I'm not going to assign a one so between this 0 to one I can assign any value this is going to work as a weight right so here I can assign 0.5 over here this woman also same right so it is having a less wealth compared to men let's say 0.4 and monkey is not having any sort of a wealth so here I'm going to write down the zero now if we talking about the power so definitely King is having a power Queen is also having a power but maybe less than to this King so here let me write down let's say 0.8 eight now here let's say this man is having a power let's say it's having very less power 0.2 this woman is having a power let's say 0.2 and monkey is not having any power now if we are talking about the weight definitely King is having a weight 0.8 now let's say woman this queen actually it's a more than this King in terms of weight so here I can write down the 0.9 man also is having a weight right say uh it's having 0.7 and this is 0.8 and monkeys also some weight let's say 0.5 right so to this vocab based on this feature I'm going to assign some sort of a numbers right and here let's say speak so yes King can speak Queen can speak man also can speak now here woman can also speak but monkey cannot speak so here is a zero so now you will see that this is my first Vector see this is the vector of the King right this is the vector of the king so here I'm representing the King by using this particular particular Vector now if we are talking about the woman so here is a vector of the woman guys this one sorry this is a vector of the queen this particular Vector now if we are talking about the vector for the main this is the vector of the main I'm going to represent main by using this particular Vector now just look into this example where I was representing Sunny by using this Vector now compare this vector and this type of vector see this Vector is actually this vector is dense Vector right this Vector actually it's a dense vector and it is having more meaning right it is having more meaning it's not a meaningless it's having a meaning which I have uh which I can uh basically uh it is having a meaning which I can prove it also now this Vector whatever Vector I have designed over here it's a 5D Vector it's a five dimension Vector right now guys see I told you uh about the two Dimension vector now let's say here uh if I'm going to draw the two Dimension Vector so this is my two Dimension Vector this one and how to represent this vector by using this x value and Y value now if I'm writing about the king let's say this is what this is my king right so here how to represent the king Now 1 1 1 0.8 and 1 so here is what here is my king Vector now tell me guys this King Vector actually it is in five Dimensions so we we cannot draw it like this we cannot draw it like this so see the word to W model the word to W model which Google has Stained it was a model from the Google right so this Google has Stained this particular model on a news article on a Google news article and actually uh the vector they have created the vector which they have created over there the vector size was the 300 Dimension right so the vector size was the 300 dimension so here I have just given you the Glimpse right with a few vocabulary and the feature now here uh if you will look into the real workto model which you can download from thepi or maybe from any NLP Library like nltk and all so the dimension you will find out of each Vector which is going to be a 300 right which is going to be a 300 so this is called embedding now here here guys see whenever we are talking about whenever we are talking about neural network so in a neural network what we are going to do so in that actually we have three layer one is a input layer the second is called uh hidden layer the third is called the output layer so here actually what is happening see we are passing a input we are passing an input now what we are passing over here what we are passing to this uh what we are passing to this neural network so here actually we are passing this a particular feature right this a particular feature so we are passing this particular feature and and we are assigning some weight and at the end actually at the end at this particular layer in the output layer whatever Vector I will get right whatever Vector I will get in the output layer so that itself is called is going to be my embedding right here I have given you the high level overview how the bend how the embedding is going to be generated but the same process is going to be automate by using this neural network and here what feature we are passing which feature we are passing so what I will do I will create one recording right for the word to back along with the python implementation there I will show you uh like how this word to back is working in actually actually right so here U yeah this is all about the embedding so embedding is nothing it's just a vector and what is a vector you already knows about the vector so here you can see I clearly given you the explanation about the vector so what is a 1D Vector what is a 2d vector and if here let's say we are going to write down the five value right so that is a vector in a five dimension so we cannot draw the five dimension that's why I'm not able to show you that a 5D Vector but yeah if we are going to represent it let's say uh here what I'm going to do so let's say if I want to represent this five as of now I'm just going to draw it in 2D itself so let's say this is my king Vector this is my king Vector now this King Vector will be near to this queen vector and this monkey Vector actually it will be far from this king and queen now this king and queen so this men and wom right so this is what this is my king and this is my queen now here let's say this will be my a main vector and this is what this is my woman Vector so this will be near to each other this king and queen Vector will be near to each other and here this monkey Vector will be far from each other and here let's see if I'm going to uh what I'm going to do guys so here let's say I'm going to uh substract this king from this queen and we are going to add something let's say men right so just just look uh just see what you will be getting after doing uh this much of like calculation over here right so you can subtract the vector from each other you can add it and you can make a new meaning over there right so the new meaning also will be a vector which will be representing some sort of a information right so here is all about the word embedding and all so I just given you the introduction because I want to make a foundation as strong as much and here uh you can see why need Vector database here uh there are different different uh database name here is a example basically which I'm showing so in tomorrow session I will uh continue with this particular slide and then directly I will move to the Practical implementation where we are going to talk about two database so initially I will start from this chroma and this weent right sorry this spine cone so first I will try to discuss this chroma and the spine cone and if time will permit then I will come to this f f also so this F is a uh this F actually it's a vector database of the meta AI Facebook AI so yes definitely two database we're going to discuss in the class itself chroma and pine cone and there what we are going to do we are going to store IM bding and you got to know about the Ming guys mding is nothing it's just a vector it's just a number which is having some centic meaning and how we are going to do that we are going to create a feature which we are passing to our neural network and some uh like mechanism is there and based on that we are going to uh generate the vector so tell me guys did you like the session whatever I explain you over here did you understand each and everything how much you would like to rate the session if you're liking the session if you're liking the content which I'm showing you in depth so please hit the like button please support the channel so it motivates to me also and please write your answer in the chat if you're liking the session if you're liking the content and even the explanation also tell me I'm waiting for your reply so please uh tell me guys uh write it down in the chat yes did you learn something new did you understand uh whatever I have explained you the deployment and all and the what Vector databases and uh here uh you will find out the session after the uh like see here is a session guys on top of the dashboard so just enroll to the dashboard here is my dashboard this one just enroll to the dashboard and uh you'll find out the session over here itself and even along with the resources this handwritten resources and all everything will be over here and uh yeah just subscribe the I on YouTube channel where all the thing is getting updated and here uh the recording also will be here great so fine I think now we can conclude it so today we have talked about the deployment and the vector database okay just go through the dashboard and download it TR to check with the res this assignment and all so just click on the assignment and try to solve this assignment and then you can submit it also after solving it so let me show you how the assignment and all it look like this one yeah so here is assignment guys see you can okay so you here on itself you can write down the answer uh whatever questions we have given you and then you can submit it directly right fine I hope everything is clear everything is fine everything you are getting from my sessions just revise it just try to uh go through the session again if you're not able to understand anything then please do let me know write down the comment and here is my LinkedIn so post whatever uh you are learning right so just just post it right here see let me show you my uh LinkedIn so here is my LinkedIn guys you can search to my LinkedIn and here you can write on the message and all whatever doubts you have definitely I will try to reply you it will if it will be a genuine now let me show you my notifications and all see whatever people are learning they are posting over the LinkedIn and they are tagging and all so yes if you are learning something from the session so please try to uh post your learning over the LinkedIn please try to tag me here you can see guys uh like people are doing it and they are able to build their portfolio and uh they are getting attention from like from multiple side they are able to build their connection also right which is going to be very very helpful so uh don't be hesitate uh if you are sharing something right if you're are sharing with the community if you're sharing your learning and all yeah uh now you are uh like enough capable in a generative wayi if you have attended my session from very first day okay so yeah please uh go through with the session uh implement the project and post it over the LinkedIn right and then I will give you more use cases in our upcoming session there I have designed and couple of project we'll talk about that and even uh I will show you from the internship portal also so yeah stay tuned with us and uh if you are liking the session hit the like button subscribe the channel we'll meet again on the same time at 300 p.m. IST until thank you bye-bye take care guys thank you
Info
Channel: iNeuron Intelligence
Views: 3,700
Rating: undefined out of 5
Keywords: vector database, vector db, chroma vector db, pinecone vector db, what is vector db, langchain vector db, llm vector db, openai embedding, vector openai, openai vector, text embedding, openai api, what is embedding, what is vector database, embedding function, create embeddings, search embeddings, pdf embeddings, embedding vector, word embeddings, openai embeddings, ineuron generative ai, ineuron, ineuron intelligence, vector embedding
Id: f0EcGl9O_Wg
Channel Id: undefined
Length: 130min 36sec (7836 seconds)
Published: Wed Dec 13 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.