Prompt Sensitivity of Language Model for Solving Programming Problems

Atsushi Shirafuji, Takumi Ito, Makoto Morishita, Yuki Nakamura, Yusuke Oda, Jun Suzuki, Yutaka Watanobe

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

A popular language model that can solve introductory programming problems, OpenAI's Codex, has drawn much attention not only in the natural language processing field but also in the software engineering field. It supports programmers by suggesting the next tokens to write, and it can even generate a whole function definition from a document string. We focus on its capability of automatically solving programming problems through code generation from problem descriptions. We investigate the model's sensitivity to problem descriptions by formatting and modifying them. The experimental results show that the more explicitly formatted problem description enhances the code generation performance from 30.9% (raw) to 39.9% (formatted). Additionally, we observe that code generation relies on information specified in the problem description, such as variable names and constant values, as anonymizing them reduces the performance significantly. Moreover, statistical biases in code generation are identified, such as the generated programs ignoring the problem modification and answering the exact opposite problem. The changes in accuracy across formats suggest that the model does not correctly understand the natural language explaining the problem specification even if the model could solve the programming problems with high accuracy.

Original languageEnglish
Title of host publicationNew Trends in Intelligent Software Methodologies, Tools and Techniques - Proceedings of the 21st International Conference on New Trends in Intelligent Software Methodologies, Tools and Techniques, SoMeT 2022
EditorsHamido Fujita, Yutaka Watanobe, Takuya Azumi
PublisherIOS Press BV
Pages346-359
Number of pages14
ISBN (Electronic)9781643683164
DOIs
Publication statusPublished - 2022 Sept 14
Event21st International Conference on New Trends in Intelligent Software Methodologies, Tools and Techniques, SoMeT 2022 - Kitakyushu, Japan
Duration: 2022 Sept 202022 Sept 22

Publication series

NameFrontiers in Artificial Intelligence and Applications
Volume355
ISSN (Print)0922-6389

Conference

Conference21st International Conference on New Trends in Intelligent Software Methodologies, Tools and Techniques, SoMeT 2022
Country/TerritoryJapan
CityKitakyushu
Period22/9/2022/9/22

Keywords

  • code generation
  • deep learning
  • language models
  • natural language processing
  • prompt sensitivity
  • solving programming problems

ASJC Scopus subject areas

  • Artificial Intelligence

Fingerprint

Dive into the research topics of 'Prompt Sensitivity of Language Model for Solving Programming Problems'. Together they form a unique fingerprint.

Cite this