ai cheatsheet by zartis

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?

Reasoning is AI’s capability to process input data, draw inferences, make decisions, and generate coherent, contextually appropriate responses. Simply put, it is an LLM model’s ability to reason with the Context you provide.

What's the significance of reasoning for LLMs?

Reasoning allows LLMs to solve complex problems more effectively and provide more informed and relevant responses, enhancing decision-making processes in application like virtual assistants, customer support, and other expert systems.

How does reasoning improve output quality?

Reasoning contributes to a better understanding of content and significantly improves the task outcome. By understanding and maintaining context, LLMs can generate more accurate and contextually appropriate outputs, reducing errors and misunderstanding, enabling the generation of more comprehensive responses. In addition, multi-agent systems leveraing advanced reasoning structures are a significant step forward in lLLM-based applications.
 
Reasoning allows LLMs to solve complex problems more effectively and provide more informed and relevant responses, enhancing decision-making processes in application like virtual assistants, customer support, and other expert systems.

Increased accuracy

Better reasoning means better comprehension, which enables LLMs to produce more accurate responses.

eye referencing ai agent hallucinations

Minimal hallucinations

With better reasoning skills, LLMs can assess potential responses better and avoid hallucinations.

specialised ai agent

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

AI agents are systems that perform tasks using LLMs to make decisions. They can perceive their environment, process information, use tools, plan, take actions and reflect to achieve specific goals.
 
They can operate independently or collaboratively in multi-actor systems and can be applied to a wide range of domains.
Agentic Workflows:
 
Semi-structured workflows involving several AI agents iterating on tasks. These can be router-like systems or (soon) fully independent systems that can not only choose the right path, but also define the steps they can take.

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:

ai agents

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.

ai decision making tools

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 ai agents

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

Another way of classifying AI agents is through their abilities. Some agents are able to generate highly skilled responses based on the data available, while others are able to take contextual decisions for new actions, derived from historical data.

Basic Agents

(GenerativeAI Agents)

ReAct Agents

(Reasoning and Acting Agents)

Frameworks for Multi-Agent Systems

CrewAI logo

CrewAI

CrewAI is a high level abstraction of multiagent framework. In other words it makes very high level abstractions making it very easy to create agents by defining their role, the tasks to be solved, the process and relationship between them as well as the tools they can use.

AutoGen

AutoGen is Microsoft’s Open Source framework to help build multi-agent conversations. It is similar to CrewAI in that it works with high level abstractions, but gives a higher level of control over the process.
langgraph ai agent logo

LangGraph

LangGraph, developed by LangChain (a reference in the industry), is a framework that helps define a state machine that helps build multi-actor LLM based  applications. It gives a much more granular control over the application and the agents than the previous frameworks. By enabling loops and cycles it helps creating conditional semi autonomous agentic applications.

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:

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!