Can LLM Code Explanations Adapt to Diverse Problem-Solvers' Needs?

📅 2026-07-18
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This study addresses the limitation that code explanations generated by large language models often overlook users’ diverse problem-solving styles in programming, thereby hindering learning efficiency and productivity. The work proposes the first approach to adapt code explanations to individual problem-solving styles through inclusive design–informed prompt engineering, guiding six open-source large language models to generate explanations tailored to five distinct styles. Leveraging natural language processing and qualitative analysis, the research contributes 13 literature-grounded linguistic adaptation types, corresponding declarative rules, and 10 stylized prompt templates. The effectiveness of these adaptations is validated across 1,072 generated explanations, revealing significant differences among models in their responsiveness to style-oriented prompting strategies.
📝 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.
Problem

Research questions and friction points this paper is trying to address.

LLM code explanations
problem-solving styles
adaptation
inclusive design
user needs
Innovation

Methods, ideas, or system contributions that make the work stand out.

problem-solving styles
LLM code explanation
linguistic adaptations
inclusive design
prompt engineering
🔎 Similar Papers
No similar papers found.