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 条
  • [41] A new fast acquisition method of Parallel Search Pseudo-code and frequency offset based on FFT
    Luo J.-F.
    Wang X.
    Fu Y.-X.
    Yuan X.-B.
    Dianzi Yu Xinxi Xuebao/Journal of Electronics and Information Technology, 2011, 33 (03): : 563 - 568
  • [42] Blind estimation of pseudo-code sequence of soft spread spectrum signal with residual frequency offset
    Zhang, Tianqi
    Zhang, Huizhi
    Luo, Qingyu
    Fang, Rong
    Xi Tong Gong Cheng Yu Dian Zi Ji Shu/Systems Engineering and Electronics, 2024, 46 (10): : 3586 - 3593
  • [43] Design of pseudo-code phase modulation and LFM composite fuze interference based on Duffing oscillator
    Yan, Xiaopeng
    An, Tai
    Hao, Xinhong
    Zhao, Wenlong
    Dai, Jian
    Beijing Hangkong Hangtian Daxue Xuebao/Journal of Beijing University of Aeronautics and Astronautics, 2024, 50 (11): : 3338 - 3347
  • [44] 10.23 Mcps laser pseudo-code ranging system with 0.33 mm (1σ) pseudo-range measurement precision
    Yu, Xiaonan
    Tong, Shoufeng
    Zhang, Lei
    Dong, Yan
    Zhao, Xin
    Qiao, Yue
    APPLIED OPTICS, 2017, 56 (19) : 5342 - 5348
  • [45] Using the Rotation Matrix to Eliminate the Unitary Ambiguity in the Blind Estimation of Short-Code DSSS Signal Pseudo-Code
    Li, Kejun
    Gao, Yong
    IEICE TRANSACTIONS ON COMMUNICATIONS, 2020, E103B (09) : 979 - 988
  • [46] Sequence-to-Sequence Learning-Based Conversion of Pseudo-Code to Source Code Using Neural Translation Approach
    Acharjee, Uzzal Kumar
    Arefin, Minhazul
    Hossen, Kazi Mojammel
    Uddin, Mohammed Nasir
    Uddin, Md Ashraf
    Islam, Linta
    IEEE ACCESS, 2022, 10 : 26730 - 26742
  • [47] The study of measuring GPS pseudo-code signal in high dynamic circumstance based on MLE technology
    Li, XM
    Zhang, GR
    Lv, YM
    Peng, XH
    ISTM/2005: 6th International Symposium on Test and Measurement, Vols 1-9, Conference Proceedings, 2005, : 7649 - 7651
  • [48] A Two-stage Fast Pseudo-code Acquisition Algorithm Based on PMF-FFT
    Bai Zhongyuan
    Li Bo
    Wen, Cui
    2020 IEEE ASIA-PACIFIC MICROWAVE CONFERENCE (APMC), 2020, : 982 - 984
  • [49] An estimation method of Direct spread signal pseudo-code rate based on delay-and-multiplication autocorrelation
    Qian Bingli
    Feng Yongxin
    Qian Bo
    2015 8TH INTERNATIONAL SYMPOSIUM ON COMPUTATIONAL INTELLIGENCE AND DESIGN (ISCID), VOL 2, 2015, : 400 - 403
  • [50] PG-VulNet: Detect Supply Chain Vulnerabilities in IoT Devices using Pseudo-code and Graphs
    Liu, Xin
    Wu, Yixiong
    Yu, Qingchen
    Song, Shangru
    Liu, Yue
    Zhou, Qingguo
    Zhuge, Jianwei
    PROCEEDINGS OF THE16TH ACM/IEEE INTERNATIONAL SYMPOSIUM ON EMPIRICAL SOFTWARE ENGINEERING AND MEASUREMENT, ESEM 2022, 2022, : 205 - 215