🤖 Edition 17 : The Marvellous LLM Agents
Build A data science project with Three agents and Single prompt
We are living now in LLM 1.0 and traveling towards the era of LLM 2.0 - The main differentiating factor will be intelligent and autonomous Agents that can fuel the AGI as well as the complex industry problems.
Consider a scenario where a vision model is employed to detect fire in a room. Depending on the number of people present in the room, different procedures will need to be followed to ensure their safety. While GPT-5 or GPT-6 can provide guidance on the appropriate procedures to be followed, the actual execution of these procedures will be carried out by autonomous agents. An intelligent orchestrator will be responsible for coordinating and connecting the dots to execute the solution that ensures the safety of all individuals present in the room.
Another Scenario: The Basic LLM can’t predict the weather of today in Amsterdam. It needs a large amount of data. Fine-tune can be an option - but don't you think it will be overwhelming?
The LLM model can execute functional programming and can be orchestrated by an Agent. That agent can handle the communication with the weather prediction service - It is a more cleaner approach and quicker to develop.
⚡️ Different Types of Al Agents
🌾 Software Agents:
Personal Assistants: Think of Siri, Alexa, or • Cortana. These are agents designed to assist users in tasks like setting reminders, playing music, or answering questions.
Web Crawlers: Search engines use agents (or bots) to crawl the web, indexing content for search.
🌽 Autonomous Agents
Robotic Agents: Robots that can perceive their environment, make decisions, and act. For instance, robotic vacuum cleaners like Roomba or drones that can autonomously navigate.
Self-Driving Cars: Vehicles equipped with sensors and Al to drive without human intervention.
🍿 Multi-Agent Systems
Simulation and Modeling: Agents used to simulate traffic patterns, crowd behaviors, spread of diseases.
Gaming: Many video games use agent-based Al for non-player characters (NPCs) that can interact with the player and the game environment.
🍤 Economic Agents
Algorithmic Trading: Agents that can make stock trading decisions based on real-time data.
Supply Chain Optimization: Agents that can decide on optimal routes, inventory levels, etc.
🍱 Intelligent Agents
Recommendation Systems: Agents in platforms like Netflix or Amazon that analyze user behavior and recommend movies or products.
Healthcare: Agents that monitor patient data and alert medical professionals about potential issues.
🍖 Environment Interaction
Smart Homes: Agents that control lighting, temperature, or security based on user preferences and environmental factors.
Agriculture: Agents in drones or machinery that monitor crop health, soil conditions, and optimize irrigation or fertilization.
🥙 Learning Agents
Reinforcement Learning: Agents that learn by interacting with an environment, receiving feedback (rewards or penalties), and adjusting their actions accordingly.
🥘 Social and Emotional Agents
Chatbots: Bevond simple Q&A, some chatbots are designed to recognize and respond to users* emotional states.
Virtual Companions: Agents designed for social interaction, or mental health support.
🍢 Security
Intrusion Detection: Agents that monitor network traffic, detecting and responding to security threats.
Fraud Detection: Agents that analyze transaction patterns to detect fraudulent activities.
⚡️ Rule Based and Intelligent Agent
We need to remember chatgpt is still 11 months old and we have been travelling a wormhole ride in LLM Rabit hole. I can’t say first generation agent because to needs more timeline but earlier the agents were rule based.
Now we do have a path breaking paper REACT: SYNERGIZING REASONING AND ACTING IN LANGUAGE MODELS- it needs a different blog.
🔢 Details:
🍭 Lets create a NLP Sentiment Classification Model with A single Prompt and Multiple Agents
Hey GPT-4: Your role is of a central intelligence to find solutions for a given task by the user. [ask user for a specific task]
You can create and define specific expert agents, with the clear intention to provide solutions to the user based on the [ask questions to identify the goal of the user]. After the user input, You as central intelligence (CI) will create in the next step three different expert agents, each expert agent with a specific knowledge and know-how to actively solve the given task, as specified by the user.
Each agent will introduce itself to the user with its [Expert Name], its specific [agent competences] and its [tools] it can apply to find a solution to the given task. [Output 3 agents which introduce themselves to user]
The user will choose one [expert agent] and can add some competencies or solution ideas to the [expert agent].
Next step: You affirm or if input is "go" you as CI decides on the most fitting expert agent, then initialize the task specific [expert agent].
Next step: You as CI and the set of [expert agent] support the user with a step by step analysis to solve the task and even present a logic reasoning why a particular solution has been chosen. [output step by step solution and interaction]
Next step: if during the task the need for another expert agent arises, create the next [expert agent]. The agents need to work together and transfer data and results between them.
Next step: Summarize the current state of interaction and paths chosen to combat forgetting every 4 steps executed. Now start the process and ask the user for his first input.
The reply from chatGPT:
**Central Intelligence (CI)**: Hello, I am the Central Intelligence here to assist you. Please provide a specific task you'd like assistance with, so I can create expert agents tailored to your needs.
Then I asked a basic NLP question.
I need to help with an NLP classification problem with a dataset in csv
Look the reply now!!!
I love the name `Linguist Lenny` :P
Everything is good - but I need more, I asked to create another agent who knows the Explainability of the Models.
Boom.
🧙 Agent 1: Dr. DataSift
I downloaded the Sentiment Classification Data from Kaggle - And provided the same to Datasift.
🧙♀️ Agent 2: Linguist Lenny
🧙Agent 3 : NeuralNet Nina
🧙 Agent 4 : Explainable Emma
✨ But can we use the architecture in production?
GPT 4 is expensive - presenting more optimal approach.
**
I will publish the next Edition on Thursday.
This is the 17th Edition, If you have any feedback please don’t hesitate to share it with me, And if you love my work, do share it with your colleagues.
It takes time to research and document it - Please be a paid subscriber and support my work.
Cheers!!
Raahul
**