{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Welcome to the start of your adventure in Agentic AI" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", " \n", " \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 read the README? Many common questions are answered here!
\n", " Have you checked out the guides in the guides folder?
\n", " Well in that case, you're ready!!\n", "
\n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", " \n", " \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", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### And please do remember to contact me if I can help\n", "\n", "And I love to connect: https://www.linkedin.com/in/eddonner/\n", "\n", "\n", "### New to Notebooks like this one? Head over to the guides folder!\n", "\n", "Just to check you've already added the Python and Jupyter extensions to Cursor, if not already installed:\n", "- Open extensions (View >> extensions)\n", "- Search for python, and when the results show, click on the ms-python one, and Install it if not already installed\n", "- Search for jupyter, and when the results show, click on the Microsoft one, and Install it if not already installed \n", "Then View >> Explorer to bring back the File Explorer.\n", "\n", "And then:\n", "1. Click where it says \"Select Kernel\" near the top right, and select the option called `.venv (Python 3.12.9)` or similar, which should be the first choice or the most prominent choice. You may need to choose \"Python Environments\" first.\n", "2. Click in each \"cell\" below, starting with the cell immediately below this text, and press Shift+Enter to run\n", "3. Enjoy!\n", "\n", "After you click \"Select Kernel\", if there is no option like `.venv (Python 3.12.9)` then please do the following: \n", "1. On Mac: From the Cursor menu, choose Settings >> VS Code Settings (NOTE: be sure to select `VSCode Settings` not `Cursor Settings`); \n", "On Windows PC: From the File menu, choose Preferences >> VS Code Settings(NOTE: be sure to select `VSCode Settings` not `Cursor Settings`) \n", "2. In the Settings search bar, type \"venv\" \n", "3. In the field \"Path to folder with a list of Virtual Environments\" put the path to the project root, like C:\\Users\\username\\projects\\agents (on a Windows PC) or /Users/username/projects/agents (on Mac or Linux). \n", "And then try again.\n", "\n", "Having problems with missing Python versions in that list? Have you ever used Anaconda before? It might be interferring. Quit Cursor, bring up a new command line, and make sure that your Anaconda environment is deactivated: \n", "`conda deactivate` \n", "And if you still have any problems with conda and python versions, it's possible that you will need to run this too: \n", "`conda config --set auto_activate_base false` \n", "and then from within the Agents directory, you should be able to run `uv python list` and see the Python 3.12 version." ] }, { "cell_type": "code", "execution_count": 32, "metadata": {}, "outputs": [], "source": [ "# First let's do an import. If you get an Import Error, double check that your Kernel is correct..\n", "\n", "from dotenv import load_dotenv\n" ] }, { "cell_type": "code", "execution_count": 33, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "True" ] }, "execution_count": 33, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Next it's time to load the API keys into environment variables\n", "# If this returns false, see the next cell!\n", "\n", "load_dotenv(override=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Wait, did that just output `False`??\n", "\n", "If so, the most common reason is that you didn't save your `.env` file after adding the key! Be sure to have saved.\n", "\n", "Also, make sure the `.env` file is named precisely `.env` and is in the project root directory (`agents`)\n", "\n", "By the way, your `.env` file should have a stop symbol next to it in Cursor on the left, and that's actually a good thing: that's Cursor saying to you, \"hey, I realize this is a file filled with secret information, and I'm not going to send it to an external AI to suggest changes, because your keys should not be shown to anyone else.\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", " \n", " \n", " \n", " \n", "
\n", " \n", " \n", "

Final reminders

