EUVIMEDObjevte EUVIMED
Crossref

Self-Collaboration Code Generation via ChatGPT

Yihong Dong, Xue Jiang, Zhi Jin, Ge Li

ACM Transactions on Software Engineering and Methodology · 2024-09-30 · 33 (7) · 1-38

DOI: 10.1145/3672459 ↗

At a glance

Journal article in ACM Transactions on Software Engineering and Methodology, published online on 2024-09-27. Written by Yihong Dong and 3 co-authors. Cited 243 times so far (Crossref); 65 references. Funded by: National Natural Science Foundation of China, Key Program of Hubei.

AbstraktBibliografické údajeCiteRelated studies

Abstract (original language)

Although large language models (LLMs) have demonstrated remarkable code-generation ability, they still struggle with complex tasks. In real-world software development, humans usually tackle complex tasks through collaborative teamwork, a strategy that significantly controls development complexity and enhances software quality. Inspired by this, we present a self-collaboration framework for code generation employing LLMs, exemplified by ChatGPT. Specifically, through role instructions, (1) Multiple LLM agents act as distinct “experts,” each responsible for a specific subtask within a complex task; (2) Specify the way to collaborate and interact, so that different roles form a virtual team to facilitate each other’s work, ultimately the virtual team addresses code generation tasks collaboratively without the need for human intervention. To effectively organize and manage this virtual team, we incorporate software-development methodology into the framework. Thus, we assemble an elementary team consisting of three LLM roles (i.e., analyst, coder, and tester) responsible for software development’s analysis, coding, and testing stages. We conduct comprehensive experiments on various code-generation benchmarks. Experimental results indicate that self-collaboration code generation relatively improves 29.9–47.1% Pass@1 compared to the base LLM agent. Moreover, we showcase that self-collaboration could potentially enable LLMs to efficiently handle complex repository-level tasks that are not readily solved by the single LLM agent.

Funding

  • National Natural Science Foundation of China
  • Key Program of Hubei

Cite

APA

Dong, Y., Jiang, X., Jin, Z., & Li, G. (2024). Self-Collaboration Code Generation via ChatGPT. ACM Transactions on Software Engineering and Methodology, 33(7), 1-38. https://doi.org/10.1145/3672459

Vancouver

Dong Y, Jiang X, Jin Z, Li G. Self-Collaboration Code Generation via ChatGPT. ACM Transactions on Software Engineering and Methodology. 2024;33(7):1-38. doi:10.1145/3672459

BibTeX
@article{Dong2024,
  author = {Dong, Yihong and Jiang, Xue and Jin, Zhi and Li, Ge},
  title = {Self-Collaboration Code Generation via ChatGPT},
  journal = {ACM Transactions on Software Engineering and Methodology},
  year = {2024},
  volume = {33},
  number = {7},
  pages = {1--38},
  doi = {10.1145/3672459}
}
Start for free →