Code

GPTutor

First page
GPTutor
Paper summary

A ChatGPT-powered VSCode extension for code explanation.

Ask this paper

Key points
01

IDE integration: Delivered as a VSCode extension, making AI-assisted code explanation frictionless for developers.

02

Prompt engineering for code: Uses code-relevant prompt engineering to produce more concise and accurate explanations than vanilla ChatGPT or Copilot.

03

Context-aware prompts: Automatically includes relevant surrounding code in its prompts for better local explanations.

04

Education use case: Particularly useful for junior developers learning unfamiliar codebases - an early AI-education product.

Abstract

Learning new programming skills requires tailored guidance. With the emergence of advanced Natural Language Generation models like the ChatGPT API, there is now a possibility of creating a convenient and personalized tutoring system with AI for computer science education. This paper presents GPTutor, a ChatGPT-powered programming tool, which is a Visual Studio Code extension using the ChatGPT API to provide programming code explanations. By integrating Visual Studio Code API, GPTutor can comprehensively analyze the provided code by referencing the relevant source codes. As a result, GPTutor can use designed prompts to explain the selected code with a pop-up message. GPTutor is now published at the Visual Studio Code Extension Marketplace, and its source code is openly accessible on GitHub. Preliminary evaluation indicates that GPTutor delivers the most concise and accurate explanations compared to vanilla ChatGPT and GitHub Copilot. Moreover, the feedback from students and teachers indicated that GPTutor is user-friendly and can explain given codes satisfactorily. Finally, we discuss possible future research directions for GPTutor. This includes enhancing its performance and personalization via further prompt programming, as well as evaluating the effectiveness of GPTutor with real users.

Every Monday
Get next week’s papers.
Subscribe on Substack