CodeS: Natural Language to Code Repository via Multi-Layer Sketch

Daoguang Zan, Ailun Yu, Wei Liu, Dong Chen, Bo Shen +9 more
3/25/2024
cs.CLcs.AIcs.SE

No official code found. Best implementation: hiyouga/LlamaFactory (72,841 stars, Apache-2.0, last commit 2026-04-29). 1 more below.

Abstract

The impressive performance of large language models (LLMs) on code-related tasks has shown the potential of fully automated software development. In light of this, we introduce a new software engineering task, namely Natural Language to code Repository (NL2Repo). This task aims to generate an entire code repository from its natural language requirements. To address this task, we propose a simple yet effective framework CodeS, which decomposes NL2Repo into multiple sub-tasks by a multi-layer sketch. Specifically, CodeS includes three modules: RepoSketcher, FileSketcher, and SketchFiller. RepoSketcher first generates a repository's directory structure for given requirements; FileSketcher then generates a file sketch for each file in the generated structure; SketchFiller finally fills in the details for each function in the generated file sketch. To rigorously assess CodeS on the NL2Repo task, we carry out evaluations through both automated benchmarking and manual feedback analysis. For benchmark-based evaluation, we craft a repository-oriented benchmark, SketchEval, and design an evaluation metric, SketchBLEU. For feedback-based evaluation, we develop a VSCode plugin for CodeS and engage 30 participants in conducting empirical studies. Extensive experiments prove the effectiveness and practicality of CodeS on the NL2Repo task.

View on arXivView PDF

Code Implementations(2)

Apache-2.0

Unified Efficient Fine-Tuning of 100+ LLMs & VLMs (ACL 2024)

72,8418,898Python, MakefileMay 28, 20235 months agoApache-2.0
agentaideepseekfine-tuninggemma+15 more
NL2Code/CodeSCommunity100%
294C, C#Mar 25, 20242 years ago

Similar Papers

Cite this paper

@article{zan2024codes,
  title  = {CodeS: Natural Language to Code Repository via Multi-Layer Sketch},
  author = {Daoguang Zan and Ailun Yu and Wei Liu and Dong Chen and Bo Shen and Wei Li and Yafen Yao and Yongshun Gong and Xiaolin Chen and Bei Guan and Zhiguang Yang and Yongji Wang and Qianxiang Wang and Lizhen Cui},
  year   = {2024},
  eprint = {2403.16443},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.16443v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2403.16443.svg)](https://codeofpaper.com/paper/2403.16443)

Discussion