PromptAudit: Auditing Prompt Sensitivity in LLM-Based Vulnerability Detection

Steffen J. Camarato, Yahya Hmaiti, Mandana Ghadamian, David Mohaisen
5/22/2026
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

Large language models are increasingly used for vulnerability detection, yet their reliability under different prompt formulations remains uncharacterized. We present PromptAudit, a controlled evaluation framework that isolates prompt effects by fixing the dataset, decoding, and parsing while varying only the prompting strategy.

Show full abstract

Using five prompting strategies across five open-weight models on 1,000 CVEs (6,074 code samples spanning 16 programming languages), we evaluate accuracy, recall, abstention, coverage, and effective F1. We find that standard chain-of-thought prompting achieves the strongest overall operational performance, while few-shot prompting provides model-dependent benefits that are most pronounced for prompt-sensitive models. In contrast, adaptive chain-of-thought frequently suppresses recall and self-consistency induces excessive abstention, sharply reducing effective performance. These results show that vulnerability detection behavior is jointly determined by the model and the prompt, and that prompt sensitivity is a first-class system property that must be explicitly characterized in evaluation and deployment.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{camarato2026promptaudit,
  title  = {PromptAudit: Auditing Prompt Sensitivity in LLM-Based Vulnerability Detection},
  author = {Steffen J. Camarato and Yahya Hmaiti and Mandana Ghadamian and David Mohaisen},
  year   = {2026},
  eprint = {2605.24171},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.24171v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.24171.svg)](https://codeofpaper.com/paper/2605.24171)

Discussion