跳到正文
论文阅读馆THE RESEARCH LIBRARY 查找论文
← 论文库AI 研究与应用 / 智能体协作与通信导出 ↗

PAPER / 2023

AutoGen:用消息与可执行回复组织智能体应用

AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation

Qingyun Wu · Gagan Bansal · Jieyu Zhang · Yiran Wu · Beibin Li · Erkang Zhu · Li Jiang · Xiaoyun Zhang · Shaokun Zhang · Jiale Liu · Ahmed Awadallah · Ryen W. White · Doug Burger · Chi Wang

arXiv · 2023

30 秒读懂

作者区分“计算”和“控制流”:计算是调用模型、执行程序等动作,控制流决定谁接下来回应、何时停止。回复函数把二者连接起来:助手提出代码,代理执行,报错作为下一条消息,助手再修正。这个闭环由开发者配置的角色、函数和终止条件支撑,不是多开几个窗口就自动成立。

一个可对话智能体保存收发消息形成的上下文,背后可以接语言模型、工具或人类。助手生成建议,用户代理既能询问真人,也能执行代码并返回结果。统一接口让这些角色可以替换和组合;代理收到自然语言,并不意味着所有回复都只是聊天文本。

先说结论

AutoGen的贡献是把模型、工具和人类放进统一的消息接口,让开发者编排可执行的协作流程。它不是训练出的更强模型,也不是无需设计的自动团队;实验展示多个应用的收益,但任务、工具和基线条件不同,不能拿一张图概括所有智能体应用。 (原文:PDF p.3, Section 2.1;PDF p.4, Figure 2; Section 2.2;PDF p.6, Section 3; Figure 3;PDF p.7, Figure 4a;PDF p.7, Figure 4c;PDF p.6, Footnote five; human intervention scenario)

论文为什么要做这件事

一个可对话智能体保存收发消息形成的上下文,背后可以接语言模型、工具或人类。助手生成建议,用户代理既能询问真人,也能执行代码并返回结果。统一接口让这些角色可以替换和组合;代理收到自然语言,并不意味着所有回复都只是聊天文本。 (原文:PDF p.3, Section 2.1)

核心方法到底怎么运转

作者区分“计算”和“控制流”:计算是调用模型、执行程序等动作,控制流决定谁接下来回应、何时停止。回复函数把二者连接起来:助手提出代码,代理执行,报错作为下一条消息,助手再修正。这个闭环由开发者配置的角色、函数和终止条件支撑,不是多开几个窗口就自动成立。 (原文:PDF p.4, Figure 2; Section 2.2)

解释性例子:用户要求画表格,助手写绘图代码,执行器返回缺少库的错误,助手据此修改;若执行涉及重要文件,系统还可以停下来要求人确认。

实验怎样检验这个方法

应用覆盖数学、检索问答、环境交互、带安全检查的编程等。数学比较包含较难题子集和完整测试集,但部分商业工具及较差的开源基线只测了子集。阅读时要先确认同一根柱子属于哪个测试范围,不能把子集结果与全量结果交叉排序。 (原文:PDF p.6, Section 3; Figure 3)

结果说明了什么

数学较难题子集上,AutoGen为52.5%,原生GPT-4为30.0%;全量测试分别为69.48%和55.18%。这是特定助手与执行器配置的任务表现,并不隔离工具执行、反馈轮次和多人角色各自贡献,也不能解释为模型权重本身进步。 (原文:PDF p.7, Figure 4a)

ALFWorld中,三智能体配置平均表现69%、最好一轮77%,两智能体平均54%、最好一轮63%;ReAct平均54%、最好一轮66%。因此两智能体的平均值并未超过ReAct,最好一轮还较低。加入专门的grounding角色有价值,不等于任意多人设计都有价值。 (原文:PDF p.7, Figure 4c)

这篇论文哪里最强,哪里最危险

数学全量比较没有覆盖所有列出的基线;另外,人类介入解决困难题是单独的使用情境,不能与自主求解混合汇报。它首先是一个可复用工程抽象,落地仍需决定权限、执行环境和人何时介入。本文版本也不能直接当作现今软件接口的保证。 (原文:PDF p.6, Footnote five; human intervention scenario)

