Blog

94% noise and 20 silent rules: What our first automated detection tuning run found

A weekly Elastic Workflow now handles our detection rule tuning, scoring every rule for noise, volume and silence. The noisiest rules surface before an analyst ever asks us to look.

Our analysts have a button. Inside every Kibana case, we have a custom toggle field, Open tuning request?, that routes a noisy detection rule to the Threat Detection Team for tuningd, without the analyst leaving security information and event management (SIEM). In December 2025, Aaron Jewitt wrote about how we built that toggle. We love this button for simplifying the process. It does its job and our analysts use it, but it still isn’t the best model.

If an analyst has to click it, they’ve already spent time triaging a rule that could have been proactively tuned. We wanted something that finds those rules before analysts tell us about them, a weekly engine that scores every detection rule against noise rate and alert volume, as well as silence, and delivers a prioritized digest before our team's rule review. In this blog post, we cover how we built it using Elastic Workflows.

What is Elastic Workflows?

Elastic Workflows is a native Kibana automation engine that reached general availability (GA) in Elastic 9.4. You define multistep automations in YAML (such as triggers or sequential steps, or connectors to external services, like Slack and Jira), and Kibana runs them on schedule or on alert fire. It can also run them on demand. No security orchestration, automation, and response (SOAR) platform or external orchestration is required. The automation runs where the data lives.

A workflow can query Elasticsearch with Elasticsearch Query Language (ES|QL), call a Kibana AI agent to reason over the results, open a case, post to Slack, and tag an alert, all in sequence with conditional branching. If you’re new to Workflows in a security context, the Security Labs guide on building automated security playbooks is the most practical starting point. The Elastic Workflows GA announcement covers case management in detail, and the Search Labs post has the clearest YAML authoring tutorial.

How we score detection rules: The tuning framework

To move from reactive analyst feedback to automated, proactive detection-tuning identification, we built a scheduled workflow using native Kibana features and ES|QL. Before writing any workflow logic, we established a tiering framework to score detection quality across our telemetry. Following is an example of what we used in our framework:

Digest section

Trigger

Action

🔴 Tier 1 (high noise)

Noise rate ≥70% with ≥10 closed alerts in 90 days

Immediate tuning

🟡 Tier 2 (moderate noise)

Noise rate 50%–69% with ≥10 closed alerts

Schedule for review

📈 Tier 3 (trends)

Volume growth >25%, or high volume with no false positive (FP) data

Flag the trend

⚠️ Rule issues

Active execution errors, warnings, or partial failures

Map error to remediation step

💔 Broken rules

Silent ≥45 days with non-OK execution status, or no longer in the detection engine

Investigate or retire

With the tiers defined, the workflow's job is straightforward; that is, run targeted ES|QL queries against closed-alert data and pass the results to an AI summarization pipeline. Everything runs inside Elastic Workflows.

The ES|QL queries that score detection rule noise

Note: index: .internal.alerts-* is a placeholder for our actual index.

There are seven query steps, as shown in the following table. The first five use ES|QL; the last two call the detection engine API directly:

Type

Query purpose

Source

Time period

ES|QL

False positive and noise rate per rule

index: .internal.alerts-*

Last 90 days

ES|QL

Alert volume

index: .internal.alerts-*

Last 30 days versus prior 60-day window

ES|QL

Silent rules (30 most recent, plus a total count)

index: .internal.alerts-*

Greater than 45 days ago

Kibana API

Rule execution health

/api/detection_engine/rules/_find

Rules with errors in the last 24 hours (up to 100)

Kibana API

Recently modified rules

/api/detection_engine/rules/_find

50 most recently updated rules

Query sources for AI Detection Rule Tuning: Kibana API and ES|QL lookups with index and time period detail.

The two exclusion filters that every query shares

All five ES|QL queries listed above share two exclusion filters at the top. WHERE kibana.alert.severity != "low" drops low-severity alerts. We track  low-severity alerts internally but don’t announce them to analysts. Including them would inflate noise rates and misrepresent the analyst experience. WHERE NOT MV_CONTAINS(kibana.alert.rule.tags, "SEND_TO_DEV") removes rules still in validation; they shouldn’t appear in the weekly digest until promoted to production. Of course, if you use low-severity alerts in a different way, you can amend or drop this part.

Query 1: False positive and noise rate per detection rule

Query 1 calculates noise rate per detection rule across 90 days of closed alerts. COUNT_IF doesn’t exist in ES|QL; the workaround is EVAL is_fp = CASE(condition, 1, 0), followed by SUM(is_fp). Integer division also truncates, so 17 / 36 evaluates to 0, not 0.47. Noise rate calculations must multiply before dividing: ROUND((fp_count + bp_count) * 100 / total_closed, 1).

