Uncovering Behavioral Patterns in Student-LLM Conversations during Code Refactoring Tasks

Research output: Chapter in Book/Report/Conference proceedingConference contributionAcademicpeer-review

Abstract

The ability to write high-quality code is essential in software development. With the growing use of LLMs for code generation, ensuring code quality has become even more important, as AI-generated code often contains various quality issues. Educators are increasingly integrating LLMs into programming education, which has raised interest in understanding how students interact with LLMs. To date, little research has explored the teaching and learning of refactoring supported by LLMs. However, before investigating whether and how to integrate LLMs to support students with refactoring, it is important to understand how students interact with these models. In this study, we analyze students' behavior when interacting with an LLM during code refactoring tasks. We identify six patterns of student-LLM interaction behavior, and explore the relation between these patterns and the quality of student code. The two most common behaviors are: (1) students who delegate the entire refactoring task to the LLM; and (2) students who only use the LLM to ask questions about their refactored code. We observed a relation between the latter behavior and solutions of good quality.

Original languageEnglish
Title of host publicationProceedings of 25th International Conference on Computing Education Research, Koli Calling 2025
EditorsJuho Leinonen, Rodrigo Duran
PublisherAssociation for Computing Machinery
Pages1-11
ISBN (Electronic)9798400715990
DOIs
Publication statusPublished - 10 Nov 2025
Event25th Koli Calling International Conference on Computing Education Research, Koli Calling 2025 - Koli, Finland
Duration: 11 Nov 202516 Nov 2025

Publication series

NameProceedings of 25th International Conference on Computing Education Research, Koli Calling 2025

Conference

Conference25th Koli Calling International Conference on Computing Education Research, Koli Calling 2025
Country/TerritoryFinland
CityKoli
Period11/11/2516/11/25

Bibliographical note

Publisher Copyright:
© 2025 Copyright held by the owner/author(s).

Keywords

  • code quality
  • code refactoring
  • design pattern
  • human-AI interaction
  • interaction pattern
  • llm
  • programming education
  • student behavior

Fingerprint

Dive into the research topics of 'Uncovering Behavioral Patterns in Student-LLM Conversations during Code Refactoring Tasks'. Together they form a unique fingerprint.

Cite this