Skip to main content
QUICK REVIEW

[Paper Review] ChatGPT and Software Testing Education: Promises & Perils

Sajed Jalil, S. Rafi|arXiv (Cornell University)|Feb 7, 2023
Software Engineering ResearchComputer Science28 citations
TL;DR

The study evaluates ChatGPT on 31 software testing questions from a textbook, finding 77.5% answerable, 55.6% correct/partially correct, and 53.0% correct/partially correct explanations, with context and confidence affecting outcomes.

ABSTRACT

Over the past decade, predictive language modeling for code has proven to be a valuable tool for enabling new forms of automation for developers. More recently, we have seen the advent of general purpose "large language models", based on neural transformer architectures, that have been trained on massive datasets of human written text spanning code and natural language. However, despite the demonstrated representational power of such models, interacting with them has historically been constrained to specific task settings, limiting their general applicability. Many of these limitations were recently overcome with the introduction of ChatGPT, a language model created by OpenAI and trained to operate as a conversational agent, enabling it to answer questions and respond to a wide variety of commands from end users. The introduction of models, such as ChatGPT, has already spurred fervent discussion from educators, ranging from fear that students could use these AI tools to circumvent learning, to excitement about the new types of learning opportunities that they might unlock. However, given the nascent nature of these tools, we currently lack fundamental knowledge related to how well they perform in different educational settings, and the potential promise (or danger) that they might pose to traditional forms of instruction. As such, in this paper, we examine how well ChatGPT performs when tasked with answering common questions in a popular software testing curriculum. Our findings indicate that ChatGPT can provide correct or partially correct answers in 55.6% of cases, provide correct or partially correct explanations of answers in 53.0% of cases, and that prompting the tool in a shared question context leads to a marginally higher rate of correct responses. Based on these findings, we discuss the potential promises and perils related to the use of ChatGPT by students and instructors.

Motivation & Objective

  • Assess how well ChatGPT answers software testing questions from a popular textbook.
  • Evaluate the quality of ChatGPT explanations for its answers.
  • Investigate how prompting strategy and conversation context affect performance.
  • Examine the correlation between ChatGPT's self-reported confidence and answer correctness.

Proposed method

  • Use a manually vetted dataset of 31 questions (from five chapters of Ammann & Offutt) with three ChatGPT responses per question.
  • Compare separate-context vs. shared-context prompting to assess effect on correctness.
  • Ask a confidence question after each response to study calibration.
  • Have two or more researchers label correctness of answers and explanations independently.
  • Use three runs per question to analyze non-determinism effects.

Experimental results

Research questions

  • RQ1RQ1: How often is ChatGPT able to provide correct answers and explanations under different prompting strategies?
  • RQ2RQ2: How often does ChatGPT produce answer-explanation pairs with varying correctness levels?
  • RQ3RQ3: How does ChatGPT’s non-determinism affect answer and explanation correctness?
  • RQ4RQ4: Does ChatGPT’s stated confidence correlate with actual correctness?

Key findings

  • ChatGPT answers correctly 77.5% of questions attempted, with correct/partially correct outcomes in 55.6% of cases for those answered.
  • ChatGPT provides correct/partially correct explanations in 53.0% of cases where it answers.
  • Shared context prompts yield higher correctness than separate context prompts (49.4% vs. 34.6% for correct answers; 6.2% vs. 7.4% partially correct).
  • Prompting with shared context improves both answers and explanations on average; confidence reports are not reliably aligned with correctness.
  • Non-determinism affects answer correctness in 9.7% and explanation correctness in 6.5% of questions.
  • ChatGPT’s self-reported confidence has little bearing on whether its answer is correct.

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.