代码从哪里读

已核验作者代码仓库可以访问。先从项目说明核对版本、运行环境与输入格式,再决定是否复现。本次未安装、运行作者代码,也没有验证复现成功。

读完后记住这三件事

统一可交谈的代理接口;用消息驱动工具执行与反馈;具体收益依赖模型、任务和是否允许人介入。 (原文:PDF p.3, Section 2.1;PDF p.4, Figure 2; Section 2.2;PDF p.6, Section 3; Figure 3;PDF p.7, Figure 4a;PDF p.7, Figure 4c;PDF p.6, Footnote five; human intervention scenario)

原文证据

将主张放回条件与原文定位中理解。

方法

研究问题

原文摘录
AutoGen also provides a collection of multi-agent applications created using conversable agents and conversation programming. These applications demonstrate how AutoGen can easily support applications of various complexities and LLMs of various capabilities. Moreover, we perform both evaluation on benchmarks and a pilot study of new applications. The results show that AutoGen can help achieve outstanding performance on many tasks, and enable innovative ways of using LLMs, while reducing development effort. (Section 3 and Appendix D) 2 The AutoGen Framework To reduce the effort required for developers to create complex LLM applications across various do- mains, a core design principle of AutoGen is to streamline and consolidate multi-agent workflows using multi-agent conversations. This approach also aims to maximize the reusability of imple- mented agents. This section introduces the two key concepts of AutoGen: conversable agents and conversation programming. 2.1 Conversable Agents In AutoGen, a conversable agent is an entity with a specific role that can pass messages to send and receive information to and from other conversable agents, e.g., to start or continue a conversation. It maintains its internal context based on sent and received messages and can be configured to possess a set of capabilities, e.g., enabled by LLMs, tools, or human input, etc. The agents can act according to programmed behavior patterns described next. Agent capabilities powered by LLMs, humans, and tools. Since an agent’s capabilities directly influence how it processes and responds to messages, AutoGen allows flexibility to endow its agents with various capabilities. AutoGen supports many common composable capabilities for agents, including 1) LLMs. LLM-backed agents exploit many capabilities of advanced LLMs such as role playing, implicit state inference and progress making conditioned on conversation history, providing feedback, adapting from feedback, and coding. These capabilities can be combined in different ways via novel prompting techniques4 to increase an agent’s skill and autonomy. AutoGen also offers enhanced LLM inference features such as result caching, error handling, message templating, etc., via an enhanced LLM inference layer. 2) Humans. Human involvement is desired or even essential in many LLM applications. AutoGen lets a human participate in agent conversation via human- backed agents, which could solicit human inputs at certain rounds of a conversation depending on the agent configuration. The default user proxy agent allows configurable human involvement levels and patterns, e.g., frequency and conditions for requesting human input including the option for humans to skip providing input. 3) Tools. Tool-backed agents have the capability to execute tools via code execution or function execution. For example, the default user proxy agent in AutoGen is able to execute code suggested by LLMs, or make LLM-suggested function calls. Agent customization and cooperation. Based on application-specific needs, each agent can be configured to have a mix of basic back-end types to display complex behavior in multi-agent con- versations. AutoGen allows easy creation of agents with specialized capabilities and roles by reusing or extending the built-in agents. The yellow-shaded area of Figure 2 provides a sketch of the built-in agents in AutoGen. The ConversableAgent class is the highest-level agent abstraction and, by default, can use LLMs, humans, and tools. The AssistantAgent and UserProxyAgent are two pre-configured ConversableAgent subclasses, each representing a common usage mode, i.e., act- ing as an AI assistant (backed by LLMs) and acting as a human proxy to solicit human input or execute code/function calls (backed by humans and/or tools). In the example on the right-hand side of Figure 1, an LLM-backed assistant agent and a tool- and human-backed user proxy agent are deployed together to tackle a task. Here, the assistant agent generates a solution with the help of LLMs and passes the solution to the user proxy agent. Then, the user proxy agent solicits human inputs or executes the assistant’s code and passes the results as feedback back to the assistant. 4 Appendix C presents an example of such novel prompting techniques which empowers the default LLM- backed assistant agent in AutoGen to converse with other agents in multi-step problem solving. 3

