Skip to main content

Nikolakoudi P, Kalouptsoglou I, Tsoukalas D, Kehagias D, Tzovaras D. 2026. Understanding Prompt Engineering for LLM-Based Software Vulnerability Detection: An Empirical Study. ICTSS 2026.

By September 16, 2026November 8th, 2026Publications

Conference:
38th International Conference on Testing Software and Systems (IFIP ICTSS 2026)
13-15. October 2026  Paris, France

Authors:
Nikolakoudi P, Kalouptsoglou I, Tsoukalas D, Kehagias D, Tzovaras D

Abstract:
Software security is a fundamental challenge in modern software development, as vulnerabilities can cause severe financial, operational, and privacy-related consequences. Large Language Models (LLMs) have recently demonstrated promising capabilities for vulnerability detection (VD). However, their effectiveness depends strongly on prompt design, and the impact of prompt engineering on VD remains underexplored. We examine prompt-engineering techniques for VD using three open-weight LLMs on a Python corpus. In particular, we investigate lexical prompt optimization and model reasoning to improve detection performance. We also explore the potential benefits of few-shot prompting compared with zero-shot prompting. The evaluation employs standard classification metrics to quantify the effects of prompt design and identify effective optimization strategies. Results show that prompts aware of the class distribution of the task improve performance, whereas few-shot demonstrations and explicit Chain-of-Thought prompting provide no consistent gains.

Leave a Reply