Best LLM for detection engineering (November 2026)
GPT-6 Astra leads BlueBench's detection engineering track at 87.3, where rules are re-run and scored on precision and recall. Rankings, cost, and value picks.
Summary
GPT-6 Astra is the best LLM for detection engineering as of November 2026, based on BlueBench's detection engineering track, where it scored 87.3 against 85.3 for Claude Opus 4.8 and 83.8 for Claude Opus 5.5. It also costs the most, at $9.60 per task. Detection is the track where cheap models come closest to the top: DeepSeek V4.1 Flash, an open-weight model, scored 81.7 at $0.17 per task. This ranking is refreshed monthly.
- Top detection engineering score, GPT-6 Astra
- 87.3
- Cost per task for DeepSeek V4.1 Flash, which scored 81.7 on detection
- $0.17
- Points between the 1st and 9th models on detection engineering
- 6.8
- Models that scored 100% on the macOS detection tasks
- 12 of 26
Key findings
- GPT-6 Astra led BlueBench's detection engineering track at 87.3, ahead of Claude Opus 4.8 (85.3) and Claude Opus 5.5 (83.8), at $9.60 per task, the highest cost of the 26 models tested.
- DeepSeek V4.1 Flash scored 81.7 at $0.17 per task and Claude Haiku 5.5 scored 80.5 at $0.59: within 6.8 points of the leader for a small fraction of its cost.
- The track compresses: the top nine models span 6.8 points, and 12 of 26 models scored 100% on the macOS detection tasks. Windows' 18 guided rules spread models most.
- Detection ranks models differently from hunting. GLM-5.3 is sixth on threat hunting and 23rd on detection; GPT-6 Astra is 10th on hunting and first on detection.
- Claude Opus 4.8 scored 85.3 at $1.56 per task but ranked 24th of 26 on reliability (17.3). Claude Opus 5.5 scored 83.8 at $3.54 with the 2nd-ranked reliability (56.2).
This ranking is refreshed monthly. The November 2026 edition ranks the 26 models in the October 2026 results of BlueBench, Cotool's benchmark for defensive security work, on one track: writing detection rules that run. For all four tracks together, see which AI models are best for security work.
Detection engineering leaderboard, November 2026
The top ten models on the detection engineering track of the capability leaderboard:
| Detection rank | Model | Weights | Detection engineering | Overall rank | Cost per task | Reliability |
|---|---|---|---|---|---|---|
| 1 | GPT-6 Astra | Closed | 87.3 | 2 | $9.60 | 64.1 |
| 2 | Claude Opus 4.8 | Closed | 85.3 | 8 | $1.56 | 17.3 |
| 3 | Claude Opus 5.5 | Closed | 83.8 | 1 | $3.54 | 56.2 |
| 4 | GPT-5.6 Sol | Closed | 82.8 | 6 | $2.89 | 47.6 |
| 5 | Grok 4.6 | Closed | 82.6 | 4 | $3.64 | 47.4 |
| 6 | DeepSeek V4.1 Flash | Open | 81.7 | 9 | $0.17 | 38.5 |
| 7 | Gemini 3.6 Flash | Closed | 81.1 | 19 | $3.01 | 29.8 |
| 8 | Gemini 4 Argon | Closed | 80.7 | 3 | $6.76 | 38.0 |
| 9 | Claude Haiku 5.5 | Closed | 80.5 | 15 | $0.59 | 27.9 |
| 10 | GPT-6.1 Sol | Closed | 78.5 | 7 | $1.30 | 52.9 |
Cost per task and reliability cover the whole suite, not detection alone. BlueBench keeps cost benchmark-wide in track views (methodology), and reliability, from the reliability leaderboard, is 100 minus the average gap between a model's best and worst scores in each of the six benchmarks.
Best overall, best value, and best open-weight
Best overall: GPT-6 Astra, by score. It led at 87.3 and had the tightest reliability of all 26 models, but its $9.60 per task was the highest cost tested. Claude Opus 4.8 scored 2.0 points lower at $1.56, about a sixth of the cost, but ranked 24th on reliability, so its results swing more from task to task. Claude Opus 5.5 falls between them: 83.8 at $3.54, second on reliability, and first on the overall leaderboard.
Best value: DeepSeek V4.1 Flash. It scored 81.7 at $0.17 per task, 5.6 points below GPT-6 Astra. Claude Haiku 5.5 scored 80.5 at $0.59. Four models sit on this track's cost frontier, where no model scores higher for less: GLM-5.3 Flash (74.7 at $0.11), DeepSeek V4.1 Flash, Claude Opus 4.8, and GPT-6 Astra.
Best open-weight: DeepSeek V4.1 Flash, sixth of 26. The next open-weight models are well behind: GLM-5.2 at 75.9 and GLM-5.3 Flash at 74.7. GLM-5.3 and Kimi K3, which rank sixth and eighth on threat hunting, ranked 23rd and 24th here, so an open-weight model chosen for hunting isn't automatically a good detection writer.
These picks don't have to be one choice. Where the model is set per agent, as in Cotool, whose guidance is "frontier models for hard cases, cheaper ones for volume," a tuning agent can run on DeepSeek V4.1 Flash while new multi-source rules go to a top-scoring model.
What the detection engineering track tests
Each task asks for a detection query over the case data. BlueBench re-executes the submitted rule against the evidence and scores it on recall and precision: credit for the records it should return, lost credit for records it shouldn't. No LLM judge is involved, and a rule that fails to run scores zero. Every benchmark contributes detection tasks:
- Real intrusions. The Windows intrusion has 18 guided detection tasks in DuckDB SQL, such as a rule for the wmiprvse.exe → cmd.exe → powershell.exe lineage "with noise controls that separate attacker activity from IT automation." The macOS case asks for correlation queries, such as tying local credential validation to a privileged action shortly after. The AWS case adds seven detection questions on its CloudTrail, S3, VPC Flow Log, and GuardDuty evidence.
- Simulated environments. Four tasks across Simulation-001, Simulation-002, and Simulation-003: a living-off-the-land execution, service-credential theft on a domain controller, a hands-on-keyboard operator's commands, and data exfiltration hidden among legitimate large transfers. Each is scored by exact-record F1 and must exclude benign lookalikes.
Each Intrusion benchmark contributes 20% of the track score and the pooled simulation detections 40%. The rules are SQL, not Sigma, KQL, or SPL. Microsoft's CTI-REALM tests KQL and Sigma written from 37 threat intelligence reports, and is the closer reference for teams on those languages; Claude models took its top three positions among the models it tested.
A scored SQL query is the core of a production detection but not all of it. In Cotool's detections, for example, a Python function wraps the query, such as a count of denied Okta Verify pushes per user over 10 minutes, and adds thresholds, baselines, enrichment from other tools, and the alert output. The track measures whether a model returns the right records; the surrounding logic is untested here.
Why the ranking differs from the overall leaderboard
Detection compresses the field, so small per-benchmark differences decide the order. The top nine models span 6.8 points, against 12.9 on threat hunting. On the macOS tasks, 12 of 26 models scored 100%. The spread comes from two places:
- Windows' guided rules. GLM-5.2 led at 95.8% and Claude Opus 4.8 scored 80.8%, while GPT-6 Astra scored 57.2%, 19th of 26, and Gemini 3.6 Flash 45.0%.
- Simulations and AWS. GPT-6 Astra scored 100% on Simulation-002's detections, tied first on Simulation-003 at 97.1%, and scored 97.2% on AWS. Gemini 3.6 Flash led AWS at 98.2% and scored 95.4% on Simulation-002, which is how it ranks seventh on detection while 19th overall. GLM-5.2 scored 51.4% on Simulation-002, which leaves it 15th despite leading Windows.
Models that write rules better than they write reports move up: Claude Opus 4.8 is eighth overall and second here, Claude Haiku 5.5 15th and ninth. Report-strong models move down: Claude Sonnet 5.5 is fifth overall and 12th on detection, Gemini 4 Argon third and eighth.
Because scoring is deterministic, this is the BlueBench track least exposed to grader variance. The sample is still small: the simulation detections, 40% of the score, are four tasks with three trials each.
When a cheaper model is good enough
More often here than on any other track, because the output can be checked. A detection is a query you can run, so you can catch a weak rule before it ships instead of trusting the model.
- Backtest everything. Run each generated rule against known-bad and known-benign data before it alerts anyone. BlueBench's own scoring is this test, and it's why a rule that doesn't run scores zero. In Cotool's Git workflow, for example, a tuning change opens a pull request and must pass a
cotool backtest --days 30check; the example on its Detect page shows an MFA-fatigue rule with a higher threshold and service accounts excluded cutting alerts 71% over 30 days with 0 missed. With a backtest in place, DeepSeek V4.1 Flash at $0.17 or Claude Haiku 5.5 at $0.59 can write the first draft of most rules. - Spend on the hard rules. Rules that need noise controls across several sources, like the Windows lineage task, are where models spread from 95.8% to below 50%. Try the top models on two or three rules like yours before choosing; no single model led every detection benchmark.
- Check the neighboring track. A detection agent that also investigates or hunts needs those skills too. GPT-6 Astra is 10th on threat hunting, and GLM-5.3 is sixth on hunting but 23rd on detection.
- Watch reliability. Claude Opus 4.8's score is high but its 17.3 reliability means wide swings between tasks; pair it with stricter backtests or review.
Detection as code covers the review and CI pipeline these rules should pass through, and what a detection factory is covers producing them at volume.
How Cotool applies these results to detections
Cotool publishes BlueBench and uses detection agents in its own product. In Cotool Detect, detections are Python code that runs queries, so the query-writing skill this track measures is the core of each one. Agents write new detections and tune existing ones: each alert verdict feeds back into the detection that fired it, and a proposed tuning shows its effect on a 30-day backtest before you apply it or send it for review. Cotool's MCP server also lets Claude Code, Codex, or Cursor write, test, and deploy detections, in which case the model is whatever your coding agent runs; connecting security tools to Claude Code covers that setup.
Inside Cotool, the model is set per agent in its AI SOC, from closed and open-weight providers or your own endpoint, with a recommended starting model for each agent's job from BlueBench. Every run is evaluated, so after moving a tuning agent to a cheaper model, the eval scores on your own detections show whether quality held, which a benchmark can't tell you. When a model refuses or a provider fails, Cotool Router moves the task to another provider or an open-weight model without interrupting the agent. Choosing a model automatically by task type is work Cotool describes as in progress.
FAQ
- What is the best AI model for detection engineering?
- On BlueBench's detection engineering track, as of November 2026, the best AI model for detection engineering is GPT-6 Astra at 87.3, followed by Claude Opus 4.8 (85.3) and Claude Opus 5.5 (83.8). GPT-6 Astra costs $9.60 per task, the highest of 26 models. DeepSeek V4.1 Flash scored 81.7 at $0.17 per task.
- What is the best open-weight LLM for detection engineering?
- The best open-weight LLM for detection engineering on BlueBench is DeepSeek V4.1 Flash, which scored 81.7 at $0.17 per task and ranked sixth of 26 models on the track. The next open-weight models are GLM-5.2 at 75.9 and GLM-5.3 Flash at 74.7. GLM-5.3 and Kimi K3, strong open-weight hunters, ranked 23rd and 24th on detection.
- Can AI write detection rules?
- AI can write working detection rules, and on BlueBench's detection track nine of 26 models scored above 80, with rules re-executed against the evidence and scored on precision and recall. A rule that fails to run scores zero. Every AI-written rule still needs a backtest against known-bad and known-benign data before it alerts anyone.
- Does BlueBench test Sigma, KQL, or SPL rules?
- BlueBench's detection tasks ask for SQL queries over the case data, such as DuckDB SQL on the Windows intrusion, not Sigma, KQL, or SPL. Microsoft's CTI-REALM benchmark tests KQL queries and Sigma rules written from threat intelligence reports, so it is a useful second reference for teams on those languages.
- How does BlueBench score detection engineering?
- BlueBench scores detection engineering deterministically: each submitted rule is re-executed against the evidence and earns credit for the records it should return and loses credit for records it shouldn't, with no LLM judge. Each of the three real-intrusion benchmarks counts 20% and the pooled simulation detections 40%.
Sources
- BlueBench — AI Benchmark for Defensive Security · accessed November 16, 2026
- BlueBench Capability Leaderboard · accessed November 16, 2026
- BlueBench Cost Efficiency · accessed November 16, 2026
- BlueBench Reliability Leaderboard · accessed November 16, 2026
- BlueBench Methodology · accessed November 16, 2026
- macOS Threat Investigation · accessed November 16, 2026
- Windows Enterprise Intrusion · accessed November 16, 2026
- AWS Cloud Intrusion · accessed November 16, 2026
- Initial Access & Command-and-Control · accessed November 16, 2026
- Identity & Active Directory Attacks · accessed November 16, 2026
- Impact & Exfiltration · accessed November 16, 2026
- CTI-REALM: A new benchmark for end-to-end detection rule generation with AI agents - Microsoft Security Blog · accessed November 16, 2026
- AI Detection Engineering with Python Detections - Cotool · accessed November 16, 2026
- AI SOC Without the Black Box - Cotool · accessed November 16, 2026
- Introducing Cotool Router · accessed November 16, 2026