条件:本地全文 arXiv:2308.08155v2,Section 2.1;条件及比较对象见陈述

指标:一个可对话智能体保存收发消息形成的上下文,背后可以接语言模型、工具或人类。助手生成建议,用户代理既能询问真人,也能执行代码并返回结果。统一接口让这些角色可以替换和组合;代理收到自然语言,并不意味着所有回复都只是聊天文本。

原文第 3 页 ↗PDF p.3, Section 2.1

只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。

方法

核心机制

原文摘录
ConversableAgent Agent Customization: Unified Conversation Interfaces: • send human_input_mode = “NEVER” • receive code_execution_config = False • generate_reply DEFAULT_SYSTEM_MESSAGE = “You are a helpful AI assistant… human_input_mode = “NEVER” In the following cases, suggest group_chat = [ ] AutoGen python code…” human_input_mode = “ALWAYS” Agents AssistantAgent UserProxyAgent GroupChatManager 1.2 Register a Custom Reply Func: 1.1 Define Agents: # This func will be invoked in generate_reply # Note: when no reply A.register_reply(B, func is registered, a reply_func_A2B) list of default reply def reply_func_A2B(msg): functions will be used. ouput = input_from_human() Developer … User Proxy A Assistant B Code if not ouput: if msg includes code: 2 Initiate Conversations: output = execute(msg) A.initiate_chat(“Plot a chart of META and return output TESLA stock price change YTD.”, B) The Resulting Automated Agent Chat: Conversation-Driven Control Flow Plot a chart of META and receive generate_reply TESLA stock price change YTD. receive Execute the following send Program code… Execution generate_reply Error: package yfinance is not generate_reply installed send Conversation-Centric Sorry! Please first pip install Computation yfinance and then execute … Figure 2: Illustration of how to use AutoGen to program a multi-agent conversation. The top sub- figure illustrates the built-in agents provided by AutoGen, which have unified conversation interfaces and can be customized. The middle sub-figure shows an example of using AutoGen to develop a two-agent system with a custom reply function. The bottom sub-figure illustrates the resulting automated agent chat from the two-agent system during program execution. By allowing custom agents that can converse with each other, conversable agents in AutoGen serve as a useful building block. However, to develop applications where agents make meaningful progress on tasks, developers also need to be able to specify and mold these multi-agent conversations. 2.2 Conversation Programming As a solution to the above problem, AutoGen utilizes conversation programming, a paradigm that considers two concepts: the first is computation – the actions agents take to compute their response in a multi-agent conversation. And the second is control flow – the sequence (or conditions) un- der which these computations happen. As we will show in the applications section, the ability to program these helps implement many flexible multi-agent conversation patterns. In AutoGen, these computations are conversation-centric. An agent takes actions relevant to the conversations it is involved in and its actions result in message passing for consequent conversations (unless a termina- tion condition is satisfied). Similarly, control flow is conversation-driven – the participating agents’ decisions on which agents to send messages to and the procedure of computation are functions of the inter-agent conversation. This paradigm helps one to reason intuitively about a complex workflow as agent action taking and conversation message-passing between agents. Figure 2 provides a simple illustration. The bottom sub-figure shows how individual agents perform their role-specific, conversation-centric computations to generate responses (e.g., via LLM inference calls and code execution). The task progresses through conversations displayed in the dialog box. The middle sub-figure demonstrates a conversation-based control flow. When the assistant receives a message, the user proxy agent typically sends the human input as a reply. If there is no input, it executes any code in the assistant’s message instead. 4

条件:本地全文 arXiv:2308.08155v2,Figure 2; Section 2.2;条件及比较对象见陈述

指标:作者区分“计算”和“控制流”:计算是调用模型、执行程序等动作,控制流决定谁接下来回应、何时停止。回复函数把二者连接起来:助手提出代码,代理执行,报错作为下一条消息,助手再修正。这个闭环由开发者配置的角色、函数和终止条件支撑,不是多开几个窗口就自动成立。

原文第 4 页 ↗PDF p.4, Figure 2; Section 2.2

只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。

方法

实验设置

