ElifTech's AI: Team's Experience with Multi-Agent AI in Wealth Management and Logistics Projects

ElifTech's AI: Team's Experience with Multi-Agent AI in Wealth Management and Logistics Projects

What can be better than AI? Only several AIs, especially when they work as a team. AI can be a great problem solver, even if it’s just a single LLM. But some challenges are so big that one AI isn’t enough. That’s when Multi-Agent Systems (MAS) become useful. They bring together several AIs to tackle tough tasks more effectively.

Influential figures in AI, such as Andrew Ng , a big name in AI, have underlined the importance of MAS, highlighting the importance of AI "agents" in boosting AI systems like language models. In a letter to DeepLearning.AI, he mentioned that AI agent workflows could drive significant progress this year, potentially even more than new foundational models.

A good analogy to AI multi-agent systems would be a highly coordinated group of robots, each tasked with a specific role, yet collaborating closely and (most importantly!) taking autonomous decisions. These systems can benefit various industries, including finance, healthcare, traffic management, and logistics, by enabling agents to perform multiple complex tasks simultaneously, yet in a consistent and coordinated manner.

The experience of our AI Lead, Serhii Skoromets , aligns closely with Andrew Ng's. MAS, with its collaborative intelligence, offered a new lens to view and solve the complex problems in many industries we work in – including in fintech and logistics, where its applications are probably the most exciting.

In this article, we'll share Serhii's and his team's firsthand experiences with Multi-Agent Systems (MAS), offering insights into their functionality and the advantages they present. Furthermore, we'll detail Serhii's experiments with MAS in the logistics and fintech industries, showcasing their potential to make these industries even more precise and productive.

What are multi-agent systems and its key capabilities

Multi-Agent Systems (MAS) represent a collaborative approach in AI, where multiple AI agents work together, each leveraging their unique capabilities to tackle complex tasks more effectively than they could alone.?

Key capabilities of MAS include:?

  • Distributed Problem-Solving: Multiple agents work on separate parts of a problem, speeding up the solution process.
  • Agent Autonomy: Agents handle tasks independently, reducing the need for manual oversight.
  • Collaborative Decision-Making: Agents share insights and make decisions together, aimed at common objectives.
  • System Adaptability: MAS adapts and evolves in response to new data or changing environments.
  • Scalable Architecture: Adding more agents allows the system to effectively manage larger or more complex tasks.
  • Built-in Redundancy: The presence of multiple agents ensures the system remains operational even if one fails.
  • Task Specialization: Agents are tailored for specific functions, increasing the efficiency and effectiveness of the system.

Where did they come from?

The concept of MAS is rooted in Distributed Artificial Intelligence (DAI) from the 1970s and 1980s, primarily focusing on enabling these agents to operate independently yet interdependently, sharing insights and strategies to reach a common goal.

However, the idea gained significant traction with advancements in machine learning models, particularly with the creation and success of Large Language Models (LLMs) like GPT-3.?

Integrating MAS with Large Language Models (LLMs) like GPT significantly enhances their performance. Normally, this program gives you one answer right away, similar to someone writing down the first thing that comes to mind without double-checking or fixing mistakes. When we use MAS with it, it's like the program can think and improve on its first answer. It does this by sort of 'talking' to its own parts, refining the answer together until it's much better. So, instead of just one quick answer, you get a more accurate and well-thought-out response.

For example, adding MAS to the workflow of GPT-3.5 has shown remarkable improvements. In one case mentioned in the article, the accuracy of the responses generated by GPT-3.5 using MAS techniques jumped from 48.1% to 95.1%. This improvement demonstrates the powerful impact of using a team-like approach in AI, where multiple agents work together, assessing and improving each other’s work.


When two agents are better than one (and when it’s not)

MAS excels in complex environments where issues benefit from distributed cognition – when diverse, yet connected agents can collectively process information, solve problems, and learn from their environment. This makes them ideal for tasks that are too intricate for a single agent, especially those spread over large areas or requiring varied expertise.

This could be a grid system, managing electricity distribution across a city. One agent could predict energy demand spikes using weather forecasts and historical data, while another dynamically adjusts the flow of electricity to different city zones to match supply with demand. This synergy allows for efficient energy use and reduces the risk of outages.?

