GenDLN: Evolutionary Algorithm-Based Stacked LLM Framework for Joint Prompt Optimization
Pia Chouayfati, Niklas Herbster, Ábel Domonkos Sáfrán, Matthias Grabmair
Abstract
With Large Language Model (LLM)-based applications becoming more common due to strong performance across many tasks, prompt optimization has emerged as a way to extract better solutions from frozen, often commercial LLMs that are not specifically adapted to a task. LLM-assisted prompt optimization methods provide a promising alternative to manual/human prompt engineering, where LLM “reasoning” can be used to make them optimizing agents. However, the cost of using LLMs for prompt optimization via commercial APIs remains high, especially for heuristic methods like evolutionary algorithms (EAs), which need many iterations to converge, and thus, tokens, API calls, and rate-limited network overhead. We propose GenDLN, an open-source, efficient genetic algorithm-based prompt pair optimization framework that leverages commercial API free tiers. Our approach allows teams with limited resources (NGOs, non-profits, academics, ...) to efficiently use commercial LLMs for EA-based prompt optimization. We conduct experiments on CLAUDETTE for legal terms of service classification and MRPC for paraphrase detection, performing in line with selected prompt optimization baselines, at no cost.- Anthology ID:
- 2025.acl-srw.92
- Volume:
- Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 4: Student Research Workshop)
- Month:
- July
- Year:
- 2025
- Address:
- Vienna, Austria
- Editors:
- Jin Zhao, Mingyang Wang, Zhu Liu
- Venues:
- ACL | WS
- SIG:
- Publisher:
- Association for Computational Linguistics
- Note:
- Pages:
- 1171–1212
- Language:
- URL:
- https://preview.aclanthology.org/ingestion-acl-25/2025.acl-srw.92/
- DOI:
- Cite (ACL):
- Pia Chouayfati, Niklas Herbster, Ábel Domonkos Sáfrán, and Matthias Grabmair. 2025. GenDLN: Evolutionary Algorithm-Based Stacked LLM Framework for Joint Prompt Optimization. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 4: Student Research Workshop), pages 1171–1212, Vienna, Austria. Association for Computational Linguistics.
- Cite (Informal):
- GenDLN: Evolutionary Algorithm-Based Stacked LLM Framework for Joint Prompt Optimization (Chouayfati et al., ACL 2025)
- PDF:
- https://preview.aclanthology.org/ingestion-acl-25/2025.acl-srw.92.pdf