FROM .internal.alerts-*
| WHERE @timestamp > NOW() - 90 days
| WHERE kibana.alert.workflow_status == "closed"
| WHERE kibana.alert.severity != "low"
| WHERE NOT MV_CONTAINS(kibana.alert.rule.tags, "SEND_TO_DEV")
| EVAL is_fp = CASE(kibana.alert.workflow_reason == "false_positive", 1, 0)
| EVAL is_bp = CASE(kibana.alert.workflow_reason == "benign_positive", 1, 0)
| EVAL is_tp = CASE(kibana.alert.workflow_reason == "true_positive", 1, 0)
| STATS
    total_closed = COUNT(),
    fp_count     = SUM(is_fp),
    bp_count     = SUM(is_bp),
    tp_count     = SUM(is_tp)
    BY kibana.alert.rule.name
| WHERE total_closed >= 10
| EVAL fp_rate    = ROUND(fp_count * 100 / total_closed, 1)
| EVAL noise_rate = ROUND((fp_count + bp_count) * 100 / total_closed, 1)
| SORT noise_rate DESC

Queries 2 and 3: Alert volume over 30 days against the prior 60

ES|QL doesn’t support splitting a single aggregation across two time windows in one query; there’s no conditional count by time range. Volume trend requires two separate queries with their ranges split at the 30-day mark. The AI summarization step compares them to detect rules that are spiking or declining.

FROM .internal.alerts-*
| WHERE @timestamp > NOW() - 30 days
| WHERE kibana.alert.severity != "low"
| WHERE NOT MV_CONTAINS(kibana.alert.rule.tags, "SEND_TO_DEV")
| STATS count_30d = COUNT() BY kibana.alert.rule.name
| SORT count_30d DESC

Query 4: Detection rules silent for more than 45 days

We don’t expect rules to fire every day or even every month (our incident response team would disown us), but we do need to catch rules that have stopped firing entirely due to broken data pipelines or field schema changes, along with those as a result of obsolete rule logic. The 45-day lower bound keeps the scope manageable; without it, the workflow would churn through every rule that had a quiet week. The workflow sorts by days_silent ascending and keeps the 30 most recently silent rules, because evaluating a longer list pushes the AI step past its timeout, and a rule that went quiet recently is also more likely to be fixable. A separate count query applies the same filters without the limit, so the digest can state how many silent rules weren’t evaluated.

FROM .internal.alerts-*
| WHERE kibana.alert.severity != "low"
| WHERE NOT MV_CONTAINS(kibana.alert.rule.tags, "SEND_TO_DEV")
| STATS last_seen = MAX(@timestamp) BY kibana.alert.rule.name, kibana.alert.rule.uuid
| EVAL days_silent = DATE_DIFF("day", last_seen, NOW())
| WHERE days_silent >= 45
| SORT days_silent ASC
| LIMIT 30

Query 5: Detection rule execution health

Query 5 calls the detection engine _find API with a Kibana Query Language (KQL) filter to return only rules currently in an error, warning, or partial-failure execution state (typically a handful, not the full inventory). The results feed the ⚠️ Rule Issues section, and they’re cross-referenced against the silent rules list. A rule absent here is healthy but quiet; a rule present here is actively broken. The query only returns rules whose last execution was in the past 24 hours, so rules that have since been fixed or disabled drop out of the digest.

- name: query_rule_health
  type: kibana.request
  with:
    method: GET
    path: "/s/{{ consts.space_id }}/api/detection_engine/rules/_find"
    query:
      per_page: 100
      filter: 'alert.attributes.executionStatus.status:(error OR warning OR "partial failure") AND alert.attributes.executionStatus.lastExecutionDate > now-24h'
    use_server_info: true
    fetcher:
      skip_ssl_verification: true
  timeout: "30s"
  on-failure:
    retry:
      max-attempts: 2
      delay: "15s"
    continue: true

Query 6: Recently modified rules

This query fetches the 50 most recently updated rules from the detection engine, sorted by updated_at descending. The AI cross-references this list against every Tier 1 rule. If a noisy rule was recently modified, it may have already been tuned and the 90-day noise window hasn’t caught up yet. Those rules receive a ⏳ flag and a softer recommendation rather than an immediate disable.

- name: query_rule_updates
  type: kibana.request
  with:
    method: GET
    path: "/s/{{ consts.space_id }}/api/detection_engine/rules/_find"
    query:
      per_page: 50
      sort_field: updated_at
      sort_order: desc
    use_server_info: true
    fetcher:
      skip_ssl_verification: true
  timeout: "30s"
  on-failure:
    continue: true

How the AI agent builds the Slack digest

Once the five ES|QL queries and two detection engine API calls return, the workflow calls the AI agent using the ai.agent step. The converse endpoint has a ~5-minute server-side timeout that the agent's reasoning time regularly exceeded; ai.agent bypasses it.

The agent receives all seven result sets as structured data in a single prompt: noise rates, volume trends (30 days versus 60 days), silent rule lists, execution health logs, and recent modification history. We instruct it to synthesize these into a Slack digest that mimics our manual prioritization flow.

On top of the tier rules, the agent applies three modifiers before it writes anything: 

Signal

Flag

Agent behavior

Tier 1 rule appears in the recently modified list

⏳

Soften the recommendation; the 90-day window may not have caught up

Tier 1 rule with 30-day volume below 25% of the prior daily average

📉

Note that an existing fix appears to be working

Three or more rules failing with authentication errors at once

None

Report as one possible auth-key incident rather than listing each rule

