arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2502.02539cs.SE
收藏

用于生成架构组件的LLM:Serverless领域的一项探索性实证研究

LLMs for Generation of Architectural Components: An Exploratory Empirical Study in the Serverless World

Shrikara Arun, Meghana Tedla, Karthik Vaidhyanathan

AI总结:

本文通过遮蔽开源serverless函数并利用LLMs在不同上下文信息条件下生成该函数,探索了LLMs自动生成FaaS架构组件的能力,并评估了正确性、代码质量及与人类代码的相似度。

摘要:

近年来,大语言模型(LLMs)在能力和普及程度上的指数级增长,推动了代码生成领域的大量研究工作。然而,目前的代码生成仅限于代码片段。更进一步,我们的目标是自动生成架构组件。这不仅能够加快开发速度,还能使我们最终完全跳过开发阶段,直接从设计决策进入部署。为此,我们开展了一项探索性研究,考察LLMs为函数即服务(FaaS,通常称为serverless函数)生成架构组件的能力。与其他架构风格(如单体架构和微服务)相比,serverless架构组件的规模较小,使其更适合利用当前的LLMs进行生成。我们通过以下方式开展研究:系统地选取开源serverless代码仓库,遮蔽其中一个serverless函数,并利用最先进的LLMs,在提供不同粒度的系统整体上下文信息的条件下,生成被遮蔽的函数。我们通过代码仓库中已有的测试来评估生成结果的正确性,并分别使用软件工程(SE)和自然语言处理(NLP)领域的指标来评估代码质量以及人类编写代码与LLM生成代码之间的相似程度。除研究发现外,我们还讨论了未来使用GenAI进行架构组件生成的路径。

英文摘要:

Recently, the exponential growth in capability and pervasiveness of Large Language Models (LLMs) has led to significant work done in the field of code generation. However, this generation has been limited to code snippets. Going one step further, our desideratum is to automatically generate architectural components. This would not only speed up development time, but would also enable us to eventually completely skip the development phase, moving directly from design decisions to deployment. To this end, we conduct an exploratory study on the capability of LLMs to generate architectural components for Functions as a Service (FaaS), commonly known as serverless functions. The small size of their architectural components make this architectural style amenable for generation using current LLMs compared to other styles like monoliths and microservices. We perform the study by systematically selecting open source serverless repositories, masking a serverless function and utilizing state of the art LLMs provided with varying levels of context information about the overall system to generate the masked function. We evaluate correctness through existing tests present in the repositories and use metrics from the Software Engineering (SE) and Natural Language Processing (NLP) domains to evaluate code quality and the degree of similarity between human and LLM generated code respectively. Along with our findings, we also present a discussion on the path forward for using GenAI in architectural component generation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