What You Need is What You Get: Theory of Mind for an LLM-Based Code Understanding Assistant

Jonan Richards,Mairieli Wessel
2024-08-08
Abstract:A growing number of tools have used Large Language Models (LLMs) to support developers' code understanding. However, developers still face several barriers to using such tools, including challenges in describing their intent in natural language, interpreting the tool outcome, and refining an effective prompt to obtain useful information. In this study, we designed an LLM-based conversational assistant that provides a personalized interaction based on inferred user mental state (e.g., background knowledge and experience). We evaluate the approach in a within-subject study with fourteen novices to capture their perceptions and preferences. Our results provide insights for researchers and tool builders who want to create or improve LLM-based conversational assistants to support novices in code understanding.
Software Engineering
What problem does this paper attempt to address?
What You Need is What You Get: Theory of Mind for an LLM - Based Code Understanding Assistant This paper aims to solve the problems that developers face when using large language models (LLMs) to support code - understanding tools, especially the challenges that novice developers encounter in natural - language - description intentions, interpreting tool results, and optimizing prompts to obtain useful information. Specifically, the paper proposes a dialogue assistant ToMMY based on LLM, which can provide personalized interactions according to the inferred user mental states (such as background knowledge and experience), thus helping novice developers better understand and handle unfamiliar code. Through an experimental study involving 14 novice developers, the paper evaluates the effectiveness of ToMMY, explores the ways in which novices interact with LLM assistants, the impact of ToMMY on novice code understanding, and novices' views on this interaction method.