Which Prompting Technique Should I Use? An Empirical Investigation of Prompting Techniques for Software Engineering Tasks
Not on the map. Why?
Abstract (arXiv)
A growing variety of prompt engineering techniques has been proposed for Large Language Models (LLMs), yet systematic evaluation of each technique on individual software engineering (SE) tasks remains underexplored. In this study, we present a systematic evaluation of 14 established prompt techniques across 10 SE tasks using four LLM models. As identified in the prior literature, the selected prompting techniques span six core dimensions (Zero-Shot, Few-Shot, Thought Generation, Ensembling, Self-Criticism, and Decomposition). They are evaluated on tasks such as code generation, bug fixing, and code-oriented question answering, to name a few. Our results show which prompting techniques are most effective for SE tasks requiring complex logic and intensive reasoning versus those that rely more on contextual understanding and example-driven scenarios. We also analyze correlations between the linguistic characteristics of prompts and the factors that contribute to the effectiveness of prompting techniques in enhancing performance on SE tasks. Additionally, we report the time and token consumption for each prompting technique when applied to a specific task and model, offering guidance for practitioners in selecting the optimal prompting technique for their use cases.
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). First posted on arXiv 5 Jun 2025.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 3; 2026: 6.
9 papers.
- 2026TDD Governance for Multi-Agent Code Generation via Prompt Engineeringcited by 2
- 2025Library Hallucinations in LLM-Generated Code: A Risk Analysis Grounded in Developer Queriescited by 1
- 2026How to Ask the AI: A User Perspective Survey for Large Language Model Promptingcited by 1
- 2025Progressive Code Integration for Abstractive Bug Report Summarizationcited by 0
- 2025SoK: Understanding (New) Security Issues Across AI4Code Use Casescited by 0
- 2026PEEM: Prompt Engineering Evaluation Metrics for Interpretable Joint Evaluation of Prompts and Responsescited by 0
- 2026Comparing Large Language Models on Scrum Certification-Style Questions: Accuracy, Stability, and Error Patternscited by 0
- 2026Prompting GPT-5 on Scrum Certification Questions: An Empirical Accuracy Studycited by 0
- 2026Prompts in the Wild: A Large Analyzed Collection of Transactional Prompts in Codecited by 0
- 2026Prompts in the Wild: A Large Analyzed Collection of Transactional Prompts in Code13 Aug 2026
- 2026Prompting GPT-5 on Scrum Certification Questions: An Empirical Accuracy Study29 Jun 2026
- 2026Comparing Large Language Models on Scrum Certification-Style Questions: Accuracy, Stability, and Error Patterns29 Jun 2026
- 2026How to Ask the AI: A User Perspective Survey for Large Language Model Prompting17 Jun 2026
- 2026TDD Governance for Multi-Agent Code Generation via Prompt Engineering29 Apr 2026
- 2026PEEM: Prompt Engineering Evaluation Metrics for Interpretable Joint Evaluation of Prompts and Responses11 Mar 2026
- 2025SoK: Understanding (New) Security Issues Across AI4Code Use Cases20 Dec 2025
- 2025Progressive Code Integration for Abstractive Bug Report Summarization29 Nov 2025
- 2025Library Hallucinations in LLM-Generated Code: A Risk Analysis Grounded in Developer Queries26 Sep 2025