Security orchestration platforms and SOAR tools generate alerts that must reach the correct team with the right priority and context. This prompt takes a risk event, its computed category, and your routing policy, then produces a deterministic routing decision with team assignment, SLA tier, and a packaged context payload. Use it when you need consistent, policy-driven escalation routing that replaces brittle rule engines with an auditable, explainable decision layer. This prompt belongs between your detection systems and your paging or ticketing integration. It does not compute the risk score itself; pair it with a risk scoring prompt upstream.
Prompt
Escalation Routing Prompt Based on Risk Category

When to Use This Prompt
Deterministic routing of risk events to the correct team with the right priority and context, replacing brittle rule engines with an auditable decision layer.
The ideal user is a security automation engineer or platform operator who already has a risk score and category from an upstream detection system but needs to map that signal to a specific team, SLA, and notification payload. You must provide the prompt with a routing policy that defines which categories map to which teams, what severity thresholds trigger which SLA tiers, and what context fields each team requires. Without a well-defined routing policy, the prompt will produce inconsistent or incomplete routing decisions. This prompt is not a replacement for a full incident management platform; it is the decision layer that sits between detection and notification.
Do not use this prompt when the risk event lacks a computed category or when the routing policy is undefined or in flux. It is also not suitable for scenarios where the routing decision depends on real-time factors like current on-call schedules or team capacity, unless those factors are explicitly included in the input context. For high-severity events where regulatory or contractual obligations require human review of the routing decision itself, pair this prompt with a human-in-the-loop approval step before the notification is sent. The prompt produces a decision, but the execution of that decision—sending pages, creating tickets, logging audit trails—belongs in your application layer.
Use Case Fit
Where the Escalation Routing Prompt fits into a security orchestration workflow, where it breaks, and what inputs and operational risks to manage before deployment.
Good Fit: Structured Risk Signals
Use when: A risk score, anomaly type, or threat category has already been computed and needs to be mapped to a specific team, SLA, and context package. Guardrail: Validate that the upstream risk signal includes a confidence score before routing; low-confidence signals should route to a general triage queue instead of a specialized team.
Bad Fit: Raw Alert Storms
Avoid when: The system is receiving unclassified, high-volume raw alerts without any risk scoring or deduplication. Guardrail: Place a deduplication and risk-scoring layer before this prompt. Routing without prior scoring will produce inconsistent team assignments and overwhelm responders with noise.
Required Inputs
Risk: Missing fields cause hallucinated routing. Guardrail: Enforce a strict input schema that includes risk_category, risk_score, confidence_interval, affected_assets, and detection_source. If any required field is null, the prompt must return a structured error instead of guessing a team.
Operational Risk: Team Mapping Drift
Risk: Team names, on-call rotations, and escalation paths change over time. A hardcoded mapping in the prompt will become stale. Guardrail: Provide the current team mapping and on-call schedule as a tool or retrieved context injected at runtime. Log every routing decision with the mapping version used so stale assignments are auditable.
Operational Risk: SLA Misclassification
Risk: The prompt assigns a lower SLA tier than the incident requires, delaying response. Guardrail: Include a post-routing validation step that compares the assigned SLA against the risk score threshold policy. If the SLA tier is inconsistent with the score, flag for human review before dispatch.
Operational Risk: Context Package Gaps
Risk: The routed team receives an escalation without the evidence they need to act, causing back-and-forth delays. Guardrail: Define a minimum context package per risk category (e.g., log excerpts, asset details, related alerts). Validate the generated context package against this checklist before the escalation is sent.
Copy-Ready Prompt Template
A reusable prompt for routing security escalations to the correct team based on risk category, with placeholders for live data injection.
This prompt template is designed to be pasted directly into your orchestration layer. It takes a structured security event, a risk score, and your organization's routing policy, and produces a deterministic routing decision. The template uses square-bracket placeholders that your application must replace with live data before calling the model. Do not deploy this prompt with placeholders unresolved; doing so will produce unreliable routing and may leak template structure into production decisions.
textYou are an escalation routing engine for a security operations platform. Your task is to determine which team should receive an escalation based on the risk category, severity, and organizational routing policy. ## INPUT - Event Summary: [EVENT_SUMMARY] - Risk Score: [RISK_SCORE] - Risk Category: [RISK_CATEGORY] - Affected Assets: [AFFECTED_ASSETS] - Detection Source: [DETECTION_SOURCE] - Current Time: [CURRENT_TIME] ## ROUTING POLICY [ROUTING_POLICY] ## OUTPUT SCHEMA Return a valid JSON object with exactly these fields: { "routing_decision": { "target_team": "string (must match a team defined in ROUTING_POLICY)", "escalation_reason": "string (specific justification referencing risk category and policy rule)", "sla_tier": "string (P1 | P2 | P3 | P4 as defined in ROUTING_POLICY)", "required_context_package": ["list of evidence types the target team needs"], "fallback_team": "string or null (team to route to if primary is unavailable)", "routing_policy_rule_applied": "string (exact rule reference from ROUTING_POLICY)" }, "confidence": { "category_match_confidence": "high | medium | low", "routing_ambiguity_detected": true or false, "ambiguity_notes": "string or null (explain if multiple teams could apply)" } } ## CONSTRAINTS - The target_team MUST be a valid team name from the ROUTING_POLICY. - If the risk category maps to multiple teams, select the most specific match and flag routing_ambiguity_detected as true. - If no team clearly matches, set target_team to the default escalation team defined in ROUTING_POLICY and set confidence to low. - SLA tier must be derived from the risk score and the thresholds in ROUTING_POLICY, not assumed. - Required context package must include at minimum: event summary, risk score breakdown, affected assets, and detection source. - Do not invent team names, SLA definitions, or policy rules. Use only what is provided in ROUTING_POLICY. ## EXAMPLES [EXAMPLES] Return only the JSON object. No additional text.
To adapt this template, replace each placeholder with live data from your detection pipeline. [EVENT_SUMMARY] should contain a concise description of the security event. [RISK_SCORE] must include the numeric score and any sub-component breakdowns. [ROUTING_POLICY] is critical: it must define your team structure, SLA thresholds, and category-to-team mappings in structured text. The [EXAMPLES] placeholder should contain 2-3 few-shot demonstrations of correct routing decisions, including edge cases where categories overlap. After replacing placeholders, validate that the output JSON parses correctly and that the target_team field matches a real team in your system before the routing decision is executed. For high-severity events (P1/P2), always require human verification of the routing decision before dispatch.
Prompt Variables
Inputs the Escalation Routing Prompt needs to work reliably. Validate each before calling the model to prevent misrouting and SLA violations.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[RISK_CATEGORY] | The classified risk category from the upstream detection system | account_takeover | Must match an entry in the approved category taxonomy. Reject unknown or null values before prompt assembly. |
[RISK_SCORE] | Numerical risk score (0-100) assigned by the scoring engine | 87 | Parse as float. Must be >= 0 and <= 100. If null or out of range, set a flag for manual review before routing. |
[ASSET_CRITICALITY] | Criticality tier of the affected asset or system | tier_1 | Must be one of: tier_1, tier_2, tier_3. Map from CMDB before calling. Default to tier_3 if unmapped but log the gap. |
[DETECTION_TIMESTAMP] | ISO-8601 timestamp when the risk event was detected | 2025-03-17T14:22:05Z | Parse as valid ISO-8601. Reject if in the future or older than the defined lookback window (e.g., 7 days). |
[AFFECTED_USER_ID] | Unique identifier for the user or entity associated with the event | user_829104 | Must be a non-empty string. If the event is system-level, use 'system' and set [AFFECTED_SYSTEM] instead. |
[DETECTION_SOURCE] | The system or model that generated the initial alert | fraud_model_v3 | Must match a registered source in the detection registry. Unknown sources should route to a triage queue, not a specific team. |
[EVIDENCE_SUMMARY] | Brief structured summary of the evidence supporting the risk score | Login from new IP in Riga, followed by password change and 3 failed MFA attempts within 4 minutes. | Must be a non-empty string under 500 characters. If evidence is missing, set [ESCALATION_REASON] to 'insufficient_evidence' and route to manual review. |
Implementation Harness Notes
How to wire the escalation routing prompt into a security orchestration platform with validation, retries, and audit logging.
Integrating this prompt into a production security orchestration platform requires treating it as a deterministic routing function with a natural-language reasoning layer, not as an open-ended chatbot. The prompt should be called after a risk score has been computed and a threshold breach has been confirmed. The application layer must supply the structured [INPUT] payload—including the risk category, severity, affected assets, and detection source—and the [ROUTING_TABLE] that maps categories to on-call teams, SLA tiers, and escalation paths. The model's job is to produce a single JSON routing decision that matches the schema exactly, not to invent new categories or override the routing table.
Validation and retry logic is critical because a malformed routing decision can delay incident response. Implement a JSON schema validator that checks: (1) the team field matches an entry in the [ROUTING_TABLE], (2) the sla_tier is one of the allowed enum values, (3) the context_package contains all required fields from the [OUTPUT_SCHEMA], and (4) the reasoning field is non-empty and references the risk category. If validation fails, retry the prompt once with the validation error message appended to the [CONSTRAINTS] block—for example, "Your previous output failed validation: team 'netsec' not found in routing table. Use only teams from the provided table." If the second attempt also fails, escalate to a human dispatcher with the raw model output and validation errors logged. Do not retry more than twice; at that point, the routing decision is too unreliable for automated handling.
Model choice and tool use should favor models with strong instruction-following and structured output capabilities. GPT-4o and Claude 3.5 Sonnet are appropriate defaults. Enable structured output mode (JSON mode or function calling with a strict schema) rather than relying on prompt-level format instructions alone. If your platform supports tool-use, define a route_escalation function with the output schema as its parameters; this gives you free validation on argument types. Logging and audit must capture the full prompt, the model's raw response, the validated routing decision, any retry attempts, and the final dispatch action. This audit trail is essential for post-incident review and for demonstrating that routing decisions followed defined escalation policies. Store logs in a tamper-evident system and retain them according to your incident response retention policy.
When not to use this prompt alone: If the routing table changes frequently, maintain it in application configuration and inject it into [ROUTING_TABLE] at call time rather than hardcoding it in the prompt. If the risk category is ambiguous or the input lacks a clear category mapping, do not ask the model to guess—instead, route to a default triage queue and flag for human review. This prompt is designed for known categories with defined escalation paths; novel or ambiguous threats should follow a separate "unclassified threat" escalation path that you define in your routing table. Finally, test this prompt against a golden dataset of known incidents with expected routing outcomes before deployment, and re-test whenever the routing table or escalation policies change.
Expected Output Contract
Fields, format, and validation rules for the escalation routing decision. Reject any response that does not conform to this contract.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
routing_decision | object | Top-level object must contain all required child fields. Parse failure or missing keys triggers retry. | |
routing_decision.team_assigned | string (enum) | Must match one of the allowed team identifiers defined in [TEAM_CATALOG]. Unknown team triggers human review. | |
routing_decision.escalation_path | string (enum) | Must be one of: 'immediate', 'standard', 'deferred'. Mismatch with [SLA_TIER] triggers retry. | |
routing_decision.risk_category | string | Must match a category label from [RISK_CATEGORY_LIST]. Unknown category triggers human review. | |
routing_decision.sla_tier | string (enum) | Must be one of: 'P1', 'P2', 'P3', 'P4'. Tier must be consistent with [RISK_SCORE] and [SLA_MAPPING]. | |
routing_decision.confidence | number | Float between 0.0 and 1.0. If below [CONFIDENCE_THRESHOLD], flag for human review regardless of routing. | |
routing_decision.context_package | object | Must contain 'summary', 'evidence_ids', and 'trigger_event' sub-fields. Missing sub-field triggers retry. | |
routing_decision.context_package.evidence_ids | array of strings | Each ID must match a record in [EVIDENCE_STORE]. Unmatched IDs trigger retry with corrected evidence list. |
Common Failure Modes
Escalation routing prompts fail in predictable ways. These cards cover the most common failure modes when mapping risk categories to teams, SLAs, and context packages, along with concrete mitigations.
Category-to-Team Mapping Drift
What to watch: The prompt routes a 'credential compromise' alert to the network team instead of the identity team because the category mapping is stale or ambiguous. This happens when team responsibilities change but the prompt's mapping table isn't updated. Guardrail: Externalize the category-to-team mapping into a configuration object or tool call. The prompt should reference a live mapping, not hardcode team names. Add a validation step that checks the routed team against a current directory before returning the final decision.
SLA Tier Misclassification
What to watch: A 'P1 - Critical' risk category gets routed with a 'P3 - Standard' SLA tier because the prompt confuses severity with urgency or applies the wrong policy version. Reviewers act too slowly on time-sensitive escalations. Guardrail: Include explicit SLA tier definitions in the prompt with clear criteria (e.g., 'P1: response required within 15 minutes, involves active breach or data loss'). Require the output to cite which SLA rule was matched. Test with boundary cases where severity and urgency diverge.
Incomplete Context Package
What to watch: The prompt routes correctly but omits critical evidence the receiving team needs—missing log excerpts, truncated timestamps, or absent asset identifiers. The human reviewer has to re-investigate from scratch. Guardrail: Define a required context schema per risk category in the prompt. Validate the output against that schema before delivery. If the input lacks required fields, the prompt should request them rather than routing with gaps.
Ambiguous Risk Category Assignment
What to watch: An alert matches multiple risk categories (e.g., both 'phishing' and 'malware'), and the prompt picks one arbitrarily or returns a low-confidence split decision. The escalation lands in the wrong queue. Guardrail: Instruct the prompt to return a primary category with a confidence score and list any secondary categories that also apply. When confidence is below a defined threshold, route to a triage queue instead of a specialized team. Include tie-breaking rules for overlapping categories.
Escalation Path Non-Compliance
What to watch: The prompt routes directly to a senior responder, skipping required intermediate approval steps defined by the organization's escalation policy. This creates audit gaps and bypasses shift managers. Guardrail: Encode the escalation path as a sequence of steps in the prompt (e.g., 'L1 SOC Analyst → L2 Incident Lead → L3 IR Team'). Validate the output's routing target against the expected next step in the path. Flag violations for human review before delivery.
Stale Risk Category Definitions
What to watch: The prompt uses risk category definitions that haven't been updated to reflect new threat types, causing novel attacks to be misclassified as 'other' or 'unknown' and routed to a low-priority general queue. Guardrail: Include a catch-all category with explicit handling rules, but also log when it's used. Periodically review 'other' routing frequency and update category definitions. The prompt should surface when an input doesn't fit any defined category rather than forcing a bad match.
Evaluation Rubric
How to test output quality before shipping. Run these checks against a golden dataset of 50+ risk events with known correct routing.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Correct Team Mapping | Assigned team matches the golden label for the event's risk category. | Team mismatch on a known event type (e.g., routing a DDoS alert to the endpoint team). | Run the prompt on the golden dataset and assert exact match on the [ASSIGNED_TEAM] field. |
SLA Tier Accuracy | Assigned SLA tier is correct per the defined risk-to-SLA mapping policy. | A 'Critical' risk event receives a 'P4-Low' SLA tier. | Validate [SLA_TIER] against a lookup table of risk categories and their expected tiers. |
Context Package Completeness | The output includes all required fields for the target team's investigation SOP. | Missing required fields like [AFFECTED_ASSETS] or [TIMELINE_OF_EVENTS] in the context package. | Schema validation: check for the presence and non-null status of all keys in the [CONTEXT_PACKAGE] object. |
Escalation Path Compliance | Routing decision follows the multi-step path defined in the escalation policy. | A 'Suspicious Login' event is routed directly to L3 without passing through the L1 SOC queue. | Trace the [ESCALATION_PATH] array and verify the sequence matches the policy's state machine for the event type. |
Reasoning Traceability | The justification explicitly links the event's risk signals to the chosen team and SLA. | The [ROUTING_REASON] field is a generic statement like 'High risk event escalated'. | LLM-as-a-Judge check: Does the reason cite specific risk factors from the [INPUT] to justify the routing? |
Hallucination Rate | No invented team names, SLA tiers, or risk categories not present in the provided taxonomy. | Output contains a team name 'Advanced Threats Unit' that is not in the [TEAM_CATALOG]. | Validate all values in [ASSIGNED_TEAM] and [SLA_TIER] against the allowed values list from the system prompt. |
Output Format Stability | Output is valid JSON matching the [OUTPUT_SCHEMA] on the first attempt, with no extra text. | Output is wrapped in markdown fences or contains a conversational preamble before the JSON object. | Parse the full model response with a strict JSON parser and validate against the target schema. |
Low-Confidence Handling | When risk signals are ambiguous, the [CONFIDENCE_SCORE] is below the threshold and a human review flag is set. | An event with conflicting risk indicators receives a confidence score of 0.95 and is auto-routed. | Assert that for a curated set of ambiguous events, [CONFIDENCE_SCORE] < [CONFIDENCE_THRESHOLD] and [REQUIRES_HUMAN_REVIEW] is true. |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Start with the base prompt and a hardcoded category-to-team mapping table in the system prompt. Use a simple JSON schema for the routing decision. Skip SLA tier computation and context packaging initially.
codeSYSTEM: You are an escalation router. Map the risk category to the correct team using this table: - [CATEGORY_A] → [TEAM_ALPHA] - [CATEGORY_B] → [TEAM_BRAVO] USER: Risk category: [RISK_CATEGORY] Summary: [EVENT_SUMMARY] Return JSON: {"team": "...", "reason": "..."}
Watch for
- Categories not in the hardcoded table producing empty or hallucinated teams
- Missing validation that the returned team actually exists in your routing system
- Overly broad category descriptions causing ambiguous routing

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us