Auto-GPT - How to Automate a Task Based AI with GPT-4

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[00:00:00] Okay, in this video we're gonna look at Auto-GPT. So in the previous video we looked at, BabyAGI, which was, sort of early stage task agent. this is another one that's similar, but I must admit, in some ways this seems to be a lot better. so we'll look at, what it's got going for it, how it does some of the things, how it's using some of the language models, et cetera. So, this is their GitHub site. I think it was originally done by one guy, and then gradually a lot of other people have contributed to it. it's pretty amazing that it has like almost 23,000, stars at the time of me recording this. and you can see that there are lots of commits going on, as we speak, as I'm recording this. So it does look like it's a project that people are getting behind, which is really good. So, it's got a whole bunch of sort of functionality and the idea here is that it's gonna be an autonomous agent that will go and do, a set of tasks for you and those tasks might be quite major. they give an example in [00:01:00] here of, getting it to basically, be an AI entrepreneur, or entrepreneur GPT, and it's gonna build a business for you. It'sI think the challenge with a lot of those things, is that it's very hard to measure whether it, is actually doing something that's really useful or it just looks useful, on the screen, et cetera. So what I thought I would do is, try this out. and so I've gone through this. They've got very nice instructions about how to set it up. and it seems that they're using a number of different things in here. they've gota bunch of tools already in there. So we'll have a look at some of those. They seem to be really good. also, it can support, GPT-4 or GPT-3.5. it also has, its own long-term and short-term memory. So the short-term memory seems to be writing to a file, whereas the long-term memory, I think is writing to Pinecone, for a sort of vector look up later on. Which I didn't use in the demo. they've also got, the ability to add in, speech in here. So by using, ElevenLabs, a [00:02:00] TTS provider, in here. So, it's pretty good. It's got some nice instructions of how to do it. I've basically gone ahead and put this in a Colab. and just set it up. Okay, so basically you just git clone it to get started. you go through and install the requirements, and then you'll probably need to do a restart of the runtime after that. and then you can basically just bring in your. and you can then set up, some of the settings for this. So they have a yaml file. so if you run it the first time, it will actually ask you, do you want to change their settings? I went through and made my own settings now, rather than try it for something like, you know, make a lot of money or do something like that, that's probably not gonna happen in a very short time. What I thought I'd do is just give it a simple task. So here I've basically asked it to, I've set it up to be a master shopper. although with some bad spelling in there, and we're gonna get it to look for a yubikey, at various sites and price it. Now, after I ran this, I'd [00:03:00] probably come back and change this slightly, and basically give it, rather than from multiple sites, I might say, from three sites or five sites. As you'll see, it tends to go into just wanting to keep going with some of these things. so probably the more specific you are in your actual. Prompt, the better it's gonna be. Now what I thought is okay, how would I evaluate this? So I just had a quick look on Amazon. here's the key on Amazon. it's $55. So I thought, okay, let's see. Can it find that information? If it can find that information, I would class that as a success, So it's basically gone and done. so I've set it up. Its role is an AI designed to autonomously find the best price for a yubikey5C security key. and so I've just written that into the yaml file there. I also wanted to have a look at some of, the prompts So if we go through looking at their code, the code is actually really nicely, laid out. You can see what's going on quite easily. and we can have a look at some of the prompts in here. And this shows us, some of [00:04:00] the command. Of what it can actually do. So it can do a Google search, it can browse a website, write and delete things. It can read things, it can append to files. this is good, standard stuff that you would want from an autonomous agent to be able to do, rather than just purelyfanciful stuff. Really, you want it to basically document what it's doing as it goes along. And then it, you can see here, it's got some resources. So this is all part of the prompt. It shows it how to output thoughts and a command so that we can see what's going on. So when we look in here, we can see that, okay, in the scripts, they've got a whole bunch of these tools in here. so we can see that we've got our browse function there., we've got, some execute code functions. We've got a bunch of different, passes and stuff like that going on in there, as well. let's have a look at the browse function. So the browse function kind of shows us that okay, this thing can basically get a web webpage and can then scrape it and [00:05:00] it's using beautiful soup to go through it. So, beautiful soup is a standard, scraping library in Python. but it's doing it quite nicely. when we go through and read the code, it's like, okay, this is doing stuff that would make sense. And then it's got, how to, how basically summarizes the text, in here. So it's got these things going on in here as well. So each of the tools is kind of like a file and it, it's got a whole bunch of things that it does. Which suggests to me that you could write your own custom tool pretty easily in this, which is probably a lot easier than LangChain in some ways. so I thought this was a big plus for it. All right, so let's get started. This is the main thing of what this was all about. So when you run this script, it's basically reading in the Yaml file and it will ask you,do you want to use these settings? and I said, yes, and I'm not running it in God mode. So it has like, what they're calling a continuous mode or a god mode where it just nonstop, never asks you for any [00:06:00] authorization. Just keeps running and running and running. that obviously could get expensive. and that was one of the frustrating things I felt with the BabyAGI that we looked at in the last video, was that once you gave the user input at the start, there was no sort of checking back. If you remember, it was looking for, I asked it to find a good restaurant for a romantic dinner, and it was trying to plan a yacht cruise and buy jewelry and doing all this stuff that I really didn't want. This is better in that way that it does seem to, give you the option to bascially you can then authorize each command. Now it gets maybe a little too fine grained, with this, but you'll see as we go through. So, okay, first off, I think the first step would be to perform, a Google search for yubikey 5C to see, where it's being sold. So, the thoughts that are coming outta this are very good. reasoning performing a Google search will allow me to begin gathering information on where the security key is being sold or from what price. So there's some really nice sort of [00:07:00] chain of thought stuff going on in here, of how it's thinking it things through at each step, which I think could actually be used really well for good training data, for these kind of things too. So you can see planning is to perform a Google search, catalog the websites with relevant information, compare prices on the multiple websites, and then make a recommendation for where to get the best price criticism. I should make sure my search criteria is specific enough so that the results are relevant and that I save the relevant information efficiently so that I don't lose any important details. All right, so then it starts off, it does the Google search. It asks me, will I approve this step? Yes, I approve it.and then we can see now that it's going through and it's finding, you know websites, and it's finding, information on those websites, as it goes through. Now, it does this for quite a while of, asking me for different things. and it's going through, multiple, sites. It does seem to go through the same sites at times [00:08:00] again and again. you know, it's maybe going through each of the sites looking for the actual. so here we've just got their products. then we are looking for the actual key. it's finding it, it is doing a really good job. the next one, it comes along and it looks at Amazon, and so it's basically asking itself what is the cost of the yubi 5C key on Amazon. Remember, the way I'm sort of benchmarking is it, can it find that $55 price?and cuz I haven't told her anything about Amazon, right? It's deciding all of that itself. it also then, looks at Best Buy. so just, let's see. Do it find, yes. Okay. So up here if we see, the result, the cost of the key for is $55, right?and we can see that it's got some information about the key there. So it's definitely been able to find, some of the stuff on there. it then looks at like Best Buy, and you can see that each time. It's also taking some notes, about this as well. So this is where I thought this was kind of interesting, [00:09:00] is if we come in here and look at its workspace, we can actually come in, and download, the websites. It had, and can see that it's basically got the yubikey, it's got Amazon, and it, and these changed over time. So, I think this is what I downloaded earlier, but you can see that it's going through the different things and you could imagine that you could, with a little bit of prompt engineering, you could get it to put together a nice report, at the end. You've also got the logs in here of all of this stuff. So that's something you could definitely use, for, testing this thing out and training it and stuff. So it goes through and then keeps looking at, different sites. It looks, at, Amazon more. it looks at, new Egg. It looks at. Best Buy, And then eventually I decided okay, just for the sake of time to stop it. but I think it's very impressive of how it's going through and doing this task. a lot more than some of the other things that [00:10:00] I've looked at for this kind of thing. it's definitely worth you checking out, and I think you should really try it out with something that you know you want to use it for, rather than just say, okay, make me a hundred million dollars or something. give it a real well task and see, okay, how does it do it? And also, The thing I like about this a lot is that you're kind of getting its thinking steps of how to do it so that if you found something that you disagreed with, you would then be able to, look at like how to mitigate that, as well. So this is sort of a nice way of being able to do something. So one of the questions that we had in the comments, from the previous video was someone, asked, how could we integrate this, with a microservice that's already on the web. and this one would definitely be easy to integrate. You could just basically do a call, set up a yaml file, do a call to this, let it run. you could probably set this up to run a certain number of steps and then return the data, and then summarize the [00:11:00] data for whatever information that you are after it shows a lot of promise in this way, and I think, as a project going forward, it's definitely gonna be interesting to see, where this goes. it's also interesting to see that at the moment, from what I can see, most of this is being done, from scratch. I don't see LangChain in there, et cetera. they're coming up with their own ways to do these calls, which may end up being, more efficient than some of the other frameworks that are out there. Anyway, this was Auto-GPT I definitely think it's worth having a play with it. take the Colab, try something out specifically to your use case and see how well it does. I checked, the number of tokens. It wasn't super excessive. but you should be prepared. I think in here they say, That you should be prepared to spend, a full day of development can easily cost as much as $20 in API costs. that's something, the of them just sort of checking the code. You could also imagine if you were running this in production, it could become quite expensive. overall though, I'd say this is a really interesting project. [00:12:00] Definitely worth checking out. Have a play with the Colab. As always, if you've got any questions, please put them in the comments below. and if you found this useful, please click like and subscribe. I will see you in the next video. Bye for now.
Info
Channel: Sam Witteveen
Views: 35,179
Rating: undefined out of 5
Keywords: LangChain, open ai, chat gpt api python, chatgpt api tutorial, chatgpt api key, chatgpt api php, chatgpt api react, chatgpt api postman, chat gpt api integration, chat gpt api project, chatgpt api cost, chatbot api keys, chatgpt api, chat gpt app, chat gpt app development, chatgpt applications, chat gpt app link, chatgpt api javascript, chatgpt api python, chatgpt software development, chatgpt software engineering, open ai api, babyAGI, task agents, autonomous ai
Id: wEs2CStEMw0
Channel Id: undefined
Length: 12min 14sec (734 seconds)
Published: Tue Apr 11 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.