diff --git a/1_lab1.ipynb b/1_lab1.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..b76efd532de77bbdbb812e8f78c14a912ea81130 --- /dev/null +++ b/1_lab1.ipynb @@ -0,0 +1,510 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Welcome to the start of your adventure in Agentic AI" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n",
+ " ![]() | \n",
+ " \n",
+ " Are you ready for action??\n", + " Have you completed all the setup steps in the setup folder?\n", + " Have you checked out the guides in the guides folder? \n", + " Well in that case, you're ready!!\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " This code is a live resource - keep an eye out for my updates\n", + " I push updates regularly. As people ask questions or have problems, I add more examples and improve explanations. As a result, the code below might not be identical to the videos, as I've added more steps and better comments. Consider this like an interactive book that accompanies the lectures.\n", + " I try to send emails regularly with important updates related to the course. You can find this in the 'Announcements' section of Udemy in the left sidebar. You can also choose to receive my emails via your Notification Settings in Udemy. I'm respectful of your inbox and always try to add value with my emails!\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Exercise\n", + " Now try this commercial application:\n", + " First ask the LLM to pick a business area that might be worth exploring for an Agentic AI opportunity. \n", + " Then ask the LLM to present a pain-point in that industry - something challenging that might be ripe for an Agentic solution. \n", + " Finally have 3 third LLM call propose the Agentic AI solution.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Important point - please read\n", + " The way I collaborate with you may be different to other courses you've taken. I prefer not to type code while you watch. Rather, I execute Jupyter Labs, like this, and give you an intuition for what's going on. My suggestion is that you carefully execute this yourself, after watching the lecture. Add print statements to understand what's going on, and then come up with your own variations.If you have time, I'd love it if you submit a PR for changes in the community_contributions folder - instructions in the resources. Also, if you have a Github account, use this to showcase your variations. Not only is this essential practice, but it demonstrates your skills to others, including perhaps future clients or employers...\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Super important - ignore me at your peril!\n", + " The model called llama3.3 is FAR too large for home computers - it's not intended for personal computing and will consume all your resources! Stick with the nicely sized llama3.2 or llama3.2:1b and if you want larger, try llama3.1 or smaller variants of Qwen, Gemma, Phi or DeepSeek. See the the Ollama models page for a full list of models and sizes.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Exercise\n", + " Which pattern(s) did this use? Try updating this to add another Agentic design pattern.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Commercial implications\n", + " These kinds of patterns - to send a task to multiple models, and evaluate results,\n", + " are common where you need to improve the quality of your LLM response. This approach can be universally applied\n", + " to business projects where accuracy is critical.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Looking up packages\n", + " In this lab, we're going to use the wonderful Gradio package for building quick UIs, \n", + " and we're also going to use the popular PyPDF2 PDF reader. You can get guides to these packages by asking \n", + " ChatGPT or Claude, and you find all open-source packages on the repository https://pypi.org.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Exercise\n", + " • First and foremost, deploy this for yourself! It's a real, valuable tool - the future resume..\n", + " • Next, improve the resources - add better context about yourself. If you know RAG, then add a knowledge base about you. \n", + " • Add in more tools! You could have a SQL database with common Q&A that the LLM could read and write from? \n", + " • Bring in the Evaluator from the last lab, and add other Agentic patterns.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Commercial implications\n", + " Aside from the obvious (your career alter-ego) this has business applications in any situation where you need an AI assistant with domain expertise and an ability to interact with the real world.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Now try this commercial application: \n", + " First ask the LLM to pick a business area that might be worth exploring for an Agentic AI opportunity. \n", + " Then ask the LLM to present a pain-point in that industry - something challenging that might be ripe for an Agentic solution. \n", + " Finally have 3 third LLM call propose the Agentic AI solution.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Are you ready for action??\n", + " Have you completed all the setup steps in the setup folder?\n", + " Have you checked out the guides in the guides folder? \n", + " Well in that case, you're ready!!\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Treat these labs as a resource\n", + " I push updates to the code regularly. When people ask questions or have problems, I incorporate it in the code, adding more examples or improved commentary. As a result, you'll notice that the code below isn't identical to the videos. Everything from the videos is here; but in addition, I've added more steps and better explanations. Consider this like an interactive book that accompanies the lectures.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Exercise\n", + " Now try this commercial application:\n", + " First ask the LLM to pick a business area that might be worth exploring for an Agentic AI opportunity. \n", + " Then ask the LLM to present a pain-point in that industry - something challenging that might be ripe for an Agentic solution. \n", + " Finally have 3 third LLM call propose the Agentic AI solution.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Exercise\n", + " Now try this commercial application:\n", + " First ask the LLM to pick a business area that might be worth exploring for an Agentic AI opportunity. \n", + " Then ask the LLM to present a pain-point in that industry - something challenging that might be ripe for an Agentic solution. \n", + " Finally have 3 third LLM call propose the Agentic AI solution.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Are you ready for action??\n", + " Have you completed all the setup steps in the setup folder?\n", + " Have you checked out the guides in the guides folder? \n", + " Well in that case, you're ready!!\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " This code is a live resource - keep an eye out for my updates\n", + " I push updates regularly. As people ask questions or have problems, I add more examples and improve explanations. As a result, the code below might not be identical to the videos, as I've added more steps and better comments. Consider this like an interactive book that accompanies the lectures.\n", + " I try to send emails regularly with important updates related to the course. You can find this in the 'Announcements' section of Udemy in the left sidebar. You can also choose to receive my emails via your Notification Settings in Udemy. I'm respectful of your inbox and always try to add value with my emails!\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Exercise\n", + " Now try this commercial application:\n", + " First ask the LLM to pick a business area that might be worth exploring for an Agentic AI opportunity. \n", + " Then ask the LLM to present a pain-point in that industry - something challenging that might be ripe for an Agentic solution. \n", + " Finally have 3 third LLM call propose the Agentic AI solution.\n", + " \n", + " | \n",
+ "
{col} | " + table_html += "
---|
{val} | " + table_html += "
\n",
+ " ![]() | \n",
+ " \n",
+ " Important point - please read\n", + " The way I collaborate with you may be different to other courses you've taken. I prefer not to type code while you watch. Rather, I execute Jupyter Labs, like this, and give you an intuition for what's going on. My suggestion is that you carefully execute this yourself, after watching the lecture. Add print statements to understand what's going on, and then come up with your own variations.If you have time, I'd love it if you submit a PR for changes in the community_contributions folder - instructions in the resources. Also, if you have a Github account, use this to showcase your variations. Not only is this essential practice, but it demonstrates your skills to others, including perhaps future clients or employers...\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Super important - ignore me at your peril!\n", + " The model called llama3.3 is FAR too large for home computers - it's not intended for personal computing and will consume all your resources! Stick with the nicely sized llama3.2 or llama3.2:1b and if you want larger, try llama3.1 or smaller variants of Qwen, Gemma, Phi or DeepSeek. See the the Ollama models page for a full list of models and sizes.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Exercise\n", + " Which pattern(s) did this use? Try updating this to add another Agentic design pattern.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Commercial implications\n", + " These kinds of patterns - to send a task to multiple models, and evaluate results,\n", + " and common where you need to improve the quality of your LLM response. This approach can be universally applied\n", + " to business projects where accuracy is critical.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Are you ready for action??\n", + " Have you completed all the setup steps in the setup folder?\n", + " Have you checked out the guides in the guides folder? \n", + " Well in that case, you're ready!!\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Treat these labs as a resource\n", + " I push updates to the code regularly. When people ask questions or have problems, I incorporate it in the code, adding more examples or improved commentary. As a result, you'll notice that the code below isn't identical to the videos. Everything from the videos is here; but in addition, I've added more steps and better explanations. Consider this like an interactive book that accompanies the lectures.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Exercise\n", + " Now try this commercial application:\n", + " First ask the LLM to pick a business area that might be worth exploring for an Agentic AI opportunity. \n", + " Then ask the LLM to present a pain-point in that industry - something challenging that might be ripe for an Agentic solution. \n", + " Finally have 3 third LLM call propose the Agentic AI solution.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Are you ready for action??\n", + " Have you completed all the setup steps in the setup folder?\n", + " Have you checked out the guides in the guides folder? \n", + " Well in that case, you're ready!!\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " This code is a live resource - keep an eye out for my updates\n", + " I push updates regularly. As people ask questions or have problems, I add more examples and improve explanations. As a result, the code below might not be identical to the videos, as I've added more steps and better comments. Consider this like an interactive book that accompanies the lectures.\n", + " I try to send emails regularly with important updates related to the course. You can find this in the 'Announcements' section of Udemy in the left sidebar. You can also choose to receive my emails via your Notification Settings in Udemy. I'm respectful of your inbox and always try to add value with my emails!\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Exercise\n", + " Now try this commercial application:\n", + " First ask the LLM to pick a business area that might be worth exploring for an Agentic AI opportunity. \n", + " Then ask the LLM to present a pain-point in that industry - something challenging that might be ripe for an Agentic solution. \n", + " Finally have 3 third LLM call propose the Agentic AI solution.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Exercise\n", + " Now try this commercial application:\n", + " First ask the LLM to pick a business area that might be worth exploring for an Agentic AI opportunity. \n", + " Then ask the LLM to present a pain-point in that industry - something challenging that might be ripe for an Agentic solution. \n", + " Finally have 3 third LLM call propose the Agentic AI solution.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Important point - please read\n", + " The way I collaborate with you may be different to other courses you've taken. I prefer not to type code while you watch. Rather, I execute Jupyter Labs, like this, and give you an intuition for what's going on. My suggestion is that you carefully execute this yourself, after watching the lecture. Add print statements to understand what's going on, and then come up with your own variations.If you have time, I'd love it if you submit a PR for changes in the community_contributions folder - instructions in the resources. Also, if you have a Github account, use this to showcase your variations. Not only is this essential practice, but it demonstrates your skills to others, including perhaps future clients or employers...\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Exercise\n", + " Which pattern(s) did this use? Try updating this to add another Agentic design pattern.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Commercial implications\n", + " These kinds of patterns - to send a task to multiple models, and evaluate results,\n", + " and common where you need to improve the quality of your LLM response. This approach can be universally applied\n", + " to business projects where accuracy is critical.\n", + " \n", + " | \n",
+ "
\n",
+ " ![]() | \n",
+ " \n",
+ " Looking up packages\n", + " In this lab, we're going to use the wonderful Gradio package for building quick UIs, \n", + " and we're also going to use the popular PyPDF2 PDF reader. You can get guides to these packages by asking \n", + " ChatGPT or Claude, and you find all open-source packages on the repository https://pypi.org.\n", + " \n", + " | \n",
+ "