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 条
  • [21] Analysis on an Improved Pseudo-Code Periodic Estimation Method for DSSS Signals
    Chuan, Feng
    Tao, Sui
    Fan, Zhou
    IIP'17: PROCEEDINGS OF THE 2ND INTERNATIONAL CONFERENCE ON INTELLIGENT INFORMATION PROCESSING, 2017,
  • [22] DLBT: Deep Learning-Based Transformer to Generate Pseudo-Code from Source Code
    Gad, Walaa
    Alokla, Anas
    Nazih, Waleed
    Aref, Mustafa
    Salem, Abdel-badeeh
    CMC-COMPUTERS MATERIALS & CONTINUA, 2022, 70 (02): : 3117 - 3132
  • [23] Fine-grained Pseudo-code Generation Method via Code Feature Extraction and Transformer
    Yang, Guang
    Zhou, Yanlin
    Chen, Xiang
    Yu, Chi
    2021 28TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC 2021), 2021, : 213 - 222
  • [24] Is the Corpus Ready for Machine Translation? A Case Study with Python to Pseudo-Code Corpus
    Sawan Rai
    Ramesh Chandra Belwal
    Atul Gupta
    Arabian Journal for Science and Engineering, 2023, 48 : 1845 - 1858
  • [25] Pseudo-code CW RVD radar signal processor interferometery system design
    Geng, SQ
    Wu, SL
    ISTM/2005: 6th International Symposium on Test and Measurement, Vols 1-9, Conference Proceedings, 2005, : 6995 - 6998
  • [26] A novel algorithm for long pseudo-code acquisition in spread spectrum communication system
    Fu, Yusheng
    He, Zhongquan
    Ren, Chunhui
    Barner, Kenneth E.
    SIGNAL PROCESSING, SENSOR/INFORMATION FUSION, AND TARGET RECOGNITION XXIII, 2014, 9091
  • [27] Opcount: A Pseudo-Code Performance Estimation System for Pairing-Based Cryptography
    Abe, Masayuki
    Hoshino, Fumitaka
    Ohkubo, Miyako
    IEICE TRANSACTIONS ON FUNDAMENTALS OF ELECTRONICS COMMUNICATIONS AND COMPUTER SCIENCES, 2019, E102A (09) : 1285 - 1292
  • [28] PSEUDO-CODE SIMULATION OF DESIGNER ACTIVITY IN CONCEPTUAL DESIGNING OF SOFTWARE INTENSIVE SYSTEMS
    Sosnin, Petr
    PROCEEDINGS 27TH EUROPEAN CONFERENCE ON MODELLING AND SIMULATION ECMS 2013, 2013, : 85 - +
  • [29] Research and Implementation of GPS Pseudo-Code Fast Acquisition Based On Matched Filter and FFT
    Li Ruitao
    Li Songlin
    Liu Gang
    2018 IEEE CSAA GUIDANCE, NAVIGATION AND CONTROL CONFERENCE (CGNCC), 2018,
  • [30] Application FFT-Based Algorithm Pseudo-Code Serial in Measurement and Control of the Spread
    Gang, Fu
    PROCEEDINGS OF THE ADVANCES IN MATERIALS, MACHINERY, ELECTRICAL ENGINEERING (AMMEE 2017), 2017, 114 : 540 - 544