Build LLM Pipelines With No Code In Minutes

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello all my name is krishak and welcome to my YouTube channel so guys in this specific video I'm going to show you how you can completely simplify the llm Ops and you can build some amazing llm pipelines within minutes without writing any code obviously building llm pipelines in some of the cloud platforms like Azar and AWS is a cubers some task and you will definitely be finding lot of difficulties but this amazing platform that is called as WX uh we'll just show you that how you can create all these things within minutes without writing any code and how simple it is so let me go ahead and let me start over here now the best thing about this llm pipeline is that and whenever you probably create any kind of generative AI application you know you need to use a lot of tools you need to use a lot of agents to probably solve various use cases it can be a rag application it can be a document Q&A so to develop all this kind of applications uh specifically with the help of this platform called as Vex I will just show you I will build a project completely from scratch and it'll it'll just give you an idea like how easy it is probably to probably create this everything out there right so over here uh first of all you need to log in over here and once you log in or you have to sign up if you have not logged in at any point of time and then you can just click on AI projects over here I will show you how you can build it completely from scratch so let me just go ahead and create a project and here I'll say build your own okay now uh this specific project that I'm actually going to create I'm going to use multiple tools and agents one of the tools will be for interacting with uh let's let's say Wikipedia API one tool will be responsible in interacting with rshift one tool can be specifically using llms you know to summarize all the content out there right so let me go ahead and let me uh show you that how you can probably keep on adding those kind of tools and agents and how you can finally use an llm model and probably display the entire results after creating all these things uh the best thing about this platform will be that it will also give you the entire API along with the body that is actually required so just by writing the entire code this entire llm pipeline uh for accessing this entire llm pipeline you'll be getting an API to access it so guys once you start a project now I will show you how you can quickly create an llm pipeline uh with multiple functionalities in this generative AI app uh initially once you start your project here you'll be getting two options one is query um this is just like uh you can see over here it is written and even that starts the flow so as soon as you probably write your query uh this entire events is going to get triggered uh here you can also see a variable which is called as payload we'll be discussing about this post request and all as we go ahead uh and this will be required at the last because uh understand with the help of this specific API we will be able to access this entire llm pipeline okay but just remember this variable which is called as payload okay we are going to use this specific payload this payload will be assigned with whatever query we ask initially okay so here uh this is the first uh box that you probably see in this particular LM Pipeline and the large box that you can probably see is the output okay so output is responsible in displaying uh it it just displays the result to a destination uh now what we are going to do is that we are going to add more functionalities in this llm pipeline so let me just go ahead and see what all options we have so the first option here you can see that we are trying to add an action in this particular action you have options to add llm you have options to add Vector databases Vector databases can be specifically used um whenever you really want to work with rag application or document Q&A application and all then you have options to add tools uh these are some of the tools which we commonly use like Google search uh apis Wikipedia search API you know other other other apis which we will definitely be seeing what all options it basically supports and the final option is basically with respect to function calling function calling let's say you want to proba create your own custom API you have your API in your company uh which is probably being hosted in some other platform in some some other cloud and you want to probably use that and integrate along with the function calling in your chat bot you can also use that let me do one thing let me just move my face towards the left hand side and let me show you step by step how you can add all these particular tools and how you can develop a complete llm pipeline which will be able to perform many task itself so uh let's go ahead and add an action and in this case I will go ahead and add a tools now in this tools you can see you have two types one is pre-built and one is custom as I said pre-built it supports multiple like basic maths PubMed open weather uh I hope everybody knows about open Weather it gives you weather information RCF Wikipedia Google search let's say I will go ahead and add Google search over here now with respect to this particular Google search here you'll be able to see that whenever I give a sample input it should be able to give me some kind of sample output uh it will search for any keyword using the Google search engine and return the relevant web results okay um and here is also one more option which is called as function input uh and here you can see some available variables like current date time history and payload I hope everybody has seen that particular post request there you had something like payload and if we use this payload over here right that basically means we are referring to the initial query that has been written by the human being right so uh to refer the query or refer the query that we initially give uh in the Google Search right so we'll be taking this particular query and we'll be uh in short we'll be using this Google Search tool to get the response right so this query will be the input to this Google Search tool itself so if you write this particular variable in this way uh you will be getting with respect to that particular results right and again Google Search tool will be used over here so this is the first tool that I will be using okay so once I use this particular tool um that will be after the query itself as soon as I give the query the first tool is nothing but Google search uh let me go ahead and add one more uh one more if if I specifically want one more tool I will go ahead and add it so here uh let's go ahead and add one more tool like RF so most of the research paper so let me just go ahead and add one more like Wikipedia now in this Wikipedia uh you'll be able to see again I'll be giving some input I'll be getting some output and with respect to this also what I can actually do there are two different things one obviously I can actually give a payload over here right now if I'm specifically giving the payload that basically means again this is also referring to the initial query that we give in our post request so here I'm going to put this particular payload and let me just save it okay so in short in this entire llm pipeline I have added two actions uh and these two actions are specifically two tools one is with respect to the Google search and the other one is with respect to the Wikipedia search now uh let me go ahead and let me perform or let me just add one more llm so that we'll be able to summarize all this particular results based on our prompt so I will go ahead and add another action over here and uh here also with respect to llms you have two different types you can also bring your own llm or you can also add managed llm now with respect to managed llm here you have multiple options here you can see it supports Azure opening at GPD 3.5 GPD 4 cloudy instant cloudy 2 you have G mini pro you have Lama 2 Lama 3 all different models let me just go ahead and select Lama 2 13 billion parameters I will set the temperature 2.7 now what I'm actually going to do is that I am going to add some kind of system prompt okay my system prompt will be seeing that okay the first tool I know that it is a Google search so I'm saying hey you are a helpful assistant so the first one is info found via Google search and whatever information is from the Google search that is not nothing but my action one by default it will be stored in this particular variable which is called as action 1core output this actually says that this is the output of the first action similarly info found via Wikipedia here you can see action two output because this is the action two uh which we have included which is nothing but the Wikipedia search and then the output will be stored in this particular variable whatever output is basically coming from this particular tool and finally uh if I want to display what is my initial query that I've asked so I will be putting up inside this particular variable that is called as payload right so I hope everybody has got an idea about action one output action two output that is nothing but my tools one or tools 2 output uh with respect to the action that I have actually created over here so this was my first llm that I've actually created let me just go ahead and add one more llm and this time we'll be using mrr just to show you like how we can use this all LMS in a pipeline and get our specific output put okay so let me just go ahead and click on and how easy it is you know you're just doing drag and drop you're just clicking on this just imagine you're an experienced person who quickly wants to develop this kind of geni application where you don't have to even worry about the deployment part and all and you easily being able to create the entire llm PL uh llm of sply planine right so let me just go ahead and add one more llm and this time I'll be using mral uh 7B uh 8 into 7B and this time I'm going to use a system prompt let say that you are an auditor job is to audit and find the best response so user input is nothing but this particular payload obviously the payload is used to refer the user input agent one um let me do one thing agent one will basically be my action one output okay or I can also take it as action three output action three output will be nothing but this llm output right and then I'm saying that please provide the best response so in short this action 3 output will be the output of the llm that I've actually created using Lama 2 okay and then that final output that is probably coming we'll summarize from that and then please provide the best response uh that is what I have actually written over here so once I save it so here you'll be able to see that yes I think I'll be able to get a perfect output over here and then we'll also try to see that whether we are able to get the uh right uh whether it is working fine or not in the playground okay so now uh this is my entire pipeline that I've actually created and I think hardly it took any minutes since I'm explaining so it is taking some amount of time otherwise if I just want to implement it I can hardly do it in 5 minutes right so this will finally be my output over here so let's go ahead and test this in the playground I will just go ahead and ask what is machine learning okay now once I probably go ahead and search for what is machine learning you'll be able to see that for the first time it will take some amount of time to give the response but the most important thing will be that how is the flow of this entire llm pipeline will'll be also able to see that okay based on the prompt that we have actually created so again uh I will go ahead and click the log once I get the output so here I have got the output machine learning is a sub field of artificial intelligence so here if you probably see it's just like giving a query so this will be saved in a payload variable right it payload will be referring to this okay um so let me just go ahead and see the log so the logs over here I just clicked on see logs over there and once I probably see the logs over here let me see okay so this is the log initially right now the time is 4:37 so 4:37 p.m. so let's see so here you'll be able to see the detail like what is basically happening so initially this is the query this will be saved um you can probably just consider that payload will be referring to this particular word to this particular sentence and then it goes to the Google search what is machine learning so machine learning is a branch so and so all the information is probably coming up machine learning is a field of this one so all the information is basically coming and understand this output what you probably getting from this Google Search will be sa saved in action uncore one output right because this is my action one similarly action two uh Wikipedia search so this will basically be the output this will be saved in action 2 action uncore 2core output right attention is all you need all this machine learning is a field so it is basically searching the Wikipedia search rapper right then you have this llm now here we are basically used metal Lama too you can see you are a helpful assistant info found via Google search machine learning is a field of this this this all the information this information is basically coming from the action _ 1core output right similarly here you'll be able to see all this information and this is finally my data output okay and uh within this ins I've also showed you that we have put the payload so payload is basically referring over here right and if you see further right after this there will also be a variable which will be taking the information from the Wikipedia okay somewhere here it will be there somewhere it is a big content so you can probably search for it because uh in the second tool we were basically sorry in the llm itself we are referring to action two output also somewhere here it'll be there okay and this is your final data output uh that you are probably getting from this particular llm model okay uh which is probably taking the best combination out of it then similarly with respect to Mistral here you can see user input what is machine learning agent one is basically giving you this particular output right please provide the best response so by selecting the best response it is giving you the output over here so I hope you're able to understand the entire flow and this is what you will probably get in the output itself uh which we have actually created in our llm pipeline so uh this in all together gives you an idea that how easily you are able to create this llm Pipeline and how easily you are able to see the flow right again to revise understand here we can add any number of actions that can be tools it can be llms it can be function calls it can be Vector databases let's say if I'm adding my own data set I can also use a vector database and I can also refer that and the third uh llm model was based on the prompt that we have actually created over here so let me just click this so this was the problem that we have created action uncore one output is the output of First Tool action number two uh action _ 2core output is the output of the action two right and then this payload is nothing but whatever query we are specifically referring to right so this was the entire uh amazing pipeline that we have actually created now I will show you that how we can use this specific API and we'll be able to access this entire Pipeline with the help of code that we will try to see so guys the first step if I really want to use this API to access this llm pipeline there is a requirement of an API key so so here you can actually see API key is required we have to probably set this up in our headers like content type application Json along with that API key so how to create an API key first of all I will just go to my API Keys over here and once I probably go to my API Keys you'll be able to see that uh I can create my API key and I already created it if you really want to create a new API key just click on create right give any name for this particular API key select the project that you are specifically working on and click on generate okay so once you specifically click on generate you will be able to get the API key over here okay so don't use this API key for your site because you create in your own dashboard because I will be deleting this API key once the uh video will get uploaded so once you copy over here then now we can go to the cloud platform and we can save it or I will just keep a note of it uh somewhere else so that I will be able to see this API key whenever I require okay so I will just go ahead and save it so now we can go ahead and use this entire post request that I have already shown you on our project and then we can just update this API key over there and that entire code we will go ahead and discuss it I've already written that particular code and uh all we have to do is that we have to replicate this entire post request over there right just replace the API key over there and use some new channel token which I'm actually going to show you so let's go ahead and have a look onto so just to give you an idea how I can specifically call that particular llm pipeline we have already seen what should be our API request uh what should be uh there in the content type what should be there in the payload what should be the URL now with respect to this only I have actually created this specific code so initially we go ahead and import request then we specify the API key this API key is the same API key that I have actually created then uh we specify what is our query like what kind of query we are searching for so like what is machine learning then we are setting it up as headers right headers needs to be set ups because over here in the header content type is application Json and the second header that you write require is API key so that is the symbol that is given by this HED symbol over here right Edge basically means headers so headers we really need to set it up so here we are setting up this content type application Json and API key which is nothing but this API key which we are assigning to this particular API key then the payload the data payload so here we are going to set up the payload as your query whatever query I am specifically asking the second thing is with respect to the URL we need to set up the URL where we'll be able to get the URL it is nothing but it is this URL over here right so I will copy this same URL and I will paste it over here okay I will paste it over here and here we need to specify some unique Channel token okay so just a second here we need to specify a unique Channel token okay so here we will specify some kind of token right so like let's say Krishna 06 so this will be unique and please specify with yourself with respect to the unique one right it can be anything but let it be unique right it should not be same this will be the URL that will be specifying where we really need to hit it which is hosted in vexab okay and then finally we use this request. poost on URL Json I will be giving a variable with respect to this particular data whatever data payload that we are giving and headers will be able to set it up and finally we get the response uh over here with the help of response. text now let me just go ahead and run this so I will just open my terminal okay and we will go ahead and run this okay now see I'm asking for what is machine learning right so I will go ahead and write python test.py okay and this is just to give you an idea how we can hit that particular llm pipeline that I have actually created right initially it'll go and do the Google search then it'll go and do the RF search right after that it'll summarize with the two llm models that is Lama 2 and uh mistra and it'll give you the best output from all this particular content with as with respect to the response so as I said for the initial time so here you can see text machine learning is a subset so here I'm getting my entire output so this is so amazing right so if you really want to get your entire query so you can basically say response. text so that is what I'm actually printing it over here and this is what is the output that we are specifically getting right and this looks absolutely amazing right just imagine just with the help of API you are interacting with this entire llm pipeline isn't it amazing right and just just one part of the code you know accessing the apis is the part of the code remaining everything with respect to inferencing everything this WX platform is basically handling so I hope you like this particular video uh please make sure that uh you try it from your side and obviously check out this particular platform there are lot many steps if you're an experienced person if you're an architect I think you should definitely go with this platform to quickly develop any generative AI application and uh considering this uh if you probably go to app directory this also supports lot of other features also like Confluence Google drive this and all here you can see with the help of AWS Sage maker also now you can actually do you can integrate your own models and utilize them on Vex right right so whatever model you have uh in AWS Sage maker you can also integrate you can also integrate and soon they also coming up with features like AWS bedrock and hugging face so that uh let's say you have an account in hugging face you want to use the open source model with the inferencing you can integrate it over here so I hope you like this particular video I'll see you all in the next video have a great day thank you and all take care bye-bye and all the other information regarding this will be given in the description of this particular video thank you take care
Info
Channel: Krish Naik
Views: 7,105
Rating: undefined out of 5
Keywords: yt:cc=on, llm pipelines tutorials, llmops tutorials, generative ai tutorials, data science tutorials, machine learnign tutorials, deep learning tutorials
Id: GzddWsNolD8
Channel Id: undefined
Length: 20min 54sec (1254 seconds)
Published: Wed May 08 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.