Skip to main content
QUICK REVIEW

[Paper Review] ChatDev: Communicative Agents for Software Development

Chen Qian, Liu, Wei|arXiv (Cornell University)|Jul 16, 2023
Topic ModelingComputer Science69 citations
TL;DR

ChatDev uses a multi-agent, chat-based framework driven by LLMs to perform end-to-end software development (design, code, test, document) in a waterfall-like process, achieving executable results at low cost and time. It introduces a chat-chain with role-based agents and a thought-instruction mechanism to mitigate code hallucinations.

ABSTRACT

Software development is a complex task that necessitates cooperation among multiple members with diverse skills. Numerous studies used deep learning to improve specific phases in a waterfall model, such as design, coding, and testing. However, the deep learning model in each phase requires unique designs, leading to technical inconsistencies across various phases, which results in a fragmented and ineffective development process. In this paper, we introduce ChatDev, a chat-powered software development framework in which specialized agents driven by large language models (LLMs) are guided in what to communicate (via chat chain) and how to communicate (via communicative dehallucination). These agents actively contribute to the design, coding, and testing phases through unified language-based communication, with solutions derived from their multi-turn dialogues. We found their utilization of natural language is advantageous for system design, and communicating in programming language proves helpful in debugging. This paradigm demonstrates how linguistic communication facilitates multi-agent collaboration, establishing language as a unifying bridge for autonomous task-solving among LLM agents. The code and data are available at https://github.com/OpenBMB/ChatDev.

Motivation & Objective

  • Motivate and address the challenges of generating end-to-end software with a single pass from LLMs due to code hallucinations and lack of cross-examination.
  • Propose ChatDev, a virtual chat-powered company that unifies designing, coding, testing, and documenting via structured chat chains.
  • Enable granular subtask collaboration among specialized agents to improve solution quality and debuggability.
  • Introduce memory streams and thought/self-reflection mechanisms to guide and audit agent decisions within chats.

Proposed method

  • Propose a four-phase waterfall-inspired framework: designing, coding, testing, and documenting.
  • Use phase-specific chat chains where two-role interactions decompose each phase into atomic subtasks.
  • Implement role specialization, memory streams, and self-reflection to maintain context and encourage consensus.
  • In coding/testing, employ a thought-instruction mechanism (role swap) to expose unimplemented parts or bugs and reduce hallucinations.
  • Utilize object-oriented programming with a version-evolution scheme to manage code visibility and curb hallucinations.
  • Evaluate via experiments using ChatGPT-turbo-16k to simulate multi-agent development across 70 tasks, measuring time, cost, and output quality.
  • Collect statistics on code files, assets, documents, lines of code, dependencies, and version updates; analyze dialogue tokens and success rates.

Experimental results

Research questions

  • RQ1Can a chat-based, multi-agent framework powered by LLMs perform end-to-end software development across designing, coding, testing, and documenting phases?
  • RQ2How do role specialization, memory, and self-reflection affect task decomposition, code quality, and hallucination reduction?
  • RQ3What are the practical time and cost characteristics of automatic software production with ChatDev across diverse tasks?
  • RQ4What types of issues arise during reviewer-programmer and tester-programmer dialogues, and can thought-instruction mitigate them?
  • RQ5How does the proposed framework compare to traditional development in terms of feasibility and efficiency?

Key findings

  • ChatDev produced executable software for most tasks, with average production time of 409.84 seconds and average cost of $0.2967 per software.
  • Across 70 tasks, the software generated included an average of 17.04 files, with 86.66% executing flawlessly and 13.33% experiencing failures largely due to API token limits or external dependencies.
  • The average software included 2 to 8 code files (avg 4.26), about 4–5 document files (avg 4.04), and 1–5 environment dependencies (avg 2.90).
  • Average lines of source code per software were 131.61 (range 39–359), and average lines in user manuals were 53.96 (range 31–232).
  • Version updates averaged 13.23, reflecting iterative refinement to mitigate code hallucinations during completion, coding, and testing.
  • Dialogue analysis showed common reviewer issues (e.g., unimplemented methods 34.85%, missing imports 19.70%) and common tester issues (module not found 45.76%), with thought-instruction addressing many such problems.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.