On the flip side, simplicity and speed present scenarios where MAS might not be the best fit. For tasks that are straightforward like setting an alarm or turning on a light via a voice command, the layered coordination and communication within MAS can introduce unnecessary complexity, slowing down processes that a single agent could handle more efficiently. Similarly, in situations where decisions need to be made quickly, the time taken for multiple agents to communicate and reach a consensus could be a critical drawback.

?? Deciding when to use MAS really boils down to figuring out how complicated your problem is. MAS shines when things get tricky — like when you need to juggle lots of info, get multiple tasks done at once, or tackle problems that are too gnarly for just one agent. If your task is simple or super straightforward, sticking to a simpler setup might be your best option.

Here are several scenarios: ??

When MAS excel:

  • For intricate issues with several variables.
  • When multiple simultaneous actions are necessary.
  • In settings where conditions change rapidly.
  • For tasks that cover broad geographic areas or have many components.
  • Where different specialized skills are required.
  • In scenarios that demand learning and evolving.
  • For critical situations needing fast, coordinated responses.

When MAS might not be effective:

  • Simple tasks, where the use of MAS could introduce unnecessary layers of complexity, slowing down what could be straightforward executions by a single agent.
  • Situations demanding swift decisions often suffer under MAS due to the time required for coordination and communication between multiple agents.
  • In static environments, where the conditions are constant and predictable over time.
  • For operations confined to a small and manageable area, where centralized control is more effective (Managing inventory in a single retail store)
  • In situations where systems are designed not to learn or adapt but to follow a set, pre-defined process.

How multi-agent systems work and communicate

In a MAS, each "agent" is a software entity designed to perform specific actions autonomously based on the data it processes.?

The environment represents the context within which these agents act, varying in complexity from digital interfaces to real-world settings.

Agents and the environment are the core components of MAS.

Agents autonomously perceive their surroundings, process information, and act to achieve their individual or collective objectives. They communicate using sensors for perception, internal logic for decision-making, and effectors to execute actions.

Communication methods

Crucial to MAS efficiency is how agents communicate, which can be through:

  • Direct Communication: Exchanging messages using a specific protocol.
  • Indirect Communication (Stigmergy): Altering the environment as a means of communication useful in complex or restricted communication scenarios.
  • Broadcast: Sending messages to all or specific groups of agents, effective for rapid information dissemination.

Coordination strategies

For cooperative tasks, MAS employs strategies like:

  • Task Allocation: Assigning tasks based on agent capabilities and conditions.
  • Consensus and Negotiation: Using negotiation for agreement on shared goals or resources.
  • Synchronization: Coordinating actions, especially where timing is crucial.

Many MAS incorporate learning algorithms allowing agents to evolve and adapt strategies based on new data or environmental changes, enhancing the system's overall efficiency and responsiveness.

Applications of multi-agent systems

Federico Bergenti from the Department of Mathematics of the University of Parma described 3 three notable cases of multi-agent systems in Italy. In one, MAS used NLP to analyze the content of numerous articles from Italian online newspapers. The MAS performs several integrated functions: analyzing large sets of articles to determine their content and sentiment, learning user reading habits and preferences, and ultimately delivering personalized news content.

That's just one of the many applications of MAS in Italy, but globally, MAS is deployed in a myriad of other ways, showcasing its versatility and impact across various fields. ??

Urban traffic management

  • Traffic Flow Optimization: MAS can work by constantly collecting and analyzing data from traffic sensors and cameras distributed throughout the urban area. They process this data in real time to make immediate adjustments to traffic signal timings at different intersections.
  • Dynamic Navigation Systems: MAS can continuously monitor current traffic conditions, including any unexpected incidents like accidents or road construction. They process this information to dynamically update and offer the most efficient routing options to drivers in real time.

Logistics

  • Warehouse Automation: In this setting, MAS can be in the center of controlling various automated systems and robots within warehouses. They can allocate tasks and manage the operations of these robots for tasks like picking items from shelves, packing orders, and preparing them for shipment. By doing so, the MAS enhances the warehouse's operational efficiency, ensuring that orders are processed quickly and with minimal errors.
  • Delivery Optimization: For delivery logistics, MAS takes into account a multitude of variables such as the urgency of orders (order priority), current traffic conditions on intended delivery routes, and the capacity or load of the delivery vehicles. MAS dynamically plans and adjusts these delivery routes in real time, aiming to optimize the delivery schedules.?

