Prompt Engineering

Prompt Engineering for Incident Response: Write Prompts That Reduce MTTR

Most incident-response prompts fail because they dump alerts into the model without context. This guide gives you a repeatable prompt stack for severity triage, runbook retrieval, timeline reconstruction, and postmortem drafting.

FreeLast tested: 2026-08-22Audience: ops / SRE / AI practitioners

Why prompt engineering matters in incidents

During an incident, speed is not just about faster queries. It is about reducing the number of hops between alert, diagnosis, and action. A poorly written prompt forces the on-call engineer to retry, rephrase, or verify output. A structured prompt gives you a repeatable output format that can be reviewed in seconds.

The difference is usually small wording changes: ask for structured output, ask for evidence before recommendation, and constrain the answer to the current system boundaries. Those changes cut mean time to recovery by removing ambiguity when cognition is under pressure.

Core prompt stack for incident response

Use four layered prompts instead of one catch-all prompt. Each layer has one job and one output format.

1. Context bundle prompt

Build a short factual summary of the affected service, region, deployment window, and recent changes. This is the grounding layer. Without it, the model hallucinates system state.

Summarize the following incident context in 5 bullet points. - Service: - Region: - Window: - Recent changes: - Symptoms: Output only facts. No recommendations.

2. Severity triage prompt

Map signal strength to severity using explicit criteria. Avoid vague language like "looks bad." Use yes/no criteria tied to user impact, revenue, and blast radius.

Classify severity as P1/P2/P3 using: - P1: revenue hit, data loss, or customer-facing outage - P2: degraded SLA with workaround - P3: internal tool or cosmetic issue Context: Output: severity, rationale, first responder action.

3. Runbook retrieval prompt

Ask the model to return only relevant runbook steps, filtered by symptom. This avoids flooding the chat with irrelevant procedures during a live incident.

Given symptoms , return only the runbook steps that match. For each step, output: 1. step title 2. command or check 3. expected result 4. escalation trigger

4. Postmortem prompt

After resolution, use a structured prompt to draft the timeline, root cause, and remediation. Keep the output review-ready instead of narrative.

Draft a postmortem from the incident log. Structure: - Timeline - Root cause - Blast radius - Remediation steps - Follow-up actions Tone: factual, no blame language.

Structured output keeps reviews fast

Ask for JSON, markdown tables, or numbered lists. Humans scan formats faster than paragraphs. For triage, a 4-line JSON is easier to verify than a paragraph.

Also set constraints explicitly: "Answer in 6 lines," "Return only commands," or "Do not explain reasoning." Those constraints reduce token usage and shorten the feedback loop.

Prompt typeBest output formatWhy
Context bundleBullet listFast human scan
Severity triageJSONMachine-readable routing
Runbook retrievalNumbered stepsAction sequence clarity
PostmortemSectioned markdownReview-ready structure

When to stop prompting and act

Prompting is useful until the diagnosis becomes clear. If the model gives the same answer twice, switch to execution. The goal is decision support, not a second opinion loop.

Keep prompts short during live incidents. Long prompts waste time and increase the chance of model drift on edge cases. Save detailed prompt engineering for postmortems and playbook refinement.

For related prompt-engineering techniques outside incidents, see few-shot versus zero-shot prompting and engineering team handoff workflows.

Limits and notes

These prompts are starting points, not replacements for runbook ownership. Model output should always be verified by a human before execution in production. Prompt performance varies across models; test changes offline before relying on them in incidents.