Inferensys

Prompt

Escalation Evidence Packaging Prompt for Security Analysts

A practical prompt playbook for using the Escalation Evidence Packaging Prompt in production security automation workflows to prepare structured investigation handoff packages.
Operations team reviewing AI workflow automation on laptop, workflow builder visible, casual office setup.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the job-to-be-done, ideal user, required context, and when not to use the Escalation Evidence Packaging Prompt.

This prompt is designed for security automation engineers and SOC platform builders who need to convert raw detection outputs into structured, analyst-ready investigation packages. The core job-to-be-done is the handoff: taking machine-generated alerts, log excerpts, risk score breakdowns, and related context, then producing a formatted evidence package that follows a standard investigation SOP. Use it when an automated detection system or risk scoring pipeline has flagged an event that requires human investigation, and the goal is to eliminate the manual assembly work that analysts typically perform before they can begin actual analysis. The ideal user is a developer or engineer wiring together a detection pipeline, a SOAR platform, or a case management system, not the analyst performing the investigation itself.

The prompt requires specific, structured inputs to function reliably. You must provide the raw alert payload, relevant log excerpts with timestamps, a risk score breakdown showing contributing factors and their weights, any related alerts or correlated events, and the target investigation SOP sections that define what a complete package must contain. Without these inputs, the prompt will produce a generic summary rather than a complete evidence package. The output is designed to be ingested by a case management system, ticketing platform, or SOC queue, so the prompt includes formatting instructions that match the target system's schema. This is not a prompt for performing the investigation itself, generating new hypotheses, or making escalation decisions. It is a packaging prompt that ensures the handoff from machine to human is complete, consistent, and immediately actionable.

Do not use this prompt when the detection system's output is already structured and complete enough for direct analyst consumption, or when the investigation workflow does not follow a defined SOP that can be encoded as completeness checks. It is also inappropriate for real-time blocking decisions where latency constraints prevent the assembly of a full evidence package. In those cases, a lightweight escalation decision prompt with threshold comparison is more suitable. For investigations that require cross-system correlation or root cause hypothesis generation, use dedicated anomaly correlation or hypothesis generation prompts before packaging the results with this prompt. Always validate the output against the target system's schema before ingestion, and implement a human review step if the packaging prompt itself introduces uncertainty about evidence completeness or accuracy.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Escalation Evidence Packaging Prompt delivers value and where it introduces risk. Use these cards to decide whether this prompt fits your investigation handoff workflow.

01

Good Fit: Structured Handoff Workflows

Use when: your SOC or fraud team has a defined investigation SOP with required fields, evidence types, and triage notes. Guardrail: map the prompt's output schema directly to your case management system fields so the package lands where analysts expect it.

02

Good Fit: Multi-Source Evidence Aggregation

Use when: an alert fires and you need to pull log excerpts, related alerts, risk score breakdowns, and asset context into one view before human review. Guardrail: pre-fetch evidence sources in the application layer and pass them as structured context rather than asking the model to retrieve or invent evidence.

03

Bad Fit: Real-Time Blocking Decisions

Avoid when: the workflow requires sub-second decisions to block a transaction or isolate a host. Evidence packaging adds latency and is designed for human review, not inline enforcement. Guardrail: use a separate lightweight risk threshold prompt for blocking actions and reserve this prompt for post-detection investigation handoff.

04

Bad Fit: Fully Autonomous Investigation

Avoid when: you expect the AI to close incidents without human review. This prompt prepares context for a human analyst; it does not replace analyst judgment. Guardrail: always route the output to a review queue and require human acknowledgment before incident closure.

05

Required Inputs

Must have: triggering alert details, raw log excerpts, risk score with feature breakdown, related alert IDs, and asset or user context. Guardrail: validate input completeness before calling the prompt. If required fields are missing, route to a missing-information interruption prompt instead of generating an incomplete package.

06

