By NHI Mgmt Group Editorial TeamBased on Legion AI: “How IOC Indexing Unlocks Automated (AI) Security Alert Correlation” (May 26, 2026)

TL;DR: Security alert correlation breaks down when LLMs ingest raw IOCs such as emails, URLs, IPs, domains, and hostnames, because token bloat and malformed structured output erode reliability, according to Legion AI. Replacing raw indicators with compact symbolic references turns multi-step investigations into a tractable agentic workflow, and that is the difference between experimentation and operational SOC automation.


At a glance

What this is: This is an analysis of why LLM-driven security investigations fail when raw IOCs are left unstructured, and how compact indexing makes correlation output reliable.

Why it matters: It matters because SOC teams using agentic AI need structured, repeatable handling of indicators if they want automation to survive multi-step investigations and produce usable case output.

By the numbers:

  • Across 100 evaluation runs, the full system achieved 100% JSON validity and 100% IOC reference compliance.

Context

LLM-based security investigations break down when raw indicators are allowed to accumulate across multiple tool queries and reasoning steps. Emails, URLs, IPs, domains, and hostnames expand the prompt, repeat endlessly, and make structured outputs fragile. In SOC automation terms, the underlying governance gap is not model intelligence alone but context discipline: investigations need a stable way to represent indicators so the agent can reason without echoing the entire incident history.

This is also an identity and access problem in the broad operational sense that machine-readable security context must remain governed as it moves through an agentic workflow. If an agent cannot preserve indicator integrity across steps, it cannot produce trustworthy correlations, containment recommendations, or case records. That makes IOC handling part of the control plane for AI-assisted investigations, not a formatting detail.


Key questions

Q: How should security teams handle raw IOCs in LLM-driven investigations?

A: They should normalize raw IOCs into compact references before the model reasons over them. That reduces token bloat, keeps repeated indicators consistent across steps, and lowers the chance of malformed structured output. The agent should work from a registry, not from repeated long strings copied into every turn.

Q: How should SOC teams structure indicator data for agentic investigations?

A: Use a registry-backed reference model that converts raw emails, URLs, IPs, domains, hostnames, and hashes into compact identifiers, then reuse those identifiers throughout the case. That keeps the model’s working memory consistent, reduces token waste, and makes the output easier to validate. The agent should see symbols, while the registry preserves the original evidence.

Q: What are the signs that IOC handling is failing in AI-driven SOC workflows?

A: The clearest signs are rising token usage, repeated indicator dumps in responses, and malformed structured output such as invalid JSON or broken nesting. You may also see the model include irrelevant indicators from earlier steps instead of only the ones needed for the current query. Those symptoms usually mean the investigation context is not being governed tightly enough.

Q: What should teams do when agentic workflows need both traceability and reliable output?

A: Treat indicator indexing, prompt rules, and input cleaning as one control set rather than three separate fixes. The agent needs stable references for reasoning, explicit instructions about when to use them, and preprocessing that removes malformed tool output before inference. That combination is what turns multi-step investigation data into something the model can handle consistently.


Technical breakdown

Why raw IOCs destabilise multi-step investigation prompts

Raw IOCs are verbose, repetitive, and often partially structured. In an agentic investigation, every new query result can add more email addresses, URLs, IPs, domains, and hostnames to the context window. That increases token usage and raises the chance that the model will echo indicators inconsistently or emit malformed JSON. Once the model is carrying several rounds of step history, the problem compounds: the same indicator appears in multiple forms, and the output schema becomes easier to break. Practical implication: treat indicator volume as a first-class reliability risk in SOC automation.

Practical implication: reduce prompt inflation by normalising indicators before they reach the model.

How IOC indexing changes the model’s working memory

IOC indexing replaces long indicator strings with compact symbolic references such as EMAIL01 or URL01 while storing the original value in a registry. That gives the model a stable shorthand to reuse across steps, so the investigation can refer to the same object without carrying the full raw value every time. The approach depends on deterministic extraction order, deduplication, and selective processing of dynamic content only. Practically, that turns the model’s working memory into a governed reference system rather than a dump of every indicator ever seen. Practical implication: consistency comes from representation, not from hoping the model remembers the right value.

Practical implication: build a registry-backed reference layer for indicators used in agentic investigations.

Why prompt instructions still matter after indexing

Indexing alone does not guarantee compliant output. The model can still revert to raw IOCs if the prompt does not explicitly tell it when to use references, when to report new values, and which indicators are relevant to the current step. That is why the prompt adjustment matters: it constrains reasoning, output formatting, and relevance filtering at the same time. In other words, the input layer cleans the data, but the instruction layer governs behaviour. Practical implication: reliable AI correlation requires both data transformation and behavioural control.

Practical implication: pair IOC indexing with explicit output rules and relevance checks.


Threat narrative

Attacker objective: The objective is not an external attacker in the classic sense, but reliable automated correlation that survives multi-step investigations without breaking structured output.

  1. Entry begins when the investigation agent receives raw alert data containing emails, URLs, IPs, domains, and hostnames from security tools.
  2. Credential or context abuse occurs as repeated indicator values inflate the prompt and the model starts echoing them inconsistently in reasoning and output.
  3. Impact appears when structured output fails or becomes noisy enough that SOC automation can no longer trust the correlation result.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

IOC indexing is a working-memory control for agentic security operations. The article shows that the decisive failure mode is not model reasoning alone, but how much ungoverned indicator data the agent is forced to carry between steps. SOC teams should treat indicator representation as a control design problem, not a prompt-writing exercise.

