EMNLP Findings2024
Symbolic Prompt Program Search: A Structure-Aware Approach to Efficient Compile-Time Prompt Optimization
Abstract
In many modern LLM applications, such as retrieval augmented generation, prompts have become programs themselves. In these settings, prompt programs are repeatedly called with different user queries or data instances. A big practical challenge is optimizing such prompt programs. Recent work has mostly focused on either simple prompt programs or assumed that the structure of a prompt program is fixed.
We introduce SAMMO, a framework to perform symbolic prompt program search for compile-time optimizations of prompt programs. SAMMO represents prompt programs on a symbolic level which allows for a rich set of transformations that can be searched over during optimization. We show that SAMMO generalizes previous methods and improves the performance of complex prompts on (1) instruction tuning, (2) RAG pipeline tuning, and (3) prompt compression, across several different LLMs. We make all code available open-source at https://github.com/microsoft/sammo.
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
- Learning to Compress Prompts with Gist Tokens cites Language Models are Few-Shot Learners
- Sharing State Between Prompts and Programs cites Promptbreeder: Self-Referential Self-Improvement via Prompt Evolution
- A Systematic Survey of Automatic Prompt Optimization Techniques cites Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formatting
- Hyperband-based Bayesian Optimization for Black-box Prompt Selection cites Promptbreeder: Self-Referential Self-Improvement via Prompt Evolution
- Hyperband-based Bayesian Optimization for Black-box Prompt Selection cites Language Models are Few-Shot Learners
- Hyperband-based Bayesian Optimization for Black-box Prompt Selection cites Large Language Models are Human-Level Prompt Engineers
- Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formatting cites Large Language Models are Human-Level Prompt Engineers
- Promptbreeder: Self-Referential Self-Improvement via Prompt Evolution cites Language Models are Few-Shot Learners
- Promptbreeder: Self-Referential Self-Improvement via Prompt Evolution cites Large Language Models are Human-Level Prompt Engineers
- Large Language Models are Human-Level Prompt Engineers cites Language Models are Few-Shot Learners
Cited by top-tier papers4
- A Systematic Survey of Automatic Prompt Optimization TechniquesKiran Ramnath, Kang Zhou, Sheng Guan, Soumya Smruti Mishra et al.EMNLP 2025 · 5 citations
- Sharing State Between Prompts and ProgramsEllie Y. Cheng, Logan Weber, Tian Jin, Michael CarbinICLR 2026 · 3 citations
- Clotho: Measuring Task-Specific Pre-Generation Test Adequacy for LLM InputsJuyeon Yoon, Somin Kim, Robert Feldt, Shin YooFSE 2026 · 2 citations
- Hyperband-based Bayesian Optimization for Black-box Prompt SelectionLennart Schneider, Martin Wistuba, Aaron Klein, Jacek Golebiowski et al.ICML 2025
Builds on13
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formattingMelanie Sclar, Yejin Choi, Yulia Tsvetkov, Alane SuhrICLR 2024 · 682 citations
- Learning to Compress Prompts with Gist TokensJesse Mu, Xiang Li, Noah D. GoodmanNeurIPS 2023 · 488 citations
- Promptbreeder: Self-Referential Self-Improvement via Prompt EvolutionChrisantha Fernando, Dylan Banarse, Henryk Michalewski, Simon Osindero et al.ICML 2024 · 432 citations
- Large Language Models are Human-Level Prompt EngineersYongchao Zhou, Andrei Ioan Muresanu, Ziwen Han, Keiran Paster et al.ICLR 2023 · 297 citations
Related papers
- DSPy: Compiling Declarative Language Model Calls into State-of-the-Art PipelinesOmar Khattab, Arnav Singhvi, Paridhi Maheshwari, Zhiyuan Zhang et al.ICLR 2024 · 170 citations
- LOOPRAG: Enhancing Loop Transformation Optimization with Retrieval-Augmented Large Language ModelsYijie Zhi, Yayu Cao, Jianhua Dai, Xiaoyang Han et al.ASPLOS 2026 · 1 citation
- CODEPROMPTZIP: Code-specific Prompt Compression for Retrieval-Augmented Generation in Coding Tasks with LMsPengfei He, Shaowei Wang, Tse-Hsun ChenACL Findings 2026 · 1 citation
- Optimizing Instructions and Demonstrations for Multi-Stage Language Model ProgramsKrista Opsahl-Ong, Michael J. Ryan, Josh Purtell, David Broman et al.EMNLP 2024 · 17 citations
- AMPO: Automatic Multi-Branched Prompt OptimizationSheng Yang, Yurong Wu, Yan Gao, Zineng Zhou et al.EMNLP 2024 · 5 citations
