ACM Transactions on Software Engineering and Methodology· 2026Q1
Automated Prompt Engineering for Cost-Effective Code Generation Using Evolutionary Algorithms
- 22citations
- Q1SCImago
- 2026year
Short summary
EPiC, an evolutionary algorithm-based approach, refines prompts for Large Language Models (LLMs) to generate high-quality code with minimal LLM interactions, achieving up to 5% improvement in pass@k and being 1.2–10 times more cost-effective than State-of-the-Art methods.
AI-generated from the title and abstract; the full text is not read.
Key points
- EPiC employs an evolutionary algorithm to automate prompt engineering for LLM code generation.
- The method aims to reduce costs associated with iterative LLM interactions and token usage.
- EPiC achieves up to a 5% improvement in pass@k compared to State-of-the-Art agents.
- The approach is 1.2–10 times more cost-effective than existing baselines.
AI-generated from the title and abstract; the full text is not read.
Abstract
Large Language Models (LLMs) have seen increasing use in various software development tasks, especially in code generation. The most advanced recent methods attempt to incorporate feedback from code execution into prompts to help guide LLMs in generating correct code in an iterative process. While effective, these methods could be costly due to numerous interactions with the LLM and extensive token usage. To address this issue, we propose an alternative approach named Evolutionary Prompt Engineering for Code ( EPiC ) , which leverages a lightweight evolutionary algorithm to refine the original prompts into improved versions that generate high-quality code, with minimal interactions with the LLM. Our evaluation against State-of-the-Art (SOTA) LLM-based code generation agents shows that EPiC not only achieves up to 5% improvement in pass@k but is also 1.2–10 times more cost-effective than the baselines.
The authors' abstract, as published at the source. ACM Transactions on Software Engineering and Methodology, 2026 · DOI ↗
Continue with a free account
Ask the paper: 5 free questions a day about this paper; save it, get its citation, new summaries every day for your field. Takeaways are Premium.
Continue free on the webSign in with Google or Apple; no card needed. You come back to this paper.
On your phone:
Field: Information Systems
Information SystemsComputer Science