arrow
Return

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

delete2024-09-01
delete1
delete
OA
AI
S
Sarah Fakhoury *
A
Aaditya Naik
G
Georgios K. Sakkas
S
Saikat Chakraborty
S
Shuvendu K. Lahiri
DOI:10.1109/TSE.2024.3428972delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
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 workflow TiCoder for 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.
Keywords:
Intent disambiguation
code generation
LLMs
human factors
cognitive load
test generation
Intent disambiguation
code generation
LLMs
human factors
cognitive load
test generation

Journal

IEEE Transactions on Software Engineering cover
IEEE Transactions on Software Engineering
IF:
5.6
Papers:
2.9K
Citations:
1.1W

Organization

U
university of pennsylvania
Scholars:
9.2W
Papers: 7.8W
Citations: 153
University of California System cover
University of California System
Scholars:
37.5W
Papers: 33.7W
Citations: 6.6K
M
Microsoft
Scholars:
3.0K
Papers: 2.7K
Citations: 7
researcher View more organizations
Cited Papers

Cited Papers

Economic Restructuring: The British Experience
err1984-09-01
err0
PREAI
errDAVID ROSE; CAROLYN VOGLER; GORDON MARSHALL; HOWARD NEWBY
errShare
errSave
errShare
errSave
Autophagic Gene Polymorphisms in Liquid Biopsies and Outcome of Patients with Metastatic Clear Cell Renal Cell Carcinoma
err2018-10-01
err0
errOAAI
errMATTEO SANTONI; FRANCESCO PIVA; UGO DE GIORGI; ALESSANDRA MOSCA; UMBERTO BASSO; DANIELE SANTINI; SEBASTIANO BUTI; CRISTIAN LOLLI; CARLO TERRONE; MARCO MARUZZO; MICHELE IULIANI; MELISSA BERSANELLI; ALESSANDRO CONTI; ROBERTA MAZZUCCHELLI; RODOLFO MONTIRONI; LUCIANO BURATTINI; ROSSANA BERARDI
errShare
errSave
Composite effect of solid electrolytes based on alkali carbonates and sulfates
err1996-05-01
err0
PREAI
errS. Brosda; H. J. M. Bouwmeester; U. Guth
errShare
errSave
SURVEY OF REPRODUCTIVE EVENTS OF WIVES OF EMPLOYEES EXPOSED TO CHLORINATED DIOXINS
err1982-05-01
err0
PREAI
errJEAN C TOWNSEND; KENNETH M BODNER; P. F. D VAN PEENEN; RICHARD D OLSON; RALPH K COOK
errShare
errSave
errShare
errSave
Variable effects of temperature on insect herbivory
err2014-05-06
err0
errOAAI
errNathan P. Lemoine; Deron E. Burkepile; John D. Parker
errShare
errSave
researcher View more