LLM prompts achieve 92% recall for smart contract vulnerability detection
The authors claim their LLM-based framework attains an average positive recall of 0.92 and negative recall of 0.85 across 13 vulnerability types.
AI/ML arXiv 5 May 2026 Method Prototype evidence
Published as “Tailored Prompts, Targeted Protection: Vulnerability-Specific LLM Analysis for Smart Contracts”
Why it matters
The framework could enable more accurate, low-cost automated auditing of smart contracts, reducing manual review effort for security auditors.
Summary
The paper reports strong detection performance, achieving positive recall rates ranging from 0.76 to 1.00 with an average of 0.92 and negative recall rates ranging from 0.60 to 1.00 with an average of 0.85 on a real-world dataset of 31,165 annotated vulnerabilities. They build an end-to-end framework that uses AST-based code analysis to construct structured, vulnerability-aware prompts for GPT-4, enhanced with few-shot in-context learning and chain-of-thought prompting. Evidence is based on a single evaluation using their own dataset; no external baselines are reported, and the results vary widely across vulnerability types.
What they found 3
- Positive recall average of 0.92 across 13 vulnerability categories
“Experimental results demonstrate strong performance, achieving positive recall rates ranging from 0.76 to 1.00 with an average of 0.92, and negative recall rates ranging from 0.60 to 1.00 with an average of 0.85.”
- Dataset contains 31,165 annotated vulnerabilities from 15 blockchains
“We collect, curate, and open-source a large-scale real-world smart contract dataset containing 31165 annotated vulnerabilities, sourced from 15 major Ethereum-compatible blockchains, including Ethereum and Binance Smart Chain.”
- Up to 0.90 recall on real-world test contracts using the proposed prompt design
“Our approach achieves strong detection performance, attaining up to 0.90 recall on real-world test contracts.”
Caveats 2
- Negative recall rates as low as 0.60 indicate a false-positive rate up to 40% for some vulnerability types.
- While the reliance on manual prompt refinement limits the ability to generalize to previously unseen vulnerability patterns, this work lays a solid foundation for future improvements.
What’s new here 4
- Uses AST-based analysis to create structured, vulnerability-aware representations for LLM input.
- Designs customized prompt templates for 13 specific vulnerability categories.
- Applies few-shot in-context learning with chain-of-thought prompting to improve reasoning without fine-tuning.
- Provides a large, open-sourced real-world dataset of 31,165 annotated vulnerabilities from 15 blockchains.