arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.04687cs.SEcs.LG
收藏

LLM4TDD:使用大型语言模型进行测试驱动开发的最佳实践

LLM4TDD: Best Practices for Test Driven Development Using Large Language Models

The University of Texas at Arlington(德克萨斯大学阿灵顿分校)

Sanyogita Piya, Allison Sullivan

AI总结:

本文提出 LLM4TDD,利用大型语言模型按测试驱动开发迭代生成代码,并基于 ChatGPT 与 LeetCode 题目实证分析测试、提示和问题属性对其效果的影响。

摘要:

在当今社会,我们正变得越来越依赖软件系统。然而,我们也不断目睹有缺陷软件带来的负面影响。程序综合旨在根据预期行为的概要自动生成程序,从而提高软件的正确性。数十年来,程序综合一直是一个活跃的研究领域,近期的方法则寻求引入大型语言模型来帮助生成代码。本文探讨了 LLM4TDD 的概念,即引导大型语言模型采用测试驱动开发方法迭代式地生成代码。我们使用 ChatGPT 和来自 LeetCode 的编程问题开展了一项实证评估,以研究不同的测试、提示和问题属性对 LLM4TDD 功效的影响。

英文摘要:

In today's society, we are becoming increasingly dependent on software systems. However, we also constantly witness the negative impacts of buggy software. Program synthesis aims to improve software correctness by automatically generating the program given an outline of the expected behavior. For decades, program synthesis has been an active research field, with recent approaches looking to incorporate Large Language Models to help generate code. This paper explores the concept of LLM4TDD, where we guide Large Language Models to generate code iteratively using a test-driven development methodology. We conduct an empirical evaluation using ChatGPT and coding problems from LeetCode to investigate the impact of different test, prompt and problem attributes on the efficacy of LLM4TDD.

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

↑