mlsanityData to 14 Oct 2026

Automated Prompt Engineering for Cost-Effective Code Generation Using Evolutionary Algorithm

arXiv 2408.11198 ↗First posted 20 Aug 2024cs.SE cs.AI cs.NEcited by 5

Not on the map. Why?

Abstract (arXiv)

Large Language Models 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 6% improvement in pass@k but is also 2-10 times more cost-effective than the baselines.

Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 32 of its 47 references that are in the map. First posted on arXiv 20 Aug 2024.

Builds on

32 of 47 references.

References · 32

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
  3. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  5. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
  6. 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,808
  7. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
  8. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  9. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
  10. 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,045
  11. 2023Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formattingcited by 817
  12. 2019EDA: Easy Data Augmentation Techniques for Boosting Performance on Text Classification Taskscited by 807
20 more
  1. 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 653
  2. 2023Language Agent Tree Search Unifies Reasoning Acting and Planning in Language Modelscited by 574
  3. 2023Promptbreeder: Self-Referential Self-Improvement Via Prompt Evolutioncited by 551
  4. 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 546
  5. 2024A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applicationscited by 431
  6. 2023Self-collaboration Code Generation via ChatGPTcited by 258
  7. 2021Generated Knowledge Prompting for Commonsense Reasoningcited by 214
  8. 2023Software Testing with Large Language Models: Survey, Landscape, and Visioncited by 166
  9. 2024Debug like a Human: A Large Language Model Debugger via Verifying Runtime Execution Step-by-stepcited by 127
  10. 2023Chain-of-Knowledge: Grounding Large Language Models via Dynamic Knowledge Adapting over Heterogeneous Sourcescited by 122
  11. 2022HyperPrompt: Prompt-based Task-Conditioning of Transformerscited by 67
  12. 2023Effective Test Generation Using Pre-trained Large Language Models and Mutation Testingcited by 51
  13. 2023Enhancing Large Language Models in Coding Through Multi-Perspective Self-Consistencycited by 46
  14. 2023ClarifyGPT: Empowering LLM-based Code Generation with Intention Clarificationcited by 38
  15. 2024On the Worst Prompt Performance of Large Language Modelscited by 38
  16. 2024Can LLMs Generate Architectural Design Decisions? -An Exploratory Empirical studycited by 19
  17. 2023InstOptima: Evolutionary Multi-objective Instruction Optimization via Large Language Model-based Instruction Operatorscited by 17
  18. 2023SPELL: Semantic Prompt Evolution based on a LLMcited by 15
  19. 2023ANPL: Towards Natural Programming with Interactive Decompositioncited by 13
  20. 2024Can ChatGPT Support Developers? An Empirical Evaluation of Large Language Models for Code Generationcited by 11

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 1; 2025: 3; 2026: 1.

5 papers.