ChatGPT Function Calling - BIG AI Agents Upgrade - 10X Performance Boost!

The Agent's Journey: A Cutting-Edge AI Project

The agent's journey began with a simple yet ambitious goal: to find the contact information for the "All About AI" YouTube channel. With ease, the agent navigated through various search engines and websites to locate the desired information. After a successful search, the agent found the website allaboutai.com and scraped the URL function for this specific webpage. The results were relevant, and the agent was pleased with the accuracy of the search.

Next, the agent tackled the second goal: reading the latest research on AI. With a few clicks, the agent opened the file again to double-check its completion. Satisfied that the content had been successfully read, the agent moved on to the next step. To save time and effort, the agent suggested using the "save function" to store the draft email for future reference.

The third goal was to write a simple chatbot Python code using the OpenAI API with the ChatGPT 3.5 Turbo model. The agent successfully created the code, which was then saved to a file named "sushi_restaurants.txt". To complete the task, the agent added a shutdown function to the code when it was saved, ensuring that the chatbot would cease operation once all the information was stored.

The fourth and final goal involved finding a nice sushi restaurant in San Francisco. The agent used Google's best search results and scraped information from websites such as Yelp and TripAdvisor to locate highly-recommended restaurants. After scouring various options, the agent found two top-rated sushi restaurants: Sushi Paste and Uma Casa. Both restaurants received excellent reviews, with Sushi Paste boasting a Michelin star.

To further enhance the research, the agent searched for information about the neighborhoods where these restaurants were located. The results revealed that both the Marina District and Financial District in San Francisco are relatively safe areas. The agent noted that it's always best to stay alert when exploring new locations.

As the agent continued its journey, it became clear that this cutting-edge AI project was just the beginning. With the ability to process vast amounts of information and perform complex tasks with ease, the possibilities for this technology seemed endless. The agent was excited to explore further and push the limits of what was possible with this system.

In conclusion, the agent's journey showcased the impressive capabilities of AI technology. From finding contact information to writing Python code, the agent demonstrated its ability to tackle a wide range of tasks with speed and accuracy. As this project continued to evolve, it was clear that the potential for innovation and discovery would be vast. The future looked bright for this agent and its creators, who were poised to make significant strides in the world of AI.

