Manuscript Offprint

arXiv:2608.24641

Aging of Prompt Engineering Techniques Across LLM Versions

Anastasiia Rudyk, Julian Oertel, Regina Hebig

Anastasiia Rudyk

Software Engineering

University of Rostock

anastasiia.rudyk@uni-rostock.de

Julian Oertel

Software Engineering

University of Rostock

julian.oertel@uni-rostock.de

Regina Hebig

Software Engineering

University of Rostock

regina.hebig@uni-rostock.de

Abstract—Prompt engineering and prompt engineering techniques (PETs) have become an integral part of software engineering for AI systems. However, new LLMs are released frequently and it remains unclear how the effectiveness of prompt engineering techniques changes across successive generations of Large Language Models (LLMs). To this end, we conduct a partial replication of the study by Khojah et al. (2025). We evaluate five techniques – Zero-Shot, Few-Shot, Chain-of-Thought (CoT), Contrastive Chain-of-Thought (CCoT), and an adapted version of Program-of-Thought (PoT) – on six instruction-tuned models grouped into three version pairs: GPT-3.5-Turbo → GPT-4o, Qwen2 7B Instruct → Qwen2.5 7B Instruct, and Mistral-7B-Instruct → Mistral-Large. We use a cleaned subset of the CodePromptEval dataset with 218 context-rich Python functions and 19,620 total generations assessed via pass@k-based functional correctness to evaluate model pairs on function-level code generation tasks. We show that prompt engineering “ages” in a model-family-specific way: Newer GPT models exhibit diminishing or even negative marginal gains from structured prompting, suggesting that instruction-following and reasoning scaffolds are increasingly internalized, whereas Qwen models continue to benefit substantially from Few-Shot and CCoT. Mistral models show mixed behavior with persistent gains from CCoT but attenuated benefits from CoT and PoT. Our results imply that effective prompting strategies must be adapted per model family and generation rather than transferred unchanged. This motivates future work on adaptive, model-aware prompting and broader, multi-dimensional code quality evaluation.

Index Terms—Generative AI, AI for Software Engineering, Prompt Engineering, Empirical study

I. INTRODUCTION

The increasing use of LLMs in software engineering, particularly for automated code generation, necessitates effective input strategies to guarantee high-quality outputs [1, 2, 3]. Creating strategic textual inputs, or prompts, to direct LLMs and optimize their intended performance without changing model parameters is known as prompt engineering [4, 5, 6].

The rapid progression of artificial intelligence, particularly in the development of LLMs, has resulted in frequent releases of new model generations that exhibit improved reasoning abilities, scalability, and domain adaptability [7, 8, 9]. This accelerating pace has fostered extensive research comparing the performance of distinct LLM architectures across tasks such as code completion, text summarization, and reasoning [10, 11, 12, 13].

Concurrently, the refinement of prompt engineering has gained significant scholarly attention. Studies have examined how various prompting strategies influence code quality and performance metrics, including accuracy, maintainability, and reliability [12, 14]. However, despite these advances, there remains a notable gap in systematically analyzing how the effectiveness of prompt engineering techniques evolves across successive versions of different LLMs. Addressing this gap is vital to understanding whether improvements in model design inherently reduce prompt sensitivity or whether prompt optimization remains critical for maintaining output quality.

Khojah et al. created CodePromptEval, a dataset of 7,072 prompts using a full factorial design to test five PETs (few-shot, persona, chain-of-thought, function signatures, and package lists) across project-level code generation tasks [13]. They examined GPT-4o, Llama3-70B-Instruct, and Mistral-22B-Instruct (also GPT-3.5-Turbo and Llama2-7B-Instruct without detailed reporting) solving real open-source function tasks, measuring impacts on correctness, similarity, and code quality. Their results showed that function signatures and few-shot examples boost functional correctness reliably, but stacking all five techniques fails to deliver consistent gains and risks adding code smells.

In this paper, we investigate the evolution of prompting techniques across successive LLM generations, driven by the challenge that LLM performance often remains unstable and highly sensitive to input format in software engineering tasks, necessitating careful prompt engineering [13, 15]. This study systematically compares the effectiveness of fundamental prompting techniques, such as Zero-shot and Few-shot approaches [16, 17], alongside advanced reasoning-based methods, including CoT [18], CCoT [19], and an adapted version of PoT [20]. With this we aim to answer the following research questions.

RQ1: How does the performance of different prompting strategies vary across successive versions of LLMs in function-level code generation tasks?

We use a modified version of the CodePromptEval dataset, to benchmark prompting effectiveness across proprietary models (GPT-3.5-Turbo, GPT-4o) and open-source models

Accepted for publication at the 42nd IEEE International Conference on Software Maintenance and Evolution (ICSME 2026), Benevento, Italy. This is the author's accepted version. © 2026 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.

(Qwen2/Qwen2.5 7B Instruct, Mistral-7B-Instruct/Large). We replicate the original study with a few notable distinctions: (1) We substitute the original PETs “signature” and “persona” with CCoT and the adapted PoT to not only replicate, but extend the results to other PETs; (2) We do not adhere to the full factorial design as we wanted to focus on individual effects only and (3) except for GPT-4o and GPT-3.5-Turbo, we utilize different LLMs due to cost constraints and our goal of comparing subsequent model versions.

References (32)