Do advanced language models eliminate the need for prompt engineering in software engineering?
Open Access
- 16 October 2025
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
- Vol. 35 (8) , 1-33
Abstract
Large Language Models (LLMs) have significantly advanced software engineering (SE) tasks, with prompt engineering techniques enhancing their performance in code-related areas. However, the rapid development of foundational LLMs such as the non-reasoning models (GPT-4o and Claude 3.5 Sonnet) and the reasoning model o1 raises questions about the continued effectiveness of these prompt engineering techniques. This paper presents an extensive empirical study that reevaluates various prompt engineering techniques within the context of these advanced LLMs. Focusing on five representative SE tasks, i.e., code generation, code translation, program repair, code summarization, and commit message generation, we assess whether prompt engineering techniques still yield improvements with advanced models, the actual effectiveness of reasoning models compared to non-reasoning models, and whether the benefits of using these advanced models justify their increased costs. Our findings reveal that some novel prompt engineering techniques developed for earlier LLMs may provide diminished benefits or even hinder performance when applied to advanced models. In reasoning LLMs, the ability of sophisticated built-in reasoning reduces the impact of complex prompts, sometimes making simple zero-shot prompting more effective in some specific tasks. Prompt strategies that utilize execution feedback or precise task-specific guidance remain effective and are essential for improving performance on complex related-code problems. Furthermore, while reasoning models outperform non-reasoning models in tasks requiring complex reasoning, they offer minimal advantages in tasks that do not need reasoning and may incur unnecessary costs. Based on our study, we provide practical guidance for practitioners on selecting appropriate prompt engineering techniques and foundational LLMs, considering factors such as task requirements, operational costs, and environmental impact. Our work contributes to a deeper understanding of effectively harnessing advanced LLMs in SE tasks, informing future research and application development.Keywords
Funding Information
- National Natural Science Foundation of China (62232001 and No. 62402482)
- ZTE Industry-University-Institute Cooperation Funds (IA20240723020-PO0003)
This publication has 44 references indexed in Scilit:
- RepairAgent: An Autonomous, LLM-Based Agent for Program Repair2025
- A survey on large language models for recommendationWorld Wide Web, 2024
- What Makes Good In-Context Demonstrations for Code Intelligence Tasks with LLMs?2023
- Large Language Models for Software Engineering: Survey and Open Problems2023
- Automated Program Repair in the Era of Large Pre-trained Language Models2023
- What makes a good commit message?2022
- On the Evaluation of Commit Message Generation Models: An Experimental Study2021
- CC2Vec2020
- Defects4J: a database of existing faults to enable controlled testing studies for Java programs2014
- Note on the Sampling Error of the Difference Between Correlated Proportions or PercentagesPsychometrika, 1947