vix.ing · top · new · best · stats

LLM-Based Test-Driven Interactive Code Generation: User Study and Empirical Evaluation

2024/04/15 by Sarah Fakhoury, Aaditya Naik, Georgios Sakkas +3 · 1 voice · 94 citations
Computer Science · #Code (set theory) #Code generation #Computer science #Empirical research #Human–computer interaction #Model-Driven Software Engineering Techniques #Operating system #Programming language #Software Engineering Research #Software Testing and Debugging Techniques #Software engineering #Test (biology) #cs.SE

paper · pdf · doi:10.1109/tse.2024.3428972

published in IEEE Transactions on Software Engineering 50(9), 2254-2268 (IEEE Computer Society)

arxiv published 2024/04/15 · openalex publication_date 2024/07/22 · openalex created_date 2024/07/23 · arxiv updated 2024/10/02 · openalex updated_date 2026/08/01

Abstract

Large language models (LLMs) have shown great potential in automating significant aspects of coding by producing natural code from informal natural language (NL) intent. However, given NL is informal, it does not lend easily to checking that the generated code correctly satisfies the user intent. In this paper, we propose a novel interactive workflowTiCoderfor guided intent clarification (i.e., partial formalization) through tests to support the generation of more accurate code suggestions. Through a mixed methods user study with 15 programmers, we present an empirical evaluation of the effectiveness of the workflow to improve code generation accuracy. We find that participants using the proposed workflow are significantly more likely to correctly evaluate AI generated code, and report significantly less task-induced cognitive load. Furthermore, we test the potential of the workflow at scale with four different state-of-the-art LLMs on two python datasets, using an idealized proxy for a user feedback. We observe an average absolute improvement of 45.97% in the pass@1 code generation accuracy for both datasets and across all LLMs within 5 user interactions, in addition to the automatic generation of accompanying unit tests.

Cited by

Discussions

Related