ai-agents-for-beginners

멀티 에이전트 설계

(위의 이미지를 클릭하여 이 수업의 비디오를 보세요)

멀티 에이전트 디자인 패턴

As soon as you start working on a project that involves multiple agents, you will need to consider the multi-agent design pattern. However, it might not be immediately clear when to switch to multi-agents and what the advantages are.

소개

In this lesson, we’re looking to answer the following questions:

학습 목표

After this lesson, you should be able to:

What’s the bigger picture?

멀티 에이전트는 여러 에이전트가 공동의 목표를 달성하기 위해 함께 작업할 수 있게 하는 디자인 패턴입니다.

This pattern is widely used in various fields, including robotics, autonomous systems, and distributed computing.

멀티 에이전트가 적용되는 시나리오

So what scenarios are a good use case for using multi-agents? The answer is that there are many scenarios where employing multiple agents is beneficial especially in the following cases:

단일 에이전트보다 멀티 에이전트를 사용하는 장점

A single agent system could work well for simple tasks, but for more complex tasks, using multiple agents can provide several advantages:

Let’s take an example, let’s book a trip for a user. A single agent system would have to handle all aspects of the trip booking process, from finding flights to booking hotels and rental cars. To achieve this with a single agent, the agent would need to have tools for handling all these tasks. This could lead to a complex and monolithic system that is difficult to maintain and scale. A multi-agent system, on the other hand, could have different agents specialized in finding flights, booking hotels, and rental cars. This would make the system more modular, easier to maintain, and scalable.

Compare this to a travel bureau run as a mom-and-pop store versus a travel bureau run as a franchise. The mom-and-pop store would have a single agent handling all aspects of the trip booking process, while the franchise would have different agents handling different aspects of the trip booking process.

멀티 에이전트 디자인 패턴 구현의 구성 요소

Before you can implement the multi-agent design pattern, you need to understand the building blocks that make up the pattern.

Let’s make this more concrete by again looking at the example of booking a trip for a user. In this case, the building blocks would include:

멀티 에이전트 상호작용에 대한 가시성

It’s important that you have visibility into how the multiple agents are interacting with each other. This visibility is essential for debugging, optimizing, and ensuring the overall system’s effectiveness. To achieve this, you need to have tools and techniques for tracking agent activities and interactions. This could be in the form of logging and monitoring tools, visualization tools, and performance metrics.

For example, in the case of booking a trip for a user, you could have a dashboard that shows the status of each agent, the user’s preferences and constraints, and the interactions between agents. This dashboard could show the user’s travel dates, the flights recommended by the flight agent, the hotels recommended by the hotel agent, and the rental cars recommended by the rental car agent. This would give you a clear view of how the agents are interacting with each other and whether the user’s preferences and constraints are being met.

Let’s look at each of these aspects more in detail.

멀티 에이전트 패턴

Let’s dive into some concrete patterns we can use to create multi-agent apps. Here are some interesting patterns worth considering:

그룹 채팅

This pattern is useful when you want to create a group chat application where multiple agents can communicate with each other. Typical use cases for this pattern include team collaboration, customer support, and social networking.

In this pattern, each agent represents a user in the group chat, and messages are exchanged between agents using a messaging protocol. The agents can send messages to the group chat, receive messages from the group chat, and respond to messages from other agents.

This pattern can be implemented using a centralized architecture where all messages are routed through a central server, or a decentralized architecture where messages are exchanged directly.

그룹 채팅

핸드오프

This pattern is useful when you want to create an application where multiple agents can hand off tasks to each other.

Typical use cases for this pattern include customer support, task management, and workflow automation.

In this pattern, each agent represents a task or a step in a workflow, and agents can hand off tasks to other agents based on predefined rules.

핸드오프

협업 필터링

This pattern is useful when you want to create an application where multiple agents can collaborate to make recommendations to users.

Why you would want multiple agents to collaborate is because each agent can have different expertise and can contribute to the recommendation process in different ways.

Let’s take an example where a user wants a recommendation on the best stock to buy on the stock market.

추천

시나리오: 환불 프로세스

Consider a scenario where a customer is trying to get a refund for a product, there can be quite a few agents involved in this process but let’s divide it up between agents specific for this process and general agents that can be used in other processes.

환불 프로세스에 특화된 에이전트:

Following are some agents that could be involved in the refund process:

일반 에이전트:

These agents can be used by other parts of your business.

There’s quite a few agents listed previously both for the specific refund process but also for the general agents that can be used in other parts of your business. Hopefully this gives you an idea on how you can decide on which agents to use in your multi-agent system.

과제

Design a multi-agent system for a customer support process. Identify the agents involved in the process, their roles and responsibilities, and how they interact with each other. Consider both agents specific to the customer support process and general agents that can be used in other parts of your business.

읽기 전에 잠시 생각해 보세요. 다음 해답을 읽기 전에, 생각보다 더 많은 에이전트가 필요할 수 있습니다.

팁: 고객 지원 프로세스의 다양한 단계와 시스템에 필요한 에이전트를 고려해 보세요.

솔루션

솔루션

지식 점검

Question: 멀티 에이전트를 언제 고려해야 하나요?

솔루션 퀴즈

요약

이 강의에서는 멀티-에이전트 설계 패턴을 살펴보았습니다. 멀티-에이전트가 적용되는 시나리오, 단일 에이전트보다 멀티-에이전트를 사용할 때의 이점, 멀티-에이전트 설계 패턴을 구현하는 구성 요소, 그리고 여러 에이전트가 서로 어떻게 상호작용하는지에 대한 가시성을 확보하는 방법을 다루었습니다.

멀티-에이전트 설계 패턴에 대해 더 궁금한 점이 있나요?

다른 학습자들과 만나고, 오피스 아워에 참석하고, AI 에이전트 관련 질문에 답을 얻으려면 Microsoft Foundry Discord에 참여하세요.

추가 자료

이전 강의

Planning Design

다음 강의

Metacognition in AI Agents


면책사항: 이 문서는 AI 번역 서비스 Co-op Translator를 사용하여 번역되었습니다. 정확성을 위해 노력하고 있으나, 자동 번역에는 오류나 부정확성이 포함될 수 있음을 유의해 주십시오. 원문(원어로 된 문서)을 정본으로 간주해야 합니다. 중요한 정보의 경우 전문 번역가에 의한 번역을 권장합니다. 이 번역의 사용으로 인해 발생한 오해나 잘못된 해석에 대해서는 책임을 지지 않습니다.