Grammar-Guided Evolutionary Search for Discrete Prompt Optimisation
Muzhaffar Hazman, Minh-Khoi Pham, Shweta Soundararajan, Goncalo Mordido, Leonardo Custode, David Lynch, Giorgio Cruciata, Yucheng Shi, Hongmeng Song, Wang Chao, Pan Yue, Aleksandar Milenovic, Alexandros Agapitos

TL;DR
This paper introduces a grammar-guided evolutionary search method for discrete prompt optimization that outperforms existing approaches on smaller language models and complex tasks by synthesizing and fine-tuning prompt programs.
Contribution
It presents a novel two-phase evolutionary approach combining grammar-guided genetic programming and local search for improved prompt optimization.
Findings
Outperforms state-of-the-art prompt optimization methods on small LLMs.
Effective in complex, domain-specific tasks with minimal performance degradation.
Demonstrates robustness across multiple models and tasks.
Abstract
Prompt engineering has proven to be a crucial step in leveraging pretrained large language models (LLMs) in solving various real-world tasks. Numerous solutions have been proposed that seek to automate prompt engineering by using the model itself to edit prompts. However, the majority of state-of-the-art approaches are evaluated on tasks that require minimal prompt templates and on very large and highly capable LLMs. In contrast, solving complex tasks that require detailed information to be included in the prompt increases the amount of text that needs to be optimised. Furthermore, smaller models have been shown to be more sensitive to prompt design. To address these challenges, we propose an evolutionary search approach to automated discrete prompt optimisation consisting of two phases. In the first phase, grammar-guided genetic programming is invoked to synthesise prompt-creating…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
