Lune

EMNLP2023顶会

Prompting with Pseudo-Code Instructions

Mayank Mishra, Prince Kumar, Riyaz A. Bhat, Rudra Murthy V, Danish Contractor, Srikanth Tamilselvam

摘要

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 pseudocode. 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 1 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.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Measuring Massive Multitask Language Understanding 引用了 PIQA: Reasoning about Physical Commonsense in Natural Language
  • Learning to Reason via Program Generation, Emulation, and Search 引用了 Large Language Models are Zero-Shot Reasoners
  • Learning to Reason via Program Generation, Emulation, and Search 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Large Language Models are Zero-Shot Reasoners 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Finetuned Language Models are Zero-Shot Learners 引用了 PIQA: Reasoning about Physical Commonsense in Natural Language
  • Finetuned Language Models are Zero-Shot Learners 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • UniCoder: Scaling Code Large Language Model via Universal Code 引用了 Large Language Models are Zero-Shot Reasoners
  • UniCoder: Scaling Code Large Language Model via Universal Code 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper3

  1. Learning to Reason via Program Generation, Emulation, and SearchNathaniel Weir, Muhammad Khalifa, Linlu Qiu, Orion Weller 等NeurIPS 2024 · 16 次引用
  2. SHAPE-IT: Exploring Text-to-Shape-Display for Generative Shape-Changing Behaviors with LLMsWanli Qian, Chenfeng Gao, Anup Sathya, Ryo Suzuki 等UIST 2024 · 12 次引用
  3. UniCoder: Scaling Code Large Language Model via Universal CodeTao Sun, Linzheng Chai, Jian Yang, Yuwei Yin 等ACL 2024

它引用的 Paper22

  1. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
  2. Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo 等NeurIPS 2022 · 8,168 次引用
  3. Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou 等ICLR 2021 · 7,905 次引用
  4. Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu 等ICLR 2022 · 4,966 次引用
  5. PIQA: Reasoning about Physical Commonsense in Natural LanguageYonatan Bisk, Rowan Zellers, Ronan Le Bras, Jianfeng Gao 等AAAI 2020 · 2,916 次引用

相关 Paper

  1. Python Code Generation by Asking Clarification QuestionsHaau-Sing Li, Mohsen Mesgar, André F. T. Martins, Iryna GurevychACL 2023 · 3 次引用
  2. On Code-Induced Reasoning in LLMsAbdul Waheed, Zhen Wu, Carolyn Rose, Daphne IppolitoICLR 2026 · 6 次引用
  3. To Code or Not To Code? Exploring Impact of Code in Pre-trainingViraat Aryabumi, Yixuan Su, Raymond Ma, Adrien Morisot 等ICLR 2025 · 3 次引用
  4. AmbigNLG: Addressing Task Ambiguity in Instruction for NLGAyana Niwa, Hayate IsoEMNLP 2024 · 2 次引用
  5. Code Needs Comments: Enhancing Code LLMs with Comment AugmentationDemin Song, Honglin Guo, Yunhua Zhou, Shuhao Xing 等ACL Findings 2024 · 9 次引用
黄昏的海面,两侧是细线勾勒的悬崖