Operational Risk: Evidence Hallucination

Risk: the model may fabricate log entries, alert relationships, or risk explanations that look plausible but are not grounded in real data. Guardrail: implement post-generation validation that checks every cited alert ID, timestamp, and log excerpt against the source data. Flag unverifiable claims for human review before the package reaches an analyst.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A copy-ready prompt for packaging raw detection signals into a structured evidence brief ready for a human investigator's queue.

This prompt template is designed to be pasted directly into your system instructions or orchestration layer. It takes raw outputs from your detection pipeline—such as log excerpts, risk scores, and related alert IDs—and assembles them into a standardized evidence package. The goal is to eliminate the manual copy-paste work analysts perform when preparing an investigation handoff, ensuring every package is consistent with your investigation SOPs.

code
You are an escalation evidence packaging assistant for a security operations team. Your task is to compile a structured evidence package from the provided detection data. The package must be complete enough for a human analyst to begin an investigation without re-querying source systems.

## Input Data
- **Triggering Alert:** [ALERT_DETAILS]
- **Risk Score Breakdown:** [RISK_SCORE_JSON]
- **Relevant Log Excerpts:** [LOG_EXCERPTS]
- **Related Alert IDs:** [RELATED_ALERT_IDS]
- **Asset Context:** [ASSET_INFORMATION]
- **User/Entity Context:** [ENTITY_CONTEXT]

## Required Output Schema
Produce a JSON object conforming to this exact structure:
{
  "package_id": "string",
  "generated_at": "ISO8601 timestamp",
  "executive_summary": "A 2-3 sentence plain-language summary of what happened and why it's suspicious.",
  "risk_details": {
    "composite_score": "number (0-100)",
    "score_trend": "string (escalating | stable | de-escalating)",
    "top_risk_drivers": ["string (list of the top 3 factors contributing to the score)"],
    "threshold_comparison": "string (e.g., 'Score of 85 exceeds critical threshold of 80')"
  },
  "evidence_inventory": [
    {
      "source": "string (e.g., 'Firewall Log', 'EDR Alert')",
      "timestamp": "ISO8601",
      "summary": "string (a 1-sentence description of the evidence)",
      "raw_excerpt": "string (the exact log line or alert text)",
      "relevance": "string (explain how this evidence supports or contradicts the alert)"
    }
  ],
  "related_alerts": [
    {
      "alert_id": "string",
      "relationship": "string (e.g., 'Same source IP', 'Same user within 10 minutes')"
    }
  ],
  "initial_triage_notes": {
    "likely_scenario": "string (the most probable attack or failure scenario)",
    "alternative_scenarios": ["string"],
    "immediate_recommended_actions": ["string (a list of 2-4 concrete next steps for the analyst)"],
    "missing_evidence": ["string (list any expected data sources that are absent or empty)"]
  },
  "sop_compliance_check": {
    "required_fields_present": "boolean",
    "missing_required_fields": ["string"],
    "overall_completeness": "string (complete | partial | insufficient)"
  }
}

## Constraints
- Do not fabricate evidence. If a field is empty or data is missing, note it explicitly in `missing_evidence` and set `required_fields_present` to false.
- The `executive_summary` must be understandable by a non-specialist manager.
- All timestamps must be in ISO8601 format.
- If the risk score is below the defined threshold of [CRITICAL_THRESHOLD], add a note to the `initial_triage_notes` explaining why this alert was escalated despite being below threshold.
- The `sop_compliance_check` must reference the investigation SOP requirements defined in [SOP_REQUIREMENTS_DOC].

To adapt this template, replace the square-bracket placeholders with data from your detection pipeline before sending it to the model. The [SOP_REQUIREMENTS_DOC] placeholder is critical—it should contain the specific fields your investigation team requires for a complete handoff. If your SIEM or SOAR platform enforces a different output schema, modify the JSON structure accordingly, but preserve the sop_compliance_check block as a final validation gate. For high-severity alerts, consider adding a [HUMAN_REVIEW_REQUIRED] boolean flag that forces a manual review of the generated package before it reaches the analyst queue.