原文摘录
Student Assistant Assistant Retrieval-augmented Retrieval-augmented User Proxy Assistant Ask expert ALFWorld Executor Assistant Grounding Expert Agent A1. Math Problem Solving A2. Retrieval-augmented Chat A3. ALF Chat Commander Chess Board Manager Broadcast Speak Human/AI Chess Human/AI Chess Writer Safeguard Player A Player B A4. Multi-agent Coding A5. Dynamic Group Chat A6. Conversational Chess Figure 3: Six examples of diverse applications built using AutoGen. Their conversation patterns show AutoGen’s flexibility and power. A1: Math Problem Solving Mathematics is a foundational discipline and the promise of leveraging LLMs to assist with math problem solving opens up a new plethora of applications and avenues for exploration, including per- sonalized AI tutoring, AI research assistance, etc. This section demonstrates how AutoGen can help develop LLM applications for math problem solving, showcasing strong performance and flexibility in supporting various problem-solving paradigms. (Scenario 1) We are able to build a system for autonomous math problem solving by directly reusing two built-in agents from AutoGen. We evaluate our system and several alternative approaches, including open-source methods such as Multi-Agent Debate (Liang et al., 2023), LangChain Re- Act (LangChain, 2023), vanilla GPT-4, and commercial products ChatGPT + Code Interpreter, and ChatGPT + Plugin (Wolfram Alpha), on the MATH (Hendrycks et al., 2021) dataset and summarize the results in Figure 4a. We perform evaluations over 120 randomly selected level-5 problems and on the entire5 test dataset from MATH. The results show that the built-in agents from AutoGen al- ready yield better performance out of the box compared to the alternative approaches, even including the commercial ones. (Scenario 2) We also showcase a human-in-the-loop problem-solving process with the help of AutoGen. To incorporate human feedback with AutoGen, one only needs to set human input mode=‘ALWAYS’ in the UserProxyAgent of the system in scenario 1. We demon- strate that this system can effectively incorporate human inputs to solve challenging problems that cannot be solved without humans. (Scenario 3) We further demonstrate a novel scenario where multiple human users can participate in the conversations during the problem-solving process. Our experiments and case studies for these scenarios show that AutoGen enables better performance or new experience compared to other solutions we experimented with. Due to the page limit, details of the evaluation, including case studies in three scenarios are in Appendix D. A2: Retrieval-Augmented Code Generation and Question Answering Retrieval augmentation has emerged as a practical and effective approach for mitigating the intrinsic limitations of LLMs by incorporating external documents. In this section, we employ AutoGen to build a Retrieval-Augmented Generation (RAG) system (Lewis et al., 2020; Parvez et al., 2021) named Retrieval-augmented Chat. The system consists of two agents: a Retrieval-augmented User Proxy agent and a Retrieval-augmented Assistant agent, both of which are extended from built-in agents from AutoGen. The Retrieval-augmented User Proxy includes a vector database (Chroma, 5 We did not evaluate ChatGPT on the whole dataset since it requires substantial manual effort and is re- stricted by its hourly message-number limitation. Multi-agent debate and LangChain ReAct were also not evaluated since they underperformed vanilla GPT-4 on the smaller test set. 6

条件:本地全文 arXiv:2308.08155v2,Section 3; Figure 3;条件及比较对象见陈述

指标:应用覆盖数学、检索问答、环境交互、带安全检查的编程等。数学比较包含较难题子集和完整测试集,但部分商业工具及较差的开源基线只测了子集。阅读时要先确认同一根柱子属于哪个测试范围,不能把子集结果与全量结果交叉排序。

原文第 6 页 ↗PDF p.6, Section 3; Figure 3

只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。

结果

主要比较

原文摘录
80 80 120 Level-5 problems AutoGen 69.48% AuotGen W/O interactive retrieval 66.65% 70 Whole Dataset 70 DPR 62.59% 60 60 58.56% 55.18% Success Ratio (%) 52.5% Percentage (%) 50 48.33% 50 45.0% 40 40 30 30.0% 26.67% 30 25.88% 23.33% 22.79% 20 20 15.12% 10 10 0 0 AutoGen ChatGPT ChatGPT GPT-4 Multi-Agent LangChain +Code +Plugin Debate ReAct F1 Recall Methods Metrics (a) A1: Performance on MATH (w/ GPT-4). (b) A2: Q&A tasks (w/ GPT-3.5). 100 Multi-GPT4 Average Single-GPT4 77% Best of 3 100 96.00% 98.00% Multi-GPT3.5 80 88.00% Single-GPT3.5 69% 83.00% Success Ratio (%) 66% 78.00% Percentage (%) 80 63% 72.00% 60 54% 54% 60 48.00% 40 40 32.00% 20 20 0 0 AutoGen (3 agent) AutoGen (2 agent) ReAct F1 Recall Methods Metrics (c) A3: Performance on ALFWorld. (d) A4: Performance on OptiGuide. Figure 4: Performance on four applications A1-A4. (a) shows that AutoGen agents can be used out of the box to achieve the most competitive performance on math problem solving tasks; (b) shows that AutoGen can be used to realize effective retrieval augmentation and realize a novel interactive retrieval feature to boost performance on Q&A tasks; (c) shows that AutoGen can be used to introduce a three-agent system with a grounding agent to improve performance on ALFWorld; (d) shows that a multi-agent design is helpful in boosting performance in coding tasks that need safeguards. 2023) with SentenceTransformers (Reimers & Gurevych, 2019) as the context retriever. A detailed workflow description of the Retrieval-augmented Chat is provided in Appendix D. We evaluate Retrieval-augmented Chat in both question-answering and code-generation scenarios. (Scenario 1) We first perform an evaluation regarding natural question answering on the Natural Questions dataset (Kwiatkowski et al., 2019) and report results in Figure 4b. In this evaluation, we compare our system with DPR (Dense Passage Retrieval) following an existing evaluation6 prac- tice (Adlakha et al., 2023). Leveraging the conversational design and natural-language control, AutoGen introduces a novel interactive retrieval feature in this application: whenever the retrieved context does not contain the information, instead of terminating, the LLM-based assistant would reply “Sorry, I cannot find any information about... UPDATE CONTEXT.” which will invoke more retrieval attempts. We conduct an ablation study in which we prompt the assistant agent to say “I don’t know” instead of “UPDATE CONTEXT.” in cases where relevant information is not found, and report results in Figure 4b. The results show that the interactive retrieval mechanism indeed plays a non-trivial role in the process. We give a concrete example and results using this appealing feature in Appendix D. (Scenario 2) We further demonstrate how Retrieval-augmented Chat aids in generating code based on a given codebase that contains code not included in GPT-4’s training data. Evaluation and demonstration details for both scenarios are included in Appendix D. 6 The results of DPR with GPT-3.5 shown in Figure 4b are from (Adlakha et al., 2023). We use GPT-3.5 as a shorthand for GPT-3.5-turbo. 7

