Software engineering is a domain characterized by intricate decision-making processes, often relying on nuanced intuition and consultation. Recent advancements in deep learning have started to revolutionize software engineering practices through elaborate designs implemented at various stages of software development. In this paper, we present an innovative paradigm that leverages large language models (LLMs) throughout the entire software development process, streamlining and unifying key processes through natural language communication, thereby eliminating the need for specialized models at each phase. At the core of this paradigm lies ChatDev, a virtual chat-powered software development company that mirrors the established waterfall model, meticulously dividing the development process into four distinct chronological stages: designing, coding, testing, and documenting. Each stage engages a team of agents, such as programmers, code reviewers, and test engineers, fostering collaborative dialogue and facilitating a seamless workflow. The chat chain acts as a facilitator, breaking down each stage into atomic subtasks. This enables dual roles, allowing for proposing and validating solutions through context-aware communication, leading to efficient resolution of specific subtasks. The instrumental analysis of ChatDev highlights its remarkable efficacy in software generation, enabling the completion of the entire software development process in under seven minutes at a cost of less than one dollar. It not only identifies and alleviates potential vulnerabilities but also rectifies potential hallucinations while maintaining commendable efficiency and cost-effectiveness. The potential of ChatDev unveils fresh possibilities for integrating LLMs into the realm of software development.
翻译:软件工程是一个以复杂决策过程为特征的领域,往往依赖细微的直觉判断与多方咨询。近年来深度学习的进展通过在各软件开发阶段设计精妙的方案,开始从根本上革新软件工程实践。本文提出了一种创新范式,该范式利用大型语言模型贯穿整个软件开发流程,通过自然语言通信统一并精简关键环节,从而消除了在各阶段使用专用模型的必要性。该范式的核心在于ChatDev——一个基于虚拟聊天的软件公司,它模拟经典瀑布模型,严谨地将开发过程划分为四个连续阶段:设计、编码、测试与文档编写。每个阶段由一组智能体(如程序员、代码评审员与测试工程师)协同参与,通过协作对话实现无缝工作流。聊天链作为协调工具,将每个阶段分解为原子化子任务,支持双角色协作机制,使智能体能够通过情境感知通信提出并验证方案,从而高效解决具体子任务。对ChatDev的实证分析凸显了其在软件生成中的显著效能:整个软件开发流程可在七分钟内完成,且成本不足一美元。它不仅能够识别并消除潜在漏洞,还能纠正可能出现的幻觉,同时保持卓越的效率与经济性。ChatDev的潜力揭示了将大型语言模型融入软件开发领域的新可能。