Finance

  • Trading Systems Optimization: MAS in trading systems can monitor and analyze vast amounts of financial market data in real time. They execute buy or sell orders based on predefined criteria such as market conditions, stock performance, and trading volume. These agents are designed to adapt and learn from market changes, potentially outperforming traditional models by adjusting strategies based on ongoing data analysis.
  • Risk Management and Fraud Detection: In risk management, MAS continuously scans and analyzes transactional data and customer behavior to identify potential risks and fraudulent activity. They can be programmed to recognize patterns that signify fraud, such as unusual account activity or transactions that deviate from typical user behavior. By dynamically adjusting risk parameters and alert settings, MAS helps financial institutions minimize losses and protect customer data in real time.

ElifTech AI team's projects with MAS?

Engaging with MAS has been a pivotal part of Serhii Skoromets recent projects in fintech and logistics. Several projects demanded solutions that could not only process vast amounts of data in real time but also adapt to unforeseen changes with minimal human intervention. MAS stepped up perfectly, offering swift data handling and adaptive responses that boosted our efficiency and agility in these industries.

Here are some details ??

Investment advisory chatbot supplementing user dashboard

For our latest project, we developed an investment advisory chatbot that simplifies investment advice, connecting users directly to personalized guidance through the investment dashboard. It uses an NLP to understand and respond to user questions naturally, making complex investment advice approachable and straightforward.

The chatbot is designed to tailor advice based on each user's unique financial details from the database and stay informed with real-time market data from sources like Yahoo Finance. This ensures the advice it offers is both customized and up-to-date.

It uses a three-agent system to provide precise, personalized advice

  • Supervisor Agent: This agent is the initial handler of user requests. It utilizes sophisticated understanding capabilities to grasp the query's essence and determines whether to address it directly or route it to the appropriate specialized agents for further processing.
  • Portfolio Analyst Agent: Focused on the user's specifics, this agent accesses the user database to analyze details such as risk profile, number of stocks, and portfolio valuation. It uses this personalized data to generate investment suggestions that align perfectly with the user's financial strategy and goals.
  • Stock Analyst Agent: This agent externalizes the focus by analyzing current stock market conditions, news, and sentiment. It provides insights on market trends and potential impacts on investments, offering a comprehensive outlook that aids in informed decision-making.


The AI-powered landing page generator

Traditional web development often suffers from miscommunications and inconsistencies, leading to delays and higher costs. Thus, in one of our recent projects we set out to use AI and make landing page creation faster, more precise, and less prone to the usual hiccups of web development.?

In a typical scenario, creating a landing page involves a team with project managers, developers, QAs, and others, all working through tasks like planning, coding, and quality checking. As managing this complex process with simple AI can be challenging, we introduced a MAS to streamline the workflow. We set up several AI "agents" programmed to carry out specific roles, and an essential part of the system is the cross-checking between these agents to ensure the job is done correctly. This ensures that all the bases are covered, from the initial concept to the final product, without the need for a large human team.

The system comprises three key agents, each with distinct roles:

  1. Product Manager Agent: Serves as a bridge between user requests and the development process, breaking down user specs into tasks that the system can act upon. Using NLP, it understands the user's needs and organizes them into a web development to-do list, focusing on essential tasks first.

  1. Developer Agent: Turns tasks from the Product Manager Agent into real code – HTML, CSS, and JavaScript – and selects coding templates and frameworks that match the project's requirements. It adapts common coding patterns to meet specific functionalities and ensures the landing page looks and works great on different devices.

  1. QA Agent: Constantly checks the work in progress against quality benchmarks and the original user requests. It uses machine learning to spot and fix errors in code and design or to tell the Developer Agent what needs tweaking for the best outcome.

AI-powered inventory management solution

In the modern warehouse setting, many separate processes like object recognition, robotics management, or certain types of decision-making, are already routinely done by AI. However, in non-multiagent systems, AI is usually expected to hand over the results of its very narrowly defined task (e.g. defining the object in front of it) to, say, a dashboard. Only then will the next operator, human or machine, proceed with the next step in the process. In other words, it’s easy to say “do an inventory check”, but in reality, this means stacking several actions on top of each other, which is where MAS can help.?

