Failure-driven prompt refinement boosts reliability of LLM vulnerability analysis
Analyzing recurring LLM failures and refining prompts improves the reliability of vulnerability analysis
Software arXiv 6 Oct 2026 Method Prototype evidence
Published as “Learning from Failures: A Failure-Driven Prompt Refinement for LLM-Based Vulnerability Analysis”
Why it matters
FDPR makes LLM-based vulnerability detection more reliable, lowering false positives and improving CWE labeling, which can increase analyst trust and reduce verification effort in real-world security workflows.
Summary
FDPR reduces unsupported findings from 111 in the baseline prompt to 26 in the final prompt and achieves 96.5% CWE classification accuracy on the Juliet Test Suite, with a detection rate of 77.8% for Qwen3-Coder-30B. The evidence comes from a two-phase evaluation: prompt refinement on the Damn Vulnerable Java Application (DVJA) and external validation on the public Juliet benchmark. The paper provides quantitative metrics and manual analysis, but detection rates differ between models and only the final prompt’s zero-false-positive claim on DVJA is fully verified; the abstract was not provided.
What they found 2
- Prompt refinement reduced the number of reported findings from 111 to 26
“Reported findings decreased from 111 in the baseline prompt (v0) to 26 in the final prompt (v3).”
- Overall CWE classification accuracy on Juliet was 96.5%
“Across both models, 37,154 of 38,482 reported vulnerabilities received the correct CWE label, corresponding to an overall classification accuracy of 96.5%.”
Caveats 4
- Detection rates differ markedly between the two evaluated models (77.8% vs 37.9%) and the models were run on different subsets of Juliet, limiting direct comparison
- Even after refinement, 1,328 CWE predictions were incorrect, with 978 (73.6%) due to hierarchy collapse
- We report only the v0 baseline and the v3 endpoint. Per-model recall was not tracked for the intermediate prompt versions, and only the zero-false-positive result was verified individually at v3, which we acknowledge as a limitation.
- the models were evaluated on different subsets of Juliet due to computational constraints and should therefore not be compared directly.
What’s new here 4
- Systematic identification and taxonomy of recurring LLM failure patterns for vulnerability analysis
- Iterative, evidence-driven prompt refinement that directly targets specific failure categories
- Demonstration that prompt refinements derived on a small development set (DVJA) generalize to a large public benchmark (Juliet)
- Derivation of reusable design principles such as evidence-based reasoning and explicit uncertainty handling