AutoPDL: Automatic Prompt Optimization for LLM Agents
Abstract
The performance of large language models (LLMs) depends on how they are prompted, with choices spanning both the high-level prompting pattern (e.g., Zero-Shot, CoT, ReAct, ReWOO) and the specific prompt content (instructions and few-shot demonstrations). Manually tuning this combination is tedious, error-prone, and non-transferable across LLMs or tasks. Therefore, this paper proposes AutoPDL, an automated approach to discover good LLM agent configurations. Our method frames this as a structured AutoML problem over a combinatorial space of agentic and non-agentic prompting patterns and demonstrations, using successive halving to efficiently navigate this space. We introduce a library implementing common prompting patterns using the PDL prompt programming language. AutoPDL solutions are human-readable, editable, and executable PDL programs that use this library. This approach also enables source-to-source optimization, allowing human-in-the-loop refinement and reuse. Evaluations across three tasks and six LLMs (ranging from 3B to 70B parameters) show consistent accuracy gains ($9.06 \pm 15.3$ percentage points), up to 68.9pp, and reveal that selected prompting strategies vary across models and tasks.
Cite
Text
Spiess et al. "AutoPDL: Automatic Prompt Optimization for LLM Agents." Proceedings of the Fourth International Conference on Automated Machine Learning, 2025. doi:10.48550/arXiv.2504.04365Markdown
[Spiess et al. "AutoPDL: Automatic Prompt Optimization for LLM Agents." Proceedings of the Fourth International Conference on Automated Machine Learning, 2025.](https://mlanthology.org/automl/2025/spiess2025automl-autopdl/) doi:10.48550/arXiv.2504.04365BibTeX
@inproceedings{spiess2025automl-autopdl,
title = {{AutoPDL: Automatic Prompt Optimization for LLM Agents}},
author = {Spiess, Claudio and Vaziri, Mandana and Mandel, Louis and Hirzel, Martin},
booktitle = {Proceedings of the Fourth International Conference on Automated Machine Learning},
year = {2025},
pages = {13/1-20},
doi = {10.48550/arXiv.2504.04365},
volume = {293},
url = {https://mlanthology.org/automl/2025/spiess2025automl-autopdl/}
}