IMPLEMENTATION TABLE

Prompt Variables

Each placeholder must be populated before the prompt is sent. Validation notes describe what the model needs to produce reliable output.

PlaceholderPurposeExampleValidation Notes

[ALERT_DETAILS]

Raw alert payload, including trigger condition, timestamp, and affected asset

{"alert_id": "ALT-9921", "rule": "Suspicious O365 Login", "timestamp": "2025-01-15T08:22:10Z", "asset": "svc-account-01"}

Must be valid JSON. Check that required fields (alert_id, timestamp, asset) are present and non-null before sending.

[LOG_EXCERPTS]

Relevant raw log lines from SIEM, EDR, or application logs with timestamps

2025-01-15 08:22:10 User svc-account-01 authenticated from IP 203.0.113.5 (geo: RU) using legacy auth protocol

Validate that each excerpt includes a timestamp and source system. Minimum 3 excerpts required; if fewer, set a completeness flag to false.

[RISK_SCORE_BREAKDOWN]

Structured risk score object with component scores and weights

{"composite_score": 87, "components": [{"name": "geo_anomaly", "score": 92, "weight": 0.4}, {"name": "protocol_risk", "score": 85, "weight": 0.35}]}

Schema check: must include composite_score (0-100) and a components array with name, score, and weight fields. Sum of weights must equal 1.0.

[RELATED_ALERTS]

List of correlated alerts from the same asset or user within the investigation window

[{"alert_id": "ALT-9920", "rule": "Impossible Travel", "timestamp": "2025-01-15T08:20:00Z"}]

Array of objects with alert_id and timestamp. If empty, pass an empty array and set a related_alerts_present flag to false. Do not omit the field.

[INVESTIGATION_SOP_VERSION]

Version identifier for the target investigation SOP that defines required evidence fields

v2.3

Must match a known SOP version in the investigation system. Validate against an allowlist of active SOP versions before generating the package.

[TARGET_SYSTEM]

Identifier for the downstream investigation platform receiving the package

thehive

Must be one of the supported target systems: thehive, xsoar, sentinel, or service-now. Reject unknown values and request clarification.

[ANALYST_NOTES]

Optional free-text notes from automated pre-triage or prior analyst context

Automated triage: Geo-anomaly confirmed. User has no travel history to this region. Recommend priority review.

Null allowed. If provided, check length does not exceed 2000 characters. Truncate with a warning flag if exceeded.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Escalation Evidence Packaging Prompt into a production security automation workflow with validation, retries, and human review gates.

Integrating the evidence packaging prompt into a production SOAR or SIEM pipeline requires treating it as a deterministic component with well-defined inputs, outputs, and failure modes. The prompt should be invoked only after an escalation decision has already been made—it packages evidence, it does not decide whether to escalate. The calling system must supply all required context: the triggering alert, correlated events, asset context, risk score breakdown, and the target investigation system's schema. Missing inputs should cause the workflow to halt and request data, not to invoke the prompt with incomplete context.

The implementation harness should validate the model's output against the expected schema before the evidence package enters any downstream system. Use a strict JSON Schema validator that checks for required fields (incident_id, evidence_items, risk_score_breakdown, related_alerts, triage_notes, completeness_checks), correct data types, and non-empty arrays where evidence is expected. If validation fails, implement a single retry with the validation error message appended to the prompt as a correction instruction. If the retry also fails, escalate the packaging failure itself to a human analyst with the raw model output and validation errors attached—never silently drop a failed evidence package.

