Saved in:
Bibliographic Details
Main Authors: Zhang, Wuyang, Li, Yansong, Dong, Zeyu, Wu, Yu, Zhou, Yingyao, Wang, Duolei, Xing, Songsirou, Zhou, Chichun, Shen, Da
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2502.17441
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916628576337920
author Zhang, Wuyang
Li, Yansong
Dong, Zeyu
Wu, Yu
Zhou, Yingyao
Wang, Duolei
Xing, Songsirou
Zhou, Chichun
Shen, Da
author_facet Zhang, Wuyang
Li, Yansong
Dong, Zeyu
Wu, Yu
Zhou, Yingyao
Wang, Duolei
Xing, Songsirou
Zhou, Chichun
Shen, Da
contents Large Language Models (LLMs) have helped programmers increase efficiency through code generation, comprehension, and repair. However, their application to large-scale projects remains challenging due to complex interdependencies and the extensive size of modern codebases. Although Knuth's concept of Literate Programming (LP) combines code and natural language to convey logic and intent, its potential for enhancing relationships in large projects has not been fully explored. In this study, we introduce the idea of Interoperable LP (ILP), which leverages literate programming principles to enhance the development of both small-scale documents and large-scale projects with LLMs. We investigate how LLMs perform under ILP-style instructions for both document-oriented tasks and entire projects. Recognizing that many researchers rely on well-structured templates to guide LLMs, we propose a concise prompt engineering method to write LP documents so LLMs can better be involved in code generation. We also examine the capacity of various LLMs to generate Scheme and Python code on the RepoBench benchmark, illustrating the advantages of our approach. Our findings indicate that ILP with LLMs can enhance LLM-based code generation in large-scale project development.
format Preprint
id arxiv_https___arxiv_org_abs_2502_17441
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Renaissance of Literate Programming in the Era of LLMs: Enhancing LLM-Based Code Generation in Large-Scale Projects
Zhang, Wuyang
Li, Yansong
Dong, Zeyu
Wu, Yu
Zhou, Yingyao
Wang, Duolei
Xing, Songsirou
Zhou, Chichun
Shen, Da
Software Engineering
Machine Learning
Large Language Models (LLMs) have helped programmers increase efficiency through code generation, comprehension, and repair. However, their application to large-scale projects remains challenging due to complex interdependencies and the extensive size of modern codebases. Although Knuth's concept of Literate Programming (LP) combines code and natural language to convey logic and intent, its potential for enhancing relationships in large projects has not been fully explored. In this study, we introduce the idea of Interoperable LP (ILP), which leverages literate programming principles to enhance the development of both small-scale documents and large-scale projects with LLMs. We investigate how LLMs perform under ILP-style instructions for both document-oriented tasks and entire projects. Recognizing that many researchers rely on well-structured templates to guide LLMs, we propose a concise prompt engineering method to write LP documents so LLMs can better be involved in code generation. We also examine the capacity of various LLMs to generate Scheme and Python code on the RepoBench benchmark, illustrating the advantages of our approach. Our findings indicate that ILP with LLMs can enhance LLM-based code generation in large-scale project development.
title Renaissance of Literate Programming in the Era of LLMs: Enhancing LLM-Based Code Generation in Large-Scale Projects
topic Software Engineering
Machine Learning
url https://arxiv.org/abs/2502.17441