With the prevalence of imperfect but capable LLMs in software development, it becomes increasingly important to develop debugging skills -- to form hypotheses about the source of error in both human codes and codes from their AI pair programmers. Despite the necessity, hypothesis construction in debugging is rarely taught. In this work, we explore whether LLMs can be used to train novices on hypothesis construction, by designing a theoretically motivated, LLM-augmented tutor -- HypoCompass. HypoCompass uses LLMs to generate rich training materials guided by learning principles and presents them in a learning-by-teaching environment, where LLMs act as students who write bugs, and human novices play the role of Teaching Assistants to help debug and fix the code. Evaluations show that \sysname makes high-quality training materials four times more efficiently than humans and brings significant learning gain: 19 novices improved their pre-to-post test performances by 12%, with a reduced completion time of 14%.
翻译:暂无翻译