Tier 2 (50–69% noise) rules get flagged for routine review. Tier 3 spotlights significant volume growth (>25%) or rules with high volume that never appear in the false positive tracking dataset. Execution health data feeds a separate ⚠️ Rule Issues section, where common error messages, like "Unable to find matching indices," are mapped to specific remediation steps. In the 💔 Broken Rules section, silent rules with a non-OK execution status are marked as actively broken; rules absent from the health data that no longer exist in the detection engine at all were likely deleted or renamed.

The output is formatted strictly for Slack: bold rule names, emoji tier headers, bullet lines, with zero meta-commentary. It posts directly to the channel as is. The digest is built in two parts (tiers; and broken rules and rule issues) and posted as two separate Slack messages, because a single long message was split by the Slack connector into dozens of small fragments.

- name: build_digest
  type: ai.agent
  with:
    agent_id: "{{ consts.digest_agent_id }}"
    message: >-
You are producing the Proactive Rule Tuning Recommender weekly digest for the Elastic TDR Detection team. Output ONLY the Slack-formatted digest — no preamble, no meta-commentary, no statements about what you are doing or what the digest contains. Your response will be posted directly to Slack as-is.
Start with a one-line header in this exact format (fill in dates from report_date below):
*📋 Rule Tuning Digest — week of {report_date} | FP window: {compute report_date minus 90 days} – {report_date}*
       Then a blank line, then the first tier section.


FORMATTING — Slack mrkdwn only. Do NOT use Markdown table syntax:
         - List each rule as a single bullet line:
*Rule Name* — noise_rate% noise (fp_count FP · bp_count BP · tp_count TP) | total_closed closed → Recommended action
- Use these emoji for tier headers: 🔴 Tier 1, 🟡 Tier 2, 📈 Tier 3, 💔 Broken Rules, ⚠️ Rule Issues.


 <instructions truncated for brevity>
  timeout: 8m

Automating this step cuts what would otherwise be a multi-index manual review down to reading a Slack message. Instead of pulling log counts or querying quarterly metrics, engineers see exact rule names, noise percentages, closure counts, and trend directions, and they can go straight to remediation. For more on how we’re using AI throughout this process, read Aaron Jewitt's Inside Elastic InfoSec's agentic SOC: cutting alert triage from 30 minutes to under 3.

What the first run found

The first real run came back with actual signal. Every rule in the false positive dataset had a noise rate of 94% or higher, and two Kibana operational monitoring rules had surged by more than 145% in the prior 30 days. Plus,  20 rules had fired no alerts in 46–50 days. The digest named the specific rules, with closure counts and noise percentages, not category summaries.

Maggie Musquez's work on raising AI triage accuracy from 60% to 92% showed that the gains come from better context, not better models. The same holds for workflow authoring. A prompt that captures real operational constraints (for example, which tiers matter and which signals indicate a rule has already been tuned, along with which errors map to which fixes) is worth more than a generic summarization instruction, because it tells the model where the data will mislead it.

What the weekly rule-tuning workflow does

Every seven days, the workflow runs the following steps in under 10 minutes:

  1. Queries 90 days of closed-alert outcome data from .internal.alerts-*, excluding low-severity alerts and rules tagged SEND_TO_DEV.

  2. Scores every rule with 10 or more closed alerts against noise rate, recent volume, and prior-period volume.

  3. Queries rules that have been silent for 45 days or more.

  4. Queries the detection engine for rules with active execution errors, warnings, or partial failures.

  5. Queries the 50 most recently modified rules to identify Tier 1 candidates that may already have been tuned.

  6. Passes all seven result sets to a Claude-powered AI agent that classifies, ranks, detects broken rules, flags recently tuned candidates, and formats a Slack digest.

  7. Posts the digest to the team channel before Thursday's loud-rule review.

Sample weekly Slack digest output from the Proactive Rule Tuning Recommender.

The shift from analyst-initiated tuning requests to a weekly proactive check changed how the team manages detection quality. The workflow runs inside the infosec-detections space, keeping noise down across thousands of alerts without adding head count or tooling.

This is one piece of the broader agentic security operations center (SOC) picture that Aaron Jewitt's series covers, specifically the detection team's view before cases are created. His agentic SOC post covers what happens at the analyst end, once a workflow has already populated a case.

The Open tuning request? button still exists and is useful when an analyst catches something before the weekly run. The ideal outcome is that they never need it, because the workflow found the same rule three days earlier.

My next post takes this a step further and covers a separate workflow that automatically opens GitHub issues for every rule that the digest flags, each prefilled with recommended tuning actions.

How helpful was this content?

AlertZero in Elastic Security: Every alert answered. Every decision yours

AlertZero in Elastic Security: Every alert answered. Every decision yours

James Spiteri
Thinking fast about prompt injection: New System 1 models in Elastic

Thinking fast about prompt injection: New System 1 models in Elastic

Mika Ayenson
Mapping the AI threat landscape: MITRE ATLAS comes to Elastic Security

Mapping the AI threat landscape: MITRE ATLAS comes to Elastic Security

Davis Plumlee

Elastic Security Labs Newsletter