🟥 Let’s build QA System with @LlamaIndex and Google Gemini!(LlamaIndex, Gemini Embedding, GeminiPro)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
for for e e for yeah hello everyone so I think you are watching to me and I'm audible to everyone yes or no can you confirm in the chat if you can hear me if you can see me then I'm audible guys can you hear me my voice is clear to all of you okay great yeah hello hello guys hello everyone yeah I think uh I'm audible to everyone so this is my first live on my uh own YouTube channel and uh in today's uh session in today's uh like video we'll discuss the QA system we'll try to build one system okay so I hope uh I'm Audible and visible to all of you let me check one more time great perfect okay okay loud and clear fine great I hope there is no such delays or something yes or no great perfect okay fine so I think uh we can start with the session so first of all let me introduce myself so I hope uh you have seen my channel if you don't seen then uh first of all let me show you my channel then here guys so so I recently started my YouTube channel and this is my first live so I'm uploading the content related to the data science generative AI machine learning and operations and um this deep learning and all so uh recently I started my channel and I just uh uploaded 11 videos okay if you will go and check with my videos so here you will find out the like video related to the Gen only but don't worry I will be coming up with many more thing many more videos and all if you want to know about me so here is our introduction video so my name is s Savita and I'm working in a uh like Inon and I'm having around 3 to four year of experience in terms of the data science I worked with uh data science machine learning deep learning amops and all right so yes if you want if you want to know more about me then definitely you can visit this particular video and if you are watching my content so here uh basically I recorded the video related to the genitive AI so just go and check with my video and I'm coming up with many more videos and here you can see I created one uh playlist related to this generative AI so in this particular playlist I discussed uh like uh each and everything so I started uh from the road map and then I discussed the history complete history of the generative AI then here uh I discuss this Lama index Google jimia and all so instead of recording a video what I was thinking then okay so why not I should go live and teach you the end to end Project based on my previous video so here uh you can see I have uploaded couple of video related to this uh Jiminy and this llama index so anyone has uh seen my videos so from my playlist list from my YouTube channel anyone guys tell me and if you're liking this session then please uh hit the like button uh tell me guys first if anyone seen my playlist if anyone seen my video you can uh write it down in the chat in the live chat you can interact with me and don't worry in the live session itself we'll try to implement one uh end to endend Project based on these Concepts only so anyone have watched my video anyone uh try to like uh like understand this Lama index or this Google Jim and all okay great so definitely I will be coming up uh coming up with many more things I I'm uh thinking about like Azor or AWS so I will uh I will create a playlist on top of the AZ machine learning AWS uh machine learning so I will keep it uh like uh I will I will keep it as simple as that and I will match the industry ex standard also so that is my motto and I uh love to teach and to explain the concept uh that's why I have created this uh particular channel uh so that whatever experience I have earned in terms of this technical thing okay so whatever thing I have buil up in my career throughout my career whatever thing I have learned right so I can provide each and everything to the community so I hope guys uh you are able to learn from my videos if anything is there which you want to learn so here uh if you will look into the videos right so in the description of of the video I have attached the I have attached the uh like Google form so here once you will go through with this Google form so you will uh find out that so here I'm asking the suggestion topic name okay and uh if you want anything that definitely you can fill out this form and based on your preference also I will try to make a Content but here uh in starting actually I will try to uh more focus on this uh I will try to more focus on this generative AI I will try to complete it I along with all the tools and framework okay and then uh I'm uh thinking to start one playlist on the machine learning and operations also and then I will come up with the uh like different different clouds like AWS Azure uh because this is very much required if you are going in an industry then uh definitely you are going to use this tools for building the application okay so that is my Moto uh that is my motto basically to teach you everything from starting to end and in a simplest way so if if you haven't subscri subscribed guys so please try to subscribe my channel and yes I will be coming up with many more videos in future now uh let's start with the session so here in this today's session in this session basically we are going to build a QA system by with Lama index and this Google jimney so already I discussed a couple of thing in my playlist here if you will go and check with my playlist so I discussed this Lama index and this Google jimney and all so instead of recording the is instead of the recording uh I prefer this live session so that I can interact with my people uh whoever is learning from my videos and all and yes that's going to be a very very amazing so guys uh are you excited please do let me know in the chat if you're watching to me then uh you can hit the like button or you can let me know in the chat uh that are you excited or not and can we start if we can start then please uh give me a thumbs up and don't worry I will start from very scratch and whatever concept I have uh taught you so far right so based on uh those concept only I am going to create this system so that your handson also is going to be a very very strong and believe me guys it will help you a lot if you are beginner or on the advanced level the definitely you can refer this video this content and you can build anything in your in in your like organization also or maybe like if you are beginner then maybe are trying to learn these thing uh but you are not uh trying to find out the uh resources like resources in the sequence or the reliable resources where you can learn everything at a single place so here uh I on my channel basically I will try to provide you those particular thing so fine uh let's start with the implementation and I hope uh you are able to see the like title also so let's try to start with the project so first of all guys uh what I will do so here I'm going to start it from very very scratch now let me do one thing let me open my VSS code so here I'm going to open my vs code so for opening my vs code here I'm uh searching about the CMD so CMD means what guys tell me CMD is a command prom so everything uh I will teach you from scratch uh and yes I will keep it in my mind that uh you have learned from my videos and I will try to revise those concept also from my playlist from my videos as well so here uh on the command prompt see uh there are many more IDs if you will look into the like uh uh basically technology in terms of programming language and in terms of like a different different framework so you will find out there are so many IDs but this VSS code actually uh it support to like uh to the different different languages it support to the different different Frameworks and yes I always prefer this VSS code uh for uh coding something but it is up to you it is your choice uh that which ID and all you are going to select for developing a program or for developing this project so what I'm doing here so first of all let me show you how you can download the vs code if you are beginner uh then definitely this will help you a lot so uh let me search here download vs code so here uh by using this uh link actually you can download the vs code inside your system and then just click on next next next next and definitely you will be able to install it so whether you are using Windows or Linux or Mac it doesn't matter in every system you can install you can download and install this VSS code there are other there are couple of more IDs like py charm and all so py charm is there and for specifically for the Java there is like eclipse or some other ID for C++ right uh C or C++ or for the like uh for the different different Android right for the different different Android framework or maybe for the JavaScript right for the different different JavaScript framework you will find out different different ID but yeah definitely you can use this vs code as a common one now what I'm doing here so I'm uh I already installed this VSS code so I'm not going to install it again uh here it is already into my it is already inside my system if you want to verify it that uh it is there inside your system or not so definitely you can check it here you can simply search Visual Studio code and you will find out this Visual Studio code if you have installed it inside your system I hope guys you are able to understand it now what I will do here so let me open my command prom so there are a couple of ways basically if you want to launch this vs code so here if you are searching about the vs code so directly you can see this VSS code you can click on this open and you will be uh launch your vs code now there is one more way here uh what you can do you can uh like uh create a folder okay or any sort of a folder right in any directory let let me show you that so here what I'm going to do here I'm going here I'm going to open my directory Dory right so let's say this is my uh C directory now here in my C directory what I can do I can create a folder and directly I can do the right click on top of that and then uh I can launch my vs code inside that folder there is one more way so here in that way actually uh what you will do you will open your command prom and simply you will create a folder so in whatever folder actually you want to launch of vs code so simply you will create that folder so this is the command for creating a folder now here I'm creating a folder fer so my folder name is QA system QA system so here what I did I created a folder I created a directory now what I will do after that I will uh run this CD okay I will run one more command CD and I will uh change my directory from this directory to the next directory okay from this directory to the next directory and what's going to be next directory tell me in this one this one right so in this folder actually I'm going to change the directory so I'm simply writing a name QA and you can press the tab also so once you will press the tab so here you will uh change the directory now what you can do you can simply write code dot so automatically it will launch the vs code inside this folder so see guys it has launched the vs code inside my folder I hope you are able to do it now everything we are doing from scratch only and here itself in the live class only I will teach you that so how many of you you are following to me please do let me know in the chat if you're following to me if you doing along with me then definitely uh like it's going to be a great and I will maintain one GitHub repository also so if you required code if you required anything that definitely I will share you in between so that uh you can copy and paste if you doing along with me okay because practice is very much important what I have seen that uh people are just watching the tutorial people are just watching the videos and all but they are not practicing at all and that's like that's a very bad thing so you should always do the practice and uh like uh after watching the video video after watching the live session or from wherever you are learning so you should always do the practice otherwise uh this learning is waste this learning is completely waste okay if you are not building anything let's say you have learned about the Lama index lenen or maybe Google jimy API you know about the theory but until you are not going to build a system until you are not going to create a basic uh project then how you will get to know that how it is being used inside the industry so this is a very important thing guys if uh until you are not going to to build a project so you won't be able to like uh like understand the thing in the real time so yeah this is a very very important thing now what we can do so here I have launched the folder so uh I required couple of things so see guys whenever we are going to create any project so for that project we required an environment okay why we required an environment tell me we required an environment so that okay we required the environment so that uh we can run the project okay we can run the project we require the environment for for that a specific project so that is the first thing first priority to create an environment okay to create an environment for that particular project we cannot run it directly any uh means uh if if you are if you want to run a project so you cannot run it directly uh inside the system if you are doing that then uh definitely you at the end you will get a lots of error if you are uh running it directly so there are like so many uh like uh so many software you will find out uh for creating this environment and all for your specific project so one of them is Anaconda and Anaconda is the best one for the data science Anaconda is the best one Anaconda is the best package manager for the data science by using the PIP also by using the P by using the python environment also you can create an environment the specific environment for your project getting my point but this uh this Anaconda actually it's a best one because it comes with lots of functionality and most of the thing it's a like automatic one over here we just need to execute the command and everything is going uh everything will be happening over there so if you don't know about the Anaconda definitely I will create one dedicated video but uh here in this particular video I'm not going to talk about it so here guys uh if you want to download this Anaconda what I can do I can uh show you this Anaconda just a second uh from where basically you will be able to download it now just search about the Anaconda on your uh in your uh like a browser right so just write about the Anaconda download So once you will write this Anaconda download automatically you will get the link for downloading this Anaconda by using this link you can download this Anaconda okay so here is a like uh here is a link and here is a option and it is for the multiple it is for the multiple platform and this is the best package manager this is the best up like this is the best software for uh creating the environments and all uh which we are going to use for handling the project so here I have already installed and uh I have already downloaded and installed this Anaconda into my system so I'm not doing it again if you want to check it that Anaconda is available or not into your system so it is very very simple you can uh search about the Anaconda so you can directly write this Anaconda into your search box and you will get this Anaconda prompt so just just open this Anaconda prompt and it it's look like this only and here by default actually you will get this base environment by default you will find out this base environment now if you want to search uh like uh like let's say if you want to search that where my anaconda is the available into my system so directly you can execute this command where Anaconda so once you will write this command where Anaconda automatically you will get a link okay sorry automatically you will get a path of your anaconda of your anaconda exe this is your installer and with that definitely you will be able to identify that Anaconda is installed into your system now don't worry if you don't know about it that definitely I will make one dedicated video on top of it and with that you can do the end to endend project setup now uh let's start uh with the uh let's start with the project so here uh in this particular uh workpace as of now we don't have anything now uh see we have a terminal this is what this is my CMD this is my terminal only this one right this is what this is my CMD right so the same CMD actually you can open inside your vs code also and that is nothing that is called terminal so once you will click on this three dot right so once you will click on this three Dot and just click on this terminal so once you will click on this three Dot and this terminal so you will automatically find out this option new terminal option again I'm repeating okay so this this three dot terminal and this new terminal option if you are not getting this three dot maybe like uh uh you are getting the terminal option over here itself now just click on the terminal and just click on this new terminal so here guys you can see this is what this is my terminal this is what this is my terminal now uh here you will find out the different different option in this drop down like G bash command prom UB to Kali so I will create one dedicated video on top top of this uh like project setup on top of this terminal and all so that this each and everything the each and every idea it will be clarified to all of you got it now the next thing what I have to do so here I'm launching my command prom so here what I'm doing guys I'm launching my command prom so automatically you will find out this base environment why I'm getting this base environment because I have configured this Anaconda over here I have configured I've connected my Anaconda with my vs code how you have to do it for how you can connect this Anaconda with your vs code so it is not very difficult uh job it is not very difficult thing so here you can uh go and check with this view okay just just go and check with this view now here you will find out one option the option name is what command pellet so once you will click on this command pallet guys so here you need to search about this python interpreter now just click on this python interpreter and here you will find out all The Interpreter okay all The Interpreter now here you need to select this base interpreter this one so once you will select that let me show you again go inside the view and then command pallet and then search about the python uh interpreter once you will click on it then you will find out lots of interpreter in my case it is lots of uh interpreter but in your case basically uh you will find out only one this one base one if you have install this Anaconda because by default Anaconda comes with this base environment and in that environment already you will find out the python so here you can select this base interpreter and then you can launch your terminal in that case you will be able to get this base environment into your terminal and with that basically you can identify that you have connect your vs code with the Anaconda so I hope this thing is clear and if you don't know about it guys so I will create one dedicated video uh on the vs code also because in the vs code actually there are lots of tools right uh with those tools uh like uh those tools actually those uh extension you can install in your vs code and this will help you a lot in terms of the development so you can make your vs code like a as much as smarter and there are like lots of tool lots of tool and I will create one dedicated video on top of that uh like how you can integrate those tool into the vs code how you can install the useful extension or the multiple extension right uh related to the docker related to the gate or the different different one if you are into the development and definitely this going to be a a very amazing thing and uh I will create one dedicated video on top of it so I hope you got to know about this vs code anaconda and here you can see so how I have connected my vs code with the Anaconda and that thing is also clear to all of you so tell me guys uh how's the session are you liking it tell me if you're watching to me then uh please hit the like button please uh like uh do let me know in the chat if you are liking it or not tell me guys fast so that I will start with the implementation of this project and later on also you can see because the recording will be available or the like uh Channel itself so I already given you the introduction of the channel and I already like went through with the channel and I shown you the playlist also so this uh recording will be available inside the playlist can we do can we use Lama index and lenen both in sing one project yes you can do that and my next video will be related to that only like how you can use this llama index and lenen into the single one now uh can we use use multiple llms also for a project yes by using the Lang chain you can do that in the Lang chain actually we have one component that is called Model input output so by using that we can connect we can like call the multiple apis got it karik okay great now let's create a project or let's uh first of all let's create an environment so for creating an environment guys there are a couple of command uh there's single command of the cond but here I will introduce with a a different different command of the cond and uh yeah and uh here we are going to use the PIP uh manager pip package manager also because that pip uh package manager uh will help you to install something inside your environment from where from The Hub okay so already we uh like this pip is uh pip having this a py hub so there actually on the py Hub uh they have uploaded all the packages and all so by using this pip pip package manager we can uh download this uh we can download those packages into our current virtual environment for running the project so yes we are going to use those command as well now here what I'm doing so first of all let me create a uh environment so for creating an environment there is a very simple command here I'm writing cond create cond create hyphen P okay so cond create hyphen P now here is an environment name so environment name is a virtual environment V andb now let me write here the python version so here I'm using the uh I'm using python version which is 3.9 so I'm using 3.9 and here is hyphen y so this is nothing this is the like argument which we are passing on top of the terminal okay so now py I'm using python 3.9 for creating this uh environment now once I will hit enter so here you can see my environment is getting created now along with that guys what I will do I will initialize the git also okay I will initialize the git also so that I can later on I can push it uh uh to the GitHub and I can provide you this particular project so don't worry if you don't know about the gate if you are very beginner in that and uh if you have if you don't have any idea related to the different different mlops tools no need to worry about anything I will be coming up with uh I will be coming up with those uh particular videos where I will be discussing each and everything in terms of this mlops tools now let's do one thing here so here what I'm doing so I have created environment let me initialize the git also so for initializing the git there is a very simple command the Comm command name is called get in it now here you can see now this local repository actually it converted into a uh this local workspace this local folder actually it converted into a it converted into a local repository okay this is now this is called my local repository if you don't know about it then no need to worry definitely I'll be coming up with the one dedicated video in my upcoming sessions now here guys what you can do so you can search about the git okay so git uh download now if this git is not working in your case means in your system so definitely you can download this git into your system then here is a download option guys so you can click on this uh particular link on the very first link and from here you can download this kit inside your system and what is a git guys git is nothing it's a Version Control System it's a Version Control System got it it's a code Version Control System again I'm saying I will come up with the different different uh melops tools and in that I will discuss the git also now uh here what you need to do so first of all uh you need to initialize the git after creating the environment now you need to create one file so here I'm using this touch command touch actually it's a Linux command or maybe it's not going to work so because it's a command prom right so if I want to execute the Linux command then definitely I will have to use this git bash G bash now what I can do here so here actually I can search about the touch I can write this touch here now see it is saying that touch is not recognized as a internal external command because touch is nothing touch is a Linux command okay so we cannot execute over the CMD if you don't know about the Linux or the different different variant of the Linux again it's going to be a part of the mlops series okay now what I'm doing so manually I'm creating a file over here so here for creating a file so my uh file name is what git ignore git ignore okay now my file name is going to be a git ignore and this is going to be a really important file so whatever I want to ignore throughout my uh whatever thing I want to ignore throughout my uh development right so I don't want to track uh any if I don't want to track something okay if I don't want to track something inside the git okay while I'm using the git if I don't want to use if I want if I don't want to like track something if I'm using this gate in my local repository and if I don't want to like track something in that case you can use this get ignore file so once you will mention the folder name over here inside this gitig that definitely it's this git is not going to track that particular folder now see it is highlighted first it was green now let me remove it then you will find out that it is green now actually once I will press contrl Z now you will be able to find out it is getting highlighted so I hope you got to know the meaning of this G ignore and what is the uh like use of this git ignore file and how to initialize the git and how to create a environment so now we are ready for our development and is going to be a basic uh like requirement right so always you should have one virtual environment always you should initialize the git for the code versioning so that you can uh get the different different version of the code and always uh you should create one more file that file is going to be a requirement. txt so let me create one file the file name is going to be a requirements.txt okay so this is what guys tell me this is my file requirement. txt and by using this particular file by using this single file I can install I can install all the requirement in a single shot because see guys uh here uh if we are talking about the project so this project actually this uh Qs system with uh Lama index and this jimy it will be required the different different packages so here if you will look in my base environment so let me show you my base environment so here actually we have uh this is my base environment this is my by default environment so if I will search about this pip list here you will find find out the multiple packages multiple packages but guys see uh let's say as of now I'm implementing this uh Q system with my llama index and this uh Google jimney Now tomorrow my requirement is different I'm use I'm going to use the Len CH with the open a now uh day after tomorrow my requirement is different let's say I'm going to use chain lid with the like mrail okay so in that case see if I'm doing everything in this base environment if I'm installing everything in my base environment in this case it's going to be a mhup it's going to be a mhup means this uh let's say this llama index it is required python 3.9 version let's say Len chain is required 3.8 version let's say this uh chain L is required 3.10 version so everything is going to be a meshup and that's why I have created this virtual environment so first of all let me uh let me activate this virtual environment and after that guys what I will do you know so I will install the requirement into my virtual environment so here what I'm going to do I'm going to going to copy the path so here uh my here my command is cond activate and and then what I will do I will pass this path okay so let me copy the complete path because it's going to be a very very perfect so here if I will pass this path now so will automatically detect the virtual environment uh directory and then see this is what this is my virtual environment right so cond activate uh virtual environment now here guys you can also see the command just a second see this is the command cond activate virtual environment now what I'm getting guys I'm getting this V base also over here but it should not be let me check with my pip list if I'm not getting any sort of a library means this thing is correct so no it is uh getting some by default libraries over here into this vnb okay not an issue I can delete this terminal and again I can launch it just a second so just open the new ter terminal here and then what you can do you can select this command prom and then you can write here cond activate this is the activation command if you want to activate your virtual environment so cond activate and here you can mention your path so let me copy the path copy this path over here and see okay it is coming along with this base only why it is so or if I'm searching okay cond deactivate cond deactivate activate now here if I'm passing the path so something is wrong with my command reminder virtual environment de uh does not pass the argument not an issue guys just a second let me handle this issue uh what I'm doing here okay this is fine so let me give the relative path let me Prov wi the relative path here just uh okay this is perfect and not able to find it out why it is so so here is what slash and Dot means current directory okay fine it is coming like this uh so I think it is working in the base environment only it is a base let me check with my git bash here so where is my git bash here is my git Bash now this is my git bash guys let me check with the git bash Source activate uh base because everything I'm going to be launched from the base now here I will write cond activate do/ vnb now see yes it is perfect here see it is is not giving me a base environment but uh in my cond actually it is giving me a base environment also this one it should not give me like this it should only give me this virtual environment only okay let me check one more time here so here let me delete this terminal this one this one and this one now let me go inside the view command pellet python interpreter and here is my python interpreter this one 39.8 so let say what I will be getting here uh let me check with the view command pellet and python dep let me check with the base here just wait uh base only now if I'm going to launch the new terminal command prom so I'm getting the base now cond activate and here what I will do I will copy this uh I will copy this path so where is my path this is my path okay let me copy it let me paste it here so now it is coming in a same way okay not an issue it is also fine we are we can work in a similar way over here as well so yeah so this is already having some sort of a library I think it is fetching from the base environment only don't worry I will look into it but as of now I'm not going to work with this one so let's work with this uh best uh best terminal okay I'm avoiding this Conta terminal as of now and I'm going to work with the best terminal only here is my best terminal and in this B terminal you can see we don't have any base environment see this was my base environment but when I'm going to activate this virtual environment in that case it is giving me a virtual environment only it is not overwriting on top of the base environment but there in my uh in my command prompt actually it was overwriting on top of the base environment fine now if I'm going to check here with Pip list so see uh I think it is fetching it from the previous environment only okay this thing it is fetching from the previous environment only not an issue not an issue guys if we have this thing it is well and good right so yeah now what we can do so here you can see we have a requirement. txt I can keep the different different requirements over here inside this requirement. txt whatever uh requirement is there related to this project got it now first of all let me tell you the requirements all the requirement basically related to this project so here I'm going to copy and paste the requirement so these are the requirement guys and here the first requirement is Al llama index the second requirement is Google generative AI because we are using the gy Nina so this generative a Google generative a package is going to be an important one the third one is llama index uh LM llm jimy okay this is the third one then P PDF is here then python. EnV is here then IPM then this uh llama index embedding jimney and then stream L stream L if you want to create the endpoint Ur endpoint API so for that this streamlet is required and don't worry I will show you about this streamlit also I have created an application and we'll talk about this streamlit as well so uh we can use anything not even the streamlet flas D Jango or any uh other framework like related to the JavaScript or we can use the uh like different different uh framework right for creating the apis and all but here I'm uh keeping it simple and I'm using a stream lid but uh we can use anything and don't worry in the next project I will be coming up with uh other API like a tools and all right so the next project I will talk about the flask or maybe fast API or I can do it by using the Jango also if you are working with the python in that case now requirement is here so we have a requirements get ignore is here virtual environment is here now what I'm doing here so now I'm going to create uh see here what I was doing you know I was doing everything manually I was doing everything manually means everything uh like every files and folder I was creating manually but let's do one thing uh let's try to automate this thing because because we have lots of files lots of folders and all so we should not like create one by one we can do it but it's not a good practice right so first of all uh let me do one thing here let me create one more folder and later on I will show you the automated process by using the file by using the template file okay we can create one template file and uh but we can execute everything in a single shot we can create every folder every file in a single shot itself so guys you should always focus on the automation whenever you are creating a uh app application so you should use those tools you should use those technique where the pro the like the steps or the all the like all the processes is uh happening in a automated way so if you are a programmer if you are a developer that definitely uh you should take uh that way only and if uh like you are building a application in Python so python actually it give you the lots of flexibility and it's a very very very simple also so soon I will be coming up with one more series in that I will show you that how to like write a objectoriented programming if you are developing any a production ready application okay because that is very much required for the industry touch uh and uh like if you if you are going in an industry then in that case see if you are writing a simple script if you writing a method function in that case uh basically definitely you are able to learn it definitely you are able to do it but what about the real time code which you will see which you will see in a real time whenever you are developing any uh software or any project whether it's a web related software or whether it's a e related software there you will have to follow some protocols okay and most of the time you are going to write a code in a module of fion and there actually we are heavily using the uh like objectoriented programming so I will be coming up with one more series where I will teach you that how to write a object oriented programming uh like as a industry uh like as a as a industry grade project right so for the industry gr project and soon you will find out that playlist also on my YouTube channel now uh here we have created the this require. txt now what I have to do here so here I have to create a i python notebook because initially for uh running my experiments and all I'm going to use the I python notebook ipynb notebook okay so here what I'm doing guys I'm creating one folder my folder name is going to be a notebook so in my folder actually I'm creating or I'm keeping one file my file name is going to be a uh my file name is going to be a uh experiment. ipynb okay so let me do one thing thing let me create a folder over here uh in this folder what I'm doing I'm creating one file my file name is what my file name is experiments because here I'm I will check with the different different experiments I will do the different different different experiment okay now guys see uh whenever you will go in an industry whenever you will go in the companies also so the initial PC's or the initial experiments you are going to perform in the uh notebooks only so if you are working with a like AI project where you are going to use the python and in that case you will run your respons more experiments and all inside the notebook only but you will have to integrate those experiment into the end to end pipeline so let's say your manager is coming and your manager is saying that uh so your manager is saying okay so here this is a problem statement and you have to solve this particular problem statement into five days right so let's say he has given you one document and he's saying that okay you have to create one Rec system so from the document actually you have to read the data and you have to use the Llama index or Lang Chen or uh any other like framework and you have to keep it inside the database and you have to create one information retrieval system that's it now you are able to do inside the notebook means you have performed those thing inside the notebook you are well and good with that means you are able to read the API keys and you are able to build the uh system and all and it is working fine also but uh after 5 days he's again he coming uh he coming again and he's saying you that uh okay so now do one thing try to integrate this code into your end to end pipeline into the end to end pipeline into the end to end system right so you no need to do the development level work over there but yes you need to integrate those thing you need to convert your thing your like experiment experiment actually into the modular fashion so that thing is very much required so notwork is fine you are doing your experiments over there you are executing each and everything over there but at the end you will have to be will have to U like integrate into your and application into your main application and there the modular coding is required so always keep in your mind uh if you are implementing The Notebook with that uh after the notebook basically you are creating a uh like a modular coding okay you are creating a modular application with the same experiment with any sort of application whether you are doing in a uh like generative AI or in deep learning in code deep learning right or any like any python application also so try to be keep it inside the modular fion and that's going to be a uh very very useful or very very helpful also so first I will uh implement the notebook here and then later on what I will do I will convert into a end convert into a end to end application so with that you will get a clear-cut idea as well okay so I hope guys you are liking the session yes or no tell me tell me guys fast so you can write it down the chat also and uh definitely it's going to be a very very amazing once we'll it completely and within like uh 2 hour I'm going to complete it I'm going to conclude it and if uh you are finding that okay it's going to be a difficult for you in that case I would suggest you please go and check with my playlist which I already uploaded on my YouTube channel this one this particular playlist and this playlist basically it will help you a lot for building this application okay now let's start so first of all guys what you need to do so here you you are going to perform your here in this particular notebook you are going to perform your experiment so let's start with the experiment different different experiment so uh the first thing basically what I have to do here uh I have to like uh load the API key okay the API key is required for accessing the Google jimney now uh first of all let me do one thing let me create one more folder over here uh let me create one more file over here the file name is going to be a EnV so here what I'm doing I'm creating this EnV file now in this file uh I will keep the Google API key okay so here what I'm doing I'm going to create a file that is going to be a EnV now here I will keep my Google API key because with this API only with this API key only I can access my model I can access my Jimi model so Google API key now from where actually you can collect this Google API key so let me show you that so you need you need to search about the jimney so simply you need to search about the jimy on your browser so let me write here this Jimi okay Jimi so simply I will search about the jimy and here you will get the website so here you will get the website of this deep mind because it has been created by the Google Deep Mind so here you can see the website also deep mind. Google now uh here they have given you the lots of option so jimy era capabilities handson safety jimy apps build with jimy if you're not aware about the jimy guys so I would suggest you that please go and check please go and check with my playlist in that I already created one three video on top of the jimy only on top of the jimy API so please go and check with this three video and it's going to help you a lot believe me guys if you are a beginner in this field if you are like finding out the help right how to like get the API how to access that what is the functionality the different different functionality we have over there so definitely this three videos is for you okay now what you need to do here so here actually you need to click on this build with jimy so once you will click on this build with jimy actually so here you will it will give you the option for generating a API key now just click on this ai. google. DB so once you will click on this ai. google. tab so here actually it is giving you the option for generating the API key now click on this get API key in Google AI studio so once you will click on it so here uh you can see uh here you can see guys here you can see the option for generating the API key now you can close it and you can click on this get API key now see I already generated two API key I already generated two API key if you want to create a API key maybe you don't have anything over here maybe if you don't have anything over here you want to generate your API key in that case just click on this create API key right just just click on this create API keyy so once you will click on this create API key guys you can generate your own API key I have already generated it so here I'm uh keeping it inside my folder and I don't want to expose it also so what I'm doing here guys uh I'm directly copying and pasting from my uh from my previous project so let me do it let me copy and paste this file from the project itself now here I'm keeping it over here so let me reveal inside the folder and what I'm doing here first I'm going to delete it okay perfect then I'm going to paste it that's it now in this particular file I have my API key okay now you can see the API key and don't worry I will delete it after the session also now what I'm doing here so here actually I'm going to open my experiments. iynb this one and in this ENB I have my API key so how to load the API key from this particular file okay from this particular file EnV actually this EnV is nothing it's a uh like it is for keeping the like a confidential thing uh you can think that uh it's a portable environment variable it's it's this EnV actually it's a portable file with where we can we can keep this file anywhere actually this dot means hidden file and here actually we are saving the confidential information so we have the environment variable right inside the system and all so over there what we are keeping we are keeping the uh we are keeping the confidential information related to the system and all we are having like so many paths and all so uh here this EnV actually it's a portable one okay it's a portable uh file for keeping the environment variable with which we can keep it on any sort of a server on any server in my local system or I can like push it to my another server and from there actually we can fetch the confidential information so whenever you want to save the confidential information and it should be a portable one then definitely you can use this file for saving that those information now what I will do here so first of all let me load it so for loading it guys here is the import statement and this is my import statement guys first I'm going to import OS then load _ EnV this package should be there inside your uh inside your like require. txt and here you can see uh this is the like uh me this is the like method which we are going to be call okay okay so once I will done it guys so here it will ask you to select the kernel and here also it is giving you the option now just click on the select kernel and after that click on this python environment then you will find out the different different python environment but you only select the the very first environment which is a recommended one because this environment actually it's a virtual environment it is what it's a virtual environment now just click on it and try to selected guys so here you can see it got selected now just run this particular uh cell so here here if you're running it guys so it will ask you to install the kernel so just install the kernel and this in kernel basically is going to be installed inside your current virtual environment got it so it will take some time until you can uh ask any sort of a question if you are having any question guys you can write it down in the chat also sir is there any model to generate video by using prompt yes we have a model actually we have a Delhi we have a mid journey by using this uh those model we can generate the videos and all we can uh we can generate the images basically and uh for for the video actually there is a different tools okay not a model if we are using API so by using the API we can convert prompt into the uh images but for the video there is a separate tools actually in the tools there are like a complete uh like uh that is a complete uh tool only the complete project only and yes it is taking a prompt and based on that it is giving you the video it's not a single model single model is the uh Delhi okay which is able to generate the images and all and soon I will come up with those tools and all the useful tools and all like whatever tools is there uh definitely I will show you in my channel itself so please subscribe it please hit the like button and uh yeah you will learn like lots of things related to this AI generative Ai and all so here you can see I have selected my kernel I have uh like installed this ipynb sorry I have installed the kernel also now it is saying this no module name so for that I can install this requirement. txt so here what I'm writing here I'm writing this pip install hyph R require. txt so let me install this re. txt and then again I will execute it yeah definitely I will come up uh with this uh length chain and this Lama index also s don't worry so are you liking the video please do let me know in the chat guys if you are liking this video please hit the like button please subscribe the channel also yeah it will take some time so let it install and then I will start with the further coding okay yeah it is loading and it might take some time see here it is taking a time in your case also it it it takes some time basically so yeah let it install and then we'll start with the coding and all because this uh environment this key actually it is very much required and without this key you cannot uh go for the like uh for the coding and all right for the further coding first the key is required then only you can do the further coding so are you doing along with me are you uh running this project are you doing it are you implementing it I want to know your uh like answers so tell me guys if someone are doing it along with me then please let me know in the chat Advanced RG you will get to know once you will implement the basic RG so for that you should have knowledge of the RS what is the RS this retrieval argument generation and mainly we use this l index for the RS for building this RGS where we can uh search about the embedding where we can retrieve it where we can mark it where we can like give the indexing and all so we will learn about it now you can see I have created my environment I have installed the dependencies also now let's see uh whether it's going to work or not so here I am going to check so first of all Let Me Clear My screen and here I can check so and what I can do here I can restart also so let me restart and first let me check with this one and then I will check that uh like a different different of statement different different import statement as well so yes now it is restarted and see it is working fine for me because I have installed this dependencies into my current virtual environment now what I will do here so I will import the different different statement and this uh statement actually is going to be a very very important for your project so let me write those uh statement over here and before that let me get the keys as well so for that uh for getting the key there is very simple method the method name is what get get EnV now here in this method you you have to pass this Google API key right the same name actually the same name which which you uh which you kept over here this one so Google API key just just write the the same name now after writing a name what I will do so let me copy and paste it and then here I am writing this uh Google Google uncore API uncore key and equal to now once I will run it so here you can see inside this particular variable I have this Google API key I can search it also so here I can say that uh if Google API so if this variable if if uh I can check with this particular variable now let me copy and paste it over here if it is not equal to if it is equal to empty right in that case print you can print over here that API key didn't load it so print API key API key not there or not found anything you can say else you can write else you can write here so you can print else you can write that API key found that's it now if I'm if I'm running it guys so here you will see that API key found means I have the API key into this particular variable inside my variable now let's do one thing here so let's try to uh call the Google Jimny API so for calling the Google jimy API what I need to do so how to generate it how to generated you can uh search about the Google jimy API uh Google Jim sorry you can search about the jimy API you can search about the Google jimy and then uh automatically you will find out the option build with jimy and then here is the option for generating a API key now the next thing is what so here what I can do just a second here uh I can call the different different import statement so these are the import statement guys I already kept it into my uh like not ped so from there actually I'm going to copy and paste it so this is my import statement so first is for the direct reader and this thing actually I'm going to be import from the Llama this one then we have this Vector index Vector store index I will store the vector inside this uh inside the like uh inbuilt storage okay we have the inbuilt storage over here we can persist it we can persist uh that particular storage inside the local directory itself inside the local workspace only so for this we have this Vector store index then this is the Jiminy this is for the jimy then this is for the markdown and all right if you want to convert uh into a markdown text and all right if you want to do some sort of a formatting related to the generated text I can use this markdown and this display now here is a service context I will talk about it why this is uh why this package is there this service context because I want to keep my model and my embedding all together for the searching for the information retrieval and that's why we have this service context then we have one more this storage context Right Storage context and this load index from Storage this is just for the loading basically this one load index from Storage so we have Vector store index and we have storage context and we have service context this is this three actually it's going to be a very important method uh in terms of the embeddings right in terms of the embedding in terms of in terms of the embedding Creation in terms of the embedding embedding storage and in terms of the embedding retrieval then we have this geni so this is my main package this is my main SDK so I can keep it over here along with this jimy now I can keep it on the top and uh you can keep in any sequence there is it doesn't matter actually but here I am keeping the similar like uh similar packages at a single place now we have another one so uh let me show you one more that is going to be a j Jimi Ming so this is the model actually this is the model for converting my text Data into the Mings this model aming now I hope you got to know about this import statement and this uh this is from the llama and this is like a core geni module okay now this is from the IPython and all all of the module actually the rest of the module it is from the Llama index only if you don't know about the Llama index if you are new to this channel let me show you where you will find out the Llama index so here guys uh once you will search about the Llama Index right so first of all let me show you my play list so here in my play playlist actually I have created a video on top of the Llama index I already created a video here introduction to Lama index project setup each and everything so this project actually it's a continuation of this series only and I'm thinking in a similar way okay for the further live also so I will teach a I will teach you the topic in the playlist only and whenever I will have to build a project I will I will go live and in the live itself in the live class only I will teach you the project so this two project is here here right sorry this two video is here you can refer it otherwise you can go and check with the we uh the documentation also so you can search about the Llama index you can search about the like documentation of the Llama index so here is a website guys and here you'll find out the documentation as well see this one okay this one there is a documentation now why we use this llama index so we use this llama index so here is the Lama index for what for the data injection for the data indexing and for the query interface getting my point so the basic definition of this llama index is nothing for creating a uh for for storing the embedding for doing a efficient search for doing a efficient retrieval so storage and retrieval there is a two main functionality of this llama index Lin is having like a more functionality compared to this llama index L CH is for building a end to endend llm based system so if you want to understand the differences between this Lama index and Lang chain if you want to make a difference basically so the primary difference is so this l llama index is uh like this llama index is just for storage and for retrieval the embeddings right for retrieval the vectors okay but if we are talking about the Len chin it is having like a more component compared to this llama index and this Len chin actually it is it is for creating a complete whole sort of a system so this llama Index this llama index is just for the storage and retrial and L Chen is for creating a complete system but this index also it support the length chain now you will find out the uh like different different uh like like integration also along with this llama index directly you can load the L CH over here itself inside the Llama index okay so you need to work with both llama index and L chain and in single project you can work with both llama index and L chain but generally people don't do it because this integration actually the integration of llama index and Lang chain it is there itself inside this uh inside the uh source code of the Llama index only if you want to check the source code of the Llama index so you can see here you can search about the Llama index GitHub llama index GitHub so here is the Llama index GitHub guys see uh here you will find out the entire source code of the Llama index now you will find out the lendex fine tuning L andex score lamex experiment Legacy okay and it support to the lenen also let me show you so here if I'm directly search Llama index llama index length chain because the integration is available integration is available so Lama index Len chain so Lama index Len chain integration and here itself inside the documentation you will find out the entire code see in Lama index core Lang chain and from here actually you can import everything you can import everything so for building your system you will be required both so llama index as well as Len chain so no need to worry that whether I should learn llama index or should I learn the langen chain no it's not like that you should learn both you should learn both Lama index as well as lenan and uh you should not worry about it that uh uh if I'm working with uh llama index then uh how you can use the linkchain how we can use the Len CH should I install it separately no it is already there the integration is already available and the main uh Power of this lench is what you know chain it can create the chain it can create the memory based system okay so please uh try to go ahead and try to like uh explore more about it and uh don't worry I will come up with many more detailed video on my YouTube channel so pleas uh here okay and please subscribe it please hit the like button and you will get many more content here itself on my YouTube channel now the next thing is what so here you can see uh I'm going to import this particular thing and then after what I will do I will check with with my API whether my API is working or not okay so for checking with my API here I can simply uh do one thing let me do it so here I can simply search uh okay Google API is fine now here I can simply call one method the method name is what j. config right so once I will uh call this method method name is j got uh jni do configure and here what I can do I can pass my API key okay API uncore key and where is my key guys so here is my key this one so let me copy this key let me copy this uh key okay which I already collected over here now let me paste it over here so what I'm doing I'm calling my API by using this particular key okay so I have configured this key now what I will do I can check okay whether I'm able to fetch the model or not from my gen so here I can write models I can iterate the for loop on top of it models in and here I can search about the jni dot list okay list model right so listor models now here see what I will do I will execute it so let me print this models and you will find out all the models over here by uh doing this this you can check whether you are uh whether your API is working or not okay whether you are able to call the API or not so see I'm able to get all the models whatever model is there or the Jiminy API so we have this Chad Bon we have this text vison we have this aming we have the other model as well so we have the this uh like jimy pro jimy pro Vision now if you want to check whether the jimy provision and the Zim Pro is there or not so here you can make this condition because because if if you look into the uh if you look into the model so it it has been built for the specific task like for generating the answer right and for generating the text okay for counting the message and all now what we can do here I can mention the specific condition so J list uh j. list model and here I'm getting all the models then I can simply uh like call this supported generation models here is this particular parameter now I can uh I can say that if generate content inside this particular parameter met okay over here inside this list in that case only print the name now let's see what I will be getting here so here basically this model this Pro okay this Pro 001 Pro latest Pro Vision latest pro pro Vision so these all are gen gen generation based model so whether I can do text to text generation over here text to text generation or I can do image text to sorry image to text generation so both thing uh will try to understand text to text generation and image to image generation this image to image generation I will teach you in my uh next video so in my next video I will discuss it I will discuss about this text image to text generation in this video I will more focus on this text to text right so text to text only in this video okay now I hope you got to know about the models and my API is also working fine now it's time to implement something so first of all tell me guys are you enjoying the session is it going well for you tell me fast I would like to know in the chat if it is going well or not if you are able to understand or not tell me guys sir can you paste in the chat yes I can do it I will do it uh I will give it to you don't worry I will keep it on my GitHub and I will share that GitHub with all of you so that directly you can copy and paste the code yes karik I will share this inut just wait okay first of all let me uh Implement few more functionality and then I will give it to you so how's the session so far please do let me know in the chat if you are liking this session until I can take some water tell me guys all great so I hope you are learning something here and uh now what I will do I will write my further code don't worry if you are worrying about this uh if you're worrying about this import statement code and all I will provide you everything I already initialized my G and soon I will publish it I will publish my repository okay great so what I can do here guys so here now it is necessary to Define service context now in updated version yeah I'm coming to that pan okay I'm coming to that because this is the recent one only I think uh today or yesterday itself basically they have updated it but before that it was not there so I I will be coming up uh with that so now guys what we can do here if I'm going to face any error now right because of the latest version and all because I have seen with the Llama index also if you will look into the package so let's say here I'm searching about the Llama index IND Pi Lama index now here I'm searching about the Pi Pi llama index now see Pi Pi llama index you will find out very frequent version you will find out very very frequent version over here so see if you will look into the release history so see this is the version this version actually this one the latest version it came like only one day back okay yesterday itself they have launched it now like day before yesterday now here day before yesterday day were before yesterday okay so 2 days back here 5 days back so they are updating it very very frequently now you know I was running this code two days back and basically I've created one application two days back and today I was running it it was getting fail because of what because of the updation because of the version updation okay so that is the thing which we need to understand if we are getting any sort of error over here while we are implementing it definitely I will assist you related to side okay whether the service context is important or not whether this import statement is working or not everything we will try to understand don't worry now what I will do here so first of all let me do few more thing over here and then I will give you this particular code so first of all uh let me do one thing let me write this EnV also in my dog ignore because I don't want to share this EnV with all of you so that's why I'm keeping it inside my DOT get ignore I want to ignore this right I want to ignore it now my next thing is what what I'm going to do here so here actually I'm going to load my data because without data I think we cannot do anything we required a data and if you will look into the title so the title name is what QA okay QA application we are doing uh we are creating a question answering application but how we can do that how we can do the question answering directly we can do with the llm also but here actually we are using some specific documentation for a specific subject okay for a specific subject so QA with the PDF QA with this document that document or QA with the CSV QA with the tsv QA with the Json any sort of a file you can take any sort of a file you can take getting my point I think yes you are able to get it so here uh the data will be required what will be required guys tell me so the data will be required let me do one thing let me create uh okay let me me make a little more bigger let me Zoom the screen zoom in okay perfect now let me do it one more time view view view where is a view here is a view appearance and let me zoom zoom in so here what what we are going to do guys you know so we have a notebook and inside the notebook uh first of all let me write the condition for loading the data and for loading the data guys here we are using a simple method which we have which I already uh written over there the method name is what simple directory reader now here actually I will mention my path the path of the data so what I'm doing here I'm creating a data in my local uh I'm creating my uh folder in my local workspace only uh let me do it let me create a folder over here the folder name is going to be a data now here what I'm doing now I'm mentioning this path right here itself I will keep my data and why data is required tell me because see directly I can do the question answering with my llm also but directly I can do the question answering with my llm also but in case in in some cases actually it might lead to the misleading information or maybe it won't be able to give me a latest information okay so if you asking the if you asking to your chat jpd that uh can you uh tell me the current affairs can you talk uh can you talk about the uh today's test match I think the Test match is happening between India to Australia if I'm not wrong or maybe India to England right so uh can you give me the precise information related to that it won't be able to reply you that so what we are doing we will be maintaining one uh like uh database somewhere right and uh yes uh based on that database we are going to query like spec based on the specific database okay we are doing a question answering based on that specific database directly we can ask to the llm also yes definitely it will be able to answer but what about the what about the like misleading information or what about the specific information or what about the like uh precise information right or what about the latest current information in that case I will have to build a rag retrieval argument generation and for that only we use this llama index getting my point so let's do one thing here let's try to load this data okay so here what I'm doing I'm going to load the data but here we don't have any sort of a data so first of all let me keep the data over here inside this folder so I already like uh keep the data in my txt file let me write let me keep this txt file inside my data folder and here what I'm doing I'm I'm uh like uh going through with the txt file just wait and from there itself I'm going to copy it so my txt file is here let me copy this txt file and what I can do here itself inside this data folder I can paste it this one now see once I will open it once I will open this data folder now see inside this data folder I have this txt file I just pasted inside this data folder you can do the right click and you can reveal inside the file explorer getting my point now what you are doing here you are going to load the data so here you can simply uh run it and on top of this particular uh on top of this particular like uh address right on top of this particular response so here what I can do I can uh take this response inside the variable my variable name is going to be a document okay documents now uh on top of this particular document I can uh load the method so document do loore data now once I will run it guys so here you can see see I'm getting my document so here it is a documents and now it is perfect so see guys I'm able to load my data now where is my data guys so my data is available inside the response I think it is available inside this text maybe we have a variable over here the variable name is what text okay so let me show you that particular variable where is the variable this is the variable text variable so simply if I will call this text on top of it so I will be able to get my data okay now it is saying it is not callable why it is saying like that let me check once so here actually it is in the form of the list so first of all what I will have to do let me collect it inside the same variable the variable name is going to be a doc or let me write the doc over here if I'm going to run it so here you can see this is my dog okay this is what this is my dog now at the end I will show you the architecture of this project how this thing is working how this rag is working and in future actually we are trying to implement some Advanced ring as well so here uh it is inside the list so I can uh like write the zero over here for accessing this first index and on top of it I can call this text so see here I'm getting my response so here I can print it also so that I won't be getting this FL end so just a wait let me print this particular uh let me print this particular text see this is my text which I kept inside my txt file okay which I kept inside my txt file now I can keep any type of documentation over here I I can keep any any any sort of a document so I can keep the I can keep the the PDF I can keep the Json I can keep any other document right I but here I simply kepted txt uh just to showcase the uh just to showcase the flow okay how this thing is working but you can keep anything over here we I I don't have any issue any document basically you can keep it and you can read it okay now the next thing is what so here you uh kept the data inside this data folder after that what you will do so you are going to read it and definitely we are able to get it okay this is the first thing this is the first step which is called Data inje so yes you are able to load your data now what I will do after loading the data guys I will convert into a embedding okay I will convert into aing don't worry I will come uh I will like uh come to the architecture of this project if you're not able to understand that why we are loading this data directly we can ask to the llm and all at the end I will clarify everything okay just be with me just watch it till the end now what I'm doing here so first of all let me write here uh uh let me load the model so which model I'm going to load I'm going to load the zimi model OKAY edding model now here uh basically what I will do for loading the model first of all let me like create a class of this jimy embeding and here I'm going to pass something here I'm going to pass my model underscore name so what is my name what is model emitting name tell me so here is the emitting name this one okay Ting uh J Code 001 or we have other model also so if you want to search about it so you can simply like uh take this one you can simply take this uh generate text count text token okay you can you can check with this uh method basically why it is being used generated answer and based on that you can get it okay so this model actually this chat Bon it is being used for this one this model basically is being used for this one but here uh this embedding it is used for generating the embedding and all right so this ipynb actually it is truncating the output but yeah definitely uh you can get it directly you can get it the model name is a specific one let me show you over here inside the documentation also so just go and check with your documentation here is your documentation right so once you will click on this documentation let me go back over here and here is my documentation so see just uh click on this read API documentation and here just click on this uh python okay python once you will click on the python actually you will get the complete documentation this one now uh just scroll down here after the scroll scrolling down actually you will find out the model OKAY the different different model all the model basically so generative model generative model where is a model guys Google generative Google collab so here is the model let me search about it this is the model guys so here also I think they have given you the link but if you're not getting it directly you can search it over here just click on this jimy now see this is the different different model OKAY model jimy Pro and here you can see jimy Pro Vision you can see the embedding now why we are using this embedding so you can see the uh like uh the entire description of this embedding and all now just just like uh take this particular model for the embedding this is the embedding model okay it's going to be generate embedding from your data so what I'm doing here I'm going to keep it inside my uh I'm going to keep it inside my code for uh for loading what I need to do here so I just need to pass it okay so which model I'm going to load tell me I'm going to load this embedding model so here I will simply write model uncore name what I will do guys I will write this model uncore name and I have to keep it inside the double code this is what this is my embedding model now see what I will do I will run it and uh okay this is my load data only I think I will have to write it down over here itself just wait guys so this is not going to be a correct argument I think I have to keep it over here generating a meing and yes I will pass my model name over here and this is the perfect one I hope you are getting now here actually I can give the name to this one my name is going to be a jimy Ambit model so this is what this is my model name okay this is the first thing now what I will do so here I can load my model as well so what I'm doing here I'm going to uh I'm going to load my model as well so uh for the model for loading the model actually here you will find out that uh we are importing one method okay this jimney one okay we are importing this method jimney so see you are load your model by direct directly using this Jimny uh generative SDK also or you can load the model by using this jimney which is there inside the Lama Index right so this llama index also it a it is having integration of this jimney right it it does the in it did the integration of this jimney so by using the jimney also you can load by using this llama index by using this particular method which which is there inside the lamb index you can load the model or you can load the model directly also it's a core SDK it's the it's a core python SDK for the Google jimy API this one it's a core python SDK for the Google jimy API and here it is from the Llama index I think you are getting this point you are getting my point now what I'm doing here see here actually uh like I'm going to load the model also and let me write the correct API name so for writing the API name here I'm going to uh copying it let me copy this uh where is my API key here is my variable where is my variable guys where is my variable there is my variable let me copy this variable and let me keep it inside my uh let me keep it inside my method okay perfect now here is my model and here is my embedding model so here I'm loading this jimy Pro and here I'm loading this embedding model and uh like uh day before yesterday only they have updated the different different model now see jimy Pro Jim Pro 001 jimy Pro latest jimy Pro Vision latest jimy Pro right so any sort of a model you can use so here as of now I'm using this Jim pro model only I'm not going to load any latest version over here right because I might face error or issues because recently they have like uh launched these particular models now what I'm doing here I'm going to load this embedding also so I have my model and I have my embedding as well now what I'm doing I'm going to create the service context right service context so first of all let me configure my service context so here is what here is my service context okay now uh here is my service context and from the service context what I'm doing I'm going to call this method from default so first of all let's try to understand the meaning of the service context let me show you over the documentation only right so what I'm doing here I'm searching about this service context just wait uh let me open the new one or here basically I can search Llama index llama index service service context so why we use the service context basically you will get the complete definition inside the documentation only so the service context actually it's a container okay service context container is a utility container for llama index and query classes okay query classes now the container contains the following object that is commonly used for configuring every index and query such as llm okay the uh and the prompt helper right for configuring input size uh like the chunk size and all and here we can uh like generate the mding and all here we can configure the iding by using the service context so what is the main use of the service context tell me so if someone is going to ask you what is the main use of the service context so it it is a container that contains the following object now which following context which following like object guys so here it contains the indexes okay it contains it it contain it contain the queries right and here basically it is a very very important for getting the for retrieving the for retrieving the embedding based on a similar context and that's why we use the service context okay that's why use the service context for holding or for indexing the embedding now let me do one thing here let me like uh let me do one thing here let me create a object of it uh here what I'm doing I'm calling this method from default and here we are passing couple of things so first we are passing this model then we are passing this embedding model then we are passing this chunk size okay and then we are passing this overlap now here what is the chunk size and what is the overlap I will come to that just wait first of all let me run it so here is what here is my service context you can see by using this embedding and by using this model actually I'm able to create my service context okay now after creating a service context what I will do you know so here actually I will create the vectors from where from my data so what I'm doing here see I'm going to create a v Vector IND Vector store index from where from the document only and here I'm passing my service context means here I'm combining three things first I'm combining my model then there is my embedding model okay and then basically there is my document means my data and this is the thing basically which we are required for creating any query engine any query engine based on my custom document okay if I want to create an information retrieval system if I want to create a QA system based on my PDF based on my document this is the thing which is required first model the second is tell me aming and the third one is what the main data okay so I hope it is fine to all of you now here we are calling this Vector index Vector store index method so from this Vector index uh Vector store index actually we are calling this particular method from document so this Vector store index is nothing it's a class class only it is what it's a class so if you will look into the documentation you will find out the complete detail let me show you that just a wait so here I'm searching about Vector store index so once you will search about this Vector Indo store index so here you will find out the complete detail of this particular class see this is the class and this class is having method so what is my method name guys if we are talking about the method so this class is having a method so here you can see the method the method name of this class the class method name is what uh this one from document and here what we are doing we are reading the document I hope this thing is getting clear to all of you right now here let me create an index so here the index is getting created simple direct not a trable uh let me check what is here so here actually I will have to pass the docks this is my data so here I'm passing my doc and I hope it is perfect so see guys I'm able to create the indexes also from my data now what I will do guys I will keep it somewhere means the embedding basically which I have generated from the data I will keep it somewhere so for that this is having one method okay this index actually the index which I have created over here if if if you're going to check with the index right so here you can see we have an index now it is a object only now on top of that we can call one method okay so here this is my storage context and on top of it this is my method process so it's going to create one local data base here right so but local database and that local database then local works then local folder actually it will be having all the embeddings it will be having all the information information as well as meta information right so here what I'm doing I'm going to crun it and see once I run it now you can see everything it's going to be uh everything you are getting inside this particular folder so everything every indexing and all is going to be generated inside this particular folder you you can simply see over here so default Vector is store this is my this is my embedding see this is my embedding related to my data this is the embedding if you don't know about the embedding and all definitely I will teach you in my upcoming videos okay what is a specific meaning of of the embedding but as of now just think that this embedding is nothing it's just a uh number representation okay it's a numerical representation of the data that's it nothing else so here is my embedding now uh Doc is store Jason so here you can see the complete metadata now graph is store Json it is empty as of now image Vector it is empty as of now now index is store so here it is in storing the complete indexes related to the embedding so it is persisting one uh local folder uh one local database okay one local store actually for keeping all the embeddings and all now let me show you the notebook one more time so here you can see uh we have this experiments. iyv file and see it is persisting the end it is persisting or it is storing the entire embedding inside this store folder I hope this thing is clear to all all of you now what I'm going to do now based on this indexing I'm going to create my query engine right so index do as underscore query underscore engine so we have chat engine we have query engine we have a retriever there are different different method you will find out over here right so what is the difference between this chat means uh the chatbot and this QA system we will talk about in upcoming session in the chat actually we are going to sustain the memory right in the chat actually what we are doing we are going to sustain the memory but if we talking about the query system in that case we are simply retrieving the information directly from the llm from the train llm or by using the rec system and why we are using the rec system we are using the rec system for the refined output okay if you don't want any misleading information for that also we are using the rec system so I hope you got a clear-cut idea that what is the importance of the rec system and why we should not get directly output from the llm itself because at many places it can it it could be fail also so that's why we are like persisting some data over here and based on that we are going to create an information retrieval system chatboard is a different one so I will use the Len Chen for creating a chatboard uh in my upcoming videos if if if uh like for that also I will take the like a live session and all for creating the end to end project okay now here I'm going to call this method as sarey engine now let me do one thing let me run it and or let me keep it in subware basically in one variable so this is going to be my query engine query engine okay now here what I'm doing so I'm going to run it and index is not defined so first of all let me run this index uh okay so this one is storage and index where is the index guys here is the index index is defined already uh Vector store is not defined why it is showing me like this uh okay I think I will have to execute from scratch let me run all okay running running running fine fine fine fine fine guys fine now at the end I will get my query engine it is running all the sales one more time uh okay perfect now I got my query engine now what I can do here I can uh call something I can do the query to my document it's very very easy it's very very simple and here I can ask to my document or ask I can ask to my llm okay based on this document only now if you want to check now what I have inside this document I can show you that so just just uh reveal in the folder and just click on it so here you will get the document basically this one this is my document now now just read over here what is the machine learning about the machine learning about the generative AI the the like introduction and all I just kept it from the Google itself right I just took it from the Wikipedia somewhere you can keep any sort of a file right PDF file this file that file whatever file you can keep the multiple file also okay multiple file also but according to that you will have to write the functionality right right now here what I'm doing so I'm writing this uh query in query engine do query and I'm asking that what is a machine learning what is a machine learning it's my simple question to my uh document right it's a simple question to my document now let's see what it is answering to me so here it will generate answer okay so see I'm getting a response now what I can do I can collect inside the response and here what I can do I can call this attribute so here response dot response now see guys what I'm getting here I'm getting the response and if I'm going to print it now I will get the precise in a precise format or I can like a call the markdown also both are fine for me so see mine learning is artificial bran and computer science this that whatever right you are able to get the entire information entire detail over here now if I'm asking something over here so let's see if I'm asking that uh okay what is the difference between what is the difference between super supervised and unsupervised learning right so just a question so what is the difference between supervis supervis and unsupervised unsupervised technique right it's a simple question which I'm trying to ask now if I'm going to run it guys so here I will get my response okay so see I'm getting a response now I can print this particular response so here let's say if I'm going to print this response C supervised learning use label data set to train algorithm to classify data or predict outcome accurately unsupervised learning use machine learning algorithm to analysis and cluster unlabel data set getting my point guys see how efficient it is means how precisely it is giving me information let's say if I'm asking something else here I'm if I'm asking uh let's see if I'm asking uh something which is not related to this particular documentation my question is very very uh different here I'm asking that uh who is Mahendra Shing doni okay so here I'm asking that okay let let me ask something about the who cricketer that who is Mahendra Mahindra Singh donon okay so see what I will be getting here I'm getting a response now let me print the response over here so see the what it will provide provide me so see it is saying that the provided context does not maintain anything about Mahindra Singh doni means inside this text we don't have anything related to Mahindra sing doni and it is not able to generate answer as well getting my point guys yes or no so if you want to make a if you want to make a application if you want to make an information retrieval system if you want to make a QA system okay which is not going to leak your information leak your data means if you want to restrict your llm you can do it over here you can do it over here to the precise information let's say I want uh my Megatron or let's say I want my system okay my system that it should only provide up information related to this this this this topic but llm actually it can provide anything it can provide anything right so you can provide that specific data okay you can create a RG system you can create that rag system and you can provide that specific data only let's say if I'm asking uh over here uh if I'm asking something else so if I'm asking that uh can you tell me about the how the how we can uh like uh steal the data or what I can do can you tell me about how we can steal somewhere data okay so something I like this so can you tell me how I can steal the data of the organization right so this is a simple question now if I'm going to run it now here see if I'm going to print the response guys so it will tell me that uh okay it is generating generating generating and now it is done see what I will be getting so this context not provided any information content is still data from the organization so we can restrict it and we can Define the we can we can refine it in a into a multiple ways but see guys we are using it by using the Google jimy model or ambing model and all so those model also they have okay those model also they have a safety settings we can mention the different different safety settings over there also if you don't know about it guys you can go and check with my playlist here actually I already defined it in my part three if you will look into my part three guys here okay so in my part three you will already get it right so see I already mentioned inside the heading Al inside the title also safety settings how you can go and uh like mention the different different safety setting everything I will I have tried to like explain you over here so please go and check with my video and definitely will get it so print response response this that okay it is perfectly fine now guys tell me how is the session so far did you learn something did you understood something yes or no tell me if you are watching to me then uh definitely you can write it down in the chat and uh if you are getting something from here then please do let me know because now I have to create an end to endend system and to end project and yes I am going to do that and within 20 minute 20 30 minute I will do that and this session is going to be for 2 hour only I will keep it for the 2 hour and uh yeah then I will take the next project maybe next week or in upcoming days I will announce it on my YouTube only great all clear okay fine so now let's try to convert this application into the N2 and one how we can do it so first of all let me create one file here because I required the complete folder structure and for that I here I'm going to create one file the file name is going to be a template. py so here I'm writing the command the command name is going to be a touch and template. py so here is my template. py file now what I'm doing here I'm keeping the and uh I'm writing the entire files and folder whatever I want to create okay so whatever files and folder I want to create into to my directory I'm creating each and I'm writing each and everything over here so the first thing which I'm writing over here which is import Os Os module will be required then the second thing uh which is required that's going to be a path Li so path Li is a library basically it will automatically take the relevant path according to the platform so if I'm working on my Linux or maybe if I'm working on my windows so according to the platform it will take the path because in Windows actually we are using the backward slash and uh sorry we are using the forward slash and in uh like uh here in the Linux one in the bash terminal we are using so they are using the backwards slash so both are different see here they are using the backward slash on the BGE terminal uh not this one guys this one this one this one this one uh let me check once so if I'm going into the directory CD data if I'm not wrong then yes it they are using a forward selction in uh like G bash or in B terminal on in Linux terminal forward and in the windows terminal backward slash got it now first of all Let Me Clear it and uh yes it is fine to you and here I'm going to write uh some sort of a code and the code basically is going to be very very helpful for you so here is my path now what I'm doing here I am going to import few more thing okay first let me create a file and all then you will get to know so here I'm going to create one list so this is going to be a list of files okay list of files so this is what this my files now what I will do I will keep it inside the list only and see here I will write the file name so see guys this is my file name which I'm going to create over here I already kept inside my I already kept inside my notepad so here I'm just going to copy and paste it so this is going to be my file QA PDF this is my folder and this is my file file this is my folder this is my file this is my folder this is my file this is my folder this is my file okay now let me do one thing let me write the different different name over here uh because uh I want to keep it very very precisely so what I'm doing here I'm going to uh write a precise name instead of this Helper utils and all so let me do it so first I'm going with this uh QA PDF so here actually I'm going to create three file the first is going for the data underscore inje right dataor in the second is going to be a here itself inside this QA PDF so let me copy and paste it so the second file is going to be a model API or Ming okay so here let me create a next file this is going to be a embedding dopy and here we have a next file this is this is going to be a model API so three file for the three different task model API model uncore API okay so model api. py so we have this three files QA PDF embedding model _ API that is all now the next one is what so we required this similar app logger py uh exception py we requireed other also so here what we are doing we are going to create I'm going to create uh like other file like setup right so setup.py I will tell you why this setup is required and here I think everything is fine everything is done requirement I already created so yeah it is perfect this is the file basically which I want now here actually I have written a code now let me show you the code so this is my code right for creating the files and folder now here I'm reading this files one by one actually from here itself I'm reading the files right so file path my file path is coming here okay this is my file path now I'm segregating it means I'm segregating between this uh file path so this is my folder name this is my file name so here is my folder name and here is my file name I'm saying that if file okay file directory is not EMP okay if it is not empty if it is like U if it is not empty in that case what I'm doing I'm going to create it if it is not empty okay in that case what I'm going to do I'm going to create this particular file file directory is not empty okay then what I'm going to do I'm going to create it and here is my logging so as of now I haven't defined the logging I'm going to remove it once I will Define the logging then I will show you okay okay so here or what I can do you know I can create with loging over here itself uh just a wait first of all let me create it and then I will let you know so here guys you can see so what I'm saying you have to create a file if it is not empty file directory is not empty then create it if here I'm saying if os. path. exist if it is exist or if it is equal to zero means you have a file okay uh if if you have a file but you don't have anything over there in the that case you are going to create it you are going to create your file that's it you are going to create your complete file that's it means along with the path as well as along with the folder as well as the file right now let me execute this file python template. py so here I'm going to execute this file python template. py so see what I'm doing here I am getting the issues what is a issue let me check uh can't open the directory addor number no such file I think the spelling is wrong temp p l python okay let me check with the ls here so if I'm checking with the ls now okay I think I'm into the different folder so CD great now let me check with the ls okay everything is here and now let me clear it and then I will run it so python so here I can write up python template dopy now see my file and folder has created this one my file and folder is created okay so qf PDF is my main folder there I will keep my entire code here is my folder for the logger for the here this is for the exception so exception exception Pi setup I think this is like a wrong one let me check with the template one more time I think I did some mistake here exception. py stream L experiment okay experiment is already there so it is going to be override exception. py yes this is the mistake I missed the comma that's why this I'm getting this particular name so first of all let me delete this file and here after deleting it what I will do I will again run this thing so python template python template. py now see what I'm getting here I am getting the correct file name because it is going to be overwrite the previous one now here I'm going to write my logger because loger is going to be a very very important guys because uh why this logger is important tell me for keeping the information right for keeping the information this logger is important for keeping the execution information okay now here I have written my logger now I can give you the quick walk through of this logger so here is my uh module name it's a module basically which is already there inside the python now here is my lock file okay this is the name of the file which is based on the date and time only now here I'm going to join the path so which path guys so here is my current working directory and this is the folder so I'm saying that in the current working directory you have to create a folder the folder name is going to be a log only now here I'm going to create a directory this one this particular directory then here is my loog file path okay so os. path. jooin so lock path means this folder as well as the file name and then there itself okay I I'm passing it over here this log file path and there itself basically I'm going to write my log I'm going to keep my log and this is the label of the logging okay so if you if you will check with the label of the loging there is a different different label of it so if you are going to mention any one label so below that it's not going to capture the information it will capture the information above to that particular level so we have we have I think five to six level in this python logging so we have error warning information okay or uh debugging a different different like a labels so you can go and check with the logging module so here I can search about it so here I'm searching about this logger labels so you will get it you will go get those labels see here is the label is let me check with the python one so loging loging label python here you will get a different different label so we have I think uh four to five label let me show you here itself inside the documentation see not set debug info warning error critical so we are setting this particular level we are setting this logic. information so this information is not going to be captured and it will capture only information from here only right I hope this thing is clear to all of you now loger is done now let me create my exception also so here exception and logger is very much required so this exception is logger let me keep it I already written the code in my notepad I already kept it over there I'm just going to copy and paste right so here guys what I'm doing it is my custom exception class I'm just uh I will just raise this exception whenever uh I will have to like uh whenever uh like I want that wherever like I will Define the uh that try and accept blog with respect to any sort of a code okay I will raise this particular exception it is taking two thing so here you can see I is taking the error message and the CIS module the CIS module actually it is for the execution detail and here is the error message right so what I will do I will trace the execution the complete execution by using this particular uh like uh module CIS do exe info and then I will extract the different different information like line number okay file name and all and it I will show you along with the I will show you that information along with the along with the error message if you don't believe me I can show you here only I can execute this file so my file name is what python exception. py so here I'm going to execute this file Python exception. py and here is the name python exception. py now see guys you are getting the entire detail of the exception that where I'm getting this particular exception what is a message over here in which script you are getting it so for getting the complete detail of the exception here is the code you can utilize this code and you can run it got it now logger is there exception is there both are here now what I will do I will put the code inside my different different component so let's write the code inside my data injection component I already implemented in I implemented it inside my notebook now I'm not going to write it down so here I'm just going to be copy and paste it so guys see this is the code basically for what tell me so here is a code for what tell me so here is the code for the uh like data inje now let's look into the code here so here I'm saying okay first of all it should be exception exception okay and llama index is fine I think it's going to work logger is also file it should be a logger great and logger dot logger so yeah logger is fine exception is fine Lama index uh llama index core so I think it was llama index core only we'll see if we are getting any sort of error now see guys this is a method for loading the data and here I have defined the doc string right so this is what this is my doc string which I have defined over here doc string is just for the information right it's just for the information related to the particular method then here I'm fing the logging okay so here my data is started loading and here I'm reading the data here I'm loading the data and I'm I'm returning this particular document right and here I'm calling this custom exception if I'm getting any sort of exception then definitely I will get to know and what is the exception tell me so the exception is nothing it's a runtime error okay it's a error basically which we get at the like while we are running the application right so at the time of the execution at the time of the execution the error which we are getting inside the code that is called exception Dynamic error Dynamic error got it now here data injection is fine it's the same code basically which I written in my uh inside my notebook only so here let me show you my notebook here is my notebook and it is empty as of now why it is empty I think it is overr righted the file the previous file not an issue what I can do here I can uh okay I will keep it I will keep it uh from my previous project don't worry because I have uh make I make the copy of it okay so don't worry I will keep it over here so uh now next one is going to be embedding so here what I'm doing I'm going to be write a code for the embedding so here is a code for the embedding this one so L index Lama index and all so here let me keep the exception and it's going to be exception exception okay now it's going to be a logger so here is what here is my logger so this is what this is my logger exception and here is a like related to the Llama index now I'm going to write for the model API so here is is for the model API now let me keep it over here itself now this is for what this is for the model API now let me keep this as a sing uh like a small one and here you can write for the Capital One so from the logger logger what I'm doing here uh just a second from the logger actually I'm going to import the loging from the exception I'm going to import the custom exception so I hope this thing is clear now in the require. txt you can see we have all the requirements and I can install it inside the current working environment okay so first of all let me check whether this file is working or not I can copy the path and uh where's the path this one and I can write it down over here Python and I can write simply okay so it is saying that no such file and directory why it is saying that no such file directory uh user okay I can take the relative path let's let me take the relative path over here and here I can search about the file okay so here what I'm doing now I'm searching about the file so here is a file it is saying QA with PDF data and here it's going to be a folder inside that I have a file okay let me check what is the issue here why it is sh like this uh QA folder and all all everything is perfect everything is fine okay we'll see that what is the issue here first of all let me do one thing uh let me clear it and let me write here pip list so see inside the PIP list uh okay here I have all the thing now let me keep something over here let me keep something inside the setup.py file also it is a for the local environement if I want to create a local sorry if I want to install the local packages this is going to my local package now this one okay if I want to install the local package into my current virtual environment for that I have this setup.py file so this is my Global package which I already installed now this is my local package right so here I can choose the python interpreter and I can select this uh recommended one I think now it is fine so what I'm doing here so first of all guys uh here uh I'm going to be install this setup.py file also so for installing the setup.py file so wherever this init file will be available now in whatever folder it's going to install that folder it's going to install that folder see why I was getting that yellow line because I haven't selected the correct interpreter now I selected it and now you can see the line is gone the yellow line basically now you just need to click on the select interpreter and you need to select the correct interpreter over here means The Interpreter from your current virtual environment because there only you have installed all the libraries now got it now what I'm doing here see uh here this is called my local packages which I'm going to install in my current virtual environment so for that there is a command python setup.py install right install now here actually uh I hope it is fine it is completely fine now if I'm going to run it so first of all guys uh let me do it let me run it it's going to install all the local packages right local packages into my current virtual environment it's going to be it's going to be installed that okay now what I will do here so after installing it after installing this local packages into my current virtual environment I will check so here now I'm going to execute this particular file ming. py let's see everything is working fine or not over here so for that there is a command the command is Python and here I can do the copy and paste and see it is saying that it is not there why it is so QA system QA with PDF Ming dopy it is here now inside this uh folder only right okay let me check with Pip list whether I have installed the local package or not so here you can see my local package is there so what is my package name my package name is going to be a QA PDS see QA application this is my package name and here is a version guys this one yeah my local package is here then it should uh See by default this folder will be generated build distributions and all right so this folder basically is being generated now what I'm doing here after doing this many thing okay so let me create the stream lit app also so setro py file is file is fine and this model API and all everything is perfect now what I'm doing here guys except exception and logger is also clear requirement is also clear and if you want to download this uh local packages from the requirement also now so there is a simple uh hack right so here only you can mention this Hyun dot Hyun is representing the execution what you need to execute tell me you need to execute the setup.py file which is there inside your local directory here in this dot actually it is representing to the local directory you need to execute this setup.py file automatically it will execute the setup.py file over here gotting now what I'm doing here see uh streamlet app let me create the streamlet app over here so first of all guys uh okay let me show you I already kept it this is my streamlit app this one so we what what we are doing we are going to import this data injection we are going to import this QA PDF embeddings right and here what we are going to do we are going to import this model API now let me check uh what I have what I have there okay it's an embedding only it's not an embeddings fine now it is perfect now see guys this one actually it's just for setting the configuration my application configuration this uh streamlit object means I have uh like imported this streamlit as a SD now this is for uploading the file on whatever file or whatever file basically I want to use for retrieving the information now here we have a header of the project and here is a question so whatever question basically the user is going to be asked now here I'm going to be Define my complete button this is my button now this is the spinner which is like a processing until the uh until the like question will not be like uh published on the UI itself sorry until the answer is not going to be published on the UI itself then here I have written the complete functionality so here actually I've written the for the load data here I'm going to load the data here basically I'm going to be like loading the edding downloading the emitting and this is for the query okay response and then finally I'm going to write the response on top of the UI so this API and all you can create by using the flas Jango anything basically anything but why I have used this uh stream LD because this stream actually it's a very easy to use and uh here my main Moto to show you that how you can convert this application into to a modular one and how you can access by using the endpoint URL and that's why I just use thisam but in the next project I will show you the same thing by using the fast API got it now what I'm doing here so here I'm going to run this file my file name is what stream lit okay stream lit run and here is the file name is what stream lit app.py okay stream lit app.py now see guys uh once I will run it so here my server is going to be execute see my server is executed now so here I will allow once so once I will allow now I will be able to get my application so what I need to do I just need to drop the document over here so if I'm click on this browse document now just uh take the document so I kept uh where it is available it is available in my like folder itself let me like go back to that particular folder so here uh the folder is available into my user so once you will click on this user okay it is available into my this particular directory but yeah it can be in any sort of a directory in in your case so from anywhere basically you can read it but uh I will show you one uh more project there you are going to directly fetch the data from the web directly you are going to fetch the data from the web only now here where is my project let me take the project chat with document Lamas here is D okay fine now here I'm going to load the document this is my document now I can after loading thec I can ask any sort of a question so here I'm asking what is a machine learning a simple question simple question to my model so now after that what I will do I will submit it so let me submit it and let's see whether it's going to work or not so guys see it is going to process and it will show you the response in some time just wait it is going to generate a response first time actually it might take time and see guys it is generating a response it is generating a response perfectly okay it's gener generating a response perfectly now uh here you can see so what I did I did nothing okay I just written this exem lit file and I converted into a model of fashion and this a.info this uh distribution build it's nothing guys it's a meta information of the package of the local package this local package basically this this local package okay so this local package QA with QA with PDF okay QA with document so here let me change the name uh if I'm going to change the name now so everywhere I will have to change it basically so you can keep any sort of a name to of for this particular package here I kept this QA with PDF you can pass the PDF anything as such over here right so I hope guys it is clear to all of you now uh what I can do I can ask couple of more question and let me show you the end uh Point output so this is my modular code basically which I created uh basically for you so that you can take a reference and you you can design any type of application for uh your project now here I'm asking what is a difference okay what is a difference between right what is the difference between what so what is the difference between what is the difference between let's say uh machine learning machine learning and deep learning right and deep learning now here I'm simply asking that what is the difference machine learning deep learning give me in tabular format so let's let's ask in such a way uh table format let's see whether it will be able to answer or not so here hit uh enter and then submit now once I I will submit it it's going to be process and let's see whether I will be able to get it or not you can ask anything guys based on the document you can uh create this information retrial and see how beautifully it has generated this answer now you can ask something basically if you want to retrieve this information you can say that uh can you give me a summary of this documentation can you give me a summary can you give me a summary of uh of this document so you can simply search it and let's see whether it's going to be generated or not so once you will submit it and let's see uh whether I will get the answer or not so no this is not running on the GPU it is running on my local system itself Prashant if you will look into the task manager so here you can see I'm not using my GPU capability here even though I have the RTX system but here I'm not going to use that RTX RTX GPU 3 3060 it is simply using the CPU only right and how it is working it is maintaining one uh it is maintaining one data store right and directly it is calling the API and is it is generating output based on that only I will show you the architecture right now so don't worry now here you can see the complete summary of this question I hope it is visible to all of you right now the next thing is what so I hope this application is clear to all of you first of all tell me guys do you like this session if you are watching to me in the live one then please do let me know did you like this session yes or no did you like that did you like this complete application this uh information retable this QA system yes if you liked it then please uh hit the like button or please uh let me know please give me a thumbs up and this code is very very easy nothing is there so what I'm doing here now I'm going to uh like publish this particular code in the form of GitHub uh so on my GitHub like a repository so here for that first of all I will have to add it so here I'm going to add it all the files basically whatever files is there so let me add those particular files exception is there logger is there I want requirement also I'm going to add requirement setup also this app also this template I'm doing that I'm going to be add then I'm going to be add this uh uh which one guys just a second I want to add this data injection okay edding model.py I want to add this in it also right then here you can see so some other files also we have so these are the file or what I can do instead of it because it's going to be a confusing over here you have lots of other file as well so simply I can search okay so let me split the terminal and here simply I can say say on my git bash only let me change it to the git bash so here is my git bash okay so here itself I can change or not or let me check it is working or not get remote hphone V so here it is saying nothing is added so get add dot yes it is working here now I can simply say here uh get commit so first of all let me write the message so let me write the message over here from here actually I committed each and everything whatever was there so it was in a so this thing in a staging area all the thing basically which you can see this 40 thing now what I'm doing here see I'm writing a message my message is going to be a like a project updated project updated and then I'm going to be committed okay so once I will committed guys so here it will asked to me for the publishing so let me publish it it is not asking for for me to the publishing why it is so changes is this one log is there show commit and view graph view everything publish publish publish where is a publish I can directly publish it from here only uh changes done now let me commit it uh okay we like to search com directly never okay fine okay now it is giving to me now publish the branch and the name is going to be a QA system only uh just a wait guys so here I'm going to publish the branch publish the branch publish the branch okay perfect so it is giving me a here itself I can do it do it do it do it do it guys why it is so oh I think it is giving me any sort of a popup maybe for the it should showcase the name now okay what I'm going to [Music] do just wait yes I can include the fast API this that whatever okay everything I will do that uh don't worry here don't worry pan in my upcoming tutorial I will come up with the next one so next flask and fast API so here I can write this get uh status so first let me check with the get status nothing is there only one thing is here I don't want to do it or get Gage get add Dot and get commit Hy and code updated so fine it is perfectly fine now uh I can add the branch so directly I can do it from the GitHub only wait guys so here I'm going to create one repository a new Repository and the name of the repository is going to be a information retrieval retrieval with llama index and Google jimy okay so this is the name of my repository now let me create it and uh here I'm going to be create it it's going to be a public repository and here I can change the branch so let me keep the branch main only then I can add the origin here I'm going to add the or origin then what I will do I will push it so here basically I'm going to be push it so let me push it uh that's going to be a perfect yeah now it is done so here from this particular uh repository you can get my entire code so let me reload it here here here guys where is this one let me close it see guys here is my entire code which I kept now let me give you this link inside the chat and it will be available in my description also okay so here is my link please go and check guys please try to keep it with you and you can download the project from here itself so fine I hope you like this session please try to do it please try to implement it by yourself we'll meet in the next live session there we are going to develop something new uh new thing and if you want to get a architecture of this project let me give you that also so here I can uh do one thing guys just a second okay I will include it inside the I will include it inside the project folder itself so just a second what I can do here let me show you the architecture so see uh what is happening you know uh here I can open my scribble link and there I can explain you the complete architecture of it so first of all guys what is happening here uh Google jimy and all free introduction I given to you here is the Blackboard now let me scroll down here and let's see the architecture of this project see what is happening you know so here actually we have a data so this is my data which is coming from where which is coming from this document okay so I can keep my data over here let's say this is my data text document something it can be anything right now I'm going to be extract the data so let's say here what I'm doing you know I'm going to extract this particular data let me remove it and here what I'm doing I'm going to extract this data after extracting you know what I'm doing so here extract the data after extracting I'm going to be create into a chunks right so everything is happening internally you don't need to do anything you just need to call a simple method so here you know what is happening chunking is happening chunking tokenization sentence tokenization so here is sentence tokenization or chunking right so test chunk or it's not text test actually it's text text Chunk one right here is two here is three and here is what here is a n so n number of chunks is being created now after that you know what will happen so after that chunk actually we are going to be convert into embeddings right so we are going to be convert this chunk into a embedding so here is what here is my embedding this is my embedding this is my embedding now this is my embedding so here is what here is my embedding this one embedding okay now here is what here is my ambing now here is what here is my ambing I will convert this data into the embeding and then I will keep it into the tell me guys where I will keep it I will uh build the semantic index over here so I'm persisting the storage now so build semantic index okay semantic index now here I'm going to persist persist this thing inside the storage by default one folder is being created and this is because of what because of the Llama index okay and everything is there inside the particular folder then what I'm doing here so here actually build cementing index from where from the knowledge base automatically it is being created in backend so knowledge base so let me mention the knowledge base over here knowledge base okay we are going to maintain dat so we have a knowledge base and this is also called Vector store Vector is store we can use any Vector database also then I will show you in my next upcoming session Vector database then after that what we are doing you know so this is till here I think everything is fine then my user is squaring something so here let's say this is my user so this is what this is my user so here user is squaring something so let's say I'm asking some question based on the data okay based on my data I want to like retrieve some sort of information so here my question is coming so here is my question I don't have like enough space so please try to understand so here I'm asking the question this question is converting into a ambing again okay in back end it is going to be generate the edding from the question itself and then it is going through the semantic search right it's going through the semantic search so semantic search and from where actually it is trying to find out the similar type of document is going to find out a similar document from the knowledge base and then finally this this one okay this this knowledge base from the knowledge base basically I will get the output right so I will get the result from here and the this result actually it will be going through the llm okay large language model in my case it is jimy it is jimy okay in my case it is jimy and then from here from this llm to this user okay now my output is going from this llm to where tell me to this user so this is a complete flow of this project I hope you are getting let me revise it one more time so we have a data it's going to be it's going to be extract the data then we are going to convert into a chunks right we are going to convert into a chunks then we are doing a embeddings over here from the chunks okay then we are going to be create a semantic storage okay by using the Lama index and then uh we are going to be keep it inside the knowledge base now this is a user site so whenever is user is asking something so first it is going to be convert into embedding by using the jimy embedding model and then it's coming to the semantic search means a cosine similarity or dot product then it is uh like searching inside the knowledge base after that it is going to find out the best possible result best possible result everything is going to be refined the result is going to be refined by the jimy llm okay it is going through this jimy llm and finally it is coming to the user so this is my complete flow so I hope guys you like this thing so you like this uh particular uh you like this particular uh session and I will be coming up with many more sessions like this and uh I hope something is hiding behind my video and all I will keep keep it in my mind from next uh like uh from next class onwards so I can uh make a changes here see if I'm keeping over here I can keep it over here I can keep my video a left and S so uh now I hope this architecture is perfectly fine and it is visible also and uh yeah from next uh class onwards I will keep it keep this thing in my mind so fine I hope uh guys you understood this project now it's time to do the practice please try to take any sort of a use skill and please try to do it by yourself and uh yeah it's going to be very very important if you want to create any QA system or any table system definitely you can you can take a reference of this particular project so this is going to be my way first I will upload the tutorial and then whenever I will have to explain the project I will conduct the live session for that so within like 2 to 3 hours we can cover each and everything right so fine thank you guys thank you for bye-bye take care for joining this uh session and I hope uh you will uh find out this useful if you're finding it as a useful one then uh hit the like subscribe the channel share it with your friends whoever is required this type of content okay end to end project and all in a streamline fashion right so yeah fine guys thank you bye-bye take care I'm going to end the stream until thank you bye-bye take care and good night
Info
Channel: Sunny Savita
Views: 1,159
Rating: undefined out of 5
Keywords: gemini, google gemini, artifical intelligence, machine learning, deep learning, genai, generative ai, llama index, llama, chatbot, qa system, question answering bot, genai roadmap, genai complete tutorial, genai tutorial, sunny savita, sunny savita sir
Id: hqJxgbxczOo
Channel Id: undefined
Length: 142min 20sec (8540 seconds)
Published: Fri Feb 16 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.