Log every invocation with the prompt version, model used, input context hash, output validation status, and reviewer identity if the package was modified. For high-severity incidents, route the generated package to a human review queue before it reaches the investigation system. The reviewer should confirm that evidence items are correctly attributed, risk score components are explained, and no critical context was omitted. After review, store the final package immutably in the case management system and feed any reviewer corrections back as few-shot examples for future prompt iterations. Avoid using this prompt for real-time blocking decisions—it is designed for post-escalation handoff packaging, not for inline transaction gating.

IMPLEMENTATION TABLE

Expected Output Contract

The model must produce a JSON object matching this structure. Validate programmatically before ingestion into the investigation system.

Field or ElementType or FormatRequiredValidation Rule

escalation_id

string (UUID v4)

Must match UUID v4 regex. Generate if not provided in [INPUT].

generated_at

string (ISO 8601)

Must parse as valid ISO 8601 timestamp. Must be within 5 minutes of system clock at validation time.

risk_score_breakdown

object

Must contain 'composite_score' (number 0-100), 'confidence_interval' (object with 'lower' and 'upper' numbers), and 'contributing_factors' (array of objects with 'factor_name', 'score_contribution', and 'evidence_source'). Array must not be empty.

log_excerpts

array of objects

Each object must have 'timestamp' (ISO 8601), 'source_system' (string), 'raw_event' (string, truncated to 500 chars max), and 'relevance' (string enum: 'direct', 'contextual', 'corroborating'). Array must contain at least 1 item.

related_alerts

array of objects

Each object must have 'alert_id' (string), 'alert_type' (string), 'severity' (string enum: 'critical', 'high', 'medium', 'low'), and 'correlation_note' (string). Array can be empty if no related alerts exist.

initial_triage_notes

string

Must be non-empty string between 50 and 2000 characters. Must not contain unresolved placeholder tokens.

completeness_check

object

Must contain 'sop_sections_covered' (array of strings matching SOP section IDs from [SOP_REQUIREMENTS]), 'missing_evidence_flags' (array of strings, can be empty), and 'recommended_actions' (array of strings, at least 1 item).

target_system_format

string

Must exactly match one of the allowed values from [TARGET_SYSTEMS]: 'thehive', 'xsoar', 'splunk_es', 'jira_sm', 'servicenow_sir'. Reject if value is not in the allowed list.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when packaging escalation evidence for security analysts and how to guard against it.

01

Incomplete Evidence Packages

What to watch: The prompt omits required investigation fields such as related alerts, asset context, or timeline gaps, forcing analysts to re-query source systems. Guardrail: Define a mandatory evidence schema with completeness checks against SOP requirements before the package is delivered to the queue.

02

Hallucinated Log Excerpts

What to watch: The model fabricates plausible log entries or timestamps when source data is sparse, creating false leads that waste investigation time. Guardrail: Require every log excerpt to include a source pointer and run a post-generation grounding check that flags unsourced claims for human review.

03

Risk Score Misattribution

What to watch: The prompt conflates contributing factors or assigns weight to signals that weren't present in the original risk computation, producing an explanation that doesn't match the score. Guardrail: Lock the risk score breakdown to the exact feature list and weights from the scoring system; forbid the model from inventing new drivers.

04

Triage Notes Drift

What to watch: Initial triage notes become speculative or overconfident, biasing the human analyst before they review the raw evidence. Guardrail: Constrain triage notes to a structured template with explicit uncertainty markers and a mandatory 'evidence gaps' section.

05

Target System Format Mismatch

What to watch: The generated package uses the wrong field names, nesting, or data types for the target investigation system, causing ingestion failures or silent field drops. Guardrail: Validate the output against the target system's ingestion schema before marking the handoff as complete; retry with schema errors fed back to the model.

06

Stale Context Contamination

What to watch: The prompt pulls in outdated alert context or closed incidents, making the package reference resolved issues as active threats. Guardrail: Include a freshness timestamp filter in the evidence assembly step and add a validation rule that rejects packages referencing closed or stale incident IDs.

IMPLEMENTATION TABLE

Evaluation Rubric