Structured-output reliability depends on data shape before model capability. The move from raw IOCs to symbolic references demonstrates that format discipline can matter more than model size or chain-of-thought sophistication. Where an agent must return JSON, the operational question is whether the input stream has been reduced to stable, reusable objects before inference begins. Practitioners should design for parseability first and enrichment second.

IOC reference compliance is a governance boundary, not a convenience feature. Once an agent is allowed to mix raw values and references without strict rules, case records become inconsistent and hard to audit. That creates a trust gap between what the investigation saw and what the model reported. Security leaders should regard reference integrity as part of investigation governance and evidentiary quality.

Compact indicator references are a practical named pattern for SOC AI. IOC indexing gives security teams a repeatable way to keep evidence small, deduplicated, and traceable while an agent moves through a case. That pattern is especially valuable where alerts expand into multi-step investigations with repeated tool calls. Practitioners should adopt reference indexing wherever agentic workflows must remain auditable.

Agentic SOC automation now depends on context hygiene as much as detection quality. The article’s results show that malformed tool output and indicator sprawl can defeat otherwise workable investigation logic. That means automation teams need to govern the handoff between tools, prompts, and outputs with the same seriousness they apply to detections. Practitioners should measure reliability at the context boundary, not only at the detection boundary.

From our research library:

What this signals

IOC reference indexing is becoming a practical governance pattern for SOC agents. The failure mode in this article is not exotic. It is the predictable result of feeding a model long, repeated, semi-structured indicators and expecting reliable investigation output. Teams that want agentic SOC workflows to scale need a representation layer that keeps evidence compact and auditable.

Indicator hygiene now sits alongside detection quality as a programme metric. Once agents are allowed to ingest raw IOCs directly, reliability degrades through prompt bloat, repetition, and parse failure. That means operations teams should track context integrity, not just alert volume and MTTR, when they judge AI-assisted investigations.

AI-related credential leaks surged 81.5% year-over-year in 2025, with the surrounding AI infrastructure leaking 5x faster than core LLM providers, according to the State of Secrets Sprawl 2026. The pattern reinforces a broader point for SOC and identity teams alike: the surrounding control plane often fails faster than the model itself, so context, secrets, and references all need explicit governance.


For practitioners

  • Implement an IOC registry and reference scheme Assign compact symbolic references to emails, URLs, IPs, domains, hostnames, and hashes before they enter the model so multi-step investigations reuse stable identifiers instead of repeating raw values.
  • Separate dynamic case data from static prompt instructions Apply extraction only to step history and tool results, not to the template instructions or examples, to avoid false positives and preserve investigation instructions unchanged.
  • Normalize malformed tool output before inference Reformat comma-separated IOC strings and other malformed result fields into clean structured lists before sending them to the agent, because bad input can break otherwise valid JSON generation.
  • Enforce explicit reference-use rules in the prompt Tell the model to use symbolic references in reasoning, distinguish known from newly discovered IOCs in the indicators field, and include only indicators relevant to the current step.

Key takeaways

  • Raw IOCs make LLM-based security investigations brittle because the model has to carry too much repeating context across steps.
  • IOC indexing improves reliability by turning long indicator values into compact references that the model can reuse consistently.
  • SOC teams need both preprocessing and prompt governance if they want agentic investigations to produce valid, auditable structured output.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST AI RMF set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
MITRE ATT&CKTA0007;TA0009;TA0010 — Discovery; Collection; ExfiltrationThe article describes how investigations enumerate and process indicators across multiple steps.
Recommendation — Map multi-step indicator handling to ATT&CK tactics and validate where your detection workflow expands or leaks context.
NIST CSF 2.0PR.AA-05 — Access Permissions, Entitlements and AuthorizationsIndicator handling in agentic SOC workflows needs controlled access to the right evidence and outputs.
Recommendation — Apply PR.AA-05 to ensure only governed investigation context reaches the agent and its outputs.
OWASP Agentic AI Top 10ASI03 — Identity & Privilege AbuseAgentic workflows can misuse or misapply identifiers, references, and output authority.
Recommendation — Use ASI03 to govern how agents reuse references and avoid leaking ungoverned values into outputs.
NIST AI RMFGOVERN — AI Governance and AccountabilityThe article is fundamentally about governing how an AI system handles security evidence and outputs.
Recommendation — Establish GOVERN controls for context handling, output rules, and validation in AI-assisted investigations.

Key terms

  • IOC indexing: IOC indexing is the practice of replacing raw indicators of compromise with compact references that can be reused consistently across an investigation. It preserves traceability while reducing prompt size, duplicate context, and output fragility in AI-assisted security workflows.
  • Structured output validity: Structured output validity is the degree to which a model response conforms to the expected machine-readable format, such as valid JSON. In SOC automation, it matters because invalid nesting, broken strings, or malformed lists can stop downstream orchestration even when the reasoning is otherwise useful.
  • Context Window: The context window is the text a model receives at one time, including prompts, retrieved documents, and conversation history. Security teams care about it because it becomes the practical boundary between trusted instructions and untrusted content, especially when the application assembles that text automatically.
  • IOC Registry: An IOC registry is a managed mapping of discovered indicators to their original values and their working references. It gives an investigation agent a controlled memory of evidence, so the same indicator can be reused consistently without reintroducing long or fragile strings into the prompt.

Deepen your knowledge

NHI Mgmt Group covers identity security, NHI governance, and agentic AI through independent research, practitioner guides, and the NHI Foundation Level course. It is suitable for security practitioners who need a clearer operating model for identity, access, and machine trust across modern environments.
NHIMG Editorial Note
Published by the NHIMG editorial team on September 6, 2026.
Updated on October 11, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org