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

**Authors:** Sanyogita Piya, Allison Sullivan  
**arXiv:** [2312.04687](https://arxiv.org/abs/2312.04687)  
**Date:** 2023-12-07  
**Summary page:** https://www.summarizepaper.com/en/arxiv-id/2312.04687v1/

## Key points

- Our reliance on software systems is increasing in today's society.
- Program synthesis has emerged as a solution to enhance software correctness by automatically generating code based on specified behavior outlines.
- Recent advancements in program synthesis focus on integrating Large Language Models (LLMs) to aid in code generation.
- LLM4TDD involves guiding Large Language Models through an iterative code generation process using a test-driven development methodology.
- The study explores how attributes such as tests, prompts, and problem complexities impact the effectiveness of LLM4TDD.
- There is a pressing need for reliable software solutions amidst escalating software failures that cost companies billions annually.
- Leveraging program synthesis techniques and harnessing the power of LLMs within a human-in-the-loop synthesis framework can streamline code generation processes and reduce errors.

## Summary

In today's society, our reliance on software systems is increasing. However, we continue to experience the negative consequences of faulty software. To address this issue, program synthesis has emerged as a solution to enhance software correctness by automatically generating code based on specified behavior outlines. Over the years, program synthesis has been a prominent research area with recent advancements focusing on integrating Large Language Models (LLMs) to aid in code generation. This paper delves into the concept of LLM4TDD and its potential impact on improving software accuracy. LLM4TDD involves guiding Large Language Models through an iterative code generation process using a test-driven development methodology. By incorporating ChatGPT and coding challenges from LeetCode in an empirical evaluation, the study aims to explore how various attributes such as tests, prompts, and problem complexities impact the effectiveness of LLM4TDD. Furthermore, the research highlights the pressing need for reliable software solutions amidst escalating software failures that cost companies billions annually. By leveraging program synthesis techniques and harnessing the power of LLMs within a human-in-the-loop synthesis framework that adapts traditional test-driven development practices, there is potential to streamline code generation processes and reduce errors. Innovative approaches like LLM4TDD not only enhance software accuracy but also offer insights into best practices for Test Driven Development using Large Language Models.
