This prompt is designed for SRE and DevOps teams that use AI agents to detect, triage, or investigate production incidents. When the AI reaches the limit of its safe operating boundary—whether due to low confidence, an unfamiliar failure mode, or a runbook step requiring human judgment—it must hand off to a human on-call engineer. This prompt produces a structured handoff payload containing severity classification, blast radius estimate, affected services, a timeline of events, diagnostic data, and the runbook step reached. Use this prompt inside an incident management pipeline where the AI has access to monitoring data, alert context, and runbook definitions.
Prompt
Incident Response Handoff Prompt for On-Call Engineers

When to Use This Prompt
Defines the operational boundary for an AI incident responder and the required context for a safe, structured handoff to a human on-call engineer.
The ideal user is an on-call engineer receiving a pre-triaged incident from an AI agent. The required context includes real-time alert payloads, recent deployment events, infrastructure metrics, and the specific runbook the AI was following. The prompt is not a general-purpose summarizer. Do not use it for customer-facing support handoffs, non-incident operational tasks, or situations where the AI has not already attempted diagnosis. The output is a machine-readable JSON payload designed for ingestion into PagerDuty, Opsgenie, or a custom incident management API. It must include a handoff_reason code from a defined taxonomy (e.g., CONFIDENCE_THRESHOLD, RUNBOOK_STEP_REQUIRES_HUMAN, UNKNOWN_FAILURE_MODE) so that routing rules can prioritize the page correctly.
Before deploying this prompt, ensure your AI agent's runbook definitions are explicit about which steps require human approval. A common failure mode is the AI handing off too early for trivial decisions or too late after making an unreviewed change. Implement a pre-handoff validation check that confirms the payload contains all required fields (severity, blast_radius_services, timeline, diagnostic_data, runbook_step_reached) and that the handoff_reason is not null. If validation fails, the system should retry the prompt once with a specific error message before escalating to a static fallback page. Always log the full handoff payload for post-incident review and prompt improvement.
Use Case Fit
Where the Incident Response Handoff Prompt delivers value and where it introduces operational risk. Use these cards to decide if this prompt fits your on-call workflow before embedding it in a production runbook.
Good Fit: Structured Alert-to-Handoff Pipelines
Use when: your monitoring stack produces structured alerts with timestamps, affected services, and metric deviations. The prompt excels at synthesizing raw alert data into a narrative timeline and severity classification. Guardrail: Validate that the input alert payload contains the minimum required fields (service name, alert trigger time, metric) before invoking the prompt.
Bad Fit: Unbounded Diagnostic Investigation
Avoid when: the incident requires open-ended root cause analysis across unknown systems. The prompt summarizes known diagnostic data but cannot safely hypothesize about systems it has no logs for. Guardrail: Restrict the prompt's [DIAGNOSTIC_DATA] input to pre-fetched, bounded data. If the responder needs to explore, hand off with a clear 'investigation incomplete' marker instead of a guessed cause.
Required Inputs: Minimum Viable Context
Risk: A handoff without a blast radius estimate or affected services forces the on-call engineer to start cold. Guardrail: Enforce a schema check in the application layer that blocks prompt execution unless [AFFECTED_SERVICES], [SEVERITY_CLASSIFICATION], and [TIMELINE_OF_EVENTS] are non-null. Return a structured error to the operator if the context is incomplete.
Operational Risk: Hallucinated Runbook Steps
Risk: The model may invent plausible but incorrect runbook steps or diagnostic commands, leading the responder down a false path during a high-severity incident. Guardrail: Constrain the prompt to only reference the [RUNBOOK_STEP_REACHED] explicitly provided in the input. Add a system instruction: 'Do not suggest commands or procedures not present in the provided runbook context.'
Operational Risk: Stale or Incomplete Timeline
Risk: If the monitoring pipeline delays or drops events, the generated timeline will be missing critical context, causing the responder to misjudge the incident's progression. Guardrail: Include a [TIMELINE_FRESHNESS] timestamp in the prompt input. Instruct the model to surface a warning in the handoff if the last event is older than the incident's declared start time.
Process Fit: Human Approval Before Page
Risk: Automatically paging an on-call engineer with an AI-generated handoff that contains a misclassified 'Critical' severity can cause alert fatigue. Guardrail: Route the generated handoff to a human-incident-commander review queue for severity confirmation before triggering the paging system. The prompt output is a draft, not the final page.
Copy-Ready Prompt Template
A reusable prompt template for generating a structured incident handoff from AI-detected alerts to on-call engineers.
This prompt template is designed to be integrated into your incident management harness. It takes structured incident data from your monitoring stack and produces a comprehensive handoff payload for an on-call engineer. The template uses square-bracket placeholders for all dynamic inputs, ensuring a clean separation between the prompt's logic and the data injected at runtime. Before using this in production, you must validate that your monitoring system can populate every required placeholder with accurate, real-time data.
codeYou are an AI incident response handoff assistant for an SRE team. Your task is to synthesize the provided incident data into a structured, actionable handoff for the on-call engineer. Do not perform any diagnostic actions or make tool calls. Your only output is the handoff report. ## INCIDENT DATA - Incident ID: [INCIDENT_ID] - Alert Name: [ALERT_NAME] - Trigger Timestamp: [TRIGGER_TIMESTAMP] - Current Severity: [SEVERITY] - Affected Services: [AFFECTED_SERVICES] - Blast Radius Estimate: [BLAST_RADIUS] - Timeline of Events: [EVENT_TIMELINE] - Runbook Reference: [RUNBOOK_URL] - Last Completed Runbook Step: [LAST_STEP_COMPLETED] - Diagnostic Data: [DIAGNOSTIC_DATA] - Related Recent Changes: [RECENT_CHANGES] ## OUTPUT INSTRUCTIONS Generate a handoff report with the following sections. Be concise and factual. If a piece of data is missing or unknown, explicitly state that instead of guessing. 1. **Executive Summary:** A 2-3 sentence overview of the incident, its current impact, and the most likely hypothesis. 2. **Severity and Impact Assessment:** Confirm the current severity classification and justify it based on the blast radius and affected services. 3. **Timeline of Events:** Present the [EVENT_TIMELINE] in a clear, chronological format. 4. **Diagnostic Snapshot:** Summarize the key findings from the [DIAGNOSTIC_DATA]. Highlight anomalies and critical error messages. 5. **Runbook Progress:** State the runbook being followed ([RUNBOOK_URL]), the last completed step ([LAST_STEP_COMPLETED]), and the immediate next step for the on-call engineer. 6. **Recommended Immediate Actions:** Based on the diagnostic data and runbook progress, list 1-3 concrete, prioritized actions for the responder. 7. **Context and Recent Changes:** Note any [RECENT_CHANGES] that could be related to the incident. ## CONSTRAINTS - Do not fabricate diagnostic data or event details. - If the severity is 'Critical' or 'High', prepend the report with '**URGENT: HUMAN ACTION REQUIRED**'. - The output must be in plain text or Markdown, suitable for pasting into PagerDuty or Slack.
To adapt this template, start by mapping the placeholders to the exact fields in your monitoring and alerting tools (e.g., Datadog, Prometheus Alertmanager, PagerDuty). The [DIAGNOSTIC_DATA] placeholder is the most critical; it should contain a pre-formatted string of logs, error rates, and metric graphs, as the model cannot query these systems directly. For high-severity incidents, always pair this prompt with a programmatic guard that requires a human acknowledgment of the generated handoff before any automated remediation steps are executed. After generating the handoff, log the full prompt and completion for post-incident review and prompt evaluation.
Prompt Variables
Inputs the incident response handoff prompt needs to work reliably. Validate each variable before assembly to prevent incomplete or misleading handoffs to on-call engineers.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[INCIDENT_ID] | Unique identifier for the incident ticket or alert | INC-2025-07-14-0042 | Must match ^INC-\d{4}-\d{2}-\d{2}-\d{4}$ pattern. Reject if null or empty. |
[SEVERITY_CLASSIFICATION] | Observed or system-assigned severity level | SEV2 - Degraded Service | Must be one of: SEV1, SEV2, SEV3, SEV4, SEV5. Reject unknown values. |
[BLAST_RADIUS_ESTIMATE] | Estimated scope of impact: users, regions, services affected | ~40% of us-east-1 users, checkout-svc, payment-svc | Must contain at least one affected service or region. Null allowed only if assessment is incomplete; flag for human review. |
[AFFECTED_SERVICES] | List of services or components showing anomalous behavior | ["checkout-svc", "payment-svc", "cart-redis"] | Must be a non-empty array of strings. Each entry must match a known service catalog entry if catalog is available. |
[TIMELINE_OF_EVENTS] | Ordered list of detected events with timestamps | [{"ts":"14:03:22Z","event":"latency spike"},{"ts":"14:04:01Z","event":"p95 > 2s"}] | Must be a valid JSON array. Each object requires 'ts' in ISO-8601 and 'event' as non-empty string. Minimum 1 event required. |
[DIAGNOSTIC_DATA] | Relevant logs, metrics, traces, or error messages collected | {"error_rate":0.12,"p95_latency_ms":2100,"trace_id":"abc123"} | Must be valid JSON object. Null allowed if no diagnostic data was retrievable; mark as incomplete handoff. |
[RUNBOOK_STEP_REACHED] | Last completed or in-progress runbook step before handoff | Step 3: Verified upstream dependency health - PASSED | Must be a non-empty string. If no runbook was started, use 'No runbook initiated - ad-hoc investigation'. Reject empty string. |
[OPERATIONAL_CONTEXT] | Deployment, config change, or environmental context near incident onset | Deploy v2.4.1 to checkout-svc at 14:01Z, config toggle 'new-tax-calc' enabled at 14:00Z | Must be a non-empty string. If no context is known, use 'No operational context identified - manual investigation required'. Reject empty string. |
Implementation Harness Notes
How to wire the incident response handoff prompt into an on-call management application or workflow.
This prompt is designed to be the final step in an AI-driven incident detection pipeline, not a standalone chatbot. It should be invoked only after the AI system has completed its diagnostic run—collecting logs, metrics, and runbook state—and determined that human intervention is required. The application layer is responsible for assembling the [INCIDENT_DATA], [DIAGNOSTIC_CONTEXT], [RUNBOOK_STATE], and [SEVERITY_CLASSIFICATION] placeholders from structured internal sources before calling the model. Do not pass raw, unprocessed log streams directly into this prompt; pre-process them into the expected input schema to keep the model focused on synthesis and handoff quality rather than log parsing.
Wire this prompt into your incident management workflow as a post-detection hook. When your monitoring system triggers an alert and the AI agent reaches its safe operating limit, call the model with the assembled context. The application must validate the model's JSON output against a strict schema before delivering it to the on-call engineer. Implement a retry loop with a maximum of two attempts if validation fails, using the validation error message as feedback in the retry prompt. If the model still fails to produce valid JSON after two retries, fall back to a pre-formatted template that includes the raw input data and a warning that the AI-generated summary is unavailable. Log every handoff attempt—including the prompt version, model version, input context hash, output, and validation result—for post-incident review and prompt debugging. For high-severity incidents (Sev0/Sev1), the handoff payload should also trigger an immediate push notification or page to the on-call engineer, bypassing any queue-based delivery.
Model choice matters here. Use a model with strong instruction-following and JSON mode capabilities, such as Claude 3.5 Sonnet or GPT-4o, and enable structured output mode if available. Set the temperature low (0.1–0.2) to maximize consistency in severity classification and action item generation. The handoff payload should be delivered to the on-call engineer through your existing incident channel—PagerDuty, Opsgenie, Slack, or a custom dashboard—with the AI-generated summary displayed prominently alongside links to raw diagnostic data. Never allow the AI to directly execute remediation actions from this prompt; the handoff is a read-only context transfer. The human operator must explicitly acknowledge the handoff and assume control before any further automated steps are taken. Finally, schedule a periodic review of handoff logs to identify patterns where the AI consistently misclassifies severity or misses critical context, and use those findings to improve both the prompt template and the upstream data assembly logic.
Expected Output Contract
Fields, format, and validation rules for the structured handoff payload generated by the Incident Response Handoff Prompt. Use this contract to parse the model output, validate completeness, and route the payload to on-call systems.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
incident_id | string | Must match regex ^INC-\d{4}-\d{6}$ or be null if not yet assigned by an external system | |
severity_classification | enum: SEV1 | SEV2 | SEV3 | SEV4 | SEV5 | Must be exactly one of the defined severity levels; reject any unlisted value | |
blast_radius_estimate | object | Must contain affected_services (array of strings, min 1 item), affected_regions (array of strings), and customer_impact (string, min 10 chars) | |
timeline_of_events | array of objects | Each object must have timestamp (ISO 8601), event (string, min 5 chars), and source (string); array must be sorted by timestamp ascending | |
diagnostic_data | object | Must include error_logs (array of strings), metric_anomalies (array of objects with metric_name, observed_value, threshold, deviation_percent), and recent_deployments (array of strings) | |
runbook_step_reached | string | Must reference a valid runbook step identifier; if no runbook exists, value must be 'NO_RUNBOOK_DEFINED'; null not allowed | |
escalation_reason_code | string | Must match an entry in the approved escalation reason code taxonomy; reject unmapped codes | |
operator_recommended_actions | array of strings | Must contain at least 1 item; each string must be a concrete, executable instruction with a verb prefix (e.g., 'Check', 'Rollback', 'Notify') |
Common Failure Modes
What breaks first when an AI generates an incident handoff for on-call engineers, and how to prevent it.
Missing or Stale Diagnostic Data
What to watch: The prompt generates a fluent summary but omits critical diagnostic artifacts (recent deploy SHA, error rate graphs, exact timestamps) or includes data from a previous incident. Guardrail: Require the prompt to reference a structured [DIAGNOSTIC_BLOB] input field. Validate that all required keys (e.g., deploy_id, error_budget_remaining) are present in the output before delivery.
Severity Misclassification
What to watch: The model downplays a critical outage (P0) as a minor degradation (P3) due to hedging language, or escalates a known flaky test to a P1 incident. Guardrail: Implement a post-generation check that compares the model's severity label against a rule-based score derived from SLO burn rate and user-facing error ratios. If they conflict, flag for human review.
Hallucinated Runbook Steps
What to watch: The model invents plausible-sounding but non-existent runbook commands or mitigation steps, leading the on-call engineer down a dead-end path. Guardrail: Constrain the prompt to only reference steps from a provided [RUNBOOK_EXTRACT]. Use a strict instruction to output "STEP UNKNOWN" if the required action isn't in the source material, rather than guessing.
Context Window Truncation
What to watch: Long incident logs exceed the model's context window, causing the prompt to silently drop the earliest (often root-cause) events or the latest (often escalating) signals. Guardrail: Pre-process logs to extract a "symptom window" and a "trigger window" before insertion. Use a context budget check to ensure the final assembled prompt stays under the model's limit.
Ambiguous Ownership and Escalation Path
What to watch: The handoff says "escalate to the networking team" but fails to specify the exact on-call rotation, Slack channel, or PagerDuty service ID. Guardrail: Include a [TEAM_MAP] variable in the prompt that links services to specific escalation policies. Validate the output against this map to ensure the target is a concrete, valid identifier.
Overconfident Blast Radius Assessment
What to watch: The model confidently states "no customer impact" based on a lack of explicit error reports, ignoring silent failures or dependent services that haven't fired alerts yet. Guardrail: Instruct the model to explicitly list services that haven't reported in but are in the dependency chain. Add a mandatory "Unknown Impact" field to the output schema to capture uncertainty.
Evaluation Rubric
Score each criterion on a pass/fail basis before shipping the incident response handoff prompt. Run these tests against a golden dataset of 10-15 incident scenarios covering P1-P4 severity, multi-service failures, and ambiguous diagnostic states.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Severity Classification Accuracy | Severity level matches runbook definition for the described blast radius and user impact | P1 incident classified as P3; severity does not align with affected user count or revenue impact | Run 10 labeled incidents through the prompt; require >=90% exact match to ground-truth severity |
Blast Radius Completeness | All affected services, downstream dependencies, and user-facing features are enumerated | Missing a known downstream service; omitting a user-facing feature mentioned in the diagnostic data | Parse output for service list; cross-reference against pre-annotated blast radius in golden dataset |
Timeline Event Ordering | Events appear in chronological order with timestamps preserved from source data | Events out of sequence; timestamp missing for a critical event; fabricated timestamp not in source | Extract timeline array; validate timestamp ordering and presence of all source events using schema check |
Runbook Step Grounding | The runbook step reached is explicitly stated and matches the last completed action in the diagnostic log | Runbook step omitted; step name hallucinated; step does not correspond to any logged action | Compare runbook step field against annotated expected step in golden dataset; require exact match |
Diagnostic Data Inclusion | All provided diagnostic data fields appear in the handoff payload without omission or distortion | CPU/memory metrics dropped; error log excerpt truncated; diagnostic value altered from source | Parse output payload; assert every diagnostic field from input appears with identical value in output |
Handoff Readability for On-Call Engineer | Summary section provides a 3-sentence orientation that an on-call engineer can act on within 30 seconds | Summary is vague, missing the what/when/impact; requires reading full payload to understand the incident | Human review by 2 SREs: both must confirm they can state the incident nature and next step within 30 seconds of reading only the summary |
No Hallucinated Remediation Steps | Output contains only the runbook step reached; no invented remediation actions or root cause claims | Prompt suggests restarting a service not mentioned in diagnostics; claims root cause without evidence | Scan output for action verbs beyond the runbook step; flag any remediation language not present in input context |
Schema Compliance | Output validates against the defined handoff JSON schema with all required fields present and correctly typed | Missing required field; severity field is string instead of enum; timeline array contains non-object elements | Validate output against JSON Schema using programmatic validator; require zero schema violations |
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 single severity classification. Use a simplified output schema with only the required fields: severity, affected_services, timeline, diagnostic_data, and runbook_step_reached. Skip strict enum validation and blast radius estimation. Run 10-15 handoff scenarios manually and review whether the on-call engineer can act on the output.
Watch for
- Severity misclassification when the model defaults to a middle tier
- Missing timeline entries for events the AI observed but didn't log
- Overly verbose diagnostic data that buries the actionable signal

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