Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Parser-Free Querying of Security Logs

About

Security analysts routinely query system logs to detect threats and investigate incidents, but each log source uses its own semi-structured format: logs are cheap to produce, but expensive to use. The standard approach, building per-source parsers to normalize logs into structured schemas, is powerful but requires continuous engineering effort for each new format. Querying raw logs directly with tools like grep avoids this cost, but requires analysts to know each source's message variants and cannot express the multi-line temporal queries that security investigations demand. We present Sieve, a system that generates executable query code from natural-language security questions by grounding a large language model with lightweight, automatically extracted log-format context, requiring only one LLM call per query followed by deterministic execution. Evaluating 133 security queries across 5 log types, we find that Sieve achieves over a 3x reduction in error rate on complex temporal and cross-event queries compared to manual analyst scripting, with the largest gains on the multi-line correlation tasks most critical to active investigations. Our results and benchmark provide evidence that LLM-generated code can bridge the gap between the expressiveness of structured log querying and the immediacy of working directly with raw files.

Evan Luo, Julien Piet, David Wagner• 2026

Related benchmarks

TaskDatasetResultRank
Querying security logsCron logs Simple WHERE queries
Macro F1 Score100
4
Log-Investigation Query GenerationDHCP Simple (test)
F1 Score98.9
2
Log-Investigation Query GenerationCron Complex (test)
F1 Score99.1
2
Log-Investigation Query GenerationSSH Complex (test)
F1 Score84.7
2
Log-Investigation Query GenerationAudit Complex (test)
F1 Score91
2
Log-Investigation Query GenerationDHCP Complex (test)
F1 Score85.9
2
Log-Investigation Query GenerationPuppet Complex (test)
F1 Score92
2
Log-Investigation Query GenerationSSH Simple (test)
F1 Score95
2
Log-Investigation Query GenerationAudit Simple (test)
F1 Score97.8
2
Log-Investigation Query GenerationPuppet Simple (test)
F1 Score95.1
2
Showing 10 of 15 rows

Other info

Follow for update