IntelliExplain: Enhancing Conversational Code Generation for Non-Professional Programmers
Hao Yan, Thomas D. Latoza, Ziyu Yao
TL;DR
IntelliExplain addresses the accessibility gap for non-professional programmers by combining enhanced natural language explanations of generated code with a structured human–LLM interaction paradigm. Through two user studies, it demonstrates that the approach significantly improves success rates and reduces task time in SQL and Python coding tasks compared to vanilla chat-based code generation. The framework uses restated questions for SQL, concise code descriptions for Python, and an iterative NL-feedback loop guided by execution results to refine solutions. Overall, IntelliExplain advances practical conversational coding for non-experts and highlights future work in explanation design, interaction structure, and robustness against LLM limitations.
Abstract
Chat LLMs such as GPT-3.5-turbo and GPT-4 have shown promise in assisting humans in coding, particularly by enabling them to conversationally provide feedback. However, current approaches assume users have expert debugging skills, limiting accessibility for non-professional programmers. In this paper, we first explore Chat LLMs' limitations in assisting non-professional programmers with coding. Through a formative study, we identify two key elements affecting their experience: the way a Chat LLM explains its generated code and the structure of human-LLM interaction. We then propose IntelliExplain, a new conversational code generation framework with enhanced code explanations and a structured interaction paradigm, which enforces both better code understanding and a more effective feedback loop. In two programming tasks (SQL and Python), IntelliExplain yields significantly higher success rates and reduces task time compared to the vanilla Chat LLM. We also identify several opportunities that remain in effectively offering a chat-based programming experience for non-professional programmers.