条件:本地全文 arXiv:2308.08155v2,Figure 4a;条件及比较对象见陈述

指标:数学较难题子集上,AutoGen为52.5%,原生GPT-4为30.0%;全量测试分别为69.48%和55.18%。这是特定助手与执行器配置的任务表现,并不隔离工具执行、反馈轮次和多人角色各自贡献,也不能解释为模型权重本身进步。

原文第 7 页 ↗PDF p.7, Figure 4a

只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。

结果

反例或对照

原文摘录
80 80 120 Level-5 problems AutoGen 69.48% AuotGen W/O interactive retrieval 66.65% 70 Whole Dataset 70 DPR 62.59% 60 60 58.56% 55.18% Success Ratio (%) 52.5% Percentage (%) 50 48.33% 50 45.0% 40 40 30 30.0% 26.67% 30 25.88% 23.33% 22.79% 20 20 15.12% 10 10 0 0 AutoGen ChatGPT ChatGPT GPT-4 Multi-Agent LangChain +Code +Plugin Debate ReAct F1 Recall Methods Metrics (a) A1: Performance on MATH (w/ GPT-4). (b) A2: Q&A tasks (w/ GPT-3.5). 100 Multi-GPT4 Average Single-GPT4 77% Best of 3 100 96.00% 98.00% Multi-GPT3.5 80 88.00% Single-GPT3.5 69% 83.00% Success Ratio (%) 66% 78.00% Percentage (%) 80 63% 72.00% 60 54% 54% 60 48.00% 40 40 32.00% 20 20 0 0 AutoGen (3 agent) AutoGen (2 agent) ReAct F1 Recall Methods Metrics (c) A3: Performance on ALFWorld. (d) A4: Performance on OptiGuide. Figure 4: Performance on four applications A1-A4. (a) shows that AutoGen agents can be used out of the box to achieve the most competitive performance on math problem solving tasks; (b) shows that AutoGen can be used to realize effective retrieval augmentation and realize a novel interactive retrieval feature to boost performance on Q&A tasks; (c) shows that AutoGen can be used to introduce a three-agent system with a grounding agent to improve performance on ALFWorld; (d) shows that a multi-agent design is helpful in boosting performance in coding tasks that need safeguards. 2023) with SentenceTransformers (Reimers & Gurevych, 2019) as the context retriever. A detailed workflow description of the Retrieval-augmented Chat is provided in Appendix D. We evaluate Retrieval-augmented Chat in both question-answering and code-generation scenarios. (Scenario 1) We first perform an evaluation regarding natural question answering on the Natural Questions dataset (Kwiatkowski et al., 2019) and report results in Figure 4b. In this evaluation, we compare our system with DPR (Dense Passage Retrieval) following an existing evaluation6 prac- tice (Adlakha et al., 2023). Leveraging the conversational design and natural-language control, AutoGen introduces a novel interactive retrieval feature in this application: whenever the retrieved context does not contain the information, instead of terminating, the LLM-based assistant would reply “Sorry, I cannot find any information about... UPDATE CONTEXT.” which will invoke more retrieval attempts. We conduct an ablation study in which we prompt the assistant agent to say “I don’t know” instead of “UPDATE CONTEXT.” in cases where relevant information is not found, and report results in Figure 4b. The results show that the interactive retrieval mechanism indeed plays a non-trivial role in the process. We give a concrete example and results using this appealing feature in Appendix D. (Scenario 2) We further demonstrate how Retrieval-augmented Chat aids in generating code based on a given codebase that contains code not included in GPT-4’s training data. Evaluation and demonstration details for both scenarios are included in Appendix D. 6 The results of DPR with GPT-3.5 shown in Figure 4b are from (Adlakha et al., 2023). We use GPT-3.5 as a shorthand for GPT-3.5-turbo. 7

