Can LLM Code Explanations Adapt to Diverse Problem-Solvers' Needs?
Andrew Anderson, David Piorkowski, Justin Weisz, Margaret Burnett, Kush Varshney
Abstract
Large language model (LLM) code explanations can support people in solving code-related problems, yet prior work has shown that people have diverse problem-solving styles. If explanations fail to meet people's problem-solving needs, they may be less productive in their occupations and miss opportunities to learn and grow. Although some research has examined how LLMs can adapt their outputs to a user's age or expertise, no prior work has examined how LLMs can adapt their code explanations to people's problem-solving styles. To address this gap, we developed prompts from an established inclusive design method that considers 5 types of problem-solving styles, and we generated 1,072 code explanations from six open-weight LLMs. Using natural language processing techniques, we uncovered a taxonomy of 13 linguistic adaptations, with each adaptation supported by evidence from the literature, the prompts, or the LLMs' outputs. They also show which LLMs adapted their code explanations more frequently than others. This paper is the first to investigate problem-solving style adaptations in LLM code explanation, contributing two problem-solving adaptation approaches: declarative statements for each adaptation and 10 problem-solving style prompts.
Create a lesson
Metadata
- Categories
- cs.SE, cs.HC
- Comments
- To be published in AAAI/ACM conference on AI, Ethics, and Society (AIES 2026)
Related papers
Useful but Unwieldy: How Software Engineers Perceive the Design of Chain-of-Thought Explanations in Coding Agents
Shared title terminologycs.SECarlos Rafael Catalan, Lheane Marie Dizon, Patricia Nicole Monderin et al.
From Observation to Explanation: Mechanistic Interpretability of LLM-Generated Code for Principled Repair
Shared title terminologycs.SEMusfiqur Rahman
SynH-Rank: Quality-Aware Code Search via Diverse Data Synthesis and Hierarchical Ranking Training
Shared title terminologycs.SEKeyu Liang, Haoye Wang, Yanfu Yan et al.
How Much Do Coding Agents Over-Edit, and Why? An Empirical Study of Unneeded Edits in Repository-Level Agent Patches
Shared title terminologycs.SEAakash Goel, Benjamin Steenhoek, Yu Hu
Building a Unified Inline Code Editing Model for GitHub Copilot
Shared title terminologycs.SEMicrosoft CodeAI Team, Microsoft VS Code Team, Julia Gong et al.
SpecEngineeringBench: Evaluating Coding Agents as Autonomous Specification Engineers
Shared title terminologycs.SEXingjian Wang, Shijian Wang, Minghao Liu et al.