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.
翻译:软件工程是一个以复杂决策过程为特征的领域,往往依赖于微妙的直觉与协商。近期深度学习的进展已开始通过贯穿软件开发各阶段精心设计的方案,逐步革新软件工程实践。本文提出一种创新范式,利用大型语言模型(LLMs)覆盖整个软件开发流程,通过自然语言沟通精简并统一关键过程,从而消除各阶段对专用模型的需求。该范式的核心为ChatDev——一个基于聊天的虚拟软件公司,它模拟经典的瀑布模型,将开发过程细致划分为四个有序阶段:设计、编码、测试与文档编制。每个阶段均由程序员、代码审查员和测试工程师等智能体团队参与,促进协作对话并保障工作流顺畅运行。聊天链作为协调机制,将各阶段拆解为原子化子任务,支持双角色协作,通过上下文感知的沟通提出并验证解决方案,从而高效化解特定子任务。ChatDev的实证分析揭示了其在软件生成中的卓越效能:能在不到七分钟内完成完整软件开发流程,且成本不足一美元。该框架不仅能识别并缓解潜在漏洞,还能在保持高效与经济性的同时纠正可能的幻觉问题。ChatDev的潜力为LLMs融入软件开发领域开辟了全新可能。