Automatic Engineering of Long Prompts
Not on the map. Why?
Abstract (arXiv)
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 investigate the performance of greedy algorithms and genetic algorithms for automatic long prompt engineering. We demonstrate that a simple greedy approach with beam search outperforms other methods in terms of search efficiency. Moreover, we introduce two novel techniques that utilize search history to enhance the effectiveness of LLM-based mutation in our search algorithm. Our results show that the proposed automatic long prompt engineering algorithm achieves an average of 9.2% accuracy gain on eight tasks in Big Bench Hard, highlighting the significance of automating prompt designs to fully harness the capabilities of LLMs.
Key facts. Cited by 14 papers in the map (data through 14 Oct 2026). Builds on 25 of its 36 references that are in the map. First posted on arXiv 16 Nov 2023.
Builds on
25 of 36 references.
References · 25
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,795
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
- 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,998
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,807
- 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,420
13 more
- 2023PaLM 2 Technical Reportcited by 1,162
- 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,045
- 2019How Can We Know What Language Models Know?cited by 959
- 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 722
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 653
- 2021Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigmcited by 606
- 2023Promptbreeder: Self-Referential Self-Improvement Via Prompt Evolutioncited by 551
- 2022RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learningcited by 366
- 2023PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimizationcited by 233
- 2023PromptRobust: Towards Evaluating the Robustness of Large Language Models on Adversarial Promptscited by 226
- 2022Instruction Induction: From Few Examples to Natural Language Task Descriptionscited by 152
- 2021Differentiable Prompt Makes Pre-trained Language Models Better Few-shot Learnerscited by 115
- 2023Universality and Limitations of Prompt Tuningcited by 30
Built on by
Citing papers per year: 2024: 5; 2025: 4; 2026: 5.
14 papers.
Sort:
By area:
- 2024Efficient Prompting Methods for Large Language Models: A Surveycited by 47
- 2024Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimizationcited by 29
- 2024Investigate-Consolidate-Exploit: A General Strategy for Inter-Task Agent Self-Evolutioncited by 28
- 2024Task Facet Learning: A Structured Approach to Prompt Optimizationcited by 19
- 2024Large Language Models are Interpretable Learnerscited by 7
- 2025Large Language Models and Evolutionary Computation: A Critical Review of Bidirectional Interaction, Automated Algorithm Design, and Co-Adaptive Systemscited by 6
- 2026LPDS: Evaluating LLM Robustness Through Logic-Preserving Difficulty Scalingcited by 2
- 2025A Hierarchical Framework for Measuring Scientific Paper Innovation via Large Language Modelscited by 1
- 2025Is It Time To Treat Prompts As Code? A Multi-Use Case Study For Prompt Optimization Using DSPycited by 1
- 2025Grammar-Guided Evolutionary Search for Discrete Prompt Optimisationcited by 1
- 2026Learning from Prompt itself: the Hierarchical Attribution Prompt Optimizationcited by 1
- 2026APEX: Automated Prompt Engineering eXpert with Dynamic Data Selectioncited by 0
- 2026A Tutorial on Prompt Engineering: From Messy Thoughts to AI Workflows5 Sep 2026
- 2026Towards Spec Learning: Inference-Time Alignment from Preference Pairs22 Jun 2026
- 2026APEX: Automated Prompt Engineering eXpert with Dynamic Data Selection9 Jun 2026
- 2026LPDS: Evaluating LLM Robustness Through Logic-Preserving Difficulty Scaling14 May 2026
- 2026Learning from Prompt itself: the Hierarchical Attribution Prompt Optimization6 Jan 2026
- 2025Grammar-Guided Evolutionary Search for Discrete Prompt Optimisation14 Jul 2025
- 2025Is It Time To Treat Prompts As Code? A Multi-Use Case Study For Prompt Optimization Using DSPy4 Jul 2025
- 2025Large Language Models and Evolutionary Computation: A Critical Review of Bidirectional Interaction, Automated Algorithm Design, and Co-Adaptive Systems21 May 2025
- 2025A Hierarchical Framework for Measuring Scientific Paper Innovation via Large Language Models20 Apr 2025
- 2024Large Language Models are Interpretable Learners25 Jun 2024
- 2024Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimization22 Jun 2024
- 2024Task Facet Learning: A Structured Approach to Prompt Optimization15 Jun 2024
- 2024Efficient Prompting Methods for Large Language Models: A Surveycited by 47
- 2024Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimizationcited by 29
- 2024Task Facet Learning: A Structured Approach to Prompt Optimizationcited by 19
- 2024Large Language Models are Interpretable Learnerscited by 7
- 2025Large Language Models and Evolutionary Computation: A Critical Review of Bidirectional Interaction, Automated Algorithm Design, and Co-Adaptive Systemscited by 6
- 2026LPDS: Evaluating LLM Robustness Through Logic-Preserving Difficulty Scalingcited by 2
- 2025A Hierarchical Framework for Measuring Scientific Paper Innovation via Large Language Modelscited by 1
- 2025Grammar-Guided Evolutionary Search for Discrete Prompt Optimisationcited by 1
- 2026Learning from Prompt itself: the Hierarchical Attribution Prompt Optimizationcited by 1
- 2026APEX: Automated Prompt Engineering eXpert with Dynamic Data Selectioncited by 0
- 2026A Tutorial on Prompt Engineering: From Messy Thoughts to AI Workflowscited by 0
- 2026A Tutorial on Prompt Engineering: From Messy Thoughts to AI Workflows5 Sep 2026
- 2026APEX: Automated Prompt Engineering eXpert with Dynamic Data Selection9 Jun 2026
- 2026LPDS: Evaluating LLM Robustness Through Logic-Preserving Difficulty Scaling14 May 2026
- 2026Learning from Prompt itself: the Hierarchical Attribution Prompt Optimization6 Jan 2026
- 2025Grammar-Guided Evolutionary Search for Discrete Prompt Optimisation14 Jul 2025
- 2025Large Language Models and Evolutionary Computation: A Critical Review of Bidirectional Interaction, Automated Algorithm Design, and Co-Adaptive Systems21 May 2025
- 2025A Hierarchical Framework for Measuring Scientific Paper Innovation via Large Language Models20 Apr 2025
- 2024Large Language Models are Interpretable Learners25 Jun 2024
- 2024Teach Better or Show Smarter? On Instructions and Exemplars in Automatic Prompt Optimization22 Jun 2024
- 2024Task Facet Learning: A Structured Approach to Prompt Optimization15 Jun 2024
- 2024Efficient Prompting Methods for Large Language Models: A Survey1 Apr 2024