先说结论
ChatDev 把软件开发变成角色分工的聊天链,并允许执行者先澄清再改代码。实验中更容易得到能运行的软件,但可执行不等于功能完整正确,收益也伴随相对单代理的额外开销。 (原文:PDF p.2, Introduction;PDF p.3, Figure 2; Section 3.1;PDF p.5, Section 3.2;PDF p.5, experimental setup;PDF p.6, Table 1; Table 3;PDF p.7, Table 4)
指标:ChatDev 要解决的是从自然语言需求生成软件时,各阶段互不衔接的问题。模型写得出代码,并不意味着代码完整、能运行或符合需求。作者把设计、编码和测试接成聊天链,让不同角色共同形成和修改同一份软件,而不是各自输出一段互不相干的答案。
条件:仅限本地原始PDF的 Introduction;不同表格与实验不合并
PDF p.2, Introduction · PDF p.2
Gao et al., 2019; Wang et al., 2016). Due to these software requirement descriptions and conducted technical inconsistencies, methods employed in comprehensive analyses. The results indicate that different phases remain isolated until now. Every ChatDev notably improves the quality of software, phase, from data collection and labeling to model leading to improved completeness, executability, training and inference, requires its unique designs, and better consistency with requirements. Further leading to a fragmented and less efficient devel- investigations reveal that natural-language com- opment process in the field (Freeman et al., 2001; munications contribute to comprehensive system Ernst, 2017; Winkler et al., 2020). design, while programming-language communica- Motivated by the expert-like potential of au- tions drive software optimization. In summary, the tonomous agents, we aim to establish language as a proposed paradigm demonstrates how linguistic unifying bridge—utilizing multiple LLM-powered communication facilitates multi-agent collabora- agents with specialized roles for cooperative soft- tion, establishing language as a unifying bridge for ware development through language-based com- autonomous task-solving among LLM agents. munication across different phases; solutions in different phases are derived from their multi-turn 2 Related Work dialogues, whether dealing with text or code. Nev- ertheless, due to the tendency of LLM hallucina- Trained on vast datasets to comprehend and ma- tions (Dhuliawala et al., 2023; Zhang et al., 2023b), nipulate billions of parameters, LLMs have be- the strategy of generating software through com- come pivotal in natural language processing due municative agents could lead to the non-trivial chal- to their seamless integration of extensive knowl- lenge of coding hallucinations, which involves the edge (Brown et al., 2020; Bubeck et al., 2023; generation of source code that is incomplete, unex- Vaswani et al., 2017; Radford et al.; Touvron et al., ecutable, or inaccurate, ultimately failing to fulfill 2023; Wei et al., 2022a; Shanahan et al., 2023; the intended requirements (Agnihotri and Chug, Chen et al., 2021; Brants et al., 2007; Chen et al., 2020). The frequent occurrence of coding halluci- 2021; Ouyang et al., 2022; Yang et al., 2023a; nation in turn reflects the constrained autonomy of Qin et al., 2023b; Kaplan et al., 2020). Further- agents in task completion, inevitably demanding more, LLMs have demonstrated strong role-playing additional manual intervention and thereby hinder- abilities (Li et al., 2023a; Park et al., 2023; Hua ing the immediate usability and reliability of the et al., 2023; Chan et al., 2023; Zhou et al., 2023b; generated software (Ji et al., 2023). Chen et al., 2023b,a; Cohen et al., 2023; Li et al., In this paper, we propose ChatDev (see Figure 1), 2023b). Recent progress, particularly in the field a chat-powered ::: software-::: development framework of autonomous agents (Zhou et al., 2023a; Wang integrating multiple "software agents" for active et al., 2023a; Park et al., 2023; Wang et al., 2023e; involvement in three core phases of the software Richards, 2023; Osika, 2023; Wang et al., 2023d), lifecycle: design, coding, and testing. Technically, is largely attributed to the foundational advances ChatDev uses a chat chain to divide each phase in LLMs. These agents utilize the robust capa- into smaller subtasks further, enabling agents’ bilities of LLMs, displaying remarkable skills in multi-turn communications to cooperatively pro- memory (Park et al., 2023; Sumers et al., 2023), pose and develop solutions (e.g., creative ideas planning (Chen et al., 2023b; Liu et al., 2023) and or source code). The chain-structured workflow tool use (Schick et al., 2023; Cai et al., 2023; Qin guides agents on what to communicate, foster- et al., 2023a; Ruan et al., 2023; Yang et al., 2023b), ing cooperation and smoothly linking natural- and enabling them to reason in complex scenarios (Wei programming-language subtasks to propel problem- et al., 2022b; Zhao et al., 2023; Zhou et al., 2023a; solving. Additionally, to minimize coding halluci- Ma et al., 2023; Zhang et al., 2023a; Wang et al., nations, ChatDev includes an communicative de- 2023b; Ding et al., 2023; Weng, 2023). hallucination mechanism, enabling agents to ac- Software development is a multifaceted and in- tively request more specific details before giving tricate process that requires the cooperation of mul- direct responses. The communication pattern in- tiple experts from various fields (Yilmaz et al., structs agents on how to communicate, enabling 2012; Acuna et al., 2006; Basili, 1989; Sawyer precise information exchange for effective solu- and Guinan, 1998; Banker et al., 1998; France tion optimization while reducing coding hallucina- and Rumpe, 2007), encompassing the require- tions. We built a comprehensive dataset containing ment analysis and system design in natural lan- 15175
解释边界:以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。
指标:输入是一段软件需求,输出是经过设计、补全、审查和测试的代码。聊天链把开发拆成连续子任务:先由 CEO 与 CTO 商定设计,再由 CTO 与程序员完成编码和补全,之后由审查员、测试员分别与程序员讨论问题。每个子任务都有指导者和执行者,双方多轮交流后提取阶段成果,再交给下一环节。因此,系统改变的是工作的分解和交接方式,不是训练了一个新的代码模型。
条件:仅限本地原始PDF的 Figure 2; Section 3.1;不同表格与实验不合并
PDF p.3, Figure 2; Section 3.1 · PDF p.3
Phases Design Coding Testing Code Code Subtasks Design Coding Complete Review Testing CEO CTO CTO Reviewer Tester Instructor Chat Chain {task} {ideas} {code} {code} {code} {code} Assistant CTO Programmer Programmer Programmer Programmer Figure 2: Upon receiving a preliminary task requirement (e.g., “develop a Gomoku game”), these software agents engage in multi-turn communication and perform instruction-following along a chain-structured workflow, collaborating to execute a series of subtasks autonomously to craft a comprehensive solution. guages (Pudlitz et al., 2019; Martín and Abran, forming textual requirements into functional soft- 2015; Nahar et al., 2022), along with system de- ware in a single step remains a significant challenge. velopment and debugging in programming lan- ChatDev thus adopts the core principles of the wa- guages (Gao et al., 2019; Wang et al., 2016; Wan terfall model, using a chat chain (C) with sequential et al., 2022). Numerous studies employ the wa- phases (P), each comprising sequential subtasks terfall model, a particular software development (T ). Specifically, ChatDev segments the software life cycle, to segment the process into discrete development process into three sequential phases: phases (e.g., design, coding, testing) and apply design, coding, and testing. The coding phase is deep learning to improve the effectiveness of cer- further subdivided into subtasks of code writing tain phases (Winkler et al., 2020; Ezzini et al., 2022; and completion, and the testing phase is segmented Thaller et al., 2019; Zhao et al., 2021; Nijkamp into code review (static testing) and system testing et al., 2023; Wan et al., 2018; Wang et al., 2021). (dynamic testing), as illustrated in Figure 2. In every subtask, two agents, each with their own spe- 3 ChatDev cialized roles (e.g., a reviewer skilled at identifying We introduce ChatDev, a :::: chat-powered software- endless loops and a programmer adept in GUI de- development framework that integrates multiple sign), perform the functions of an instructor (I) ::: "software agents" with various social roles (e.g., and an assistant (A). The instructor agent initiates requirements analysts, professional programmers instructions, instructing (→) the discourse toward and test engineers) collaborating in the core phases the completion of the subtask, while the assistant of the software life cycle, see Figure 1. Technically, agent adheres to these instructions and responds to facilitate cooperative communication, ChatDev with (;) appropriate solutions. They engage in introduces chat chain to further break down each a multi-turn dialogue (C), working cooperatively phase into smaller and manageable subtasks, which until they achieve consensus, extracting (τ ) solu- guides multi-turn communications between differ- tions that can range from the text (e.g., defining a ent roles to propose and validate solutions for each software function point) to code (e.g., creating the subtask. In addition, to alleviate unexpected hallu- initial version of source code), ultimately leading cinations, a communicative pattern named commu- to the completion of the subtask. The entire task- nicative dehallucination is devised, wherein agents solving process along the agentic workflow can be request more detailed information before respond- formulated as: ing directly and then continue the next round of communication based on these details. C = ⟨P 1 , P 2 , . . . , P |C| ⟩ i 3.1 Chat Chain P i = ⟨T 1 , T 2 , . . . , T |P | ⟩ (1) Although LLMs show a good understanding of nat- T j = τ C(I, A) ural and programming languages, efficiently trans- C(I, A) = ⟨I → A, A ; I⟩⟲ 15176
解释边界:以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。
指标:通信去幻觉机制在原本的“指令—回答”之间插入澄清过程:执行者临时反转对话角色,先向指导者询问更具体的修改建议,例如外部依赖及类名,再据此改代码。这里通常是智能体之间追问,并非每一步都等人类回答。机制针对模糊指令导致的错漏,但追问本身仍由模型完成,不能视为事实正确性的保证。
条件:仅限本地原始PDF的 Section 3.2;不同表格与实验不合并
PDF p.5, Section 3.2 · PDF p.5
et al., 2023b). This issue is particularly concern- MetaGPT (Hong et al., 2023) is an advanced frame- ing in software development, where programming work that allocates specific roles to various LLM- languages demand precise syntax—the absence of driven software agents and incorporates standard- even a single line can lead to system failure. We ized operating procedures to enable multi-agent have observed that LLMs often produce coding hal- participation. In each step agents with specific roles lucinations, which encompass potential issues like generate solutions by adhering to static instructions incomplete implementations, unexecutable code, predefined by human experts. and inconsistencies that don’t meet requirements. Coding hallucinations frequently appear when the Datasets Note that, as of now, there isn’t a pub- assistant struggles to precisely follow instructions, licly accessible dataset containing textual descrip- often due to the vagueness and generality of cer- tions of software requirements in the context of tain instructions that require multiple adjustments, agent-driven software development. To this end, making it challenging for agents to achieve full we are actively working towards developing a com- compliance. Inspired by this, we introduce com- prehensive dataset for software requirement de- municative dehallucination, which encourages the scriptions, which we refer to as SRDD (Software assistant to actively seek more detailed suggestions Requirement Description Dataset). Drawing on from the instructor before delivering a formal re- previous work (Li et al., 2023a), we utilize existing sponse. software descriptions as initial examples, which Specifically, a vanilla communication pattern are then further developed through a process that between the assistant and the instructor follows a combines LLM-based automatic generation with straightforward instruction-response format: post-processing refinement guided by humans. As a result, this dataset includes important software ⟨I → A, A ; I⟩⟲ (6) categories from popular platforms such as Ubuntu, Google Play, Microsoft Store, and Apple Store. It In contrast, our communicative dehallucination comprises 1,200 software task prompts that have mechanism features a deliberate "role reversal", been carefully categorized into 5 main areas: Edu- where the assistant takes on an instructor-like role, cation, Work, Life, Game, and Creation. All these proactively seeking more specific information (e.g., areas are further divided into 40 subcategories, and the precise name of an external dependency and each subcategory contains 30 unique task prompts. its related class) before delivering a conclusive re- sponse. After the instructor provides a specific Metrics Evaluating software is also a challenging modification suggestion, the assistant proceeds to task, especially when trying to assess it on a holistic perform precise optimization: level. Under the current limitation of scarce bench- mark resources, traditional function-oriented code ⟨I → A, ⟨A → I, I ; A⟩⟲ , A ; I⟩⟲ (7) generation metrics (e.g., pass@k), cannot seam- Since this mechanism tackles one concrete issue at lessly transfer to a comprehensive evaluation of a time, it requires multiple rounds of communica- entire software systems. The main reason for this tion to optimize various potential problems. The is that it is often impractical to develop manual or communication pattern instructs agents on how to automated test cases for various types of software, communicate, enabling finer-grained information especially those involving complex interfaces, fre- exchange for effective solution optimization, which quent user interactions, or non-deterministic feed- practically aids in reducing coding hallucinations. back. As an initial strategy, we apply three funda- mental and objective dimensions that reflect differ- 4 Evaluation ent aspects of coding hallucinations to evaluate the agent-generated software, and then integrate them Baselines We chose some representative LLM- to facilitate a more holistic evaluation: based software development methods as our base- lines. GPT-Engineer (Osika, 2023) is a fundamen- • Completeness measures the software’s ability to tal single-agent approach in LLM-driven software fulfill code completion in software development, agents with a precise understanding of task require- quantified as the percentage of software with- ments and the application of one-step reasoning, out any "placeholder" code snippets. A higher which highlights its efficiency in generating de- score indicates a higher probability of automated tailed software solutions at the repository level. completion. 15178
解释边界:以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。
指标:实验构建 SRDD 软件需求集,覆盖教育、工作、生活、游戏和创作,包含 1,200 条任务。比较对象包括单代理 GPT-Engineer 和采用静态工作流程的 MetaGPT;完整度关注是否留下占位代码,再结合运行和需求一致性评价,不能直接等同于完整业务测试。
条件:仅限本地原始PDF的 experimental setup;不同表格与实验不合并
PDF p.5, experimental setup · PDF p.5
et al., 2023b). This issue is particularly concern- MetaGPT (Hong et al., 2023) is an advanced frame- ing in software development, where programming work that allocates specific roles to various LLM- languages demand precise syntax—the absence of driven software agents and incorporates standard- even a single line can lead to system failure. We ized operating procedures to enable multi-agent have observed that LLMs often produce coding hal- participation. In each step agents with specific roles lucinations, which encompass potential issues like generate solutions by adhering to static instructions incomplete implementations, unexecutable code, predefined by human experts. and inconsistencies that don’t meet requirements. Coding hallucinations frequently appear when the Datasets Note that, as of now, there isn’t a pub- assistant struggles to precisely follow instructions, licly accessible dataset containing textual descrip- often due to the vagueness and generality of cer- tions of software requirements in the context of tain instructions that require multiple adjustments, agent-driven software development. To this end, making it challenging for agents to achieve full we are actively working towards developing a com- compliance. Inspired by this, we introduce com- prehensive dataset for software requirement de- municative dehallucination, which encourages the scriptions, which we refer to as SRDD (Software assistant to actively seek more detailed suggestions Requirement Description Dataset). Drawing on from the instructor before delivering a formal re- previous work (Li et al., 2023a), we utilize existing sponse. software descriptions as initial examples, which Specifically, a vanilla communication pattern are then further developed through a process that between the assistant and the instructor follows a combines LLM-based automatic generation with straightforward instruction-response format: post-processing refinement guided by humans. As a result, this dataset includes important software ⟨I → A, A ; I⟩⟲ (6) categories from popular platforms such as Ubuntu, Google Play, Microsoft Store, and Apple Store. It In contrast, our communicative dehallucination comprises 1,200 software task prompts that have mechanism features a deliberate "role reversal", been carefully categorized into 5 main areas: Edu- where the assistant takes on an instructor-like role, cation, Work, Life, Game, and Creation. All these proactively seeking more specific information (e.g., areas are further divided into 40 subcategories, and the precise name of an external dependency and each subcategory contains 30 unique task prompts. its related class) before delivering a conclusive re- sponse. After the instructor provides a specific Metrics Evaluating software is also a challenging modification suggestion, the assistant proceeds to task, especially when trying to assess it on a holistic perform precise optimization: level. Under the current limitation of scarce bench- mark resources, traditional function-oriented code ⟨I → A, ⟨A → I, I ; A⟩⟲ , A ; I⟩⟲ (7) generation metrics (e.g., pass@k), cannot seam- Since this mechanism tackles one concrete issue at lessly transfer to a comprehensive evaluation of a time, it requires multiple rounds of communica- entire software systems. The main reason for this tion to optimize various potential problems. The is that it is often impractical to develop manual or communication pattern instructs agents on how to automated test cases for various types of software, communicate, enabling finer-grained information especially those involving complex interfaces, fre- exchange for effective solution optimization, which quent user interactions, or non-deterministic feed- practically aids in reducing coding hallucinations. back. As an initial strategy, we apply three funda- mental and objective dimensions that reflect differ- 4 Evaluation ent aspects of coding hallucinations to evaluate the agent-generated software, and then integrate them Baselines We chose some representative LLM- to facilitate a more holistic evaluation: based software development methods as our base- lines. GPT-Engineer (Osika, 2023) is a fundamen- • Completeness measures the software’s ability to tal single-agent approach in LLM-driven software fulfill code completion in software development, agents with a precise understanding of task require- quantified as the percentage of software with- ments and the application of one-step reasoning, out any "placeholder" code snippets. A higher which highlights its efficiency in generating de- score indicates a higher probability of automated tailed software solutions at the repository level. completion. 15178
解释边界:以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。
指标:在相同底层模型和设置下,ChatDev 的可执行性为 0.8800,GPT-Engineer 为 0.3583,MetaGPT 为 0.4145;综合 Quality 分别为 0.3953、0.1419、0.1523。可执行性指成功编译并可直接运行,不是所有业务功能均正确;Quality 是完整度、可执行性和需求一致性的乘积,也不是人工满意率。成本要比较具体对象:ChatDev 平均耗时 148.2148 秒、使用 22,949.4450 tokens,比 GPT-Engineer 慢且更费 token,但低于 MetaGPT 的 154.0000 秒和 29,278.6510 tokens,不能笼统说它比所有方案都更贵。
条件:仅限本地原始PDF的 Table 1; Table 3;不同表格与实验不合并
PDF p.6, Table 1; Table 3 · PDF p.6
Method Paradigm Completeness Executability Consistency Quality GPT-Engineer 0.5022† 0.3583† 0.7887† 0.1419† MetaGPT 0.4834† 0.4145† 0.7601† 0.1523† ChatDev 0.5600 0.8800 0.8021 0.3953 Table 1: Overall performance of the LLM-powered software development methods, encompassing both single-agent ( ) and multi-agent ( ) paradigms. Performance metrics are averaged for all tasks. The top scores are in bold, with second-highest underlined. † indicates significant statistical differences (p≤0.05) between a baseline and ours. Method Evaluator Baseline Wins ChatDev Wins Draw Method Duration (s) #Tokens #Files #Lines GPT-4 22.50% 77.08% 00.42% GPT-Engineer 15.6000 7,182.5333 3.9475 70.2041 GPT-Engineer Human 09.18% 90.16% 00.66% MetaGPT 154.0000 29,278.6510 4.4233 153.3000 GPT-4 37.50% 57.08% 05.42% ChatDev 148.2148 22,949.4450 4.3900 144.3450 MetaGPT Human 07.92% 88.00% 04.08% Table 3: Software statistics include Duration (time con- Table 2: Pairwise evaluation results. sumed), #Tokens (number of tokens used), #Files (num- ber of code files generated), and #Lines (total lines of code across all files) in the software generation process. • Executability assesses the software’s ability to run correctly within a compilation environment, quantified as the percentage of software that com- a consensus is reached. We used ChatGPT-3.5 with piles successfully and can run directly. A higher a temperature of 0.2 and integrated Python-3.11.4 score indicates a higher probability of successful for feedback. All baselines in the evaluation share execution. the same hyperparameters and settings for fairness. • Consistency measures how closely the generated software code aligns with the original require- 4.1 Overall Performance ment description, quantified as the cosine dis- tance between the semantic embeddings of the As illustrated in Table 1, ChatDev outperforms textual requirements and the generated software all baseline methods across all metrics, showing code1 . A higher score indicates a greater degree a considerable margin of improvement. Firstly, of consistency with the requirements. the improvement of ChatDev and MetaGPT over • Quality is a comprehensive metric that integrates GPT-Engineer demonstrates that complex tasks are various factors to assess the overall quality of difficult to solve in a single-step solution. There- software, quantified by multiplying2 complete- fore, explicitly decomposing the difficult problem ness, executability, and consistency. A higher into several smaller, more manageable subtasks en- quality score suggests a higher overall satisfac- hances the effectiveness of task completion. Addi- tion with the software generated, implying a tionally, in comparison to MetaGPT, ChatDev sig- lower need for further manual intervention. nificantly raises the Quality from 0.1523 to 0.3953. This advancement is largely attributed to the agents employing a cooperative communication method, Implementation Details We divided software which involves autonomously proposing and con- development into 5 subtasks within 3 phases, as- tinuously refining source code through a blend of signing specific roles like CEO, CTO, programmer, natural and programming languages, as opposed reviewer, and tester. A subtask would terminate to merely delivering responses based on human- and get a conclusion either after two unchanged predefined instructions. The communicative agents code modifications or after 10 rounds of commu- guide each subtask towards integrated and auto- nication. During the code completion, review, and mated solutions, efficiently overcoming the restric- testing, a communicative dehallucination is acti- tions typically linked to manually established op- vated. For ease of identifying solutions, the assis- timization rules, and offering a more versatile and tant begins responses with "<SOLUTION>" when adaptable framework for problem-solving. 1 Comments should be excluded from the code to avoid To further understand user preferences in practi- potential information leakage during evaluations. 2 One can also choose to average the sub-metrics, which cal settings, we use the setting adopted by Li et al. yields similar trends. (2023a), where agent-generated solutions are com- 15179
解释边界:以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。
指标:去掉通信去幻觉后,Quality 从 0.3953 降至 0.3094,可执行性从 0.8800 降至 0.8400,支持这一机制在被测设置中的作用。但仅运行至代码补全阶段时,完整度为 0.6250,高于完整流程的 0.5600;后续审查和测试改善的是整体权衡,不能写成所有指标都会逐步增加。论文展示了自动开发原型的潜力,不足以证明任意大型软件都能无人验收交付。
条件:仅限本地原始PDF的 Table 4;不同表格与实验不合并
PDF p.7, Table 4 · PDF p.7
Variant Completeness Executability Consistency Quality 2.24%1.39% Target User 5% % 3.1 6% 2.51 ChatDev 0.5600 0.8800 0.8021 0.3953 5.4 4 Data Management 3. 21.44% 1 % UI & UX ≤Coding 0.4100 0.7700 0.7958 0.2512 5.92% Customization ≤Complete 0.6250 0.7400 0.7978 0.3690 6.93% Performance ≤Review 0.5750 0.8100 0.7980 0.3717 20.55% Integration ≤Testing 0.5600 0.8800 0.8021 0.3953 . 78% 7 Real-Time Update ⧹CDH 0.4700 0.8400 0.7983 0.3094 19.23% Recommendation ⧹Roles 0.5400 0.5800 0.7385 0.2212 Platform Collaboration Table 4: Ablation study on main components or mech- Security & Privacy anisms. ≤ x denotes halting the chat chain after the 57.20% Scalability & Maintenance completion of the x phrase, and ⧹ denotes the removing operation. CDH denotes the communicative dehalluci- Natural-Language nation mechanism. 42.80% Programming-Language pared in pairs by both human participants and the 10 18.53% prevalent GPT-4 model to identify the preferred .19 % Coding one.3 Table 2 shows ChatDev consistently outper- 10.19% Code Complete Code Review forming other baselines, with higher average win 61.09% System Testing rates in both GPT-4 and human evaluations. Furthermore, the software statistics presented in Table 3 indicates that the multi-agent paradigm, Figure 3: The utterance distribution of agent communi- despite being slower and consuming more tokens cations throughout the entire development process. than the single-agent method, yields a greater num- ber of code files and a larger codebase, which may enhance the software’s functionality and integrity. tions among intelligent agents. Meanwhile, elim- Analyzing the dialogues of agents suggests that inating communicative dehallucination results in the multi-agent communication method often leads a decrease across all metrics, indicating its effec- agents to autonomously offer functional enhance- tiveness in addressing coding hallucinations. Most ments (e.g., GUI creation or increasing game diffi- interestingly, the most substantial impact on per- culty), thereby potentially resulting in the incorpo- formance occurs when the roles of all agents are ration of beneficial features that were not explicitly removed from their system prompts. Detailed dia- specified in requirements. Taking all these factors logue analysis shows that assigning a "prefer GUI together, we posit that the fundamental character- design" role to a programmer results in generated istics of multi-agent software development take source code with relevant GUI implementations; in on greater significance, surpassing short-term con- the absence of such role indications, it defaults to cerns like time and economic costs in the current implement unfriend command-line-only programs landscape. only. Likewise, assigning roles such as a "careful reviewer for bug detection" enhances the chances 4.2 Ablation Study of discovering code vulnerabilities; without such This section examines key components or mech- roles, feedback tends to be high-level, leading to anisms within our multi-agent cooperation frame- limited adjustments by the programmer. This find- work by removing particular phases in the chat ing underscores the importance of assigning roles chain, communicative dehallucination, or the roles in eliciting responses from LLMs, underscoring the assigned to all agents in their system prompts. Fig- significant influence of multi-agent cooperation on ure 4 shows that the code complete phase enhances software quality. Completeness, with testing critical for Executabil- ity. Quality steadily rises with each step, suggesting 4.3 Communication Analysis that software development optimization is progres- sively attained through multi-phase communica- Our agent-driven software development paradigm promotes cooperative agents through effective com- 3 For fairness, GPT-4’s evaluation mitigated possible po- munication for automated solution optimization. sitional bias (Wang et al., 2023c), and human experts inde- pendently assessed the task solutions, randomized to prevent Phases in the chat chain have varying levels of en- order bias. gagement in natural and programming languages. 15180
解释边界:以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。
论文为什么要做这件事
ChatDev 要解决的是从自然语言需求生成软件时,各阶段互不衔接的问题。模型写得出代码,并不意味着代码完整、能运行或符合需求。作者把设计、编码和测试接成聊天链,让不同角色共同形成和修改同一份软件,而不是各自输出一段互不相干的答案。 (原文:PDF p.2, Introduction)
指标:ChatDev 要解决的是从自然语言需求生成软件时,各阶段互不衔接的问题。模型写得出代码,并不意味着代码完整、能运行或符合需求。作者把设计、编码和测试接成聊天链,让不同角色共同形成和修改同一份软件,而不是各自输出一段互不相干的答案。
条件:仅限本地原始PDF的 Introduction;不同表格与实验不合并
PDF p.2, Introduction · PDF p.2
Gao et al., 2019; Wang et al., 2016). Due to these software requirement descriptions and conducted technical inconsistencies, methods employed in comprehensive analyses. The results indicate that different phases remain isolated until now. Every ChatDev notably improves the quality of software, phase, from data collection and labeling to model leading to improved completeness, executability, training and inference, requires its unique designs, and better consistency with requirements. Further leading to a fragmented and less efficient devel- investigations reveal that natural-language com- opment process in the field (Freeman et al., 2001; munications contribute to comprehensive system Ernst, 2017; Winkler et al., 2020). design, while programming-language communica- Motivated by the expert-like potential of au- tions drive software optimization. In summary, the tonomous agents, we aim to establish language as a proposed paradigm demonstrates how linguistic unifying bridge—utilizing multiple LLM-powered communication facilitates multi-agent collabora- agents with specialized roles for cooperative soft- tion, establishing language as a unifying bridge for ware development through language-based com- autonomous task-solving among LLM agents. munication across different phases; solutions in different phases are derived from their multi-turn 2 Related Work dialogues, whether dealing with text or code. Nev- ertheless, due to the tendency of LLM hallucina- Trained on vast datasets to comprehend and ma- tions (Dhuliawala et al., 2023; Zhang et al., 2023b), nipulate billions of parameters, LLMs have be- the strategy of generating software through com- come pivotal in natural language processing due municative agents could lead to the non-trivial chal- to their seamless integration of extensive knowl- lenge of coding hallucinations, which involves the edge (Brown et al., 2020; Bubeck et al., 2023; generation of source code that is incomplete, unex- Vaswani et al., 2017; Radford et al.; Touvron et al., ecutable, or inaccurate, ultimately failing to fulfill 2023; Wei et al., 2022a; Shanahan et al., 2023; the intended requirements (Agnihotri and Chug, Chen et al., 2021; Brants et al., 2007; Chen et al., 2020). The frequent occurrence of coding halluci- 2021; Ouyang et al., 2022; Yang et al., 2023a; nation in turn reflects the constrained autonomy of Qin et al., 2023b; Kaplan et al., 2020). Further- agents in task completion, inevitably demanding more, LLMs have demonstrated strong role-playing additional manual intervention and thereby hinder- abilities (Li et al., 2023a; Park et al., 2023; Hua ing the immediate usability and reliability of the et al., 2023; Chan et al., 2023; Zhou et al., 2023b; generated software (Ji et al., 2023). Chen et al., 2023b,a; Cohen et al., 2023; Li et al., In this paper, we propose ChatDev (see Figure 1), 2023b). Recent progress, particularly in the field a chat-powered ::: software-::: development framework of autonomous agents (Zhou et al., 2023a; Wang integrating multiple "software agents" for active et al., 2023a; Park et al., 2023; Wang et al., 2023e; involvement in three core phases of the software Richards, 2023; Osika, 2023; Wang et al., 2023d), lifecycle: design, coding, and testing. Technically, is largely attributed to the foundational advances ChatDev uses a chat chain to divide each phase in LLMs. These agents utilize the robust capa- into smaller subtasks further, enabling agents’ bilities of LLMs, displaying remarkable skills in multi-turn communications to cooperatively pro- memory (Park et al., 2023; Sumers et al., 2023), pose and develop solutions (e.g., creative ideas planning (Chen et al., 2023b; Liu et al., 2023) and or source code). The chain-structured workflow tool use (Schick et al., 2023; Cai et al., 2023; Qin guides agents on what to communicate, foster- et al., 2023a; Ruan et al., 2023; Yang et al., 2023b), ing cooperation and smoothly linking natural- and enabling them to reason in complex scenarios (Wei programming-language subtasks to propel problem- et al., 2022b; Zhao et al., 2023; Zhou et al., 2023a; solving. Additionally, to minimize coding halluci- Ma et al., 2023; Zhang et al., 2023a; Wang et al., nations, ChatDev includes an communicative de- 2023b; Ding et al., 2023; Weng, 2023). hallucination mechanism, enabling agents to ac- Software development is a multifaceted and in- tively request more specific details before giving tricate process that requires the cooperation of mul- direct responses. The communication pattern in- tiple experts from various fields (Yilmaz et al., structs agents on how to communicate, enabling 2012; Acuna et al., 2006; Basili, 1989; Sawyer precise information exchange for effective solu- and Guinan, 1998; Banker et al., 1998; France tion optimization while reducing coding hallucina- and Rumpe, 2007), encompassing the require- tions. We built a comprehensive dataset containing ment analysis and system design in natural lan- 15175
解释边界:以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。
核心方法到底怎么运转
输入是一段软件需求,输出是经过设计、补全、审查和测试的代码。聊天链把开发拆成连续子任务:先由 CEO 与 CTO 商定设计,再由 CTO 与程序员完成编码和补全,之后由审查员、测试员分别与程序员讨论问题。每个子任务都有指导者和执行者,双方多轮交流后提取阶段成果,再交给下一环节。因此,系统改变的是工作的分解和交接方式,不是训练了一个新的代码模型。 (原文:PDF p.3, Figure 2; Section 3.1)
指标:输入是一段软件需求,输出是经过设计、补全、审查和测试的代码。聊天链把开发拆成连续子任务:先由 CEO 与 CTO 商定设计,再由 CTO 与程序员完成编码和补全,之后由审查员、测试员分别与程序员讨论问题。每个子任务都有指导者和执行者,双方多轮交流后提取阶段成果,再交给下一环节。因此,系统改变的是工作的分解和交接方式,不是训练了一个新的代码模型。
条件:仅限本地原始PDF的 Figure 2; Section 3.1;不同表格与实验不合并
PDF p.3, Figure 2; Section 3.1 · PDF p.3
Phases Design Coding Testing Code Code Subtasks Design Coding Complete Review Testing CEO CTO CTO Reviewer Tester Instructor Chat Chain {task} {ideas} {code} {code} {code} {code} Assistant CTO Programmer Programmer Programmer Programmer Figure 2: Upon receiving a preliminary task requirement (e.g., “develop a Gomoku game”), these software agents engage in multi-turn communication and perform instruction-following along a chain-structured workflow, collaborating to execute a series of subtasks autonomously to craft a comprehensive solution. guages (Pudlitz et al., 2019; Martín and Abran, forming textual requirements into functional soft- 2015; Nahar et al., 2022), along with system de- ware in a single step remains a significant challenge. velopment and debugging in programming lan- ChatDev thus adopts the core principles of the wa- guages (Gao et al., 2019; Wang et al., 2016; Wan terfall model, using a chat chain (C) with sequential et al., 2022). Numerous studies employ the wa- phases (P), each comprising sequential subtasks terfall model, a particular software development (T ). Specifically, ChatDev segments the software life cycle, to segment the process into discrete development process into three sequential phases: phases (e.g., design, coding, testing) and apply design, coding, and testing. The coding phase is deep learning to improve the effectiveness of cer- further subdivided into subtasks of code writing tain phases (Winkler et al., 2020; Ezzini et al., 2022; and completion, and the testing phase is segmented Thaller et al., 2019; Zhao et al., 2021; Nijkamp into code review (static testing) and system testing et al., 2023; Wan et al., 2018; Wang et al., 2021). (dynamic testing), as illustrated in Figure 2. In every subtask, two agents, each with their own spe- 3 ChatDev cialized roles (e.g., a reviewer skilled at identifying We introduce ChatDev, a :::: chat-powered software- endless loops and a programmer adept in GUI de- development framework that integrates multiple sign), perform the functions of an instructor (I) ::: "software agents" with various social roles (e.g., and an assistant (A). The instructor agent initiates requirements analysts, professional programmers instructions, instructing (→) the discourse toward and test engineers) collaborating in the core phases the completion of the subtask, while the assistant of the software life cycle, see Figure 1. Technically, agent adheres to these instructions and responds to facilitate cooperative communication, ChatDev with (;) appropriate solutions. They engage in introduces chat chain to further break down each a multi-turn dialogue (C), working cooperatively phase into smaller and manageable subtasks, which until they achieve consensus, extracting (τ ) solu- guides multi-turn communications between differ- tions that can range from the text (e.g., defining a ent roles to propose and validate solutions for each software function point) to code (e.g., creating the subtask. In addition, to alleviate unexpected hallu- initial version of source code), ultimately leading cinations, a communicative pattern named commu- to the completion of the subtask. The entire task- nicative dehallucination is devised, wherein agents solving process along the agentic workflow can be request more detailed information before respond- formulated as: ing directly and then continue the next round of communication based on these details. C = ⟨P 1 , P 2 , . . . , P |C| ⟩ i 3.1 Chat Chain P i = ⟨T 1 , T 2 , . . . , T |P | ⟩ (1) Although LLMs show a good understanding of nat- T j = τ C(I, A) ural and programming languages, efficiently trans- C(I, A) = ⟨I → A, A ; I⟩⟲ 15176
解释边界:以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。
先追问再修改,不等于向用户无限提问
通信去幻觉机制在原本的“指令—回答”之间插入澄清过程:执行者临时反转对话角色,先向指导者询问更具体的修改建议,例如外部依赖及类名,再据此改代码。这里通常是智能体之间追问,并非每一步都等人类回答。机制针对模糊指令导致的错漏,但追问本身仍由模型完成,不能视为事实正确性的保证。 (原文:PDF p.5, Section 3.2)
指标:通信去幻觉机制在原本的“指令—回答”之间插入澄清过程:执行者临时反转对话角色,先向指导者询问更具体的修改建议,例如外部依赖及类名,再据此改代码。这里通常是智能体之间追问,并非每一步都等人类回答。机制针对模糊指令导致的错漏,但追问本身仍由模型完成,不能视为事实正确性的保证。
条件:仅限本地原始PDF的 Section 3.2;不同表格与实验不合并
PDF p.5, Section 3.2 · PDF p.5
et al., 2023b). This issue is particularly concern- MetaGPT (Hong et al., 2023) is an advanced frame- ing in software development, where programming work that allocates specific roles to various LLM- languages demand precise syntax—the absence of driven software agents and incorporates standard- even a single line can lead to system failure. We ized operating procedures to enable multi-agent have observed that LLMs often produce coding hal- participation. In each step agents with specific roles lucinations, which encompass potential issues like generate solutions by adhering to static instructions incomplete implementations, unexecutable code, predefined by human experts. and inconsistencies that don’t meet requirements. Coding hallucinations frequently appear when the Datasets Note that, as of now, there isn’t a pub- assistant struggles to precisely follow instructions, licly accessible dataset containing textual descrip- often due to the vagueness and generality of cer- tions of software requirements in the context of tain instructions that require multiple adjustments, agent-driven software development. To this end, making it challenging for agents to achieve full we are actively working towards developing a com- compliance. Inspired by this, we introduce com- prehensive dataset for software requirement de- municative dehallucination, which encourages the scriptions, which we refer to as SRDD (Software assistant to actively seek more detailed suggestions Requirement Description Dataset). Drawing on from the instructor before delivering a formal re- previous work (Li et al., 2023a), we utilize existing sponse. software descriptions as initial examples, which Specifically, a vanilla communication pattern are then further developed through a process that between the assistant and the instructor follows a combines LLM-based automatic generation with straightforward instruction-response format: post-processing refinement guided by humans. As a result, this dataset includes important software ⟨I → A, A ; I⟩⟲ (6) categories from popular platforms such as Ubuntu, Google Play, Microsoft Store, and Apple Store. It In contrast, our communicative dehallucination comprises 1,200 software task prompts that have mechanism features a deliberate "role reversal", been carefully categorized into 5 main areas: Edu- where the assistant takes on an instructor-like role, cation, Work, Life, Game, and Creation. All these proactively seeking more specific information (e.g., areas are further divided into 40 subcategories, and the precise name of an external dependency and each subcategory contains 30 unique task prompts. its related class) before delivering a conclusive re- sponse. After the instructor provides a specific Metrics Evaluating software is also a challenging modification suggestion, the assistant proceeds to task, especially when trying to assess it on a holistic perform precise optimization: level. Under the current limitation of scarce bench- mark resources, traditional function-oriented code ⟨I → A, ⟨A → I, I ; A⟩⟲ , A ; I⟩⟲ (7) generation metrics (e.g., pass@k), cannot seam- Since this mechanism tackles one concrete issue at lessly transfer to a comprehensive evaluation of a time, it requires multiple rounds of communica- entire software systems. The main reason for this tion to optimize various potential problems. The is that it is often impractical to develop manual or communication pattern instructs agents on how to automated test cases for various types of software, communicate, enabling finer-grained information especially those involving complex interfaces, fre- exchange for effective solution optimization, which quent user interactions, or non-deterministic feed- practically aids in reducing coding hallucinations. back. As an initial strategy, we apply three funda- mental and objective dimensions that reflect differ- 4 Evaluation ent aspects of coding hallucinations to evaluate the agent-generated software, and then integrate them Baselines We chose some representative LLM- to facilitate a more holistic evaluation: based software development methods as our base- lines. GPT-Engineer (Osika, 2023) is a fundamen- • Completeness measures the software’s ability to tal single-agent approach in LLM-driven software fulfill code completion in software development, agents with a precise understanding of task require- quantified as the percentage of software with- ments and the application of one-step reasoning, out any "placeholder" code snippets. A higher which highlights its efficiency in generating de- score indicates a higher probability of automated tailed software solutions at the repository level. completion. 15178
解释边界:以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。
实验怎样检验这个方法
实验构建 SRDD 软件需求集,覆盖教育、工作、生活、游戏和创作,包含 1,200 条任务。比较对象包括单代理 GPT-Engineer 和采用静态工作流程的 MetaGPT;完整度关注是否留下占位代码,再结合运行和需求一致性评价,不能直接等同于完整业务测试。 (原文:PDF p.5, experimental setup)
指标:实验构建 SRDD 软件需求集,覆盖教育、工作、生活、游戏和创作,包含 1,200 条任务。比较对象包括单代理 GPT-Engineer 和采用静态工作流程的 MetaGPT;完整度关注是否留下占位代码,再结合运行和需求一致性评价,不能直接等同于完整业务测试。
条件:仅限本地原始PDF的 experimental setup;不同表格与实验不合并
PDF p.5, experimental setup · PDF p.5
et al., 2023b). This issue is particularly concern- MetaGPT (Hong et al., 2023) is an advanced frame- ing in software development, where programming work that allocates specific roles to various LLM- languages demand precise syntax—the absence of driven software agents and incorporates standard- even a single line can lead to system failure. We ized operating procedures to enable multi-agent have observed that LLMs often produce coding hal- participation. In each step agents with specific roles lucinations, which encompass potential issues like generate solutions by adhering to static instructions incomplete implementations, unexecutable code, predefined by human experts. and inconsistencies that don’t meet requirements. Coding hallucinations frequently appear when the Datasets Note that, as of now, there isn’t a pub- assistant struggles to precisely follow instructions, licly accessible dataset containing textual descrip- often due to the vagueness and generality of cer- tions of software requirements in the context of tain instructions that require multiple adjustments, agent-driven software development. To this end, making it challenging for agents to achieve full we are actively working towards developing a com- compliance. Inspired by this, we introduce com- prehensive dataset for software requirement de- municative dehallucination, which encourages the scriptions, which we refer to as SRDD (Software assistant to actively seek more detailed suggestions Requirement Description Dataset). Drawing on from the instructor before delivering a formal re- previous work (Li et al., 2023a), we utilize existing sponse. software descriptions as initial examples, which Specifically, a vanilla communication pattern are then further developed through a process that between the assistant and the instructor follows a combines LLM-based automatic generation with straightforward instruction-response format: post-processing refinement guided by humans. As a result, this dataset includes important software ⟨I → A, A ; I⟩⟲ (6) categories from popular platforms such as Ubuntu, Google Play, Microsoft Store, and Apple Store. It In contrast, our communicative dehallucination comprises 1,200 software task prompts that have mechanism features a deliberate "role reversal", been carefully categorized into 5 main areas: Edu- where the assistant takes on an instructor-like role, cation, Work, Life, Game, and Creation. All these proactively seeking more specific information (e.g., areas are further divided into 40 subcategories, and the precise name of an external dependency and each subcategory contains 30 unique task prompts. its related class) before delivering a conclusive re- sponse. After the instructor provides a specific Metrics Evaluating software is also a challenging modification suggestion, the assistant proceeds to task, especially when trying to assess it on a holistic perform precise optimization: level. Under the current limitation of scarce bench- mark resources, traditional function-oriented code ⟨I → A, ⟨A → I, I ; A⟩⟲ , A ; I⟩⟲ (7) generation metrics (e.g., pass@k), cannot seam- Since this mechanism tackles one concrete issue at lessly transfer to a comprehensive evaluation of a time, it requires multiple rounds of communica- entire software systems. The main reason for this tion to optimize various potential problems. The is that it is often impractical to develop manual or communication pattern instructs agents on how to automated test cases for various types of software, communicate, enabling finer-grained information especially those involving complex interfaces, fre- exchange for effective solution optimization, which quent user interactions, or non-deterministic feed- practically aids in reducing coding hallucinations. back. As an initial strategy, we apply three funda- mental and objective dimensions that reflect differ- 4 Evaluation ent aspects of coding hallucinations to evaluate the agent-generated software, and then integrate them Baselines We chose some representative LLM- to facilitate a more holistic evaluation: based software development methods as our base- lines. GPT-Engineer (Osika, 2023) is a fundamen- • Completeness measures the software’s ability to tal single-agent approach in LLM-driven software fulfill code completion in software development, agents with a precise understanding of task require- quantified as the percentage of software with- ments and the application of one-step reasoning, out any "placeholder" code snippets. A higher which highlights its efficiency in generating de- score indicates a higher probability of automated tailed software solutions at the repository level. completion. 15178
解释边界:以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。
结果说明了什么
在相同底层模型和设置下,ChatDev 的可执行性为 0.8800,GPT-Engineer 为 0.3583,MetaGPT 为 0.4145;综合 Quality 分别为 0.3953、0.1419、0.1523。可执行性指成功编译并可直接运行,不是所有业务功能均正确;Quality 是完整度、可执行性和需求一致性的乘积,也不是人工满意率。成本要比较具体对象:ChatDev 平均耗时 148.2148 秒、使用 22,949.4450 tokens,比 GPT-Engineer 慢且更费 token,但低于 MetaGPT 的 154.0000 秒和 29,278.6510 tokens,不能笼统说它比所有方案都更贵。 (原文:PDF p.6, Table 1; Table 3)
指标:在相同底层模型和设置下,ChatDev 的可执行性为 0.8800,GPT-Engineer 为 0.3583,MetaGPT 为 0.4145;综合 Quality 分别为 0.3953、0.1419、0.1523。可执行性指成功编译并可直接运行,不是所有业务功能均正确;Quality 是完整度、可执行性和需求一致性的乘积,也不是人工满意率。成本要比较具体对象:ChatDev 平均耗时 148.2148 秒、使用 22,949.4450 tokens,比 GPT-Engineer 慢且更费 token,但低于 MetaGPT 的 154.0000 秒和 29,278.6510 tokens,不能笼统说它比所有方案都更贵。
条件:仅限本地原始PDF的 Table 1; Table 3;不同表格与实验不合并
PDF p.6, Table 1; Table 3 · PDF p.6
Method Paradigm Completeness Executability Consistency Quality GPT-Engineer 0.5022† 0.3583† 0.7887† 0.1419† MetaGPT 0.4834† 0.4145† 0.7601† 0.1523† ChatDev 0.5600 0.8800 0.8021 0.3953 Table 1: Overall performance of the LLM-powered software development methods, encompassing both single-agent ( ) and multi-agent ( ) paradigms. Performance metrics are averaged for all tasks. The top scores are in bold, with second-highest underlined. † indicates significant statistical differences (p≤0.05) between a baseline and ours. Method Evaluator Baseline Wins ChatDev Wins Draw Method Duration (s) #Tokens #Files #Lines GPT-4 22.50% 77.08% 00.42% GPT-Engineer 15.6000 7,182.5333 3.9475 70.2041 GPT-Engineer Human 09.18% 90.16% 00.66% MetaGPT 154.0000 29,278.6510 4.4233 153.3000 GPT-4 37.50% 57.08% 05.42% ChatDev 148.2148 22,949.4450 4.3900 144.3450 MetaGPT Human 07.92% 88.00% 04.08% Table 3: Software statistics include Duration (time con- Table 2: Pairwise evaluation results. sumed), #Tokens (number of tokens used), #Files (num- ber of code files generated), and #Lines (total lines of code across all files) in the software generation process. • Executability assesses the software’s ability to run correctly within a compilation environment, quantified as the percentage of software that com- a consensus is reached. We used ChatGPT-3.5 with piles successfully and can run directly. A higher a temperature of 0.2 and integrated Python-3.11.4 score indicates a higher probability of successful for feedback. All baselines in the evaluation share execution. the same hyperparameters and settings for fairness. • Consistency measures how closely the generated software code aligns with the original require- 4.1 Overall Performance ment description, quantified as the cosine dis- tance between the semantic embeddings of the As illustrated in Table 1, ChatDev outperforms textual requirements and the generated software all baseline methods across all metrics, showing code1 . A higher score indicates a greater degree a considerable margin of improvement. Firstly, of consistency with the requirements. the improvement of ChatDev and MetaGPT over • Quality is a comprehensive metric that integrates GPT-Engineer demonstrates that complex tasks are various factors to assess the overall quality of difficult to solve in a single-step solution. There- software, quantified by multiplying2 complete- fore, explicitly decomposing the difficult problem ness, executability, and consistency. A higher into several smaller, more manageable subtasks en- quality score suggests a higher overall satisfac- hances the effectiveness of task completion. Addi- tion with the software generated, implying a tionally, in comparison to MetaGPT, ChatDev sig- lower need for further manual intervention. nificantly raises the Quality from 0.1523 to 0.3953. This advancement is largely attributed to the agents employing a cooperative communication method, Implementation Details We divided software which involves autonomously proposing and con- development into 5 subtasks within 3 phases, as- tinuously refining source code through a blend of signing specific roles like CEO, CTO, programmer, natural and programming languages, as opposed reviewer, and tester. A subtask would terminate to merely delivering responses based on human- and get a conclusion either after two unchanged predefined instructions. The communicative agents code modifications or after 10 rounds of commu- guide each subtask towards integrated and auto- nication. During the code completion, review, and mated solutions, efficiently overcoming the restric- testing, a communicative dehallucination is acti- tions typically linked to manually established op- vated. For ease of identifying solutions, the assis- timization rules, and offering a more versatile and tant begins responses with "<SOLUTION>" when adaptable framework for problem-solving. 1 Comments should be excluded from the code to avoid To further understand user preferences in practi- potential information leakage during evaluations. 2 One can also choose to average the sub-metrics, which cal settings, we use the setting adopted by Li et al. yields similar trends. (2023a), where agent-generated solutions are com- 15179
解释边界:以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。
这篇论文哪里最强,哪里最危险
去掉通信去幻觉后,Quality 从 0.3953 降至 0.3094,可执行性从 0.8800 降至 0.8400,支持这一机制在被测设置中的作用。但仅运行至代码补全阶段时,完整度为 0.6250,高于完整流程的 0.5600;后续审查和测试改善的是整体权衡,不能写成所有指标都会逐步增加。论文展示了自动开发原型的潜力,不足以证明任意大型软件都能无人验收交付。 (原文:PDF p.7, Table 4)
指标:去掉通信去幻觉后,Quality 从 0.3953 降至 0.3094,可执行性从 0.8800 降至 0.8400,支持这一机制在被测设置中的作用。但仅运行至代码补全阶段时,完整度为 0.6250,高于完整流程的 0.5600;后续审查和测试改善的是整体权衡,不能写成所有指标都会逐步增加。论文展示了自动开发原型的潜力,不足以证明任意大型软件都能无人验收交付。
条件:仅限本地原始PDF的 Table 4;不同表格与实验不合并
PDF p.7, Table 4 · PDF p.7
Variant Completeness Executability Consistency Quality 2.24%1.39% Target User 5% % 3.1 6% 2.51 ChatDev 0.5600 0.8800 0.8021 0.3953 5.4 4 Data Management 3. 21.44% 1 % UI & UX ≤Coding 0.4100 0.7700 0.7958 0.2512 5.92% Customization ≤Complete 0.6250 0.7400 0.7978 0.3690 6.93% Performance ≤Review 0.5750 0.8100 0.7980 0.3717 20.55% Integration ≤Testing 0.5600 0.8800 0.8021 0.3953 . 78% 7 Real-Time Update ⧹CDH 0.4700 0.8400 0.7983 0.3094 19.23% Recommendation ⧹Roles 0.5400 0.5800 0.7385 0.2212 Platform Collaboration Table 4: Ablation study on main components or mech- Security & Privacy anisms. ≤ x denotes halting the chat chain after the 57.20% Scalability & Maintenance completion of the x phrase, and ⧹ denotes the removing operation. CDH denotes the communicative dehalluci- Natural-Language nation mechanism. 42.80% Programming-Language pared in pairs by both human participants and the 10 18.53% prevalent GPT-4 model to identify the preferred .19 % Coding one.3 Table 2 shows ChatDev consistently outper- 10.19% Code Complete Code Review forming other baselines, with higher average win 61.09% System Testing rates in both GPT-4 and human evaluations. Furthermore, the software statistics presented in Table 3 indicates that the multi-agent paradigm, Figure 3: The utterance distribution of agent communi- despite being slower and consuming more tokens cations throughout the entire development process. than the single-agent method, yields a greater num- ber of code files and a larger codebase, which may enhance the software’s functionality and integrity. tions among intelligent agents. Meanwhile, elim- Analyzing the dialogues of agents suggests that inating communicative dehallucination results in the multi-agent communication method often leads a decrease across all metrics, indicating its effec- agents to autonomously offer functional enhance- tiveness in addressing coding hallucinations. Most ments (e.g., GUI creation or increasing game diffi- interestingly, the most substantial impact on per- culty), thereby potentially resulting in the incorpo- formance occurs when the roles of all agents are ration of beneficial features that were not explicitly removed from their system prompts. Detailed dia- specified in requirements. Taking all these factors logue analysis shows that assigning a "prefer GUI together, we posit that the fundamental character- design" role to a programmer results in generated istics of multi-agent software development take source code with relevant GUI implementations; in on greater significance, surpassing short-term con- the absence of such role indications, it defaults to cerns like time and economic costs in the current implement unfriend command-line-only programs landscape. only. Likewise, assigning roles such as a "careful reviewer for bug detection" enhances the chances 4.2 Ablation Study of discovering code vulnerabilities; without such This section examines key components or mech- roles, feedback tends to be high-level, leading to anisms within our multi-agent cooperation frame- limited adjustments by the programmer. This find- work by removing particular phases in the chat ing underscores the importance of assigning roles chain, communicative dehallucination, or the roles in eliciting responses from LLMs, underscoring the assigned to all agents in their system prompts. Fig- significant influence of multi-agent cooperation on ure 4 shows that the code complete phase enhances software quality. Completeness, with testing critical for Executabil- ity. Quality steadily rises with each step, suggesting 4.3 Communication Analysis that software development optimization is progres- sively attained through multi-phase communica- Our agent-driven software development paradigm promotes cooperative agents through effective com- 3 For fairness, GPT-4’s evaluation mitigated possible po- munication for automated solution optimization. sitional bias (Wang et al., 2023c), and human experts inde- pendently assessed the task solutions, randomized to prevent Phases in the chat chain have varying levels of en- order bias. gagement in natural and programming languages. 15180
解释边界:以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。
读完后记住这三件事
输入是软件需求,聊天链让角色接力设计、写码和测试。澄清机制在回答前补足实现细节,阶段成果负责交接。结果是可执行性改善,而不是获得无需人工验收的软件工程师。 (原文:PDF p.2, Introduction;PDF p.3, Figure 2; Section 3.1;PDF p.5, Section 3.2;PDF p.5, experimental setup;PDF p.6, Table 1; Table 3;PDF p.7, Table 4)
指标:ChatDev 要解决的是从自然语言需求生成软件时,各阶段互不衔接的问题。模型写得出代码,并不意味着代码完整、能运行或符合需求。作者把设计、编码和测试接成聊天链,让不同角色共同形成和修改同一份软件,而不是各自输出一段互不相干的答案。
条件:仅限本地原始PDF的 Introduction;不同表格与实验不合并
PDF p.2, Introduction · PDF p.2
Gao et al., 2019; Wang et al., 2016). Due to these software requirement descriptions and conducted technical inconsistencies, methods employed in comprehensive analyses. The results indicate that different phases remain isolated until now. Every ChatDev notably improves the quality of software, phase, from data collection and labeling to model leading to improved completeness, executability, training and inference, requires its unique designs, and better consistency with requirements. Further leading to a fragmented and less efficient devel- investigations reveal that natural-language com- opment process in the field (Freeman et al., 2001; munications contribute to comprehensive system Ernst, 2017; Winkler et al., 2020). design, while programming-language communica- Motivated by the expert-like potential of au- tions drive software optimization. In summary, the tonomous agents, we aim to establish language as a proposed paradigm demonstrates how linguistic unifying bridge—utilizing multiple LLM-powered communication facilitates multi-agent collabora- agents with specialized roles for cooperative soft- tion, establishing language as a unifying bridge for ware development through language-based com- autonomous task-solving among LLM agents. munication across different phases; solutions in different phases are derived from their multi-turn 2 Related Work dialogues, whether dealing with text or code. Nev- ertheless, due to the tendency of LLM hallucina- Trained on vast datasets to comprehend and ma- tions (Dhuliawala et al., 2023; Zhang et al., 2023b), nipulate billions of parameters, LLMs have be- the strategy of generating software through com- come pivotal in natural language processing due municative agents could lead to the non-trivial chal- to their seamless integration of extensive knowl- lenge of coding hallucinations, which involves the edge (Brown et al., 2020; Bubeck et al., 2023; generation of source code that is incomplete, unex- Vaswani et al., 2017; Radford et al.; Touvron et al., ecutable, or inaccurate, ultimately failing to fulfill 2023; Wei et al., 2022a; Shanahan et al., 2023; the intended requirements (Agnihotri and Chug, Chen et al., 2021; Brants et al., 2007; Chen et al., 2020). The frequent occurrence of coding halluci- 2021; Ouyang et al., 2022; Yang et al., 2023a; nation in turn reflects the constrained autonomy of Qin et al., 2023b; Kaplan et al., 2020). Further- agents in task completion, inevitably demanding more, LLMs have demonstrated strong role-playing additional manual intervention and thereby hinder- abilities (Li et al., 2023a; Park et al., 2023; Hua ing the immediate usability and reliability of the et al., 2023; Chan et al., 2023; Zhou et al., 2023b; generated software (Ji et al., 2023). Chen et al., 2023b,a; Cohen et al., 2023; Li et al., In this paper, we propose ChatDev (see Figure 1), 2023b). Recent progress, particularly in the field a chat-powered ::: software-::: development framework of autonomous agents (Zhou et al., 2023a; Wang integrating multiple "software agents" for active et al., 2023a; Park et al., 2023; Wang et al., 2023e; involvement in three core phases of the software Richards, 2023; Osika, 2023; Wang et al., 2023d), lifecycle: design, coding, and testing. Technically, is largely attributed to the foundational advances ChatDev uses a chat chain to divide each phase in LLMs. These agents utilize the robust capa- into smaller subtasks further, enabling agents’ bilities of LLMs, displaying remarkable skills in multi-turn communications to cooperatively pro- memory (Park et al., 2023; Sumers et al., 2023), pose and develop solutions (e.g., creative ideas planning (Chen et al., 2023b; Liu et al., 2023) and or source code). The chain-structured workflow tool use (Schick et al., 2023; Cai et al., 2023; Qin guides agents on what to communicate, foster- et al., 2023a; Ruan et al., 2023; Yang et al., 2023b), ing cooperation and smoothly linking natural- and enabling them to reason in complex scenarios (Wei programming-language subtasks to propel problem- et al., 2022b; Zhao et al., 2023; Zhou et al., 2023a; solving. Additionally, to minimize coding halluci- Ma et al., 2023; Zhang et al., 2023a; Wang et al., nations, ChatDev includes an communicative de- 2023b; Ding et al., 2023; Weng, 2023). hallucination mechanism, enabling agents to ac- Software development is a multifaceted and in- tively request more specific details before giving tricate process that requires the cooperation of mul- direct responses. The communication pattern in- tiple experts from various fields (Yilmaz et al., structs agents on how to communicate, enabling 2012; Acuna et al., 2006; Basili, 1989; Sawyer precise information exchange for effective solu- and Guinan, 1998; Banker et al., 1998; France tion optimization while reducing coding hallucina- and Rumpe, 2007), encompassing the require- tions. We built a comprehensive dataset containing ment analysis and system design in natural lan- 15175
解释边界:以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。
指标:输入是一段软件需求,输出是经过设计、补全、审查和测试的代码。聊天链把开发拆成连续子任务:先由 CEO 与 CTO 商定设计,再由 CTO 与程序员完成编码和补全,之后由审查员、测试员分别与程序员讨论问题。每个子任务都有指导者和执行者,双方多轮交流后提取阶段成果,再交给下一环节。因此,系统改变的是工作的分解和交接方式,不是训练了一个新的代码模型。
条件:仅限本地原始PDF的 Figure 2; Section 3.1;不同表格与实验不合并
PDF p.3, Figure 2; Section 3.1 · PDF p.3
Phases Design Coding Testing Code Code Subtasks Design Coding Complete Review Testing CEO CTO CTO Reviewer Tester Instructor Chat Chain {task} {ideas} {code} {code} {code} {code} Assistant CTO Programmer Programmer Programmer Programmer Figure 2: Upon receiving a preliminary task requirement (e.g., “develop a Gomoku game”), these software agents engage in multi-turn communication and perform instruction-following along a chain-structured workflow, collaborating to execute a series of subtasks autonomously to craft a comprehensive solution. guages (Pudlitz et al., 2019; Martín and Abran, forming textual requirements into functional soft- 2015; Nahar et al., 2022), along with system de- ware in a single step remains a significant challenge. velopment and debugging in programming lan- ChatDev thus adopts the core principles of the wa- guages (Gao et al., 2019; Wang et al., 2016; Wan terfall model, using a chat chain (C) with sequential et al., 2022). Numerous studies employ the wa- phases (P), each comprising sequential subtasks terfall model, a particular software development (T ). Specifically, ChatDev segments the software life cycle, to segment the process into discrete development process into three sequential phases: phases (e.g., design, coding, testing) and apply design, coding, and testing. The coding phase is deep learning to improve the effectiveness of cer- further subdivided into subtasks of code writing tain phases (Winkler et al., 2020; Ezzini et al., 2022; and completion, and the testing phase is segmented Thaller et al., 2019; Zhao et al., 2021; Nijkamp into code review (static testing) and system testing et al., 2023; Wan et al., 2018; Wang et al., 2021). (dynamic testing), as illustrated in Figure 2. In every subtask, two agents, each with their own spe- 3 ChatDev cialized roles (e.g., a reviewer skilled at identifying We introduce ChatDev, a :::: chat-powered software- endless loops and a programmer adept in GUI de- development framework that integrates multiple sign), perform the functions of an instructor (I) ::: "software agents" with various social roles (e.g., and an assistant (A). The instructor agent initiates requirements analysts, professional programmers instructions, instructing (→) the discourse toward and test engineers) collaborating in the core phases the completion of the subtask, while the assistant of the software life cycle, see Figure 1. Technically, agent adheres to these instructions and responds to facilitate cooperative communication, ChatDev with (;) appropriate solutions. They engage in introduces chat chain to further break down each a multi-turn dialogue (C), working cooperatively phase into smaller and manageable subtasks, which until they achieve consensus, extracting (τ ) solu- guides multi-turn communications between differ- tions that can range from the text (e.g., defining a ent roles to propose and validate solutions for each software function point) to code (e.g., creating the subtask. In addition, to alleviate unexpected hallu- initial version of source code), ultimately leading cinations, a communicative pattern named commu- to the completion of the subtask. The entire task- nicative dehallucination is devised, wherein agents solving process along the agentic workflow can be request more detailed information before respond- formulated as: ing directly and then continue the next round of communication based on these details. C = ⟨P 1 , P 2 , . . . , P |C| ⟩ i 3.1 Chat Chain P i = ⟨T 1 , T 2 , . . . , T |P | ⟩ (1) Although LLMs show a good understanding of nat- T j = τ C(I, A) ural and programming languages, efficiently trans- C(I, A) = ⟨I → A, A ; I⟩⟲ 15176
解释边界:以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。
指标:通信去幻觉机制在原本的“指令—回答”之间插入澄清过程:执行者临时反转对话角色,先向指导者询问更具体的修改建议,例如外部依赖及类名,再据此改代码。这里通常是智能体之间追问,并非每一步都等人类回答。机制针对模糊指令导致的错漏,但追问本身仍由模型完成,不能视为事实正确性的保证。
条件:仅限本地原始PDF的 Section 3.2;不同表格与实验不合并
PDF p.5, Section 3.2 · PDF p.5
et al., 2023b). This issue is particularly concern- MetaGPT (Hong et al., 2023) is an advanced frame- ing in software development, where programming work that allocates specific roles to various LLM- languages demand precise syntax—the absence of driven software agents and incorporates standard- even a single line can lead to system failure. We ized operating procedures to enable multi-agent have observed that LLMs often produce coding hal- participation. In each step agents with specific roles lucinations, which encompass potential issues like generate solutions by adhering to static instructions incomplete implementations, unexecutable code, predefined by human experts. and inconsistencies that don’t meet requirements. Coding hallucinations frequently appear when the Datasets Note that, as of now, there isn’t a pub- assistant struggles to precisely follow instructions, licly accessible dataset containing textual descrip- often due to the vagueness and generality of cer- tions of software requirements in the context of tain instructions that require multiple adjustments, agent-driven software development. To this end, making it challenging for agents to achieve full we are actively working towards developing a com- compliance. Inspired by this, we introduce com- prehensive dataset for software requirement de- municative dehallucination, which encourages the scriptions, which we refer to as SRDD (Software assistant to actively seek more detailed suggestions Requirement Description Dataset). Drawing on from the instructor before delivering a formal re- previous work (Li et al., 2023a), we utilize existing sponse. software descriptions as initial examples, which Specifically, a vanilla communication pattern are then further developed through a process that between the assistant and the instructor follows a combines LLM-based automatic generation with straightforward instruction-response format: post-processing refinement guided by humans. As a result, this dataset includes important software ⟨I → A, A ; I⟩⟲ (6) categories from popular platforms such as Ubuntu, Google Play, Microsoft Store, and Apple Store. It In contrast, our communicative dehallucination comprises 1,200 software task prompts that have mechanism features a deliberate "role reversal", been carefully categorized into 5 main areas: Edu- where the assistant takes on an instructor-like role, cation, Work, Life, Game, and Creation. All these proactively seeking more specific information (e.g., areas are further divided into 40 subcategories, and the precise name of an external dependency and each subcategory contains 30 unique task prompts. its related class) before delivering a conclusive re- sponse. After the instructor provides a specific Metrics Evaluating software is also a challenging modification suggestion, the assistant proceeds to task, especially when trying to assess it on a holistic perform precise optimization: level. Under the current limitation of scarce bench- mark resources, traditional function-oriented code ⟨I → A, ⟨A → I, I ; A⟩⟲ , A ; I⟩⟲ (7) generation metrics (e.g., pass@k), cannot seam- Since this mechanism tackles one concrete issue at lessly transfer to a comprehensive evaluation of a time, it requires multiple rounds of communica- entire software systems. The main reason for this tion to optimize various potential problems. The is that it is often impractical to develop manual or communication pattern instructs agents on how to automated test cases for various types of software, communicate, enabling finer-grained information especially those involving complex interfaces, fre- exchange for effective solution optimization, which quent user interactions, or non-deterministic feed- practically aids in reducing coding hallucinations. back. As an initial strategy, we apply three funda- mental and objective dimensions that reflect differ- 4 Evaluation ent aspects of coding hallucinations to evaluate the agent-generated software, and then integrate them Baselines We chose some representative LLM- to facilitate a more holistic evaluation: based software development methods as our base- lines. GPT-Engineer (Osika, 2023) is a fundamen- • Completeness measures the software’s ability to tal single-agent approach in LLM-driven software fulfill code completion in software development, agents with a precise understanding of task require- quantified as the percentage of software with- ments and the application of one-step reasoning, out any "placeholder" code snippets. A higher which highlights its efficiency in generating de- score indicates a higher probability of automated tailed software solutions at the repository level. completion. 15178
解释边界:以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。
指标:实验构建 SRDD 软件需求集,覆盖教育、工作、生活、游戏和创作,包含 1,200 条任务。比较对象包括单代理 GPT-Engineer 和采用静态工作流程的 MetaGPT;完整度关注是否留下占位代码,再结合运行和需求一致性评价,不能直接等同于完整业务测试。
条件:仅限本地原始PDF的 experimental setup;不同表格与实验不合并
PDF p.5, experimental setup · PDF p.5
et al., 2023b). This issue is particularly concern- MetaGPT (Hong et al., 2023) is an advanced frame- ing in software development, where programming work that allocates specific roles to various LLM- languages demand precise syntax—the absence of driven software agents and incorporates standard- even a single line can lead to system failure. We ized operating procedures to enable multi-agent have observed that LLMs often produce coding hal- participation. In each step agents with specific roles lucinations, which encompass potential issues like generate solutions by adhering to static instructions incomplete implementations, unexecutable code, predefined by human experts. and inconsistencies that don’t meet requirements. Coding hallucinations frequently appear when the Datasets Note that, as of now, there isn’t a pub- assistant struggles to precisely follow instructions, licly accessible dataset containing textual descrip- often due to the vagueness and generality of cer- tions of software requirements in the context of tain instructions that require multiple adjustments, agent-driven software development. To this end, making it challenging for agents to achieve full we are actively working towards developing a com- compliance. Inspired by this, we introduce com- prehensive dataset for software requirement de- municative dehallucination, which encourages the scriptions, which we refer to as SRDD (Software assistant to actively seek more detailed suggestions Requirement Description Dataset). Drawing on from the instructor before delivering a formal re- previous work (Li et al., 2023a), we utilize existing sponse. software descriptions as initial examples, which Specifically, a vanilla communication pattern are then further developed through a process that between the assistant and the instructor follows a combines LLM-based automatic generation with straightforward instruction-response format: post-processing refinement guided by humans. As a result, this dataset includes important software ⟨I → A, A ; I⟩⟲ (6) categories from popular platforms such as Ubuntu, Google Play, Microsoft Store, and Apple Store. It In contrast, our communicative dehallucination comprises 1,200 software task prompts that have mechanism features a deliberate "role reversal", been carefully categorized into 5 main areas: Edu- where the assistant takes on an instructor-like role, cation, Work, Life, Game, and Creation. All these proactively seeking more specific information (e.g., areas are further divided into 40 subcategories, and the precise name of an external dependency and each subcategory contains 30 unique task prompts. its related class) before delivering a conclusive re- sponse. After the instructor provides a specific Metrics Evaluating software is also a challenging modification suggestion, the assistant proceeds to task, especially when trying to assess it on a holistic perform precise optimization: level. Under the current limitation of scarce bench- mark resources, traditional function-oriented code ⟨I → A, ⟨A → I, I ; A⟩⟲ , A ; I⟩⟲ (7) generation metrics (e.g., pass@k), cannot seam- Since this mechanism tackles one concrete issue at lessly transfer to a comprehensive evaluation of a time, it requires multiple rounds of communica- entire software systems. The main reason for this tion to optimize various potential problems. The is that it is often impractical to develop manual or communication pattern instructs agents on how to automated test cases for various types of software, communicate, enabling finer-grained information especially those involving complex interfaces, fre- exchange for effective solution optimization, which quent user interactions, or non-deterministic feed- practically aids in reducing coding hallucinations. back. As an initial strategy, we apply three funda- mental and objective dimensions that reflect differ- 4 Evaluation ent aspects of coding hallucinations to evaluate the agent-generated software, and then integrate them Baselines We chose some representative LLM- to facilitate a more holistic evaluation: based software development methods as our base- lines. GPT-Engineer (Osika, 2023) is a fundamen- • Completeness measures the software’s ability to tal single-agent approach in LLM-driven software fulfill code completion in software development, agents with a precise understanding of task require- quantified as the percentage of software with- ments and the application of one-step reasoning, out any "placeholder" code snippets. A higher which highlights its efficiency in generating de- score indicates a higher probability of automated tailed software solutions at the repository level. completion. 15178
解释边界:以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。
指标:在相同底层模型和设置下,ChatDev 的可执行性为 0.8800,GPT-Engineer 为 0.3583,MetaGPT 为 0.4145;综合 Quality 分别为 0.3953、0.1419、0.1523。可执行性指成功编译并可直接运行,不是所有业务功能均正确;Quality 是完整度、可执行性和需求一致性的乘积,也不是人工满意率。成本要比较具体对象:ChatDev 平均耗时 148.2148 秒、使用 22,949.4450 tokens,比 GPT-Engineer 慢且更费 token,但低于 MetaGPT 的 154.0000 秒和 29,278.6510 tokens,不能笼统说它比所有方案都更贵。
条件:仅限本地原始PDF的 Table 1; Table 3;不同表格与实验不合并
PDF p.6, Table 1; Table 3 · PDF p.6
Method Paradigm Completeness Executability Consistency Quality GPT-Engineer 0.5022† 0.3583† 0.7887† 0.1419† MetaGPT 0.4834† 0.4145† 0.7601† 0.1523† ChatDev 0.5600 0.8800 0.8021 0.3953 Table 1: Overall performance of the LLM-powered software development methods, encompassing both single-agent ( ) and multi-agent ( ) paradigms. Performance metrics are averaged for all tasks. The top scores are in bold, with second-highest underlined. † indicates significant statistical differences (p≤0.05) between a baseline and ours. Method Evaluator Baseline Wins ChatDev Wins Draw Method Duration (s) #Tokens #Files #Lines GPT-4 22.50% 77.08% 00.42% GPT-Engineer 15.6000 7,182.5333 3.9475 70.2041 GPT-Engineer Human 09.18% 90.16% 00.66% MetaGPT 154.0000 29,278.6510 4.4233 153.3000 GPT-4 37.50% 57.08% 05.42% ChatDev 148.2148 22,949.4450 4.3900 144.3450 MetaGPT Human 07.92% 88.00% 04.08% Table 3: Software statistics include Duration (time con- Table 2: Pairwise evaluation results. sumed), #Tokens (number of tokens used), #Files (num- ber of code files generated), and #Lines (total lines of code across all files) in the software generation process. • Executability assesses the software’s ability to run correctly within a compilation environment, quantified as the percentage of software that com- a consensus is reached. We used ChatGPT-3.5 with piles successfully and can run directly. A higher a temperature of 0.2 and integrated Python-3.11.4 score indicates a higher probability of successful for feedback. All baselines in the evaluation share execution. the same hyperparameters and settings for fairness. • Consistency measures how closely the generated software code aligns with the original require- 4.1 Overall Performance ment description, quantified as the cosine dis- tance between the semantic embeddings of the As illustrated in Table 1, ChatDev outperforms textual requirements and the generated software all baseline methods across all metrics, showing code1 . A higher score indicates a greater degree a considerable margin of improvement. Firstly, of consistency with the requirements. the improvement of ChatDev and MetaGPT over • Quality is a comprehensive metric that integrates GPT-Engineer demonstrates that complex tasks are various factors to assess the overall quality of difficult to solve in a single-step solution. There- software, quantified by multiplying2 complete- fore, explicitly decomposing the difficult problem ness, executability, and consistency. A higher into several smaller, more manageable subtasks en- quality score suggests a higher overall satisfac- hances the effectiveness of task completion. Addi- tion with the software generated, implying a tionally, in comparison to MetaGPT, ChatDev sig- lower need for further manual intervention. nificantly raises the Quality from 0.1523 to 0.3953. This advancement is largely attributed to the agents employing a cooperative communication method, Implementation Details We divided software which involves autonomously proposing and con- development into 5 subtasks within 3 phases, as- tinuously refining source code through a blend of signing specific roles like CEO, CTO, programmer, natural and programming languages, as opposed reviewer, and tester. A subtask would terminate to merely delivering responses based on human- and get a conclusion either after two unchanged predefined instructions. The communicative agents code modifications or after 10 rounds of commu- guide each subtask towards integrated and auto- nication. During the code completion, review, and mated solutions, efficiently overcoming the restric- testing, a communicative dehallucination is acti- tions typically linked to manually established op- vated. For ease of identifying solutions, the assis- timization rules, and offering a more versatile and tant begins responses with "<SOLUTION>" when adaptable framework for problem-solving. 1 Comments should be excluded from the code to avoid To further understand user preferences in practi- potential information leakage during evaluations. 2 One can also choose to average the sub-metrics, which cal settings, we use the setting adopted by Li et al. yields similar trends. (2023a), where agent-generated solutions are com- 15179
解释边界:以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。
指标:去掉通信去幻觉后,Quality 从 0.3953 降至 0.3094,可执行性从 0.8800 降至 0.8400,支持这一机制在被测设置中的作用。但仅运行至代码补全阶段时,完整度为 0.6250,高于完整流程的 0.5600;后续审查和测试改善的是整体权衡,不能写成所有指标都会逐步增加。论文展示了自动开发原型的潜力,不足以证明任意大型软件都能无人验收交付。
条件:仅限本地原始PDF的 Table 4;不同表格与实验不合并
PDF p.7, Table 4 · PDF p.7
Variant Completeness Executability Consistency Quality 2.24%1.39% Target User 5% % 3.1 6% 2.51 ChatDev 0.5600 0.8800 0.8021 0.3953 5.4 4 Data Management 3. 21.44% 1 % UI & UX ≤Coding 0.4100 0.7700 0.7958 0.2512 5.92% Customization ≤Complete 0.6250 0.7400 0.7978 0.3690 6.93% Performance ≤Review 0.5750 0.8100 0.7980 0.3717 20.55% Integration ≤Testing 0.5600 0.8800 0.8021 0.3953 . 78% 7 Real-Time Update ⧹CDH 0.4700 0.8400 0.7983 0.3094 19.23% Recommendation ⧹Roles 0.5400 0.5800 0.7385 0.2212 Platform Collaboration Table 4: Ablation study on main components or mech- Security & Privacy anisms. ≤ x denotes halting the chat chain after the 57.20% Scalability & Maintenance completion of the x phrase, and ⧹ denotes the removing operation. CDH denotes the communicative dehalluci- Natural-Language nation mechanism. 42.80% Programming-Language pared in pairs by both human participants and the 10 18.53% prevalent GPT-4 model to identify the preferred .19 % Coding one.3 Table 2 shows ChatDev consistently outper- 10.19% Code Complete Code Review forming other baselines, with higher average win 61.09% System Testing rates in both GPT-4 and human evaluations. Furthermore, the software statistics presented in Table 3 indicates that the multi-agent paradigm, Figure 3: The utterance distribution of agent communi- despite being slower and consuming more tokens cations throughout the entire development process. than the single-agent method, yields a greater num- ber of code files and a larger codebase, which may enhance the software’s functionality and integrity. tions among intelligent agents. Meanwhile, elim- Analyzing the dialogues of agents suggests that inating communicative dehallucination results in the multi-agent communication method often leads a decrease across all metrics, indicating its effec- agents to autonomously offer functional enhance- tiveness in addressing coding hallucinations. Most ments (e.g., GUI creation or increasing game diffi- interestingly, the most substantial impact on per- culty), thereby potentially resulting in the incorpo- formance occurs when the roles of all agents are ration of beneficial features that were not explicitly removed from their system prompts. Detailed dia- specified in requirements. Taking all these factors logue analysis shows that assigning a "prefer GUI together, we posit that the fundamental character- design" role to a programmer results in generated istics of multi-agent software development take source code with relevant GUI implementations; in on greater significance, surpassing short-term con- the absence of such role indications, it defaults to cerns like time and economic costs in the current implement unfriend command-line-only programs landscape. only. Likewise, assigning roles such as a "careful reviewer for bug detection" enhances the chances 4.2 Ablation Study of discovering code vulnerabilities; without such This section examines key components or mech- roles, feedback tends to be high-level, leading to anisms within our multi-agent cooperation frame- limited adjustments by the programmer. This find- work by removing particular phases in the chat ing underscores the importance of assigning roles chain, communicative dehallucination, or the roles in eliciting responses from LLMs, underscoring the assigned to all agents in their system prompts. Fig- significant influence of multi-agent cooperation on ure 4 shows that the code complete phase enhances software quality. Completeness, with testing critical for Executabil- ity. Quality steadily rises with each step, suggesting 4.3 Communication Analysis that software development optimization is progres- sively attained through multi-phase communica- Our agent-driven software development paradigm promotes cooperative agents through effective com- 3 For fairness, GPT-4’s evaluation mitigated possible po- munication for automated solution optimization. sitional bias (Wang et al., 2023c), and human experts inde- pendently assessed the task solutions, randomized to prevent Phases in the chat chain have varying levels of en- order bias. gagement in natural and programming languages. 15180
解释边界:以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。
代码从哪里读
原始来源入口。已访问官方仓库:默认分支已变为新版平台,论文对应的旧版在 chatdev1.0 分支。先按旧版说明查看聊天链与角色配置,避免把新系统当作论文实现;本轮未运行。