mlsanityData to 7 Oct 2026

Testing LLMs on Code Generation with Varying Levels of Prompt Specificity

arXiv 2311.07599 ↗First posted 10 Nov 2023cs.SE cs.AIcited by 12

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) have demonstrated unparalleled prowess in mimicking human-like text generation and processing. Among the myriad of applications that benefit from LLMs, automated code generation is increasingly promising. The potential to transform natural language prompts into executable code promises a major shift in software development practices and paves the way for significant reductions in manual coding efforts and the likelihood of human-induced errors. This paper reports the results of a study that evaluates the performance of various LLMs, such as Bard, ChatGPT-3.5, ChatGPT-4, and Claude-2, in generating Python for coding problems. We focus on how levels of prompt specificity impact the accuracy, time efficiency, and space efficiency of the generated code. A benchmark of 104 coding problems, each with four types of prompts with varying degrees of tests and specificity, was employed to examine these aspects comprehensively. Our results indicate significant variations in performance across different LLMs and prompt types, and its key contribution is to reveal the ideal prompting strategy for creating accurate Python functions. This study lays the groundwork for further research in LLM capabilities and suggests practical implications for utilizing LLMs in automated code generation tasks and test-driven development.

Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Builds on 5 of its 10 references that are in the map. First posted on arXiv 10 Nov 2023.

Builds on

5 of 10 references.

References · 5

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  2. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  3. 2022Prompting GPT-3 To Be Reliablecited by 258
  4. 2022Large Language Models Meet NL2Code: A Surveycited by 135
  5. 2022Conversing with Copilot: Exploring Prompt Engineering for Solving CS1 Problems Using Natural Languagecited by 81

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 3; 2025: 8; 2026: 1.

12 papers.