Our next project took a step further towards a more holistic handling approach, with a MAS that functions as a closely-knit “team”, executing interdependent tasks.

  • The first agent with advanced computer vision capabilities scans and interprets box labels for accurate inventory cataloging;?
  • Another patrols the warehouse, validating stock levels and identifying discrepancies;
  • The third takes commands to execute restocking based on verified data, ensuring the warehouse operates smoothly and efficiently.?

Conclusions and considerations when building multi-agent systems?

Developing these several projects has led Serhii to a few points of what should be considered when building MAS.

  1. A bedrock for MAS functionality is agent communication.

Without a common language or protocol, commands sent from one device might be misunderstood by another. Or each device may have its way of interpreting signals, causing delays in executing commands. Poor communication can even lead to security problems. To keep things running smoothly, it's important to use simple, common rules for how devices talk to each other. This way, they understand each other better and only share what's needed, keeping everything safe and efficient.

  1. Agents should be designed with specific roles in mind.

When agents (or smart devices and systems) are designed without specific roles, they may try to perform tasks they're not optimized for, leading to inefficiency. In your smart home, for instance, a device meant for playing music might try to control the lighting, but because it's not designed for that, it can lead to slow response times, incorrect lighting settings, or even failure to execute the command.?

2. Agents should support adaptive learning.

Agents in a system should be capable of adaptive learning, meaning they can adjust their behaviors based on new data and experiences. This feature allows them to grow more efficient and effective over time. For example, a climate control system in a home learns from daily usage patterns – like when the house tends to be occupied or empty—and adjusts the heating or cooling for optimal energy use and comfort. This adaptability ensures that agents remain functional and relevant as conditions change.

3. The efficiency of the MAS can also be gauged by how friendly it is to its users.

The efficiency of a MAS also depends on its user-friendliness. An intuitive and simple interface allows users to easily interact with the system, enhancing its overall effectiveness. For instance, in a smart home MAS, if users can manage lighting, temperature, and security through straightforward voice commands or a unified app interface, the system becomes more efficient by being more accessible and easier to use.

4. Regardless of the industry, MAS must function within ethical guidelines and often existing legal frameworks.

MAS must be designed and programmed to respect privacy, fairness, and transparency, among other ethical considerations. Legally, they must follow regulations that govern their field of application. If a MAS used in financial services must maintain confidentiality, ensure the security of personal and financial information, and operate in accordance with financial regulations. If a MAS is involved in decision-making processes, it should also avoid bias and discrimination, making sure that its actions are fair and justifiable.?

5. Choose the right framework for MAS development.

When picking a framework for building MAS (like OpenAI Assistant, Autogen, or CrewAI), think about how well it lets agents talk to each other and work together. You want one that can handle more agents easily as you add them and can manage agents spread out over different places. Choosing a framework with a lot of tools and a helpful community can also make building and changing your system way faster and more flexible.

Recently, ElifTech's AI team has completed a course ‘AI Agents in LangGraph’ offered by DeepLearning.AI in collaboration with LangChain and Tavily. It was pretty awesome – it taught us how to build agents from scratch using Python and an LLM, and then how to make them even better using LangGraph techniques.

LangGraph showed itself particularly beneficial for creating agents that are adept at intelligent search. LangGraph uses a graph model, which is like a map of information that helps them understand and find data like humans do. This setup makes them quicker in fetching the right information and remembering past details. It makes AI more helpful, especially in tasks that need understanding complex data or giving personalized help, like answering customer questions.

For example, in logistics, LangGraph could help an AI manage and track packages more efficiently. If a customer asks, "Where is my order from two weeks ago?", the AI, using LangGraph, can easily link the current inquiry to the specific order details and its shipping history, providing a quick and accurate update on the order's status.

Dean Casey

I help small and medium wealth managers transform client relationships into growth engines and 10x their business through AI-powered digital experiences.

2 个月

This is really great, the concept of a landing page generator is brilliant. It could form the basis of hyper personalisation for client reporting. I'm excited to see we you go with this.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了