Learn AI Engineer Skills - Autonomous Agentic Behavior (Llama 3 8B Ollama)

Exploring Systems without Llama Index: A Hands-on Experience with CL 3 Model and Search Functions

We began by trying out another system, the CL 3 Model, which turned out to be a different model from the first one we attempted. We decided to run this new system on local llama 3 and see how far it would take us. Unfortunately, we encountered a timeout error, which meant we got stuck. The code was able to calculate how many cat lifespans ago the Egyptian pyramids were built, but something failed here. Note that down; we already had the cut lifespan average. Okay, so yeah, something strange happened there.

Moving on to task 11, we switched to the CLAW model and ran it on our system to see if we could complete all the tasks or at least make progress. After a few attempts, we successfully went through every single test without any errors. However, there was an error at the end that we couldn't quite figure out. We updated our task list to reflect the results of these tests and took a closer look at some of the answers.

One notable answer was that 2024 is not a leap year, contrary to what Python would calculate. The lifespan of a cat ranges from 12 to 18 years, which is accurate according to Google's information. Another interesting finding was that the Egyptian pyramids were built approximately minus 36,000 years ago. While this result seemed unusual, it highlighted the potential for these systems to provide unique insights.

As we continued working with our CLAW system, we decided to expand its capabilities by adding a search function, similar to Google's functionality. We added this new feature to our functions list and updated other parts of the system accordingly. By incorporating the search function, we were able to use it to find specific information such as the stock price of Tesla, the CEO of Open AI, or the latest Taylor Swift album.

To demonstrate the power of our expanded system, we used the search function to retrieve relevant information from online sources and integrated it into our existing output. We successfully found the current stock price of Tesla, identified the CEO of Open AI, and discovered the title of the latest Taylor Swift album. This showcased how easily we could use the search function to gather data and expand our system's capabilities.

Throughout this hands-on experience, we learned that systems like CL 3 Model and Search Functions can be incredibly versatile and easy to expand upon without relying heavily on frameworks like Llama Index. By experimenting with these systems, we gained a deeper understanding of their potential applications and limitations. As always, we appreciate our community's support and encourage everyone to join us by becoming a member and accessing our GitHub page for the full code.

Additionally, we invite our audience to explore the world of natural language processing and machine learning through hands-on experiences like this one. While these systems may have some quirks, they offer endless possibilities for creative problem-solving and learning. If you're interested in exploring more or just want to see how these systems work in action, feel free to join us on our Discord community and watch for future videos where we'll be refining our approach and covering new topics.

As always, we appreciate your feedback and support. We hope this experience was informative and entertaining, even if it was a bit unconventional at times. Until next time, when we'll be sharing more insights and adventures in the world of AI and machine learning, take care, and have a great week!