Test these criteria against a golden dataset of 20-50 known detection scenarios before deploying any prompt change. Each scenario should include a mix of true-positive, false-positive, and edge-case alerts with known-good evidence packages.

CriterionPass StandardFailure SignalTest Method

Evidence Completeness

All required fields from [INVESTIGATION_SOP] are present and non-null unless explicitly marked optional

Missing required fields such as [LOG_EXCERPTS], [RISK_SCORE_BREAKDOWN], or [RELATED_ALERTS] in output

Schema validation against SOP field list; count null required fields across 50 test cases

Log Excerpt Accuracy

All [LOG_EXCERPTS] entries match source timestamps, raw log lines, and event IDs exactly with no hallucinated values

Fabricated timestamps, altered log content, or invented event IDs that do not appear in [RAW_LOG_DATA]

Exact string match between output excerpts and source log entries; flag any edit distance greater than zero on raw log text

Risk Score Attribution

Every risk factor in [RISK_SCORE_BREAKDOWN] cites a specific evidence source from [DETECTION_SIGNALS] with confidence bounds preserved

Risk factors listed without source attribution or confidence bounds dropped from original detection signal

Parse output for source field presence; verify each attribution maps to an input signal ID from the test case

Related Alert Correlation

All [RELATED_ALERTS] entries include alert ID, correlation rationale, and temporal relationship to primary alert with no false correlations

Unrelated alerts included without rationale or alerts correlated solely by timestamp proximity without behavioral link

Manual review of correlation rationale against known test case relationships; check that rationale field is non-empty and references specific shared indicators

Triage Note Actionability

[INITIAL_TRIAGE_NOTES] contain at least one concrete next step, one open question, and one escalation condition per investigation SOP

Vague triage notes such as investigate further or monitor situation without specific actions, questions, or escalation triggers

Keyword and structure check for action verbs, question marks, and conditional language; human review on 10% sample for actionability scoring

Timestamp Consistency

All timestamps in the evidence package use the timezone specified in [OUTPUT_TIMEZONE] and maintain chronological ordering in timeline sections

Mixed timezones, timestamps in wrong chronological order, or UTC conversion errors relative to source data

Parse all timestamp fields; validate timezone format matches [OUTPUT_TIMEZONE]; sort and check monotonic ordering in timeline arrays

Handoff Format Compliance

Output matches [TARGET_SYSTEM_SCHEMA] exactly with correct field names, nesting, enum values, and required array structures

Schema mismatch errors such as wrong field names, incorrect nesting depth, invalid enum values, or string where array expected

JSON Schema validation against [TARGET_SYSTEM_SCHEMA]; count schema violations per test case; require zero violations for pass

Confidence Communication

When [DETECTION_SIGNALS] contain confidence below [CONFIDENCE_THRESHOLD], output includes an uncertainty flag and recommends human review before action

Low-confidence signals presented as definitive without uncertainty language or missing the required human review recommendation

Check for presence of uncertainty_flag field when any input signal confidence is below threshold; verify human_review_recommended is true in those cases

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Add strict JSON schema validation, retry logic on malformed output, and logging of every evidence package generation. Wire the prompt into an orchestration layer that pre-fetches related alerts and log excerpts before calling the model. Add eval cases for completeness checks against your SOP.

Prompt snippet

code
Generate a structured evidence package as valid JSON matching [OUTPUT_SCHEMA].
Include all required fields. If any required evidence is missing, set the field to null and flag it in missing_evidence[].
Do not fabricate log lines or alert IDs.

Event: [SECURITY_EVENT]
Related Alerts: [RELATED_ALERTS]
Log Excerpts: [LOG_EXCERPTS]
Risk Score: [RISK_SCORE]

Watch for

  • Silent format drift when the model changes JSON structure across versions
  • Missing human review step before the package reaches an investigator
  • Hallucinated alert IDs or log timestamps when context is sparse
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.