Skip to main content
QUICK REVIEW

[Paper Review] Using an LLM to Help With Code Understanding

Daye Nam, Andrew Macvean|arXiv (Cornell University)|Jul 17, 2023
Software Engineering ResearchComputer Science5 citations
TL;DR

This paper presents GILT, an in-IDE plugin that uses GPT-3.5-turbo to provide on-demand code understanding support through prompt-less interaction, automatically contextualizing code for LLM queries. In a user study with 32 participants, GILT significantly improved task completion rates compared to web search, though time and understanding gains were not statistically significant, with professionals benefiting more than students.

ABSTRACT

Understanding code is challenging, especially when working in new and complex development environments. Code comments and documentation can help, but are typically scarce or hard to navigate. Large language models (LLMs) are revolutionizing the process of writing code. Can they do the same for helping understand it? In this study, we provide a first investigation of an LLM-based conversational UI built directly in the IDE that is geared towards code understanding. Our IDE plugin queries OpenAI's GPT-3.5-turbo model with four high-level requests without the user having to write explicit prompts: to explain a highlighted section of code, provide details of API calls used in the code, explain key domain-specific terms, and provide usage examples for an API. The plugin also allows for open-ended prompts, which are automatically contextualized to the LLM with the program being edited. We evaluate this system in a user study with 32 participants, which confirms that using our plugin can aid task completion more than web search. We additionally provide a thorough analysis of the ways developers use, and perceive the usefulness of, our system, among others finding that the usage and benefits differ between students and professionals. We conclude that in-IDE prompt-less interaction with LLMs is a promising future direction for tool builders.

Motivation & Objective

  • To investigate whether LLM-based, in-IDE information support can improve developers’ ability to understand and complete tasks with unfamiliar code.
  • To evaluate the effectiveness of prompt-less interaction with LLMs in reducing cognitive load during code comprehension.
  • To compare the performance and perception of GILT against traditional web search in a controlled user study.
  • To examine differences in usage patterns and benefits between students and professional developers.
  • To identify design implications for future LLM-powered developer tools in real-world software development workflows.

Proposed method

  • Developed GILT, an IDE plugin that integrates GPT-3.5-turbo to provide on-demand code explanations, API details, domain term definitions, and usage examples without requiring explicit user prompts.
  • Automatically injects the currently edited code as context into LLM prompts, enabling context-aware responses without user prompt engineering.
  • Offers both prompt-less interaction via action buttons and open-ended prompt input, with all prompts automatically enriched with local code context.
  • Implemented a UI with a trigger button, summary display, contextual action buttons, and options to embed or clear information directly in the IDE.
  • Conducted a controlled user study with 32 participants, comparing GILT use against web search for understanding and extending unfamiliar code involving Python APIs for data visualization and 3D rendering.
  • Collected and analyzed quantitative data on task completion time, success rate, and understanding level, along with qualitative feedback on tool usage and perceived usefulness.

Experimental results

Research questions

  • RQ1RQ1: To what extent does GILT affect developers’ understanding, task completion time, and task completion rates when faced with unfamiliar code?
  • RQ2RQ2: How do developers interact with GILT, and to what extent does that differ between participants?
  • RQ3RQ3: How do developers perceive the usefulness of GILT?
  • RQ4RQ4: What factors influence the differential benefits of GILT between students and professionals?
  • RQ5RQ5: How does in-IDE, context-aware LLM interaction compare to traditional web search in real-world development tasks?

Key findings

  • GILT significantly improved task completion rates compared to web search, with a statistically significant increase in success rate (p < 0.05), indicating stronger support for task completion.
  • No statistically significant differences were found in task completion time or self-reported understanding levels between GILT and web search, suggesting limited gains in efficiency or comprehension depth.
  • Professionals benefited more from GILT than students, likely due to greater ability to craft effective prompts or familiarity with AI tools, despite students using the prompt-less features more frequently.
  • Students were more successful when using the prompt-less buttons than when writing their own prompts, indicating that reducing prompt engineering burden improves usability for less experienced developers.
  • Participants reported that the ability to use local code as context was a key strength of GILT, enabling more relevant and accurate responses than general web search.
  • The study highlights the need for further research on real-world deployment, as lab conditions may not reflect long-term or large-scale usage patterns in actual development workflows.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.