Back to cookbook

ChatGPT Prompt to Write a Clear Incident Postmortem Report

12 views Published

Make this prompt yours

Share

This incident postmortem prompt helps engineers and engineering managers turn a messy timeline of logs, Slack messages, and on-call notes into a structured postmortem report after a production outage or bug. It's built for anyone who needs to write up what broke, why it broke, and what changes will stop it from happening again, without burying the root cause under vague summaries or blame-focused language.

The prompt pushes the model to separate the timeline of events from the root cause analysis and the action items, which is where most postmortems fall apart. A model given raw logs and a short description will often default to a generic "we had downtime and fixed it" summary. Structuring the request around specific sections forces a more honest accounting of detection time, impact, and contributing factors, which is what most postmortem templates actually require for a review.

Because the output is only as precise as the detail you feed in, pairing this with a tool that trims a long incident timeline down to the lines that actually matter can make the draft tighter and more accurate. If your incident thread is thousands of lines of logs, the Token Optimizer can compress that raw material into a cost-effective prompt before you run it through this template.

Prompt template

Make this prompt yours

prompt-template
335 tokens
ROLE: You are a senior engineer writing a blameless incident postmortem for [TEAM OR COMPANY NAME]. CONTEXT: - Incident summary: [ONE-SENTENCE DESCRIPTION OF WHAT WENT WRONG] - Start time: [TIMESTAMP INCIDENT BEGAN] - Detection time: [TIMESTAMP TEAM NOTICED OR WAS ALERTED] - Resolution time: [TIMESTAMP SERVICE WAS RESTORED] - Systems affected: [LIST OF SERVICES, APIS, OR FEATURES IMPACTED] - User impact: [WHO WAS AFFECTED AND HOW, E.G. ERROR RATE, DOWNTIME DURATION] - Raw timeline or logs: [PASTE RELEVANT LOG LINES, ALERTS, OR CHAT MESSAGES WITH TIMESTAMPS] - Known root cause (if any): [WHAT YOU'VE CONFIRMED SO FAR, OR "UNDER INVESTIGATION"] CONSTRAINTS: - Use blameless language: describe system and process failures, never name individuals - Clearly separate confirmed facts from open questions still being investigated - Keep the timeline in chronological order with timestamps for each major event - Action items must each have a specific owner role and a target timeframe OUTPUT FORMAT: 1. Summary (2-3 sentences: what happened, impact, current status) 2. Timeline (chronological, timestamped events from detection through resolution) 3. Root Cause Analysis (what caused it, and any contributing factors) 4. Impact (who/what was affected, quantified where possible) 5. Action Items (numbered list, each with owner role and target date) 6. Open Questions (anything still unresolved or under investigation)

Want it sharper? Optimize this prompt with Prompt Optimizer, check it with the Prompt Debugger or shorten it with the Token Optimizer.

Example input

example-input
447 tokens
ROLE: You are a senior engineer writing a blameless incident postmortem for Fintrail, a payments platform. CONTEXT: - Incident summary: Checkout API returned 500 errors for roughly 40 minutes, blocking new payments - Start time: 2026-09-14 14:02 UTC - Detection time: 2026-09-14 14:11 UTC (PagerDuty alert on 5xx rate) - Resolution time: 2026-09-14 14:43 UTC - Systems affected: checkout-api, payment-gateway-adapter - User impact: ~12% of checkout attempts failed during the window, roughly 340 failed transactions - Raw timeline or logs: 14:02 UTC - deploy of checkout-api v2.14.0 completed 14:03 UTC - error rate on /checkout/submit begins climbing 14:11 UTC - PagerDuty fires "High 5xx rate: checkout-api" 14:14 UTC - on-call engineer acknowledges, starts investigating logs 14:22 UTC - identifies null pointer exception in new discount-code validation path 14:30 UTC - rollback to v2.13.8 initiated 14:43 UTC - error rate returns to baseline, incident closed - Known root cause: v2.14.0 shipped a discount-code validation change that didn't handle null promo codes, causing a crash on any checkout without a promo code applied CONSTRAINTS: - Use blameless language: describe system and process failures, never name individuals - Clearly separate confirmed facts from open questions still being investigated - Keep the timeline in chronological order with timestamps for each major event - Action items must each have a specific owner role and a target timeframe OUTPUT FORMAT: 1. Summary (2-3 sentences: what happened, impact, current status) 2. Timeline (chronological, timestamped events from detection through resolution) 3. Root Cause Analysis (what caused it, and any contributing factors) 4. Impact (who/what was affected, quantified where possible) 5. Action Items (numbered list, each with owner role and target date) 6. Open Questions (anything still unresolved or under investigation)

When to use it

  • You need a first draft of a postmortem within hours of an incident being resolved, while the timeline is still fresh
  • You have raw inputs like PagerDuty alerts, Slack threads, or deployment logs and need them turned into a coherent narrative
  • Your team requires a standard postmortem format (timeline, impact, root cause, action items) for every production incident
  • You're writing a postmortem for a non-technical stakeholder audience and need the technical detail translated into plain impact language

Best practices

  • Paste in the actual timestamps from alerts and deploy logs rather than paraphrasing them, so the model can reconstruct an accurate sequence of events
  • Separate what you know for certain (confirmed root cause) from what's still being investigated, and tell the model to flag open questions instead of guessing
  • Ask for blameless language explicitly; without that instruction, drafts can drift toward naming individuals instead of describing system or process gaps
  • Request specific, owned action items with due dates rather than generic "improve monitoring" bullets, since vague follow-ups rarely get tracked to completion

Common mistakes

  • Feeding in only a verbal summary of the incident instead of the actual logs or timestamps, which leads to a generic-sounding report with made-up specifics
  • Skipping the "detection" and "response" timeline stages and jumping straight to root cause, which hides how long the team took to notice and react
  • Letting the model write action items as vague intentions instead of concrete, assignable tasks with owners and deadlines
  • Not specifying the audience, so the draft mixes deep technical detail with executive-level impact summary in a way that serves neither reader well

FAQs

How do I write a blameless postmortem with ChatGPT?

Give the model a role instruction that explicitly says to describe system and process failures rather than naming individuals, then feed it the actual timeline of events. The blameless framing works best when it's stated as a constraint up front, not left implicit, since models will otherwise default to whatever tone the raw input suggests.

What should I include in an incident postmortem besides the root cause?

A complete postmortem needs a timestamped timeline from detection to resolution, a quantified impact statement, the root cause and any contributing factors, and a list of specific action items with owners and deadlines. Skipping the timeline or impact sections is the most common reason postmortems read as incomplete during review.

Can AI write an accurate postmortem from just logs, without a human writing the summary first?

AI can draft a strong first pass from raw logs and alert timestamps, but it should not be the final word on root cause if the cause is still under investigation. The model will produce a plausible-sounding explanation even from incomplete data, so any output should be reviewed by someone who was involved in the incident before it's shared widely.

How long should an incident postmortem be?

Most production postmortems run one to two pages: a short summary, a timeline, root cause, impact, and action items. Length should scale with incident severity rather than being fixed, since a minor five-minute blip doesn't need the same depth as a multi-hour outage.

Which Cuelara tool can help me tighten this prompt before using it?

Token Optimizer — if your incident timeline includes long log dumps or chat exports, this tool compresses that raw material into a leaner prompt so the postmortem draft stays accurate without the extra token cost.

Found this prompt useful? Share it.

Share

More in Engineering

Engineering

AI Prompt to Triage Production Incidents Using Datadog's MCP Server

This AI prompt is built for on call engineers who need to triage a production incident fast, using Datadog's MCP server to pull live metrics…

ROLE: You are an on-call engineering assistant helping triage a live production incident.

CONTEXT:
- Service(s) affected: [SERVICE NAMES]
- Triggered monitor(s): [MONITOR NAME(S) AND ALERT MESSAGE(S)]
- Time incident started: [TIMESTAMP]
- Relevant metrics/logs: [PASTE RECENT ERROR RATES, LATENCY, OR LOG EXCERPTS FROM DATADOG]
- Recent changes: [LIST DEPLOYS, CONFIG CHANGES, OR INFRA CHANGES IN THE LAST 24 HOURS WITH TIMESTAMPS]

TASK:
1. Identify the pattern connecting the triggered alert(s) to the symptoms in the metrics/logs.
2. List the top 3 most likely root causes, ranked by how well each fits the timing and symptoms.
3. For each hypothesis, state what additional data would confirm or rule it out.
4. Recommend the single next diagnostic step to run first.

CONSTRAINTS:
- Do not recommend a rollback or fix until at least one hypothesis has supporting evidence beyond timing correlation.
- Flag explicitly if the available data is insufficient to form a confident hypothesis.

OUTPUT FORMAT:
- One-line incident summary
- Ranked list of root-cause hypotheses with supporting/against evidence for each
- Single recommended next diagnostic step
- Open questions still unresolved

Make this prompt yours

Engineering

AI Prompt to Write a Load Testing Plan for a REST API Endpoint

This prompt has ChatGPT, Claude, or Gemini draft a concrete load testing plan for a REST API endpoint before you run a single test. It's for…

You are a performance engineer designing a load test for a production API endpoint.

Context:
- Endpoint: [METHOD AND PATH, e.g. POST /api/v1/orders]
- Expected traffic: [REQUESTS PER SECOND AT PEAK, e.g. 150 rps average, 600 rps peak]
- Downstream dependencies: [LIST, e.g. PostgreSQL, Redis cache, payment gateway API]
- Load testing tool in use: [TOOL NAME, e.g. k6, Locust, JMeter]
- Current known constraints: [e.g. database connection pool size, rate limiter config]

Write a load testing plan with the following requirements:
1. Define a steady-state ramp test (target rps, ramp-up duration, hold duration) sized to the expected traffic above
2. Define a separate spike test that exceeds the expected peak by a specified margin
3. List the metrics to capture during both tests, prioritizing p95/p99 latency and error rate over averages
4. Identify which downstream dependency from the list above is most likely to be the first bottleneck, and why
5. Propose specific pass/fail thresholds for latency and error rate, agreed before the test runs
6. Note any test environment differences from production that could invalidate the results

Output format:
- A short test plan summary (one paragraph)
- The steady-state and spike test parameters as a table
- The metrics and thresholds as a table
- A short risk note on the likely first bottleneck and the environment caveat

Make this prompt yours

Engineering

AI Prompt to Write a Feature Flag Rollout and Cleanup Plan

A feature flag rollout plan lays out how a new capability ships behind a flag, moves through stages of exposure, and eventually gets removed…

You are a senior platform engineer helping plan a feature flag rollout.

Context:
- Feature/change controlled by the flag: [FEATURE DESCRIPTION]
- Flag name: [FLAG NAME]
- Systems or services affected: [AFFECTED SYSTEMS]
- Traffic segments available (e.g. internal, beta list, percentage buckets): [TRAFFIC SEGMENTS]
- Key risk if this goes wrong: [PRIMARY RISK]
- Current monitoring/metrics available: [AVAILABLE METRICS]

Task:
1. Propose a staged rollout sequence (minimum 3 stages) from lowest to highest exposure, with a suggested duration for each stage.
2. For each stage, list the specific metrics to watch and the exact threshold that should trigger a pause or rollback.
3. Define who should approve advancing to the next stage.
4. Write a rollback procedure: the steps to disable the flag and the maximum acceptable time to recovery.
5. Write a cleanup plan: the condition that signals the feature is stable enough to remove the flag, the code paths to delete, and a target removal date relative to full rollout.

Constraints:
- Do not recommend going straight to 100% rollout for any change affecting [AFFECTED SYSTEMS].
- Keep each stage's exit criteria measurable, not subjective.
- Flag any step that depends on information not provided above.

Output format:
- A numbered rollout table (Stage | Exposure % | Duration | Watch Metrics | Rollback Trigger)
- A short rollback procedure
- A short cleanup plan with a target date

Make this prompt yours