条件:本地全文 arXiv:2308.08155v2,Figure 4c;条件及比较对象见陈述

指标:ALFWorld中,三智能体配置平均表现69%、最好一轮77%,两智能体平均54%、最好一轮63%;ReAct平均54%、最好一轮66%。因此两智能体的平均值并未超过ReAct,最好一轮还较低。加入专门的grounding角色有价值,不等于任意多人设计都有价值。

原文第 7 页 ↗PDF p.7, Figure 4c

只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。

限制

适用边界

原文摘录
Student Assistant Assistant Retrieval-augmented Retrieval-augmented User Proxy Assistant Ask expert ALFWorld Executor Assistant Grounding Expert Agent A1. Math Problem Solving A2. Retrieval-augmented Chat A3. ALF Chat Commander Chess Board Manager Broadcast Speak Human/AI Chess Human/AI Chess Writer Safeguard Player A Player B A4. Multi-agent Coding A5. Dynamic Group Chat A6. Conversational Chess Figure 3: Six examples of diverse applications built using AutoGen. Their conversation patterns show AutoGen’s flexibility and power. A1: Math Problem Solving Mathematics is a foundational discipline and the promise of leveraging LLMs to assist with math problem solving opens up a new plethora of applications and avenues for exploration, including per- sonalized AI tutoring, AI research assistance, etc. This section demonstrates how AutoGen can help develop LLM applications for math problem solving, showcasing strong performance and flexibility in supporting various problem-solving paradigms. (Scenario 1) We are able to build a system for autonomous math problem solving by directly reusing two built-in agents from AutoGen. We evaluate our system and several alternative approaches, including open-source methods such as Multi-Agent Debate (Liang et al., 2023), LangChain Re- Act (LangChain, 2023), vanilla GPT-4, and commercial products ChatGPT + Code Interpreter, and ChatGPT + Plugin (Wolfram Alpha), on the MATH (Hendrycks et al., 2021) dataset and summarize the results in Figure 4a. We perform evaluations over 120 randomly selected level-5 problems and on the entire5 test dataset from MATH. The results show that the built-in agents from AutoGen al- ready yield better performance out of the box compared to the alternative approaches, even including the commercial ones. (Scenario 2) We also showcase a human-in-the-loop problem-solving process with the help of AutoGen. To incorporate human feedback with AutoGen, one only needs to set human input mode=‘ALWAYS’ in the UserProxyAgent of the system in scenario 1. We demon- strate that this system can effectively incorporate human inputs to solve challenging problems that cannot be solved without humans. (Scenario 3) We further demonstrate a novel scenario where multiple human users can participate in the conversations during the problem-solving process. Our experiments and case studies for these scenarios show that AutoGen enables better performance or new experience compared to other solutions we experimented with. Due to the page limit, details of the evaluation, including case studies in three scenarios are in Appendix D. A2: Retrieval-Augmented Code Generation and Question Answering Retrieval augmentation has emerged as a practical and effective approach for mitigating the intrinsic limitations of LLMs by incorporating external documents. In this section, we employ AutoGen to build a Retrieval-Augmented Generation (RAG) system (Lewis et al., 2020; Parvez et al., 2021) named Retrieval-augmented Chat. The system consists of two agents: a Retrieval-augmented User Proxy agent and a Retrieval-augmented Assistant agent, both of which are extended from built-in agents from AutoGen. The Retrieval-augmented User Proxy includes a vector database (Chroma, 5 We did not evaluate ChatGPT on the whole dataset since it requires substantial manual effort and is re- stricted by its hourly message-number limitation. Multi-agent debate and LangChain ReAct were also not evaluated since they underperformed vanilla GPT-4 on the smaller test set. 6

条件:本地全文 arXiv:2308.08155v2,Footnote five; human intervention scenario;条件及比较对象见陈述

指标:数学全量比较没有覆盖所有列出的基线;另外,人类介入解决困难题是单独的使用情境,不能与自主求解混合汇报。它首先是一个可复用工程抽象,落地仍需决定权限、执行环境和人何时介入。本文版本也不能直接当作现今软件接口的保证。

原文第 6 页 ↗PDF p.6, Footnote five; human intervention scenario

只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。

读完,试着回答

论文研究什么问题?

一个可对话智能体保存收发消息形成的上下文,背后可以接语言模型、工具或人类。助手生成建议,用户代理既能询问真人,也能执行代码并返回结果。统一接口让这些角色可以替换和组合;代理收到自然语言,并不意味着所有回复都只是聊天文本。

已有方法缺口在哪里?

一个可对话智能体保存收发消息形成的上下文,背后可以接语言模型、工具或人类。

输入是什么?

作者区分“计算”和“控制流”:计算是调用模型、执行程序等动作,控制流决定谁接下来回应、何时停止。

机制是什么?

作者区分“计算”和“控制流”:计算是调用模型、执行程序等动作,控制流决定谁接下来回应、何时停止。回复函数把二者连接起来:助手提出代码,代理执行,报错作为下一条消息,助手再修正。这个闭环由开发者配置的角色、函数和终止条件支撑,不是多开几个窗口就自动成立。

输出是什么?

AutoGen的贡献是把模型、工具和人类放进统一的消息接口,让开发者编排可执行的协作流程。它不是训练出的更强模型,也不是无需设计的自动团队;实验展示多个应用的收益,但任务、工具和基线条件不同,不能拿一张图概括所有智能体应用。

适用边界是什么?

数学全量比较没有覆盖所有列出的基线;另外,人类介入解决困难题是单独的使用情境,不能与自主求解混合汇报。它首先是一个可复用工程抽象,落地仍需决定权限、执行环境和人何时介入。本文版本也不能直接当作现今软件接口的保证。

还有什么未解决?

核查建议:加入专门的grounding角色有价值,不等于任意多人设计都有价值,该边界在替换底座与评价协议后是否保持?

技术附录

问题与已有方法

问题设定

一个可对话智能体保存收发消息形成的上下文,背后可以接语言模型、工具或人类。助手生成建议,用户代理既能询问真人,也能执行代码并返回结果。统一接口让这些角色可以替换和组合;代理收到自然语言,并不意味着所有回复都只是聊天文本。 一个可对话智能体保存收发消息形成的上下文,背后可以接语言模型、工具或人类。

方法与组成

核心思路

作者区分“计算”和“控制流”:计算是调用模型、执行程序等动作,控制流决定谁接下来回应、何时停止。回复函数把二者连接起来:助手提出代码,代理执行,报错作为下一条消息,助手再修正。这个闭环由开发者配置的角色、函数和终止条件支撑,不是多开几个窗口就自动成立。

主要发现

  • 标题

    主要比较

    证据

    数学较难题子集上,AutoGen为52.5%,原生GPT-4为30.0%;全量测试分别为69.48%和55.18%。这是特定助手与执行器配置的任务表现,并不隔离工具执行、反馈轮次和多人角色各自贡献,也不能解释为模型权重本身进步。

    限制

    只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。

    原文定位

    PDF p.7, Figure 4a

  • 标题

    反例或对照

    证据

    ALFWorld中,三智能体配置平均表现69%、最好一轮77%,两智能体平均54%、最好一轮63%;ReAct平均54%、最好一轮66%。因此两智能体的平均值并未超过ReAct,最好一轮还较低。加入专门的grounding角色有价值,不等于任意多人设计都有价值。

    限制

    只支持段内给出的任务、指标与条件;不代表通用保证或已复现实验。

    原文定位

    PDF p.7, Figure 4c

概念定位

是什么

作者区分“计算”和“控制流”:计算是调用模型、执行程序等动作,控制流决定谁接下来回应、何时停止。回复函数把二者连接起来:助手提出代码,代理执行,报错作为下一条消息,助手再修正。这个闭环由开发者配置的角色、函数和终止条件支撑,不是多开几个窗口就自动成立。

为什么重要

一个可对话智能体保存收发消息形成的上下文,背后可以接语言模型、工具或人类。助手生成建议,用户代理既能询问真人,也能执行代码并返回结果。统一接口让这些角色可以替换和组合;代理收到自然语言,并不意味着所有回复都只是聊天文本。

图表导读

  • PDF 页

    7

    标题

    原文 PDF p.7 的图表

    解释

    已实际查看图像,核对本文使用的图表内容;展示案例与定量结果分别解释。

核心概念

  • 名称

    AutoGen

    解释

    作者区分“计算”和“控制流”:计算是调用模型、执行程序等动作,控制流决定谁接下来回应、何时停止。回复函数把二者连接起来:助手提出代码,代理执行,报错作为下一条消息,助手再修正。这个闭环由开发者配置的角色、函数和终止条件支撑,不是多开几个窗口就自动成立。

    原文定位

    PDF p.4, Figure 2; Section 2.2

    证据来源

    paper_supported

章节阅读

  • 页码

    1

    作用

    identity

    关键问题

    标题作者与版本

    状态

    read

  • 页码

    3

    作用

    method

    关键问题

    Section 2.1

    状态

    read

  • 页码

    4

    作用

    method

    关键问题

    Figure 2; Section 2.2

    状态

    read

  • 页码

    6

    作用

    method

    关键问题

    Section 3; Figure 3

    状态

    read

  • 页码

    7

    作用

    result

    关键问题

    Figure 4a

    状态

    read

  • 页码

    7

    作用

    result

    关键问题

    Figure 4c

    状态

    read

  • 页码

    6

    作用

    limitation

    关键问题

    Footnote five; human intervention scenario

    状态

    read

批判性阅读

最低充分结论

AutoGen的贡献是把模型、工具和人类放进统一的消息接口,让开发者编排可执行的协作流程。它不是训练出的更强模型,也不是无需设计的自动团队;实验展示多个应用的收益,但任务、工具和基线条件不同,不能拿一张图概括所有智能体应用。

继续阅读

相关论文

同一研究空间