EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

Structural Prompt Variants and Their Impact on LLM-Based Vulnerability Detection Accuracy

Mariana Torres, Javier Martínez, Alejandro Ruiz

American Journal of Artificial Intelligence and Neural Networks · 28.02.2026 · 7 (1) · 124-132

DOI: 10.71465/ajainn3632 ↗

Kurz gefasst

Fachartikel in der Zeitschrift American Journal of Artificial Intelligence and Neural Networks, online erschienen am 28.02.2026. Verfasst von Mariana Torres und 2 weiteren Autor:innen. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0).

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

The structure of prompts used in vulnerability detection tasks significantly affects the reasoning process of large language models. This study systematically evaluates how formatting,decomposition, and semantic density influence the accuracy of detecting five major vulnerability categories (CWE-20, CWE-79, CWE-89, CWE-120, CWE-798). We construct a benchmark of 12,000 prompt–code pairs and test three LLMs: GPT-4, Claude-3, and Llama-3-70B. Results show that structured prompts with explicit reasoning stages improve true-positive rates by 24–41%, while overly verbose prompts increase hallucination-induced false alarms by 15%. Prompt–model mismatch analysis reveals that models differ in tolerance to prompt ambiguity. These findings highlight the necessity of prompt normalization for trustworthy security auditing using LLMs.

Zitieren

APA

Torres, M., Martínez, J., & Ruiz, A. (2026). Structural Prompt Variants and Their Impact on LLM-Based Vulnerability Detection Accuracy. American Journal of Artificial Intelligence and Neural Networks, 7(1), 124-132. https://doi.org/10.71465/ajainn3632

Vancouver

Torres M, Martínez J, Ruiz A. Structural Prompt Variants and Their Impact on LLM-Based Vulnerability Detection Accuracy. American Journal of Artificial Intelligence and Neural Networks. 2026;7(1):124-132. doi:10.71465/ajainn3632

BibTeX
@article{Torres2026,
  author = {Torres, Mariana and Martínez, Javier and Ruiz, Alejandro},
  title = {Structural Prompt Variants and Their Impact on LLM-Based Vulnerability Detection Accuracy},
  journal = {American Journal of Artificial Intelligence and Neural Networks},
  year = {2026},
  volume = {7},
  number = {1},
  pages = {124--132},
  doi = {10.71465/ajainn3632}
}
Kostenlos starten →