"WEBVTTKind: captionsLanguage: enopenai released function calling this week and this will actually give a huge bump in performance in my AI agents I also seen some consistency upgrades and that is very important from finding contact information writing code and doing some seriously good research on a topic fully autonomous let's have a look in case you missed it this is actually the blog post open a I put out so let's take a quick look what function calling is so I'm going to try to explain it quite simple you can kind of think of this like asking a chef in a restaurant to cook a specific dish for you from the menu so where that is where the chef is like the function the restaurant is the program and the dish is like the task right so the whole thing here is like to make it easier for developers to perform I would call it outside tasks like apis and stuff and that is basically the whole idea so we're gonna get a bit more into it so I'll show you how I use it let's just get straight into my python code so I can show you how I use this this is my agent code so you can see here I have defined one function two functions I have a organic traffic from Google function scrape website function I have a send email function and how we are using this now if we scroll down here you can see we have something in the chat GPT function that is called functions in plural so we can add many functions here so you can see we gave it a name get organic results and the description this is quite important so get the organic search results from a specific query and we can give it a type so this is an object some properties it's a string and search query for to fetch the organic results and you can see it does the same for the scrap website the save file the open file the email and this is because now we can go down here and we have something I have put in here that's called Auto this is now up to the AI agents if they want to call on these functions and it makes it much more easy to be consistent when we have this setup I also added a secure layer here so if you look at the prompt here for the system prompt you can see you have the following functions so I gave them a name they can call right scrap URL say file open files and mail and you have the functions called get organic results scrape URL save file you get the point right use them to search Google scrape content for web pages save content to file and when we added all of this together it performs much better as I will show you now so what I'll do now is I just go down here to I have something called goals and this is what I want the agents to achieve find contact information for Chris from the YouTube channel all about AI write them about draft email asking for interviews save to file name shut down when the draft email is said I I could probably send the mail too but I like to do a draft email I don't want to send mails straight now from the agents but in the future I think we can do that so let's just run this and I think it's better just to see how good this works now with the new function call I forgot to mention this but we are running the GPT 40613 model here because we need to do that when we are running function calls you can also do this in a 3.5 version the the other benefit with the o613 version is that it's much better to following the system prompts that's also an improvement so we get like this win-win situation but now let's just run this I don't even think we have to speed this up but because it's very quick you can see it's much more efficient now after we implemented this so you can see it uh okay let's start with the first goal we need to find content information and just go straight to Google and performs a search on the query all about AI YouTube channel contact information right and it Returns the results here so the first results were relevant uh I found the website all about ai.com scrape the URL function for this okay so we did that and okay thank you for this great data the email address is Chris at all about ai.com perfect uh I suggest we use the save function to save this the content of the email could be request for interview all about AI Dear Chris I'm writing for you from for you from your company okay we are great admirers here to work on all about a channel we love to interview you we believe yeah yeah you get the point um best regards URL so this is a good draft email and after that it just I like this one so let's move on to the third goal we need to read the latest research so it's going to open the file again so just to read it just to double check that it is completed it seems the content has been successfully read the draft mail has said we have completed all our tasks I will now shut down it doesn't really shut down because I haven't added that but I'm gonna do that so you can see it just stops and yeah if you have seen some of my other agents videos you can see how much more efficient this is and it's really promising uh I think we're gonna run a few more goals just to see what how far we can push it so let's do that also let's just take a look here so you can see this is the say file it's saved so basically it's the draft email right I just want to show you that actually saves this to file here so we can open it and I kind of use it yeah that's good so let's take another goal the goal I gave it now is write a simple chatbot python code with the open AI API using the chat GPT 3.5 turbo model save the python code to a pi file name shutdown when the file is saved so let's get that aspin okay so the agents now have said they have completed they are on the way to shutdown so let's see if it actually did complete and wrote this code for us so let's go to our folder okay we have a python code here so let's open it take a look okay this is actually a chatbot where I import open AI we put in our API key we use the 3.5 turbo yeah this will work perfect well done let's write something a bit more different so find a nice sushi restaurant in San Francisco find some information about the neighborhood is it safe shut down when all the info is saved to a file name that is pretty straightforward okay so let's run that that was the task complete that was quite efficient to be honest I just want to walk as quickly through what happened here so you start off with let's start with the first goal we need to find the search results so it's just gonna search on Google best suits your best sushi best sushi restaurant in San Francisco okay so they do a Google search they find some organic results that include a few restaurants seriously pastoral yubu the Chota yeah we got some five six restaurants here and it's gonna scrape a website or maps called best search restaurant Uma casa so we find some kind of I think it's a Trip Advisor maybe page here and scrapes all the information from that and it seemed that Sushi pustle and you do the truth are highly recommended and that is from reviews so that is quite star smart red it even has a Michelin starred eduma style Sushi I don't know so much about sushi but sounds nice and I'm gonna save that to sushi restaurants dot text yeah and then we're gonna move on to the second goal and that is find some information about the neighborhood where these restaurants are located and whether it's safe and it's going to search safety in Marina and Financial District San Francisco quick Google search on that it seems both the Marina District and the financial districts are relatively safe neighborhoods okay you can see but it's always best to stay alert we also have these results we should at least have them in here so you can see here we have the yeah serving Michelin starred adoma style sous chef perfect so you can see it's quite efficient this never happened before me before they were always back and forward but now with this new function calling they are very efficient and to be honest I think we are just touching the iceberg tip of the iceberg of course what we can do with this so I'm really looking forward to bigger context Windows adding memory to this I'm not even using memory now so I'm gonna of course do that so yeah very exciting about this function call what do you think is this something you're gonna take advantage of but anyway that was it for today thank you for tuning in and I'll see you again soonopenai released function calling this week and this will actually give a huge bump in performance in my AI agents I also seen some consistency upgrades and that is very important from finding contact information writing code and doing some seriously good research on a topic fully autonomous let's have a look in case you missed it this is actually the blog post open a I put out so let's take a quick look what function calling is so I'm going to try to explain it quite simple you can kind of think of this like asking a chef in a restaurant to cook a specific dish for you from the menu so where that is where the chef is like the function the restaurant is the program and the dish is like the task right so the whole thing here is like to make it easier for developers to perform I would call it outside tasks like apis and stuff and that is basically the whole idea so we're gonna get a bit more into it so I'll show you how I use it let's just get straight into my python code so I can show you how I use this this is my agent code so you can see here I have defined one function two functions I have a organic traffic from Google function scrape website function I have a send email function and how we are using this now if we scroll down here you can see we have something in the chat GPT function that is called functions in plural so we can add many functions here so you can see we gave it a name get organic results and the description this is quite important so get the organic search results from a specific query and we can give it a type so this is an object some properties it's a string and search query for to fetch the organic results and you can see it does the same for the scrap website the save file the open file the email and this is because now we can go down here and we have something I have put in here that's called Auto this is now up to the AI agents if they want to call on these functions and it makes it much more easy to be consistent when we have this setup I also added a secure layer here so if you look at the prompt here for the system prompt you can see you have the following functions so I gave them a name they can call right scrap URL say file open files and mail and you have the functions called get organic results scrape URL save file you get the point right use them to search Google scrape content for web pages save content to file and when we added all of this together it performs much better as I will show you now so what I'll do now is I just go down here to I have something called goals and this is what I want the agents to achieve find contact information for Chris from the YouTube channel all about AI write them about draft email asking for interviews save to file name shut down when the draft email is said I I could probably send the mail too but I like to do a draft email I don't want to send mails straight now from the agents but in the future I think we can do that so let's just run this and I think it's better just to see how good this works now with the new function call I forgot to mention this but we are running the GPT 40613 model here because we need to do that when we are running function calls you can also do this in a 3.5 version the the other benefit with the o613 version is that it's much better to following the system prompts that's also an improvement so we get like this win-win situation but now let's just run this I don't even think we have to speed this up but because it's very quick you can see it's much more efficient now after we implemented this so you can see it uh okay let's start with the first goal we need to find content information and just go straight to Google and performs a search on the query all about AI YouTube channel contact information right and it Returns the results here so the first results were relevant uh I found the website all about ai.com scrape the URL function for this okay so we did that and okay thank you for this great data the email address is Chris at all about ai.com perfect uh I suggest we use the save function to save this the content of the email could be request for interview all about AI Dear Chris I'm writing for you from for you from your company okay we are great admirers here to work on all about a channel we love to interview you we believe yeah yeah you get the point um best regards URL so this is a good draft email and after that it just I like this one so let's move on to the third goal we need to read the latest research so it's going to open the file again so just to read it just to double check that it is completed it seems the content has been successfully read the draft mail has said we have completed all our tasks I will now shut down it doesn't really shut down because I haven't added that but I'm gonna do that so you can see it just stops and yeah if you have seen some of my other agents videos you can see how much more efficient this is and it's really promising uh I think we're gonna run a few more goals just to see what how far we can push it so let's do that also let's just take a look here so you can see this is the say file it's saved so basically it's the draft email right I just want to show you that actually saves this to file here so we can open it and I kind of use it yeah that's good so let's take another goal the goal I gave it now is write a simple chatbot python code with the open AI API using the chat GPT 3.5 turbo model save the python code to a pi file name shutdown when the file is saved so let's get that aspin okay so the agents now have said they have completed they are on the way to shutdown so let's see if it actually did complete and wrote this code for us so let's go to our folder okay we have a python code here so let's open it take a look okay this is actually a chatbot where I import open AI we put in our API key we use the 3.5 turbo yeah this will work perfect well done let's write something a bit more different so find a nice sushi restaurant in San Francisco find some information about the neighborhood is it safe shut down when all the info is saved to a file name that is pretty straightforward okay so let's run that that was the task complete that was quite efficient to be honest I just want to walk as quickly through what happened here so you start off with let's start with the first goal we need to find the search results so it's just gonna search on Google best suits your best sushi best sushi restaurant in San Francisco okay so they do a Google search they find some organic results that include a few restaurants seriously pastoral yubu the Chota yeah we got some five six restaurants here and it's gonna scrape a website or maps called best search restaurant Uma casa so we find some kind of I think it's a Trip Advisor maybe page here and scrapes all the information from that and it seemed that Sushi pustle and you do the truth are highly recommended and that is from reviews so that is quite star smart red it even has a Michelin starred eduma style Sushi I don't know so much about sushi but sounds nice and I'm gonna save that to sushi restaurants dot text yeah and then we're gonna move on to the second goal and that is find some information about the neighborhood where these restaurants are located and whether it's safe and it's going to search safety in Marina and Financial District San Francisco quick Google search on that it seems both the Marina District and the financial districts are relatively safe neighborhoods okay you can see but it's always best to stay alert we also have these results we should at least have them in here so you can see here we have the yeah serving Michelin starred adoma style sous chef perfect so you can see it's quite efficient this never happened before me before they were always back and forward but now with this new function calling they are very efficient and to be honest I think we are just touching the iceberg tip of the iceberg of course what we can do with this so I'm really looking forward to bigger context Windows adding memory to this I'm not even using memory now so I'm gonna of course do that so yeah very exciting about this function call what do you think is this something you're gonna take advantage of but anyway that was it for today thank you for tuning in and I'll see you again soon\n"