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整合到软件开发领域开辟了新的可能性。