Prompting with Pseudo-Code Instructions

被引:0
|
作者
Mishra, Mayank [1 ]
Kumar, Prince [1 ]
Bhat, Riyaz [1 ]
Murthy, Rudra, V [1 ]
Contractor, Danish [1 ]
Tamilselvam, Srikanth [1 ]
机构
[1] IBM Res AI, Yorktown Hts, NY 10598 USA
来源
2023 CONFERENCE ON EMPIRICAL METHODS IN NATURAL LANGUAGE PROCESSING (EMNLP 2023) | 2023年
关键词
DATA SET; MODELS;
D O I
暂无
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Prompting with natural language instructions has recently emerged as a popular method of harnessing the capabilities of large language models (LLM). Given the inherent ambiguity present in natural language, it is intuitive to consider the possible advantages of prompting with less ambiguous prompt styles, like pseudo-code. In this paper, we explore if prompting via pseudo-code instructions helps improve the performance of pre-trained language models. We manually create a dataset1 of pseudo-code prompts for 132 different tasks spanning classification, QA, and generative language tasks, sourced from the Super-NaturalInstructions dataset (Wang et al., 2022b). Using these prompts along with their counterparts in natural language, we study their performance on two LLM families - BLOOM (Scao et al., 2023), CodeGen (Nijkamp et al., 2023). Our experiments show that using pseudo-code instructions leads to better results, with an average increase (absolute) of 7-16 points in F1 scores for classification tasks and an improvement (relative) of 12-38% in aggregate ROUGE-L scores across all tasks. We include detailed ablation studies which indicate that code comments, docstrings, and the structural clues encoded in pseudo-code all contribute towards the improvement in performance. To the best of our knowledge, our work is the first to demonstrate how pseudocode prompts can be helpful in improving the performance of pre-trained LMs.
引用
收藏
页码:15178 / 15197
页数:20
相关论文
共 50 条
  • [31] A Machine Learning Approach to Convert Pseudo-Code to Domain-Specific Programming Language
    Neal, Jacob
    Rogers, Shane
    Parra, Esteban
    2023 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION, ICSME, 2023, : 442 - 452
  • [32] Improving Pseudo-code Detection in Ubiquitous Scholarly Data Using Ensemble Machine Learning
    Tuarob, Suppawong
    2016 20TH INTERNATIONAL COMPUTER SCIENCE AND ENGINEERING CONFERENCE (ICSEC), 2016,
  • [33] Cross-correlation Interference Suppression Method Based on Pseudo-Code Transform Coefficient
    Liu, Wen
    Zhu, Shaopeng
    Deng, Zhongliang
    Xiao, Quanbin
    CHINA SATELLITE NAVIGATION CONFERENCE PROCEEDINGS, CSNC 2022, VOL III, 2022, 910 : 529 - 540
  • [34] One Kind of Fast Acquisition Technology Research Based on Parallel Pseudo-code Acquisition
    Zhang, Wen
    Han, Hangcheng
    2016 9TH INTERNATIONAL CONGRESS ON IMAGE AND SIGNAL PROCESSING, BIOMEDICAL ENGINEERING AND INFORMATICS (CISP-BMEI 2016), 2016, : 1118 - 1122
  • [35] An Approach of Compensating Pseudo-code Frequency Offset Based on Decimation of Signal Fractional Sampling
    Wu, Xiangyu
    Huang, Yangbo
    Ou, Gang
    CSNC 2011: 2ND CHINA SATELLITE NAVIGATION CONFERENCE, VOLS 1-3, 2011, : 909 - 912
  • [36] THE EXTENDED BOYER-MOORE-HORSPOOL ALGORITHM FOR LOCALITY-SENSITIVE PSEUDO-CODE
    Terasawa, Kengo
    Kawashima, Toshio
    Tanaka, Yuzuru
    VISAPP 2011: PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON COMPUTER VISION THEORY AND APPLICATIONS, 2011, : 437 - 441
  • [37] An effective SNR promotion method for mini-satellite pseudo-code range measurement
    Yu, Fa-Xin
    Jin, Zhong-He
    Chinese Journal of Sensors and Actuators, 2006, 19 (03) : 869 - 871
  • [38] Is the Corpus Ready for Machine Translation? A Case Study with Python']Python to Pseudo-Code Corpus
    Rai, Sawan
    Belwal, Ramesh Chandra
    Gupta, Atul
    ARABIAN JOURNAL FOR SCIENCE AND ENGINEERING, 2023, 48 (02) : 1845 - 1858
  • [39] Blind Estimation of Pseudo-Code Sequence of QPSK-DSSS Signal with Residual Carrier
    Chen X.
    Zhang T.
    Meng Y.
    Wang X.
    Beijing Youdian Daxue Xuebao/Journal of Beijing University of Posts and Telecommunications, 2022, 45 (03): : 90 - 95
  • [40] A Bandwidth Adaptive Pseudo-Code Tracking Loop Design for BD / INS Integrated Navigation
    Liu, Chunling
    Wang, Cheng
    Wang, Jing
    PROCEEDINGS OF 2016 2ND INTERNATIONAL CONFERENCE ON CONTROL SCIENCE AND SYSTEMS ENGINEERING (ICCSSE), 2016, : 46 - 49