AI Cheatsheet #4
In the first three editions of the AI Cheatsheet, we looked at how LLMs are formed (Context + Reasoning = Output), took a deep dive into Context, and how we can improve it with Prompt Engineering, and RAG.
Now it’s time to move on to the second part of the equation, which is Reasoning. Let’s dive into GenAI agents, ReAct agents, and frameworks for multi-agent systems to fine-tune reasoning!
Context
Prompt with relevant info
Prompt input = Perception
Reasoning
Model and configuration
Trained knowledge + prompt memory = Decision making
Conclusion
Action (give answers, use tools)
Non-deterministic = Same input, different conclusion
What is reasoning?
What's the significance of reasoning for LLMs?
How does reasoning improve output quality?
Increased accuracy
Better reasoning means better comprehension, which enables LLMs to produce more accurate responses.
Minimal hallucinations
With better reasoning skills, LLMs can assess potential responses better and avoid hallucinations.
Specialised agents
The more contextually aware an LLM is, the easier it is to train it for a specific use within a multi-agent system.
Using AI Agents to Improve Reasoning
Types of AI Agents
There are various types of intelligent agents, and the industry lacks a unified classification for them. One effective way to categorise these agents is by their level of autonomy, reflecting how much control they exert over a system’s behavior. Imagine this as a spectrum of independence:
Rule-based agents (static agents)
At the simplest level, these agents determine the output of specific tasks within the system. For example, an API call to a large language model (LLM) to answer a query based on predefined rules (e.g., If A = B then C; if A = D then E). This is similar to a conditional response system, where the agent's role is limited to producing an outcome based on given inputs.
Decision-making agents (dynamic agents)
These agents not only define the output but also decide the next steps in the process. They act as decision routers, determining the path of user queries. For instance, an LLM could decide whether a query pertains to category A or B and then direct it accordingly. This level introduces a degree of decision-making and routing, making the agent more autonomous than a basic agent.
Autonomous agents (adaptive agents)
At the highest level of autonomy, these agents can create other agents and define the steps within the system. They operate fully autonomously, not only determining outputs and next steps but also orchestrating entire workflows and adapting over time. This is akin to a system where the agents continuously evolve, create new tasks, and refine processes, showcasing maximum independence and control.
Basic vs ReAct Agents
Basic Agents
(GenerativeAI Agents)
- Specialised in generating human-like outputs (text, images, music, etc.)
- Highly skilled in understanding and generating natural language
- Can automate and enhace creative processes
- Useful for generating personalised and engaging user experiences
ReAct Agents
(Reasoning and Acting Agents)
- Utilises logical reasoning to understand context, draw conclusions, and solve problems
- Combines reasoning with action, making them versatile and adaptive
- Capable of handling complex, multifaceted tasks that require understanding and execution
- Effective in dynamic environments where real-time decision-making and action are critical
- Examples: Self-driving cars, IBM Watson Health (AI diagnostic system), Google Assistant, Amazon Alexa
Frameworks for Multi-Agent Systems
CrewAI
AutoGen
LangGraph
Future Posibilities
The future of AI agents promises significant advancements across various domains:
Enhanced Autonomous Systems: AI agents will revolutionise self-driving vehicles and business automation, improving safety and efficiency through optimised performance.
Industry Specialisation: In healthcare, AI agents will offer tailored treatment plans based on patient data and enable remote diagnosis and monitoring, leading to timely and accurate medical care.
Smart Environments: AI agents will enhance smart homes with improved comfort and energy efficiency, and optimise urban infrastructures and public services in smart cities for better resource management and quality of life.
Collaborative AI: Agents will work together to solve complex problems, utilising multi-modal inputs from text, images, audio, and sensors. Human-AI collaboration will be enhanced, augmenting human capabilities and decision-making.
Autonomous Capabilities: AI agents will design, develop, and deploy other AI agents, creating more dynamic and adaptive workflows.
Integration with Robotics, AR, and VR: In robotics, AI agents will enable adaptive systems capable of complex tasks. In AR and VR, agents will enhance immersive and interactive experiences for training, entertainment, and professional applications.
In summary, AI agents are set to transform various industries and everyday life with their increasing autonomy, collaboration, and integration with cutting-edge technologies.
List of useful links and papers:
Discover some of the resources that feed our research as well as useful links to tools and papers that are fueling advancements in the AI world.
Papers:
- ReAct: Synergizing Reasoning and Acting in Language Models by Yao et al.
- Provides an in-depth exploration of the ReAct framework.
- Self-Refine: Iterative Refinement with Self-Feedback by Madaan et al.
- LLM Connected with Massive API by Shishir Patil et al.
Links:
- Crew AI: Automate your most important workflows quickly
- AutoGen: An open-source programming framework by Microsoft for Agentic AI
- LangGraph: A LangChain library for building stateful, multi-actor applications with LLMs
AI Cheatsheet #4
If you have questions or require additional context on any of the information shared, please feel free to let us know by using the contact form or sending an email to sayhello@zartis.com!