\n", " 1. If you're not confident about Environment Variables or Web Endpoints / APIs, please read Topics 3 and 5 in this technical foundations guide.
\n", " 2. If you want to use AIs other than OpenAI, like Gemini, DeepSeek or Ollama (free), please see the first section in this AI APIs guide.
\n", " 3. If you ever get a Name Error in Python, you can always fix it immediately; see the last section of this Python Foundations guide and follow both tutorials and exercises.
\n", "
\n", "
" ] }, { "cell_type": "code", "execution_count": 45, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "OpenAI API Key exists and begins sk-proj-\n" ] } ], "source": [ "# Check the key - if you're not using OpenAI, check whichever key you're using! Ollama doesn't need a key.\n", "\n", "import os\n", "openai_api_key = os.getenv('OPENAI_API_KEY')\n", "\n", "if openai_api_key:\n", " print(f\"OpenAI API Key exists and begins {openai_api_key[:8]}\")\n", "else:\n", " print(\"OpenAI API Key not set - please head to the troubleshooting guide in the setup folder\")\n", " \n" ] }, { "cell_type": "code", "execution_count": 46, "metadata": {}, "outputs": [], "source": [ "# And now - the all important import statement\n", "# If you get an import error - head over to troubleshooting in the Setup folder\n", "# Even for other LLM providers like Gemini, you still use this OpenAI import - see Guide 9 for why\n", "\n", "from openai import OpenAI" ] }, { "cell_type": "code", "execution_count": 47, "metadata": {}, "outputs": [], "source": [ "# And now we'll create an instance of the OpenAI class\n", "# If you're not sure what it means to create an instance of a class - head over to the guides folder (guide 6)!\n", "# If you get a NameError - head over to the guides folder (guide 6)to learn about NameErrors - always instantly fixable\n", "# If you're not using OpenAI, you just need to slightly modify this - precise instructions are in the AI APIs guide (guide 9)\n", "\n", "openai = OpenAI()" ] }, { "cell_type": "code", "execution_count": 48, "metadata": {}, "outputs": [], "source": [ "# Create a list of messages in the familiar OpenAI format\n", "\n", "messages = [{\"role\": \"user\", \"content\": \"What is 2+2?\"}]" ] }, { "cell_type": "code", "execution_count": 49, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2 + 2 equals 4.\n" ] } ], "source": [ "# And now call it! Any problems, head to the troubleshooting guide\n", "# This uses GPT 4.1 nano, the incredibly cheap model\n", "# The APIs guide (guide 9) has exact instructions for using even cheaper or free alternatives to OpenAI\n", "# If you get a NameError, head to the guides folder (guide 6) to learn about NameErrors - always instantly fixable\n", "\n", "response = openai.chat.completions.create(\n", " model=\"gpt-4.1-nano\",\n", " messages=messages\n", ")\n", "\n", "print(response.choices[0].message.content)\n" ] }, { "cell_type": "code", "execution_count": 50, "metadata": {}, "outputs": [], "source": [ "# And now - let's ask for a question:\n", "\n", "question = \"Please propose a hard, challenging question to assess someone's IQ. Respond only with the question.\"\n", "messages = [{\"role\": \"user\", \"content\": question}]\n" ] }, { "cell_type": "code", "execution_count": 51, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "If two trains start from the same point but travel in exactly opposite directions, one at 60 mph and the other at 40 mph, how long will it take for the distance between them to be 300 miles? Now, if a third train starts from a point 120 miles away from the starting point of the first two trains and moves toward their meeting point at 80 mph, how long after the first two trains start should the third train leave so that all three trains meet at the same point at the same time?\n" ] } ], "source": [ "# ask it - this uses GPT 4.1 mini, still cheap but more powerful than nano\n", "\n", "response = openai.chat.completions.create(\n", " model=\"gpt-4.1-mini\",\n", " messages=messages\n", ")\n", "\n", "question = response.choices[0].message.content\n", "\n", "print(question)\n" ] }, { "cell_type": "code", "execution_count": 52, "metadata": {}, "outputs": [], "source": [ "# form a new messages list\n", "messages = [{\"role\": \"user\", \"content\": question}]\n" ] }, { "cell_type": "code", "execution_count": 53, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Let's analyze the problem step-by-step.\n", "\n", "---\n", "\n", "### Part 1: Two trains moving in opposite directions\n", "\n", "- Train 1 speed: 60 mph\n", "- Train 2 speed: 40 mph\n", "- They start from the same point but travel in **opposite directions**.\n", "- We want to find the time \\( t \\) when the **distance between them** is 300 miles.\n", "\n", "Since they are moving in opposite directions, their distances from the start add up:\n", "\n", "\\[\n", "\\text{Distance between trains} = 60t + 40t = 100t\n", "\\]\n", "\n", "We want:\n", "\n", "\\[\n", "100t = 300 \\implies t = \\frac{300}{100} = 3 \\text{ hours}\n", "\\]\n", "\n", "---\n", "\n", "### Part 2: Third train meets the other two at the same time and point\n", "\n", "---\n", "\n", "#### Given information:\n", "\n", "- After \\( t = 3 \\) hours, the two trains are 300 miles apart.\n", "- Train 1 location after 3 hours: Since it went 60 mph to the right (say), its position is \\(60 \\times 3 = 180\\) miles to the right of the origin.\n", "- Train 2 location after 3 hours: Since it went 40 mph to the left, its position is \\(40 \\times 3 = 120\\) miles to the left of the origin.\n", "\n", "The two trains are at points \\(-120\\) and \\(+180\\) on a line.\n", "\n", "The **meeting point** where they will meet the third train must be the point where the third train and one other train can arrive simultaneously.\n", "\n", "Since they move apart and do not meet again, it would make sense for the third train starting from some point 120 miles away (from the starting position of the first two trains) and moving **towards the meeting point** to join with either one of the trains.\n", "\n", "- Third train speed: 80 mph\n", "- Third train starting position: 120 miles from the starting point (let's assume to the left of the origin, or we clarify based on problem data).\n", " \n", "Assuming the problem states \"**a third train starts from a point 120 miles away from the start of the first two trains**,\" and it moves **toward their meeting point.**\n", "\n", "From problem setup:\n", "\n", "- The two trains are moving away from the start point.\n", "- After 3 hours, the trains are at -120 (Train 2) and +180 (Train 1).\n", "- The distance between them is 300 miles.\n", "\n", "---\n", "\n", "### Assume the third train starts from 120 miles on the left of the origin, matching Train 2's initial direction:\n", "\n", "- Third train start point: \\(-120\\)\n", "\n", "We want all three trains to meet at the **same point** at the **same time**.\n", "\n", "Since Train 2 after 3 hours is at \\(-120\\), the third train and Train 2 start at the same point. But Train 2 has moved leftward from the origin (at t=0 it was at 0, at t=3 it's at \\(-120\\)). Therefore, the third train is 120 miles to the left of the origin.\n", "\n", "We want to find \\(T\\), the time after the first two trains start that the third train should start, so all three meet at the same point at the same time.\n", "\n", "---\n", "\n", "### Step 1: Define unknowns\n", "\n", "Let:\n", "\n", "- \\(T\\) = time after the first two trains start when the third train leaves its starting point \\(-120\\).\n", "- \\(t_m\\) = the meeting time (time after the first two trains start) when all three trains meet.\n", "\n", "We know from Part 1 that \\(t_m = 3\\) hours for the first two trains to be 300 miles apart. But the problem doesn't explicitly say the meeting is at \\(t=3\\); maybe it's later. Let's keep it general.\n", "\n", "---\n", "\n", "### Step 2: Position of trains at meeting time \\(t_m\\)\n", "\n", "- Train 1 position at \\(t_m\\):\n", "\n", "\\[\n", "x_1 = 60 \\times t_m\n", "\\]\n", "\n", "- Train 2 position at \\(t_m\\):\n", "\n", "\\[\n", "x_2 = -40 \\times t_m\n", "\\]\n", "\n", "- Third train starts at position \\(-120\\) miles and starts at time \\(T\\) (after the others started). It moves **toward the meeting point** with speed 80 mph.\n", "\n", "The third train travels for \\(t_m - T\\) hours before meeting the others.\n", "\n", "---\n", "\n", "### Step 3: Meeting point \\(X\\)\n", "\n", "Since all three trains meet at the same place and time:\n", "\n", "\\[\n", "X = 60 t_m = -40 t_m = \\text{(third train position at meeting time)}\n", "\\]\n", "\n", "But the first two trains cannot be at the same point at the same time while moving in opposite directions, except at initial position 0.\n", "\n", "So the meeting point cannot be where train 1 and train 2 are simultaneously unless we reconsider.\n", "\n", "---\n", "\n", "### Alternative interpretation:\n", "\n", "Maybe the third train meets with *one* of the trains, and the problem means all three trains are at the **same point and time**.\n", "\n", "Given that, the first two trains move apart, so they are at different points at time \\(t\\). To have all three meet at the same point and time, the first two trains must meet the third train at some point. The only possible point where all three can meet is the track between \\(-120\\) and \\(180\\). Let's consider:\n", "\n", "- The third train starts at \\(-120\\).\n", "- The others are at positions \\(60 t\\) and \\(-40 t\\) at time \\(t\\).\n", "- The third train moves towards the meeting point \\(X\\) starting at time \\(T\\), so:\n", "\n", "\\[\n", "X = -120 + 80 (t - T)\n", "\\]\n", "\n", "---\n", "\n", "### Step 4: The third train's direction\n", "\n", "The third train is at \\(-120\\), the other trains start at 0, and move away.\n", "\n", "At time \\(t\\), train 2 is at \\(-40 t\\), train 1 is at \\(60 t\\).\n", "\n", "We want to find \\(t\\), \\(T\\), and \\(X\\) such that:\n", "\n", "\\[\n", "\\text{Train 2 position at } t = X = -40 t\n", "\\]\n", "\\[\n", "\\text{Third train position at } t = X = -120 + 80 (t - T)\n", "\\]\n", "\n", "This is the only possible way for train 2 and the third train to meet.\n", "\n", "---\n", "\n", "### Step 5: Equate positions to solve \\(T\\) and \\(t\\):\n", "\n", "\\[\n", "-40 t = -120 + 80 (t - T)\n", "\\]\n", "\\[\n", "-40 t = -120 + 80 t - 80 T\n", "\\]\n", "\\[\n", "-40 t - 80 t = -120 - 80 T\n", "\\]\n", "\\[\n", "-120 t = -120 - 80 T\n", "\\]\n", "\\[\n", "120 t = 120 + 80 T\n", "\\]\n", "\\[\n", "t = 1 + \\frac{2}{3} T\n", "\\]\n", "\n", "---\n", "\n", "### Step 6: Train 1 position\n", "\n", "At time \\(t\\), train 1 is at:\n", "\n", "\\[\n", "60 t = 60 \\times \\left(1 + \\frac{2}{3} T \\right) = 60 + 40 T\n", "\\]\n", "\n", "For all three trains to meet simultaneously, train 1 must also be at the same meeting point:\n", "\n", "\\[\n", "60 t = X\n", "\\]\n", "\n", "But we know \\(X = -40 t\\), so train 1 and train 2 meet at the same point only if \\(60 t = -40 t\\) which is impossible for \\(t > 0\\).\n", "\n", "---\n", "\n", "### Conclusion:\n", "\n", "- Trains 1 and 2 move in opposite directions, so they never meet after departing.\n", "- Therefore, the only way all three trains meet simultaneously is if two trains meet at a point and the third train also arrives there at the same time.\n", "\n", "Since Train 1 and Train 2 move apart, they never meet again after the start.\n", "\n", "---\n", "\n", "### Let's check if the problem could mean:\n", "\n", "- Third train moves toward the **start point** (\\(0\\)).\n", "\n", "If third train starts at 120 miles away from the origin in the **same direction** as Train 1 is going (to the right), and moves toward 0 (the starting point):\n", "\n", "- Then, at time \\(t\\), Train 1 is at \\(60 t\\)\n", "- Train 2 at \\(-40 t\\)\n", "- Third train starts at \\(x = 120\\) and moves leftward at 80 mph towards origin, so third train position at time \\(t\\) after first two start is:\n", "\n", "\\[\n", "x_3 =\n", "\\begin{cases}\n", " 120, & t < T \\\\\n", " 120 - 80 (t - T), & t \\geq T\n", "\\end{cases}\n", "\\]\n", "\n", "---\n", "\n", "### Step 1:\n", "\n", "Let \\(t = t_m\\) when all trains meet at point \\(X\\).\n", "\n", "For the meeting point:\n", "\n", "\\[\n", "X = 60 t_m \\quad (\\text{Train 1})\n", "\\]\n", "\\[\n", "X = -40 t_m \\quad (\\text{Train 2})\n", "\\]\n", "\\[\n", "X = 120 - 80 (t_m - T) \\quad (\\text{Third train})\n", "\\]\n", "\n", "Again, Train 1 and 2 cannot meet here because:\n", "\n", "\\[\n", "60 t_m = -40 t_m \\implies 100 t_m = 0 \\implies t_m = 0\n", "\\]\n", "\n", "Only at \\(t=0\\) they are at the same point.\n", "\n", "---\n", "\n", "### Final interpretation:\n", "\n", "The **only point all three trains can meet simultaneously** is at the starting point \\(0\\), at \\(t=0\\).\n", "\n", "---\n", "\n", "### Part 3: Maybe the question means: Train 1 and Train 2 start moving away; when the distance is 300 miles (at \\(t=3\\)), the third train starts 120 miles away from the starting point **between** Train 2's starting point and Train 1's position and moves **toward** the point where the two trains are after 3 hours.\n", "\n", "- Distance between train 2 endpoint at 3 hours is \\(120\\) miles to left.\n", "- Let's say the third train starts at +120 miles (to the right) and moves toward the meeting point.\n", "\n", "- Position of Train 1 at 3 hours: \\(180\\) miles to right.\n", "- Position of Train 2 at 3 hours: \\(-120\\) miles to left.\n", "- Third train start \\(120\\) miles to the right.\n", "\n", "---\n", "\n", "### Step 1: Can all three meet at a point?\n", "\n", "The first two trains have already moved away and are 300 miles apart.\n", "\n", "They do not meet again.\n", "\n", "---\n", "\n", "### Alternative question interpretation:\n", "\n", "Maybe the problem wants the **third train to meet both Train 1 and Train 2 simultaneously at the same place and time after starting from \\(120\\) miles away from the starting point, and moving towards the meeting point where the two trains are moving away from each other.**\n", "\n", "---\n", "\n", "### Let's try to solve the problem with these assumptions:\n", "\n", "- Start point: 0\n", "- Train 1 goes right at 60 mph.\n", "- Train 2 goes left at 40 mph.\n", "\n", "So:\n", "\n", "- Position of Train 1 at time \\(t\\): \\(60 t\\)\n", "- Position of Train 2 at time \\(t\\): \\(-40 t\\)\n", "- Distance between them at \\(t\\): \\(60 t + 40 t = 100 t\\)\n", "- Distance is 300 miles at \\(t=3\\).\n", "\n", "---\n", "\n", "### Now, the third train starts at 120 miles **to the right of the starting point** (at +120).\n", "\n", "Third train speed: 80 mph.\n", "\n", "Third train moves **toward the meeting point** (we can assume **toward the starting point 0 or somewhere else**).\n", "\n", "---\n", "\n", "### Objective:\n", "\n", "Find \\(T\\), the time after \\(t=0\\) when the third train should leave so that all three trains meet **at the same point at the same time**.\n", "\n", "---\n", "\n", "### Step 2: Variables\n", "\n", "- Let \\(t_m\\) be the time of meeting (\\(t_m \\geq 0\\))\n", "- Third train starts at \\(t=T\\)\n", "- Third train starting position: \\(P_3 = 120\\)\n", "- Third train moves left (speed 80 mph toward the meeting point)\n", "\n", "---\n", "\n", "### Step 3: Meeting point \\(X\\) (unknown)\n", "\n", "At the meeting time \\(t_m\\),\n", "\n", "- \\(X = 60 t_m\\) (Train 1 position)\n", "- \\(X = -40 t_m\\) (Train 2 position) -- again impossible unless \\(t_m=0\\).\n", "\n", "Hence Train 1 and 2 do not meet at the same point again after \\(t=0\\).\n", "\n", "---\n", "\n", "### Step 4: Relax assumption: The third train meets with **one** of the two trains.\n", "\n", "Say, third train meets with Train 1 at point \\(X\\) at time \\(t_m\\), and somehow Train 2 also reaches there.\n", "\n", "Train 2 moves left, so no meet with Train 1 after \\(t=0\\).\n", "\n", "---\n", "\n", "### Step 5: Find time and point where third train and Train 1 meet at time \\(t_m\\)\n", "\n", "- Train 1 position:\n", "\n", "\\[\n", "X = 60 t_m\n", "\\]\n", "\n", "- Third train position at time \\(t\\):\n", "\n", "\\[\n", "x_3(t) = 120 - 80 (t - T) \\quad \\text{for } t \\geq T, \\quad = 120 \\text{ for } t < T\n", "\\]\n", "\n", "Third train should be at \\(X\\) at time \\(t = t_m\\):\n", "\n", "\\[\n", "X = x_3(t_m) = 120 - 80 (t_m - T)\n", "\\]\n", "\n", "---\n", "\n", "### Equate positions:\n", "\n", "\\[\n", "60 t_m = 120 - 80 (t_m - T)\n", "\\]\n", "\\[\n", "60 t_m = 120 - 80 t_m + 80 T\n", "\\]\n", "\\[\n", "60 t_m + 80 t_m = 120 + 80 T\n", "\\]\n", "\\[\n", "140 t_m = 120 + 80 T\n", "\\]\n", "\\[\n", "t_m = \\frac{120 + 80 T}{140} = \\frac{12 + 8 T}{14} = \\frac{6 + 4 T}{7}\n", "\\]\n", "\n", "---\n", "\n", "### Step 6: Distance between Train 1 and Train 2 at meeting time\n", "\n", "They do not meet again.\n", "\n", "But maybe the question wants the third train to catch Train 2 at the same time the first two trains are 300 miles apart.\n", "\n", "Let's check when Train 2 is at some position that matches the arrival time of the third train.\n", "\n", "Train 2 position at \\(t_m\\):\n", "\n", "\\[\n", "x_2(t_m) = -40 t_m\n", "\\]\n", "\n", "Third train position at \\(t_m\\):\n", "\n", "\\[\n", "x_3(t_m) = 120 - 80 (t_m - T)\n", "\\]\n", "\n", "For Train 2 and third train to meet (both position = \\(X\\)):\n", "\n", "\\[\n", "-40 t_m = 120 - 80 (t_m - T)\n", "\\]\n", "\\[\n", "-40 t_m = 120 - 80 t_m + 80 T\n", "\\]\n", "\\[\n", "-40 t_m + 80 t_m = 120 + 80 T\n", "\\]\n", "\\[\n", "40 t_m = 120 + 80 T\n", "\\]\n", "\\[\n", "t_m = \\frac{120 + 80 T}{40} = 3 + 2 T\n", "\\]\n", "\n", "---\n", "\n", "### Step 7: Make sure third train meets both Train 1 and Train 2 **at the same time and point**:\n", "\n", "At time \\(t_m\\), Train 1 and third train meet at \\(X_1\\):\n", "\n", "\\[\n", "X_1 = 60 t_m = 120 - 80 (t_m - T)\n", "\\]\n", "\n", "At the same time, Train 2 and third train meet at \\(X_2\\):\n", "\n", "\\[\n", "X_2 = -40 t_m = 120 - 80 (t_m - T)\n", "\\]\n", "\n", "From above, the third train cannot be simultaneously at two points unless \\(X_1 = X_2\\).\n", "\n", "We want \\(60 t_m = -40 t_m\\):\n", "\n", "\\[\n", "60 t_m = -40 t_m\n", "\\]\n", "\\[\n", "100 t_m = 0\n", "\\]\n", "\\[\n", "t_m = 0\n", "\\]\n", "\n", "Again, only possible for \\(t=0\\).\n", "\n", "---\n", "\n", "### Final take:\n", "\n", "Train 1 and Train 2 do not meet again after \\(t=0\\).\n", "\n", "So, the third train can't meet both Train 1 and Train 2 simultaneously at the same point and time after \\(t=0\\).\n", "\n", "---\n", "\n", "### So, is the question asking:\n", "\n", "- To find the time when Train 1 and Train 2 are 300 miles apart (which we did: 3 hours)\n", "- Then find how long after that the third train should leave a point 120 miles away so it arrives **at the same point as one of the trains at the same time**\n", "\n", "---\n", "\n", "### If yes:\n", "\n", "- Trains 1 and 2 are 300 miles apart at \\(t=3\\)\n", "- At \\(t=3\\), Train 1 at 180 miles, Train 2 at \\(-120\\)\n", "- Third train starts 120 miles away\n", "\n", "- If the third train wants to meet Train 1 at 180 miles at \\(t=3\\):\n", "\n", "Distance between third train and meeting point:\n", "\n", "\\[\n", "180 - 120 = 60 \\text{ miles}\n", "\\]\n", "\n", "Third train speed = 80 mph\n", "\n", "Time required by third train to get there:\n", "\n", "\\[\n", "\\frac{60}{80} = 0.75 \\text{ hours}\n", "\\]\n", "\n", "Therefore, third train must start at:\n", "\n", "\\[\n", "3 - 0.75 = 2.25 \\text{ hours}\n", "\\]\n", "\n", "- If third train wants to meet Train 2 at \\(-120\\) miles at \\(t=3\\):\n", "\n", "Distance between third train and meeting point:\n", "\n", "\\[\n", "120 + 120 = 240 \\text{ miles}\n", "\\]\n", "\n", "Time required:\n", "\n", "\\[\n", "\\frac{240}{80} = 3 \\text{ hours}\n", "\\]\n", "\n", "Third train must start at:\n", "\n", "\\[\n", "3 - 3 = 0 \\text{ hours}\n", "\\]\n", "\n", "i.e., at the same time as Train 1 and Train 2.\n", "\n", "---\n", "\n", "# **Final answers:**\n", "\n", "1. **Time for trains 1 and 2 to be 300 miles apart:**\n", "\n", "\\[\n", "t = 3 \\text{ hours}\n", "\\]\n", "\n", "2. **For third train starting 120 miles away to meet train 1 or train 2 at the same time as they are 300 miles apart:**\n", "\n", "- To meet **Train 1** (at 180 miles) at \\(t=3\\):\n", "\n", "\\[\n", "\\text{Third train must start } 0.75 \\text{ hours before } t=3 \\implies \\boxed{2.25 \\text{ hours after start}}\n", "\\]\n", "\n", "- To meet **Train 2** (at \\(-120\\) miles) at \\(t=3\\):\n", "\n", "\\[\n", "\\text{Third train must start at } t=0.\n", "\\]\n", "\n", "---\n", "\n", "### Summary:\n", "\n", "- The two trains will be 300 miles apart after 3 hours.\n", "- The third train, starting 120 miles away, moving at 80 mph:\n", "\n", " - Must start 2.25 hours after the first two trains start to meet Train 1 (at the same time they are 300 miles apart).\n", " - Must start at the same time (0 hours) to meet Train 2 at that time.\n", "\n", "---\n", "\n", "If you want a simultaneous meeting of all three **at the same point**, it cannot happen after \\(t=0\\), given the directions and speeds.\n", "\n", "---\n", "\n", "If you need more clarification or variations on this problem, feel free to ask!\n" ] } ], "source": [ "# Ask it again\n", "\n", "response = openai.chat.completions.create(\n", " model=\"gpt-4.1-mini\",\n", " messages=messages\n", ")\n", "\n", "answer = response.choices[0].message.content\n", "print(answer)\n" ] }, { "cell_type": "code", "execution_count": 54, "metadata": {}, "outputs": [ { "data": { "text/markdown": [ "Let's analyze the problem step-by-step.\n", "\n", "---\n", "\n", "### Part 1: Two trains moving in opposite directions\n", "\n", "- Train 1 speed: 60 mph\n", "- Train 2 speed: 40 mph\n", "- They start from the same point but travel in **opposite directions**.\n", "- We want to find the time \\( t \\) when the **distance between them** is 300 miles.\n", "\n", "Since they are moving in opposite directions, their distances from the start add up:\n", "\n", "\\[\n", "\\text{Distance between trains} = 60t + 40t = 100t\n", "\\]\n", "\n", "We want:\n", "\n", "\\[\n", "100t = 300 \\implies t = \\frac{300}{100} = 3 \\text{ hours}\n", "\\]\n", "\n", "---\n", "\n", "### Part 2: Third train meets the other two at the same time and point\n", "\n", "---\n", "\n", "#### Given information:\n", "\n", "- After \\( t = 3 \\) hours, the two trains are 300 miles apart.\n", "- Train 1 location after 3 hours: Since it went 60 mph to the right (say), its position is \\(60 \\times 3 = 180\\) miles to the right of the origin.\n", "- Train 2 location after 3 hours: Since it went 40 mph to the left, its position is \\(40 \\times 3 = 120\\) miles to the left of the origin.\n", "\n", "The two trains are at points \\(-120\\) and \\(+180\\) on a line.\n", "\n", "The **meeting point** where they will meet the third train must be the point where the third train and one other train can arrive simultaneously.\n", "\n", "Since they move apart and do not meet again, it would make sense for the third train starting from some point 120 miles away (from the starting position of the first two trains) and moving **towards the meeting point** to join with either one of the trains.\n", "\n", "- Third train speed: 80 mph\n", "- Third train starting position: 120 miles from the starting point (let's assume to the left of the origin, or we clarify based on problem data).\n", " \n", "Assuming the problem states \"**a third train starts from a point 120 miles away from the start of the first two trains**,\" and it moves **toward their meeting point.**\n", "\n", "From problem setup:\n", "\n", "- The two trains are moving away from the start point.\n", "- After 3 hours, the trains are at -120 (Train 2) and +180 (Train 1).\n", "- The distance between them is 300 miles.\n", "\n", "---\n", "\n", "### Assume the third train starts from 120 miles on the left of the origin, matching Train 2's initial direction:\n", "\n", "- Third train start point: \\(-120\\)\n", "\n", "We want all three trains to meet at the **same point** at the **same time**.\n", "\n", "Since Train 2 after 3 hours is at \\(-120\\), the third train and Train 2 start at the same point. But Train 2 has moved leftward from the origin (at t=0 it was at 0, at t=3 it's at \\(-120\\)). Therefore, the third train is 120 miles to the left of the origin.\n", "\n", "We want to find \\(T\\), the time after the first two trains start that the third train should start, so all three meet at the same point at the same time.\n", "\n", "---\n", "\n", "### Step 1: Define unknowns\n", "\n", "Let:\n", "\n", "- \\(T\\) = time after the first two trains start when the third train leaves its starting point \\(-120\\).\n", "- \\(t_m\\) = the meeting time (time after the first two trains start) when all three trains meet.\n", "\n", "We know from Part 1 that \\(t_m = 3\\) hours for the first two trains to be 300 miles apart. But the problem doesn't explicitly say the meeting is at \\(t=3\\); maybe it's later. Let's keep it general.\n", "\n", "---\n", "\n", "### Step 2: Position of trains at meeting time \\(t_m\\)\n", "\n", "- Train 1 position at \\(t_m\\):\n", "\n", "\\[\n", "x_1 = 60 \\times t_m\n", "\\]\n", "\n", "- Train 2 position at \\(t_m\\):\n", "\n", "\\[\n", "x_2 = -40 \\times t_m\n", "\\]\n", "\n", "- Third train starts at position \\(-120\\) miles and starts at time \\(T\\) (after the others started). It moves **toward the meeting point** with speed 80 mph.\n", "\n", "The third train travels for \\(t_m - T\\) hours before meeting the others.\n", "\n", "---\n", "\n", "### Step 3: Meeting point \\(X\\)\n", "\n", "Since all three trains meet at the same place and time:\n", "\n", "\\[\n", "X = 60 t_m = -40 t_m = \\text{(third train position at meeting time)}\n", "\\]\n", "\n", "But the first two trains cannot be at the same point at the same time while moving in opposite directions, except at initial position 0.\n", "\n", "So the meeting point cannot be where train 1 and train 2 are simultaneously unless we reconsider.\n", "\n", "---\n", "\n", "### Alternative interpretation:\n", "\n", "Maybe the third train meets with *one* of the trains, and the problem means all three trains are at the **same point and time**.\n", "\n", "Given that, the first two trains move apart, so they are at different points at time \\(t\\). To have all three meet at the same point and time, the first two trains must meet the third train at some point. The only possible point where all three can meet is the track between \\(-120\\) and \\(180\\). Let's consider:\n", "\n", "- The third train starts at \\(-120\\).\n", "- The others are at positions \\(60 t\\) and \\(-40 t\\) at time \\(t\\).\n", "- The third train moves towards the meeting point \\(X\\) starting at time \\(T\\), so:\n", "\n", "\\[\n", "X = -120 + 80 (t - T)\n", "\\]\n", "\n", "---\n", "\n", "### Step 4: The third train's direction\n", "\n", "The third train is at \\(-120\\), the other trains start at 0, and move away.\n", "\n", "At time \\(t\\), train 2 is at \\(-40 t\\), train 1 is at \\(60 t\\).\n", "\n", "We want to find \\(t\\), \\(T\\), and \\(X\\) such that:\n", "\n", "\\[\n", "\\text{Train 2 position at } t = X = -40 t\n", "\\]\n", "\\[\n", "\\text{Third train position at } t = X = -120 + 80 (t - T)\n", "\\]\n", "\n", "This is the only possible way for train 2 and the third train to meet.\n", "\n", "---\n", "\n", "### Step 5: Equate positions to solve \\(T\\) and \\(t\\):\n", "\n", "\\[\n", "-40 t = -120 + 80 (t - T)\n", "\\]\n", "\\[\n", "-40 t = -120 + 80 t - 80 T\n", "\\]\n", "\\[\n", "-40 t - 80 t = -120 - 80 T\n", "\\]\n", "\\[\n", "-120 t = -120 - 80 T\n", "\\]\n", "\\[\n", "120 t = 120 + 80 T\n", "\\]\n", "\\[\n", "t = 1 + \\frac{2}{3} T\n", "\\]\n", "\n", "---\n", "\n", "### Step 6: Train 1 position\n", "\n", "At time \\(t\\), train 1 is at:\n", "\n", "\\[\n", "60 t = 60 \\times \\left(1 + \\frac{2}{3} T \\right) = 60 + 40 T\n", "\\]\n", "\n", "For all three trains to meet simultaneously, train 1 must also be at the same meeting point:\n", "\n", "\\[\n", "60 t = X\n", "\\]\n", "\n", "But we know \\(X = -40 t\\), so train 1 and train 2 meet at the same point only if \\(60 t = -40 t\\) which is impossible for \\(t > 0\\).\n", "\n", "---\n", "\n", "### Conclusion:\n", "\n", "- Trains 1 and 2 move in opposite directions, so they never meet after departing.\n", "- Therefore, the only way all three trains meet simultaneously is if two trains meet at a point and the third train also arrives there at the same time.\n", "\n", "Since Train 1 and Train 2 move apart, they never meet again after the start.\n", "\n", "---\n", "\n", "### Let's check if the problem could mean:\n", "\n", "- Third train moves toward the **start point** (\\(0\\)).\n", "\n", "If third train starts at 120 miles away from the origin in the **same direction** as Train 1 is going (to the right), and moves toward 0 (the starting point):\n", "\n", "- Then, at time \\(t\\), Train 1 is at \\(60 t\\)\n", "- Train 2 at \\(-40 t\\)\n", "- Third train starts at \\(x = 120\\) and moves leftward at 80 mph towards origin, so third train position at time \\(t\\) after first two start is:\n", "\n", "\\[\n", "x_3 =\n", "\\begin{cases}\n", " 120, & t < T \\\\\n", " 120 - 80 (t - T), & t \\geq T\n", "\\end{cases}\n", "\\]\n", "\n", "---\n", "\n", "### Step 1:\n", "\n", "Let \\(t = t_m\\) when all trains meet at point \\(X\\).\n", "\n", "For the meeting point:\n", "\n", "\\[\n", "X = 60 t_m \\quad (\\text{Train 1})\n", "\\]\n", "\\[\n", "X = -40 t_m \\quad (\\text{Train 2})\n", "\\]\n", "\\[\n", "X = 120 - 80 (t_m - T) \\quad (\\text{Third train})\n", "\\]\n", "\n", "Again, Train 1 and 2 cannot meet here because:\n", "\n", "\\[\n", "60 t_m = -40 t_m \\implies 100 t_m = 0 \\implies t_m = 0\n", "\\]\n", "\n", "Only at \\(t=0\\) they are at the same point.\n", "\n", "---\n", "\n", "### Final interpretation:\n", "\n", "The **only point all three trains can meet simultaneously** is at the starting point \\(0\\), at \\(t=0\\).\n", "\n", "---\n", "\n", "### Part 3: Maybe the question means: Train 1 and Train 2 start moving away; when the distance is 300 miles (at \\(t=3\\)), the third train starts 120 miles away from the starting point **between** Train 2's starting point and Train 1's position and moves **toward** the point where the two trains are after 3 hours.\n", "\n", "- Distance between train 2 endpoint at 3 hours is \\(120\\) miles to left.\n", "- Let's say the third train starts at +120 miles (to the right) and moves toward the meeting point.\n", "\n", "- Position of Train 1 at 3 hours: \\(180\\) miles to right.\n", "- Position of Train 2 at 3 hours: \\(-120\\) miles to left.\n", "- Third train start \\(120\\) miles to the right.\n", "\n", "---\n", "\n", "### Step 1: Can all three meet at a point?\n", "\n", "The first two trains have already moved away and are 300 miles apart.\n", "\n", "They do not meet again.\n", "\n", "---\n", "\n", "### Alternative question interpretation:\n", "\n", "Maybe the problem wants the **third train to meet both Train 1 and Train 2 simultaneously at the same place and time after starting from \\(120\\) miles away from the starting point, and moving towards the meeting point where the two trains are moving away from each other.**\n", "\n", "---\n", "\n", "### Let's try to solve the problem with these assumptions:\n", "\n", "- Start point: 0\n", "- Train 1 goes right at 60 mph.\n", "- Train 2 goes left at 40 mph.\n", "\n", "So:\n", "\n", "- Position of Train 1 at time \\(t\\): \\(60 t\\)\n", "- Position of Train 2 at time \\(t\\): \\(-40 t\\)\n", "- Distance between them at \\(t\\): \\(60 t + 40 t = 100 t\\)\n", "- Distance is 300 miles at \\(t=3\\).\n", "\n", "---\n", "\n", "### Now, the third train starts at 120 miles **to the right of the starting point** (at +120).\n", "\n", "Third train speed: 80 mph.\n", "\n", "Third train moves **toward the meeting point** (we can assume **toward the starting point 0 or somewhere else**).\n", "\n", "---\n", "\n", "### Objective:\n", "\n", "Find \\(T\\), the time after \\(t=0\\) when the third train should leave so that all three trains meet **at the same point at the same time**.\n", "\n", "---\n", "\n", "### Step 2: Variables\n", "\n", "- Let \\(t_m\\) be the time of meeting (\\(t_m \\geq 0\\))\n", "- Third train starts at \\(t=T\\)\n", "- Third train starting position: \\(P_3 = 120\\)\n", "- Third train moves left (speed 80 mph toward the meeting point)\n", "\n", "---\n", "\n", "### Step 3: Meeting point \\(X\\) (unknown)\n", "\n", "At the meeting time \\(t_m\\),\n", "\n", "- \\(X = 60 t_m\\) (Train 1 position)\n", "- \\(X = -40 t_m\\) (Train 2 position) -- again impossible unless \\(t_m=0\\).\n", "\n", "Hence Train 1 and 2 do not meet at the same point again after \\(t=0\\).\n", "\n", "---\n", "\n", "### Step 4: Relax assumption: The third train meets with **one** of the two trains.\n", "\n", "Say, third train meets with Train 1 at point \\(X\\) at time \\(t_m\\), and somehow Train 2 also reaches there.\n", "\n", "Train 2 moves left, so no meet with Train 1 after \\(t=0\\).\n", "\n", "---\n", "\n", "### Step 5: Find time and point where third train and Train 1 meet at time \\(t_m\\)\n", "\n", "- Train 1 position:\n", "\n", "\\[\n", "X = 60 t_m\n", "\\]\n", "\n", "- Third train position at time \\(t\\):\n", "\n", "\\[\n", "x_3(t) = 120 - 80 (t - T) \\quad \\text{for } t \\geq T, \\quad = 120 \\text{ for } t < T\n", "\\]\n", "\n", "Third train should be at \\(X\\) at time \\(t = t_m\\):\n", "\n", "\\[\n", "X = x_3(t_m) = 120 - 80 (t_m - T)\n", "\\]\n", "\n", "---\n", "\n", "### Equate positions:\n", "\n", "\\[\n", "60 t_m = 120 - 80 (t_m - T)\n", "\\]\n", "\\[\n", "60 t_m = 120 - 80 t_m + 80 T\n", "\\]\n", "\\[\n", "60 t_m + 80 t_m = 120 + 80 T\n", "\\]\n", "\\[\n", "140 t_m = 120 + 80 T\n", "\\]\n", "\\[\n", "t_m = \\frac{120 + 80 T}{140} = \\frac{12 + 8 T}{14} = \\frac{6 + 4 T}{7}\n", "\\]\n", "\n", "---\n", "\n", "### Step 6: Distance between Train 1 and Train 2 at meeting time\n", "\n", "They do not meet again.\n", "\n", "But maybe the question wants the third train to catch Train 2 at the same time the first two trains are 300 miles apart.\n", "\n", "Let's check when Train 2 is at some position that matches the arrival time of the third train.\n", "\n", "Train 2 position at \\(t_m\\):\n", "\n", "\\[\n", "x_2(t_m) = -40 t_m\n", "\\]\n", "\n", "Third train position at \\(t_m\\):\n", "\n", "\\[\n", "x_3(t_m) = 120 - 80 (t_m - T)\n", "\\]\n", "\n", "For Train 2 and third train to meet (both position = \\(X\\)):\n", "\n", "\\[\n", "-40 t_m = 120 - 80 (t_m - T)\n", "\\]\n", "\\[\n", "-40 t_m = 120 - 80 t_m + 80 T\n", "\\]\n", "\\[\n", "-40 t_m + 80 t_m = 120 + 80 T\n", "\\]\n", "\\[\n", "40 t_m = 120 + 80 T\n", "\\]\n", "\\[\n", "t_m = \\frac{120 + 80 T}{40} = 3 + 2 T\n", "\\]\n", "\n", "---\n", "\n", "### Step 7: Make sure third train meets both Train 1 and Train 2 **at the same time and point**:\n", "\n", "At time \\(t_m\\), Train 1 and third train meet at \\(X_1\\):\n", "\n", "\\[\n", "X_1 = 60 t_m = 120 - 80 (t_m - T)\n", "\\]\n", "\n", "At the same time, Train 2 and third train meet at \\(X_2\\):\n", "\n", "\\[\n", "X_2 = -40 t_m = 120 - 80 (t_m - T)\n", "\\]\n", "\n", "From above, the third train cannot be simultaneously at two points unless \\(X_1 = X_2\\).\n", "\n", "We want \\(60 t_m = -40 t_m\\):\n", "\n", "\\[\n", "60 t_m = -40 t_m\n", "\\]\n", "\\[\n", "100 t_m = 0\n", "\\]\n", "\\[\n", "t_m = 0\n", "\\]\n", "\n", "Again, only possible for \\(t=0\\).\n", "\n", "---\n", "\n", "### Final take:\n", "\n", "Train 1 and Train 2 do not meet again after \\(t=0\\).\n", "\n", "So, the third train can't meet both Train 1 and Train 2 simultaneously at the same point and time after \\(t=0\\).\n", "\n", "---\n", "\n", "### So, is the question asking:\n", "\n", "- To find the time when Train 1 and Train 2 are 300 miles apart (which we did: 3 hours)\n", "- Then find how long after that the third train should leave a point 120 miles away so it arrives **at the same point as one of the trains at the same time**\n", "\n", "---\n", "\n", "### If yes:\n", "\n", "- Trains 1 and 2 are 300 miles apart at \\(t=3\\)\n", "- At \\(t=3\\), Train 1 at 180 miles, Train 2 at \\(-120\\)\n", "- Third train starts 120 miles away\n", "\n", "- If the third train wants to meet Train 1 at 180 miles at \\(t=3\\):\n", "\n", "Distance between third train and meeting point:\n", "\n", "\\[\n", "180 - 120 = 60 \\text{ miles}\n", "\\]\n", "\n", "Third train speed = 80 mph\n", "\n", "Time required by third train to get there:\n", "\n", "\\[\n", "\\frac{60}{80} = 0.75 \\text{ hours}\n", "\\]\n", "\n", "Therefore, third train must start at:\n", "\n", "\\[\n", "3 - 0.75 = 2.25 \\text{ hours}\n", "\\]\n", "\n", "- If third train wants to meet Train 2 at \\(-120\\) miles at \\(t=3\\):\n", "\n", "Distance between third train and meeting point:\n", "\n", "\\[\n", "120 + 120 = 240 \\text{ miles}\n", "\\]\n", "\n", "Time required:\n", "\n", "\\[\n", "\\frac{240}{80} = 3 \\text{ hours}\n", "\\]\n", "\n", "Third train must start at:\n", "\n", "\\[\n", "3 - 3 = 0 \\text{ hours}\n", "\\]\n", "\n", "i.e., at the same time as Train 1 and Train 2.\n", "\n", "---\n", "\n", "# **Final answers:**\n", "\n", "1. **Time for trains 1 and 2 to be 300 miles apart:**\n", "\n", "\\[\n", "t = 3 \\text{ hours}\n", "\\]\n", "\n", "2. **For third train starting 120 miles away to meet train 1 or train 2 at the same time as they are 300 miles apart:**\n", "\n", "- To meet **Train 1** (at 180 miles) at \\(t=3\\):\n", "\n", "\\[\n", "\\text{Third train must start } 0.75 \\text{ hours before } t=3 \\implies \\boxed{2.25 \\text{ hours after start}}\n", "\\]\n", "\n", "- To meet **Train 2** (at \\(-120\\) miles) at \\(t=3\\):\n", "\n", "\\[\n", "\\text{Third train must start at } t=0.\n", "\\]\n", "\n", "---\n", "\n", "### Summary:\n", "\n", "- The two trains will be 300 miles apart after 3 hours.\n", "- The third train, starting 120 miles away, moving at 80 mph:\n", "\n", " - Must start 2.25 hours after the first two trains start to meet Train 1 (at the same time they are 300 miles apart).\n", " - Must start at the same time (0 hours) to meet Train 2 at that time.\n", "\n", "---\n", "\n", "If you want a simultaneous meeting of all three **at the same point**, it cannot happen after \\(t=0\\), given the directions and speeds.\n", "\n", "---\n", "\n", "If you need more clarification or variations on this problem, feel free to ask!" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from IPython.display import Markdown, display\n", "\n", "display(Markdown(answer))\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Congratulations!\n", "\n", "That was a small, simple step in the direction of Agentic AI, with your new environment!\n", "\n", "Next time things get more interesting..." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", " \n", " \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", " We will cover this at up-coming labs, so don't worry if you're unsure.. just give it a try!\n", "
\n", "
" ] }, { "cell_type": "code", "execution_count": 57, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Certainly! Here's an AgenticAI business idea for you:\n", "\n", "**AgenticAI-Powered Personal Career Coach**\n", "\n", "**Concept:** \n", "Develop an AI-driven personal career coaching platform that acts autonomously to help users identify, plan, and achieve their professional goals. Unlike traditional coaching apps that require significant user input, this AgenticAI proactively researches industry trends, analyzes user skills, recommends learning paths, applies to jobs on the user’s behalf, and even schedules networking opportunities.\n", "\n", "**Core Features:** \n", "- **Autonomous Skill Assessment:** Continuously analyzes the user’s current skills via uploaded work samples, certifications, and social media professional profiles. \n", "- **Trend & Opportunity Scouting:** Constantly monitors job market trends, emerging skills, and companies hiring. \n", "- **Personalized Learning Path:** Automatically curates and enrolls users in relevant courses, certifications, and webinars based on gaps identified and goals set. \n", "- **Job Application Automation:** Prepares tailored resumes and cover letters, applies to appropriate job listings, and follows up with employers autonomously. \n", "- **Networking & Mentorship Facilitation:** Identifies and schedules virtual coffee chats with relevant professionals or mentors using AI-driven outreach. \n", "- **Progress Tracking & Adaptation:** Monitors user progress against goals and adapts strategies in real time to optimize outcomes.\n", "\n", "**Revenue Model:** \n", "- Subscription plans for individuals with tiered access to coaching intensity and features. \n", "- White-label solutions for universities, coding bootcamps, or workforce development agencies. \n", "- Corporate partnerships for employee reskilling and internal mobility programs.\n", "\n", "**Why AgenticAI?** \n", "The key differentiator is the AI’s autonomous, end-to-end execution of career development activities, removing friction and increasing the likelihood of user success by taking initiative rather than waiting for user input.\n", "\n", "Would you like me to delve into market analysis, tech stack suggestions, or a go-to-market strategy for this idea?\n" ] } ], "source": [ "# First create the messages:\n", "\n", "messages = [{\"role\": \"user\", \"content\": \"Suggest an AgenticAI business Idea\"}]\n", "\n", "# Then make the first call:\n", "\n", "response = openai.chat.completions.create(\n", " model=\"gpt-4.1-mini\",\n", " messages=messages\n", ")\n", "\n", "# Then read the business idea:\n", "\n", "business_idea = response.choices[0].message.content\n", "print(business_idea)\n", "\n", "# And repeat! In the next message, include the business idea within the message" ] }, { "cell_type": "markdown", "metadata": {}, "source": [] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.12" } }, "nbformat": 4, "nbformat_minor": 2 }