mlsanityData to 14 Oct 2026

Prompting with Pseudo-Code Instructions

arXiv 2305.11790 ↗First posted 19 May 2023cs.CLcited by 14

Not on the map. Why?

Abstract (arXiv)

Prompting with natural language instructions has recently emerged as a popular method of harnessing the capabilities of large language models. Given the inherent ambiguity present in natural language, it is intuitive to consider the possible advantages of prompting with less ambiguous prompt styles, such as the use of 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 dataset of pseudo-code prompts for 132 different tasks spanning classification, QA and generative language tasks, sourced from the Super-NaturalInstructions dataset. Using these prompts along with their counterparts in natural language, we study their performance on two LLM families - BLOOM and CodeGen. 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 pseudo-code prompts can be helpful in improving the performance of pre-trained LMs.

Key facts. Cited by 14 papers in the map (data through 14 Oct 2026). Builds on 71 of its 107 references that are in the map. First posted on arXiv 19 May 2023.

Builds on

71 of 107 references.

References · 71

  1. 2017Attention Is All You Needcited by 60,361
  2. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  3. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  4. 2020Measuring Massive Multitask Language Understandingcited by 7,963
  5. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
  6. 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
  7. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
  8. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,780
  9. 2022Scaling Instruction-Finetuned Language Modelscited by 3,024
  10. 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,955
  11. 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
  12. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,724
38 more
  1. 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,682
  2. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
  3. 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,183
  4. 2022BLOOM: A 176B-Parameter Open-Access Multilingual Language Modelcited by 1,984
  5. 2015A large annotated corpus for learning natural language inferencecited by 1,847
  6. 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,554
  7. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
  8. 2018Neural Network Acceptability Judgmentscited by 958
  9. 2019DROP: A Reading Comprehension Benchmark Requiring Discrete Reasoning Over Paragraphscited by 903
  10. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
  11. 2022Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Taskscited by 868
  12. 2019Adversarial NLI: A New Benchmark for Natural Language Understandingcited by 807
  13. 2021Did Aristotle Use a Laptop? A Question Answering Benchmark with Implicit Reasoning Strategiescited by 743
  14. 2023The Flan Collection: Designing Data and Methods for Effective Instruction Tuningcited by 739
  15. 2017Automated Hate Speech Detection and the Problem of Offensive Languagecited by 736
  16. 2021Cross-Task Generalization via Natural Language Crowdsourcing Instructionscited by 699
  17. 2018CoQA: A Conversational Question Answering Challengecited by 683
  18. 2017DailyDialog: A Manually Labelled Multi-turn Dialogue Datasetcited by 652
  19. 2021Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigmcited by 606
  20. 2018e-SNLI: Natural Language Inference with Natural Language Explanationscited by 468
  21. 2017Zero-Shot Relation Extraction via Reading Comprehensioncited by 426
  22. 2016A Corpus and Evaluation Framework for Deeper Understanding of Commonsense Storiescited by 417
  23. 2022DeepSpeed Inference: Enabling Efficient Inference of Transformer Models at Unprecedented Scalecited by 407
  24. 2019PAWS: Paraphrase Adversaries from Word Scramblingcited by 402
  25. 2020AmbigQA: Answering Ambiguous Open-domain Questionscited by 390
  26. 2019Scene Text Visual Question Answeringcited by 331
  27. 2018SentEval: An Evaluation Toolkit for Universal Sentence Representationscited by 294
  28. 2022PromptSource: An Integrated Development Environment and Repository for Natural Language Promptscited by 289
  29. 2019Cosmos QA: Machine Reading Comprehension with Contextual Commonsense Reasoningcited by 285
  30. 2019QASC: A Dataset for Question Answering via Sentence Compositioncited by 252
  31. 2018The Natural Language Decathlon: Multitask Learning as Question Answeringcited by 236
  32. 2018ReCoRD: Bridging the Gap between Human and Machine Commonsense Reading Comprehensioncited by 200
  33. 2018Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflowcited by 165
  34. 2022Language Models of Code are Few-Shot Commonsense Learnerscited by 160
  35. 2019DREAM: A Challenge Dataset and Models for Dialogue-Based Reading Comprehensioncited by 156
  36. 2022Ask Me Anything: A simple strategy for prompting language modelscited by 155
  37. 2023The BigScience ROOTS Corpus: A 1.6TB Composite Multilingual Datasetcited by 148
  38. 2020The Multilingual Amazon Reviews Corpuscited by 143

50 most cited of 71 All 71 (JSON)

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 1; 2024: 8; 2025: 3; 2026: 2.

14 papers.

Sort:

By area: