← Lab /AI/ML

RAG-augmented LLMs achieve up to 100% recall on malware incidents and 82% recall on AD attacks

A retrieval-augmented LLM system can accurately extract attack indicators with high recall and precision across tested scenarios

AI/ML arXiv 18 Mar 2026 Method Prototype evidence

Published as “Retrieval-Augmented LLMs for Security Incident Analysis”

Why it matters

The approach enables cost-effective, near-real-time forensic analysis of security incidents, potentially reducing analyst workload and speeding response.

Summary

The system achieves perfect recall (100%) on four malware incident scenarios when using Claude Sonnet 4 or DeepSeek V3, while detecting attack steps in Active Directory attacks with 100% precision but only 82% recall. It does this by combining targeted IOC queries with a retrieval-augmented generation (RAG) pipeline that feeds semantically relevant log chunks to large language models. The evidence comes from evaluations on four public malware traffic datasets and a private red-team Active Directory dataset, comparing eight LLM providers and showing that DeepSeek V3 matches Claude’s accuracy at 15× lower cost. However, the AD attack recall is below perfect and the study is limited to a small set of scenarios.

What they found 3

  1. Claude Sonnet 4 and DeepSeek V3 achieve 100% recall on all four malware scenarios

    “Claude Sonnet 4 and DeepSeek V3 achieving 100% recall across all four malware scenarios”

  2. Attack step detection on Active Directory scenarios reaches 100% precision and 82% recall

    “Attack step detection on Active Directory scenarios reaches 100% precision and 82% recall.”

  3. DeepSeek V3 matches Claude’s accuracy at 15× lower cost per analysis

    “DeepSeek achieves accuracy equivalent to Claude at 15× lower cost ($0.008 vs. $0.12 per analysis)”

Caveats 4

  • Recall for Active Directory attack step detection is only 82%, not perfect.
  • DeepSeek V3’s cost advantage does not improve recall beyond 100% for malware scenarios, which is already achieved by Claude.
  • One limitation emerged: the LLM occasionally recommended disabling the Administrator account, which is operationally infeasible.
  • Validation on a broader set of attack types and larger-scale deployments remains future work.

What’s new here 4

  • Integrates a security-aware query library with MITRE ATT&CK mapping to pre-filter logs before LLM reasoning.
  • Applies RAG specifically to heterogeneous security logs, using semantic chunking and cross-event aggregation.
  • Provides a cost-effectiveness analysis across multiple LLM providers, highlighting a low-cost cloud option.
  • Demonstrates real-time feasibility with sub-minute analysis latency for multi-stage AD attacks.