ACL Findings2024
Automatic Engineering of Long Prompts
Cho-Jui Hsieh, Si Si, Felix X. Yu, Inderjit S. Dhillon
Abstract
Large language models (LLMs) have demonstrated remarkable capabilities in solving complex open-domain tasks, guided by comprehensive instructions and demonstrations provided in the form of prompts. However, these prompts can be lengthy, often comprising hundreds of lines and thousands of tokens, and their design often requires considerable human effort. Recent research has explored automatic prompt engineering for short prompts, typically consisting of one or a few sentences. However, the automatic design of long prompts remains a challenging problem due to its immense search space. In this paper, we propose an algorithm named Automated Prompt Engineering Xpert (APEX), a novel algorithm that automatically improves long prompts. Leveraging a greedy algorithm with beam-search for efficiency, APEX utilizes search history to significantly enhance the effectiveness of LLM-based mutation in its search process. Our results show that APEX achieves an average of 9.2% accuracy gain on eight tasks in Big Bench Hard and a consistent improvements on GSM8K with various models, highlighting the significance of automating prompt designs to fully harness the capabilities of LLMs.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
4 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimization cites Large Language Models are Zero-Shot Reasoners
- Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimization cites Large Language Models as Optimizers
- Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimization cites Language Models are Few-Shot Learners
- Large Language Models are Zero-Shot Reasoners cites AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts
- Large Language Models are Zero-Shot Reasoners cites Language Models are Few-Shot Learners
- Large Language Models are Zero-Shot Reasoners cites Training language models to follow instructions with human feedback
- AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts cites Language Models are Few-Shot Learners
- Large Language Models as Optimizers cites Large Language Models are Zero-Shot Reasoners
- Large Language Models as Optimizers cites AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts
- Induct-Learn: Short Phrase Prompting with Instruction Induction cites Large Language Models are Zero-Shot Reasoners
- Induct-Learn: Short Phrase Prompting with Instruction Induction cites Language Models are Few-Shot Learners
- Agent-Pro: Learning to Evolve via Policy-Level Reflection and Optimization cites Large Language Models as Optimizers
- Large Language Models are Interpretable Learners cites AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts
- Large Language Models are Interpretable Learners cites Large Language Models as Optimizers
- Large Language Models are Interpretable Learners cites Training language models to follow instructions with human feedback
- Training language models to follow instructions with human feedback cites Language Models are Few-Shot Learners
Cited by top-tier papers4
- Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt OptimizationXingchen Wan, Ruoxi Sun, Hootan Nakhost, Sercan Ö. ArikNeurIPS 2024 · 35 citations
- Induct-Learn: Short Phrase Prompting with Instruction InductionPo-Chun Chen, Sheng-Lun Wei, Hen-Hsen Huang, Hsin-Hsi ChenEMNLP 2024 · 1 citation
- Agent-Pro: Learning to Evolve via Policy-Level Reflection and OptimizationWenqi Zhang, Ke Tang, Hai Wu, Mengna Wang et al.ACL 2024
- Large Language Models are Interpretable LearnersRuochen Wang, Si Si, Felix X. Yu, Dorothea Wiesmann Rothuizen et al.ICLR 2025
Builds on22
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo et al.NeurIPS 2022 · 8,168 citations
- AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated PromptsTaylor Shin, Yasaman Razeghi, Robert L. Logan IV, Eric Wallace et al.EMNLP 2020 · 1,162 citations
- Large Language Models as OptimizersChengrun Yang, Xuezhi Wang, Yifeng Lu, Hanxiao Liu et al.ICLR 2024 · 817 citations
Related papers
- Why Johnny Can't Prompt: How Non-AI Experts Try (and Fail) to Design LLM PromptsJ. D. Zamfirescu-Pereira, Richmond Y. Wong, Bjoern Hartmann, Qian YangCHI 2023 · 892 citations
- Large Language Models are Human-Level Prompt EngineersYongchao Zhou, Andrei Ioan Muresanu, Ziwen Han, Keiran Paster et al.ICLR 2023 · 297 citations
- PromptWizard: Optimizing Prompts via Task-Aware, Feedback-Driven Self-EvolutionEshaan Agarwal, Raghav Magazine, Joykirat Singh, Vivek Dani et al.ACL Findings 2025 · 2 citations
- MutantPrompt: Prompt Optimization via Mutation Under a Budget on Modest-sized LMsArijit Nag, Animesh Mukherjee, Niloy Ganguly, Soumen ChakrabartiACL Findings 2025
- Connecting Large Language Models with Evolutionary Algorithms Yields Powerful Prompt OptimizersQingyan Guo, Rui Wang, Junliang Guo, Bei Li et al.ICLR 2024 · 257 citations
