Who's the Leader? Analyzing Novice Workflows in LLM-Assisted Debugging of Machine Learning Code

Jessica Y. Bo, Majeed Kazemitabaar, Emma Zhuang, Ashton AndersonarXiv 2025 · DOI

Abstract

Large Language Models (LLMs) are frequently touted as "great equalizers" for technical tasks, yet their effectiveness in complex domains like machine learning (ML) debugging remains under-explored. This study analyzes how eight novice ML engineers interact with ChatGPT to resolve silent model failures. We find that participants who "lead" the conversation with specific hypotheses and plans achieve significantly better outcomes than those who are "led by" the AI's open-ended suggestions. The latter group often falls into "rabbitholes" of over-reliance or suffers from cognitive overload. Our findings suggest that domain knowledge remains a critical compass for effective AI-assisted debugging.

Introduction

The democratization of specialized knowledge through LLMs assumes that novices can effectively partner with AI to solve expert-level problems. However, ML debugging presents unique challenges: unlike standard software engineering where code typically "runs or crashes," ML models can fail silently due to hyperparameter choices, data distribution shifts, or class imbalances. This study addresses how novices with incomplete mental models navigate this high-complexity, low-verifiability environment, focusing on meta-cognitive pitfalls like the inability to verify AI outputs.

Methodology

The researchers conducted a formative study with eight novice ML engineers (undergraduate and graduate students). The task involved debugging a scikit-learn implementation of a Random Forest model using the UCI Adult Income dataset. Participants were given 60 minutes to identify and fix three intentional "bugs" related to overfitting, data shuffling, and class imbalance.

Table 1: Description of the three intentional machine learning errors (E1-E3) used in the debugging task.

The study followed a three-part structure: a pre-task knowledge quiz, a main debugging task with "think-aloud" protocols, and a post-task interview. Interactions were coded into two categories:

  • Reliance Actions: Whether the user was Leading (specific, planned queries) or Led-by (open-ended queries).
  • Reliance Outcomes: Whether the user correctly relied on the LLM, or experienced Over-reliance (following incorrect advice) or Under-reliance (ignoring correct advice).

Key Insights and Results

The study revealed a near-perfect correlation (Pearson’s $r = .93$) between a participant's initial ML knowledge and their final task performance. Interestingly, self-reported experience was not a predictor of success.

The "Leading" Advantage

Participants who acted as the "leader"—hypothesizing causes and asking the LLM for specific implementations—performed significantly better. In contrast, the "led-by" group often became overwhelmed by the volume of suggestions provided by the AI. Figure 1 illustrates these interaction patterns across the eight participants, highlighting how "Leading" actions often correlate with more successful "Rely on LLM" outcomes.

Figure 1: Visualization of conversation turns, showing the distribution of Leading vs. Led-by actions and the resulting reliance outcomes for each participant (P1-P8).

Pitfalls of Novice-AI Interaction

  • The Sycophancy Trap: When novices suggested incorrect fixes, the LLM often complacently provided the code rather than correcting the user's faulty mental model, reinforcing the error.
  • Filtering Fatigue: Broad questions often prompted lists of 10+ potential solutions. Lacking domain knowledge, novices struggled to filter these, leading to cognitive overload and under-reliance on correct solutions buried within the list.
  • Learning Paradox: While participants felt they "learned something," interviews suggested this was limited to low-level syntax rather than a deeper understanding of ML debugging principles.

Discussion and Future Work

The findings highlight that while LLMs provide technical assistance, they do not replace the need for foundational domain knowledge. Future work should focus on reducing AI sycophancy, providing novices with prompting tutorials to help articulate intent, and enabling LLMs to infer a user's knowledge level to customize explanations and prevent over-reliance.

Summary updated

Abstract

While LLMs are often touted as tools for democratizing specialized knowledge to beginners, their actual effectiveness for improving task performance and learning is still an open question. It is known that novices engage with LLMs differently from experts, with prior studies reporting meta-cognitive pitfalls that affect novices' ability to verify outputs and prompt effectively. We focus on a task domain, machine learning (ML), which embodies both high complexity and low verifiability to understand the impact of LLM assistance on novices. Provided a buggy ML script and open access to ChatGPT, we conduct a formative study with eight novice ML engineers to understand their reliance on, interactions with, and perceptions of the LLM. We find that user actions can be roughly categorized into leading the LLM and led-by the LLM, and further investigate how they affect reliance outcomes like over- and under-reliance. These results have implications on novices' cognitive engagement in LLM-assisted tasks and potential negative effects on downstream learning. Lastly, we pose potential augmentations to the novice-LLM interaction paradigm to promote cognitive engagement.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
holdout datasetUnmodified codeF1 score0.16Performance of the unmodified code on the holdout dataset in the participant task.
Source quote
L75: The best possible F1 score on the holdout dataset using an RF model is around 0.32, as experimentally determined by the research team. The participants achieved scores ranging 0-0.28, with 0.16 being the performance of the unmodified code. Due to the sensitivity of ML code, it was possible to implement a partial solution but still severely degenerate the performance.
BibTeX
@misc{bo2025who,
  author = {Jessica Y. Bo and Majeed Kazemitabaar and Emma Zhuang and Ashton Anderson},
  title = {{Who's the Leader? Analyzing Novice Workflows in LLM-Assisted Debugging of Machine Learning Code}},
  year = {2025},
  eprint = {2505.08063},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.08063},
}
Figure