"WEBVTTKind: captionsLanguage: enhere you can see my list of tasks so these are five different tasks I want to solve but if you take a look at task five here you can see words per elephant this task is actually dependent on that we solve task three first to actually find the words per elephant and all of these sequential task have some kind of information that we need to solve before we can actually move on to the next task right so I Tred to create a system that can do this fully autonomous by just using local llama 8B and yeah running on New llama and of course some logic using python so let's see how this works now so when we run this now we're going to create a list and our code is going to go through each step of this list and try to solve this task using some kind of planning using Json so you can see it's pretty fast we are already on Tas Tre here now so yeah it's running pretty good 130 that's good 5 to six USD and you can buy 23 Big Max find the weight of one elephant in kilos query is the average weight of an adult elephant response the average weight of an adult elephant is around 5 0 6 0 Kitty 11 03 20000 okay so you can see I also added some jimmick at the end there that it reads out every answer but if we load our task list now you can see we have task one find the weage of an elephant in kilos we have the response you can see divide the words of the Bible by the weight of one elephant to five words per elephant that's 130 and you can see at the end here words per elephant at the use USD dollar use the code to calculate how many Big Max I can buy you can buy 23 Big Max so hopefully this just took 130 divided it by maybe 5.5 or something and got this so yeah it's working pretty good and we kind of get a text file back here with all the answers so yeah today I just wanted to kind of explain how I thought about this how to create this agentic Behavior where you can kind of set a list of tasks and have the llms with some python logic to actually solve this uh hopefully this could be interesting going forward when we get more powerful llms remember this is running on a small local llama 3 Model now I haven't really tried it with more powerful models but it should work right and yeah that's what we're going to do today I'm going to go through some simple examples of how I set this up and how it works so yeah let's just get started okay so today we're going to focus mostly on the main function so we I thought we can kind of go through the full workflow of the system so when it actually reads the first task from task. txt and we can follow that task all the way down here at the end and then we kind of can see the full picture of how this works because uh the previous videos I have kind of go going through kind of how we can use function calling with this pars function call and we convert it to this open AI functions so if you're interested in learning more about how to actually use these functions we have here like execute code and and ask llama Tre uh you can just go back and watch my previous videos uh of course we're going to go through the prompts we are using for this uh because they are very important so we're going to take a quick look at that but other than that we are going to mainly focus on all of the steps that actually goes through in yeah in the main function okay so let's start on step one so that's going to read the task we have in task. txt right so read lines from a file called task. txt strip whitespace and filter out empty lines and this is happens in in this parts of our code so if we go back here if we scroll up here to the start of our main functions you can see all of this here uh yeah this is working pretty good and what we end up with is this list you can see here task uh and we have all of these numbered lists here right okay so you can see here step two print all tasks yeah we did that you can see that here so that's good and then we go on to step three initial a task result list so if we take a look back on our main function here you can see because we want to store the results right in a list because when we actually have finished this uh we want to print those answers back into our task file right and we also need to store them to actually have some context and we need to store them because we need to read them out right okay so we have a list with task results that we're going to put them in uh next here we come into this for Loop that's going to run through each task we have enumerated in kind of our list here so we're going to of course start with task number one we're going to go through this and try to solve this task before we come back when we have solved this and start on task number two right so that is kind of how I set this up and the important part here is that we actually make a good prompt so we have something called plan prompt and here we want to feed in some different information we want to feed in our system message that is kind up here this is more information about how you use the function calling uh again if you want to learn more about this system message and how we use function call just go back to one of my previous two videos and you can learn more about that uh but yeah we feed our system message into this plan prompt uh create one plan Jon format to complete the following task and here we feed in our task uh and of course since this is the first run of the loop uh we're going to feed in test number one right find the weight of one elephant in kilogram and then we have some information about the Jon structure we want uh so we want a task we want a prompt we want a name of the function call and we need some arguments so an example of this could be we need to get some information about something then it's best to use the ask llama 3 function the query could be how big is this but if we want to use code to calculate something then it's better to use the execute code function and we have some example of how you can use the arguments for that right okay so make sure the task that uses uh can use information from previous task stored in task result list uh so this is the context part right if you go back up here now you can see context equals Json dumps and we're going to dump the result from previous task into this uh prompt here because like I said in the beginning some of the tasks are dependent on results uh that was solved in the previous task right so if we want to divide the words in the Bible by the weight of one elephant we actually need the words in the Bible and we need the weight of one elephant and these were solved in task one and two right 5,000 kg 783 th000 words so we're probably going to do 783 th000 divided by 6,000 maybe and then we end up with this 130 so this is kind of why we are dependent on feeding in previous results into our plan prompt right okay use key values we have answered in previous results and pick the correct function call to solve the task and then we just finish up with cre a plan in Json and then we hopefully will end up with a plan that looks something like this so let me just show you that so if we scroll down here so this is the plan we created for the first task uh so we have task we have the fine elephant size uh we're going to pick the ask llama function we're going to ask llama 3 what is the average weight of an adult elephant and then we're going to run this function call here with the correct Json format and we have the query from the result and we have the answer okay and that is kind of the full workflow of a valid plan right and then when we have actually completed this then we are ready to go on to solve task two right okay so I guess I already explained step for that was iterating over each task for each task gener plan execute and store result yeah good so step five is create a create an validate Json plan so I haven't kind of showed you how I set up this validation because this is important right so if we head back to our action dopy here now uh I created some kind of error handling system here so you can see I've set the max attempts to 10 and we're going to count how many times we try to solve this so kind of how I set this up uh you can see we have our prompt plan prompt uh we run the chat function over our plan prompt to try to get the plan right and then we have something to try to validate if this is a valid Json right because this is important because we can't really execute on our function call if our Json plan is not valid right so you can see I tried to uh create a system that autoc corrects for invalid Json uh it runs through this system here and uh if the plan is valid uh we're going to break here and skip this step right and then we're going to continue down here so that's all good but what if the plan is invalid so you can see in the first attempt here generated plan is not valy Json attempting to improve the plan so that actually happened here in our first uh attempt so what happens then is we get sent to this kind of accept block here and and we print out uh what we just saw here right and we have something called improved prompt so the generated plan has an error we feed in the error message that was invalid Json or something please try to improve the plan by following the required format more strictly here is the invalid plan and then we feed in uh the plan that did not work please generate an improved plan in valid Json with all the required fields for each subtask and you can see down here now plan prompt equals improved prompt so that means that we are actually going to run this improved prompt now uh uh over the chat function instead of this prompt right we're not going to run the plan prompt now uh over chat we're going to actually use improved prompt okay so that's good uh if we we don't get our valy Json we feed in the error message and the previous plan and try to improve it to get Json out again so we're going to run through this step 10 times uh and if it works then we of course just continue but if we fail 10 times uh then we just going to exit right because I think we're going to skip it actually sorry about that if we uh reach Max attempts here uh we're going to skip the task just going to continue uh so the system won't stop if we don't solve One Step but of course that's not good right uh so you can adjust the max attempts here if you want to uh but yeah I try this it's been working pretty good but uh I'm sure there are so improvements we can actually make in this step uh I think if we scroll down here you can see here it has to try was it four times before it actually uh got the valid js on and we got the correct output so it is actually working trying and trying over and over again until it works so that's interesting I think so yeah I'm pretty happy how I set this up but I'm sure there are room for improvements in this step okay so let's take a look at step six here so execute subtask based on the plan execute each subt defin in the plan replacing placeholders with actual results where necessary so this is the part of the code so I'm going to try to go through this so this can be a bit confusing so remember we are using our Loop here so what I kind of wanted to go through is kind of how we set this up so uh I want to kind of pull up this so you can see here the first thing uh we're going to do is we we're going to go through our plan and we're going to look at tasks right uh if we put this up here you can see yeah we have tasks here okay that's good for task description we kind of want to fetch the subtask uh task and this is this right okay okay find approximate number of words in the Bible or this could just be let's say Find the elephant size that's fine and if we go further down here function call is the next thing we want to fetch then we're going to use prompt and if we look at the plan here uh you can see prompt that contains ask llama 3 how many words are there in the Bible okay that's good so next up we just want to print this print the task prescription for print the function call and if you go down here you can see the subtask is going to be to find the words in the Bible and here we're going to print the function call we're going to run to solve this okay so far so good and here comes kind of the confusing part uh yeah I decided not to go too much into this but this is the format I want to send into our chat function uh so we have a query and we have a next query so here we are sending in just the function call as a query so we're just going to feed in this right uh but I also feed in the next query uh yeah I decided to skip that part because it's very confusing but this is the way I chose to do it and then we just going to go through here and start calling the functions we need uh again if you want to learn more about how these functions are being called and executed in the function call system just go back to a few of my previous videos and yeah you can learn all about the function calling okay so far so good uh I think we are actually on to step seven now and that is going to be storing the task result so collect and append the results for each subtask into the task results list right so if you go back to our code again you can see we just go down here task answer plus equals response and then we do a new line and we store the task and its answer in the task result list so we use the task result. append and we feed in each task into this list right and this is because on step eight we want to write the results to file and replay it and play it like with a sound so write all task back to test. txt play back task descriptions and answer using some audio and yeah this is done in this uh with open task. txt and then we're just going to print in the task the answer uh and yeah just write it so we have both task and the answer together uh as you can see here and that is pretty much the full um the full workflow of this so this is just a gimmick where we actually can play back the full TX uh task. txt if you want to listen to the answers and then we're just going to run the main function uh of course we already did that but yeah and so hopefully this was understandable I know there's a lot but uh yeah I'm still trying these videos where I kind of go through into more detail for each code and so far people have been enjoying it I can see that from the number of likes and stuff uh but uh hopefully it's not too much but I guess for a lot of you this is easy but uh this is not so easy for me this is something I had to learn and hopefully I just want to share with other people that also want to learn so yeah just thought I could do that uh but now I think we're just going to run to uh create a few more different tasks right try some different stuff can we lock up the system what doesn't work and see how far we can push this okay so what I did is I went ahead I added uh so we now have a total of 31 different task I'm pretty sure this is a bit too too much for just the local llama 3 uh model uh but I actually included clae 3E hu so we can actually try with another model all right we have the same system just a different model so we're going to try the CL 3 Model so yeah let's just start by running this on um local llama 3 right and see how far we can go okay so we seem to run in some kind of timeout error here it means we kind of got stuck right use the code to calculate how many cat lifespans ago the Egyptian pyramids were built uh okay that was a bit strange we did already have the uh cut lifespan average uh okay so yeah something failed here so okay note that down we got to task 11 now switch to claw then okay so let's run the Hau model here and see if we can actually complete all the task or at least see how far we can go okay so just just a quick update we are on task 17 doesn't seem okay so I think we got it yeah the percent of water on Earth is 70% okay good job so it keeps going here can we make H all of these tasks okay so yeah it seems that we actually went through every single test we got some error at the end here uh I don't know what that means but uh yeah so let's update our task list whoa this suddenly got long so we got a lot of answers here so let's just take a look at a few of those okay so you can see right python code to determine if 2024 is a leap year or not so yeah 24 is a leap year uh lifespan of a cat 12 to 18 years and it figured out that the Egyptian pyramids were built appro approximately minus 36 Liv spans ago uh okay so that was a bit strange uh but yeah okay so yeah pretty good job by Claude here uh I just want to finish up by showing you one more thing and that is that these systems are very easy to expand on so what I went ahead and did you can see we have a function called search Google so it's very easy to add this now to our system to expand it so you can see we added search Google here to our functions list we updated the convert to open AI function we did some more information here in our system message and we added some logic and we added some examples of how you use the search Google functions and just in a few minutes we kind of have expanded our system to add one more function we can actually use in our search for solving this tasks right and now I put up like three examples so use Google to find the stock price of Tesla find CEO of open AI find the name of the latest Taylor Swift's album uh okay so let's try that now and let's just open this and clear this now and when we run this now hopefully this should U Pick the search Google function okay that's good uh yeah this is looking good so we are going to search for Tesla stock price it found some information added it to google. text we use the query CEO of open AI we use the term latest tailor Swift album okay so good so the results we got now we can go here update this okay uh top search results so we have some kind of URL here yeah stock Tesla right uh Sam alman's Wikipedia page and taylorswift.com and a Wikipedia discography uh but we also scraped those pages so all the information will be added in here too right if we need to use some kind of Rag and search over these results right so yeah this system is very easy to uh collapse or expand and you can kind of do whatever you want with it right so that is kind of what I wanted to go through today and kind of yeah talk a bit about these systems you can build without being too dependent on llama index and all of these other Frameworks if you just want to mess around and learn something uh as well as you are doing this and of course this code will be of course fully available on my members uh GitHub page so if you just want to download this or Fork it and try it out for yourself uh just become a member follow the link in the description below and yeah uh you also get access to our community Discord uh other than that I hope this video was helpful it's kind of hard to make this videos because I don't know how much detail I should go into but this is just a test so we will see how if people like this if not I'm going to keep the length shorter and a bit more focused maybe on yeah some other things but as always like if you're not interested in kind of the the part where I go through the code and try to explain and maybe you can learn something just skip this if you just want to see how this works in action but yeah big thanks uh for the support lately it's been awesome so uh hopefully I will see you again on Wednesday have have a great uh week and yeah see you soonhere you can see my list of tasks so these are five different tasks I want to solve but if you take a look at task five here you can see words per elephant this task is actually dependent on that we solve task three first to actually find the words per elephant and all of these sequential task have some kind of information that we need to solve before we can actually move on to the next task right so I Tred to create a system that can do this fully autonomous by just using local llama 8B and yeah running on New llama and of course some logic using python so let's see how this works now so when we run this now we're going to create a list and our code is going to go through each step of this list and try to solve this task using some kind of planning using Json so you can see it's pretty fast we are already on Tas Tre here now so yeah it's running pretty good 130 that's good 5 to six USD and you can buy 23 Big Max find the weight of one elephant in kilos query is the average weight of an adult elephant response the average weight of an adult elephant is around 5 0 6 0 Kitty 11 03 20000 okay so you can see I also added some jimmick at the end there that it reads out every answer but if we load our task list now you can see we have task one find the weage of an elephant in kilos we have the response you can see divide the words of the Bible by the weight of one elephant to five words per elephant that's 130 and you can see at the end here words per elephant at the use USD dollar use the code to calculate how many Big Max I can buy you can buy 23 Big Max so hopefully this just took 130 divided it by maybe 5.5 or something and got this so yeah it's working pretty good and we kind of get a text file back here with all the answers so yeah today I just wanted to kind of explain how I thought about this how to create this agentic Behavior where you can kind of set a list of tasks and have the llms with some python logic to actually solve this uh hopefully this could be interesting going forward when we get more powerful llms remember this is running on a small local llama 3 Model now I haven't really tried it with more powerful models but it should work right and yeah that's what we're going to do today I'm going to go through some simple examples of how I set this up and how it works so yeah let's just get started okay so today we're going to focus mostly on the main function so we I thought we can kind of go through the full workflow of the system so when it actually reads the first task from task. txt and we can follow that task all the way down here at the end and then we kind of can see the full picture of how this works because uh the previous videos I have kind of go going through kind of how we can use function calling with this pars function call and we convert it to this open AI functions so if you're interested in learning more about how to actually use these functions we have here like execute code and and ask llama Tre uh you can just go back and watch my previous videos uh of course we're going to go through the prompts we are using for this uh because they are very important so we're going to take a quick look at that but other than that we are going to mainly focus on all of the steps that actually goes through in yeah in the main function okay so let's start on step one so that's going to read the task we have in task. txt right so read lines from a file called task. txt strip whitespace and filter out empty lines and this is happens in in this parts of our code so if we go back here if we scroll up here to the start of our main functions you can see all of this here uh yeah this is working pretty good and what we end up with is this list you can see here task uh and we have all of these numbered lists here right okay so you can see here step two print all tasks yeah we did that you can see that here so that's good and then we go on to step three initial a task result list so if we take a look back on our main function here you can see because we want to store the results right in a list because when we actually have finished this uh we want to print those answers back into our task file right and we also need to store them to actually have some context and we need to store them because we need to read them out right okay so we have a list with task results that we're going to put them in uh next here we come into this for Loop that's going to run through each task we have enumerated in kind of our list here so we're going to of course start with task number one we're going to go through this and try to solve this task before we come back when we have solved this and start on task number two right so that is kind of how I set this up and the important part here is that we actually make a good prompt so we have something called plan prompt and here we want to feed in some different information we want to feed in our system message that is kind up here this is more information about how you use the function calling uh again if you want to learn more about this system message and how we use function call just go back to one of my previous two videos and you can learn more about that uh but yeah we feed our system message into this plan prompt uh create one plan Jon format to complete the following task and here we feed in our task uh and of course since this is the first run of the loop uh we're going to feed in test number one right find the weight of one elephant in kilogram and then we have some information about the Jon structure we want uh so we want a task we want a prompt we want a name of the function call and we need some arguments so an example of this could be we need to get some information about something then it's best to use the ask llama 3 function the query could be how big is this but if we want to use code to calculate something then it's better to use the execute code function and we have some example of how you can use the arguments for that right okay so make sure the task that uses uh can use information from previous task stored in task result list uh so this is the context part right if you go back up here now you can see context equals Json dumps and we're going to dump the result from previous task into this uh prompt here because like I said in the beginning some of the tasks are dependent on results uh that was solved in the previous task right so if we want to divide the words in the Bible by the weight of one elephant we actually need the words in the Bible and we need the weight of one elephant and these were solved in task one and two right 5,000 kg 783 th000 words so we're probably going to do 783 th000 divided by 6,000 maybe and then we end up with this 130 so this is kind of why we are dependent on feeding in previous results into our plan prompt right okay use key values we have answered in previous results and pick the correct function call to solve the task and then we just finish up with cre a plan in Json and then we hopefully will end up with a plan that looks something like this so let me just show you that so if we scroll down here so this is the plan we created for the first task uh so we have task we have the fine elephant size uh we're going to pick the ask llama function we're going to ask llama 3 what is the average weight of an adult elephant and then we're going to run this function call here with the correct Json format and we have the query from the result and we have the answer okay and that is kind of the full workflow of a valid plan right and then when we have actually completed this then we are ready to go on to solve task two right okay so I guess I already explained step for that was iterating over each task for each task gener plan execute and store result yeah good so step five is create a create an validate Json plan so I haven't kind of showed you how I set up this validation because this is important right so if we head back to our action dopy here now uh I created some kind of error handling system here so you can see I've set the max attempts to 10 and we're going to count how many times we try to solve this so kind of how I set this up uh you can see we have our prompt plan prompt uh we run the chat function over our plan prompt to try to get the plan right and then we have something to try to validate if this is a valid Json right because this is important because we can't really execute on our function call if our Json plan is not valid right so you can see I tried to uh create a system that autoc corrects for invalid Json uh it runs through this system here and uh if the plan is valid uh we're going to break here and skip this step right and then we're going to continue down here so that's all good but what if the plan is invalid so you can see in the first attempt here generated plan is not valy Json attempting to improve the plan so that actually happened here in our first uh attempt so what happens then is we get sent to this kind of accept block here and and we print out uh what we just saw here right and we have something called improved prompt so the generated plan has an error we feed in the error message that was invalid Json or something please try to improve the plan by following the required format more strictly here is the invalid plan and then we feed in uh the plan that did not work please generate an improved plan in valid Json with all the required fields for each subtask and you can see down here now plan prompt equals improved prompt so that means that we are actually going to run this improved prompt now uh uh over the chat function instead of this prompt right we're not going to run the plan prompt now uh over chat we're going to actually use improved prompt okay so that's good uh if we we don't get our valy Json we feed in the error message and the previous plan and try to improve it to get Json out again so we're going to run through this step 10 times uh and if it works then we of course just continue but if we fail 10 times uh then we just going to exit right because I think we're going to skip it actually sorry about that if we uh reach Max attempts here uh we're going to skip the task just going to continue uh so the system won't stop if we don't solve One Step but of course that's not good right uh so you can adjust the max attempts here if you want to uh but yeah I try this it's been working pretty good but uh I'm sure there are so improvements we can actually make in this step uh I think if we scroll down here you can see here it has to try was it four times before it actually uh got the valid js on and we got the correct output so it is actually working trying and trying over and over again until it works so that's interesting I think so yeah I'm pretty happy how I set this up but I'm sure there are room for improvements in this step okay so let's take a look at step six here so execute subtask based on the plan execute each subt defin in the plan replacing placeholders with actual results where necessary so this is the part of the code so I'm going to try to go through this so this can be a bit confusing so remember we are using our Loop here so what I kind of wanted to go through is kind of how we set this up so uh I want to kind of pull up this so you can see here the first thing uh we're going to do is we we're going to go through our plan and we're going to look at tasks right uh if we put this up here you can see yeah we have tasks here okay that's good for task description we kind of want to fetch the subtask uh task and this is this right okay okay find approximate number of words in the Bible or this could just be let's say Find the elephant size that's fine and if we go further down here function call is the next thing we want to fetch then we're going to use prompt and if we look at the plan here uh you can see prompt that contains ask llama 3 how many words are there in the Bible okay that's good so next up we just want to print this print the task prescription for print the function call and if you go down here you can see the subtask is going to be to find the words in the Bible and here we're going to print the function call we're going to run to solve this okay so far so good and here comes kind of the confusing part uh yeah I decided not to go too much into this but this is the format I want to send into our chat function uh so we have a query and we have a next query so here we are sending in just the function call as a query so we're just going to feed in this right uh but I also feed in the next query uh yeah I decided to skip that part because it's very confusing but this is the way I chose to do it and then we just going to go through here and start calling the functions we need uh again if you want to learn more about how these functions are being called and executed in the function call system just go back to a few of my previous videos and yeah you can learn all about the function calling okay so far so good uh I think we are actually on to step seven now and that is going to be storing the task result so collect and append the results for each subtask into the task results list right so if you go back to our code again you can see we just go down here task answer plus equals response and then we do a new line and we store the task and its answer in the task result list so we use the task result. append and we feed in each task into this list right and this is because on step eight we want to write the results to file and replay it and play it like with a sound so write all task back to test. txt play back task descriptions and answer using some audio and yeah this is done in this uh with open task. txt and then we're just going to print in the task the answer uh and yeah just write it so we have both task and the answer together uh as you can see here and that is pretty much the full um the full workflow of this so this is just a gimmick where we actually can play back the full TX uh task. txt if you want to listen to the answers and then we're just going to run the main function uh of course we already did that but yeah and so hopefully this was understandable I know there's a lot but uh yeah I'm still trying these videos where I kind of go through into more detail for each code and so far people have been enjoying it I can see that from the number of likes and stuff uh but uh hopefully it's not too much but I guess for a lot of you this is easy but uh this is not so easy for me this is something I had to learn and hopefully I just want to share with other people that also want to learn so yeah just thought I could do that uh but now I think we're just going to run to uh create a few more different tasks right try some different stuff can we lock up the system what doesn't work and see how far we can push this okay so what I did is I went ahead I added uh so we now have a total of 31 different task I'm pretty sure this is a bit too too much for just the local llama 3 uh model uh but I actually included clae 3E hu so we can actually try with another model all right we have the same system just a different model so we're going to try the CL 3 Model so yeah let's just start by running this on um local llama 3 right and see how far we can go okay so we seem to run in some kind of timeout error here it means we kind of got stuck right use the code to calculate how many cat lifespans ago the Egyptian pyramids were built uh okay that was a bit strange we did already have the uh cut lifespan average uh okay so yeah something failed here so okay note that down we got to task 11 now switch to claw then okay so let's run the Hau model here and see if we can actually complete all the task or at least see how far we can go okay so just just a quick update we are on task 17 doesn't seem okay so I think we got it yeah the percent of water on Earth is 70% okay good job so it keeps going here can we make H all of these tasks okay so yeah it seems that we actually went through every single test we got some error at the end here uh I don't know what that means but uh yeah so let's update our task list whoa this suddenly got long so we got a lot of answers here so let's just take a look at a few of those okay so you can see right python code to determine if 2024 is a leap year or not so yeah 24 is a leap year uh lifespan of a cat 12 to 18 years and it figured out that the Egyptian pyramids were built appro approximately minus 36 Liv spans ago uh okay so that was a bit strange uh but yeah okay so yeah pretty good job by Claude here uh I just want to finish up by showing you one more thing and that is that these systems are very easy to expand on so what I went ahead and did you can see we have a function called search Google so it's very easy to add this now to our system to expand it so you can see we added search Google here to our functions list we updated the convert to open AI function we did some more information here in our system message and we added some logic and we added some examples of how you use the search Google functions and just in a few minutes we kind of have expanded our system to add one more function we can actually use in our search for solving this tasks right and now I put up like three examples so use Google to find the stock price of Tesla find CEO of open AI find the name of the latest Taylor Swift's album uh okay so let's try that now and let's just open this and clear this now and when we run this now hopefully this should U Pick the search Google function okay that's good uh yeah this is looking good so we are going to search for Tesla stock price it found some information added it to google. text we use the query CEO of open AI we use the term latest tailor Swift album okay so good so the results we got now we can go here update this okay uh top search results so we have some kind of URL here yeah stock Tesla right uh Sam alman's Wikipedia page and taylorswift.com and a Wikipedia discography uh but we also scraped those pages so all the information will be added in here too right if we need to use some kind of Rag and search over these results right so yeah this system is very easy to uh collapse or expand and you can kind of do whatever you want with it right so that is kind of what I wanted to go through today and kind of yeah talk a bit about these systems you can build without being too dependent on llama index and all of these other Frameworks if you just want to mess around and learn something uh as well as you are doing this and of course this code will be of course fully available on my members uh GitHub page so if you just want to download this or Fork it and try it out for yourself uh just become a member follow the link in the description below and yeah uh you also get access to our community Discord uh other than that I hope this video was helpful it's kind of hard to make this videos because I don't know how much detail I should go into but this is just a test so we will see how if people like this if not I'm going to keep the length shorter and a bit more focused maybe on yeah some other things but as always like if you're not interested in kind of the the part where I go through the code and try to explain and maybe you can learn something just skip this if you just want to see how this works in action but yeah big thanks uh for the support lately it's been awesome so uh hopefully I will see you again on Wednesday have have a great uh week and yeah see you soon\n"