This prompt is for SREs and platform engineers who need to analyze an incident and identify where observability failed. The job is to produce a structured gap analysis that maps the incident timeline to missing signals, slow detection, and diagnostic friction. Use this after an incident retrospective meeting when you have a timeline, chat logs, and access to monitoring dashboards. The output is a document that engineering teams can turn into a prioritized observability improvement backlog.
Prompt
Incident Retrospective Observability Gap Analysis Prompt

When to Use This Prompt
Identify when to deploy the observability gap analysis prompt after an incident retrospective to produce a structured, actionable improvement backlog.
This prompt assumes you already have an incident timeline and are not starting from raw logs. It does not replace the human retrospective; it accelerates the observability-specific analysis that often gets skipped when teams focus on root cause and remediation actions. The prompt works best when you provide a detailed timeline with timestamps, actions taken, and the specific dashboards or tools queried during the incident. It is not designed for real-time incident response or for generating postmortem narratives. If you lack a structured timeline, use a separate timeline reconstruction prompt first.
Do not use this prompt when the incident is still active, when the retrospective has not yet produced a consensus timeline, or when the team lacks access to the monitoring tools referenced in the incident. The prompt will produce low-quality output if fed vague recollections instead of specific timestamps and tool names. For teams new to observability, pair this prompt with a human review step to validate that the identified gaps are actionable within your current tooling and budget constraints. The goal is a prioritized backlog, not an abstract wish list.
Use Case Fit
Where this prompt works and where it does not. Use these cards to decide if the Incident Retrospective Observability Gap Analysis Prompt fits your current situation.
Good Fit: Structured Post-Incident Review
Use when: you have a completed incident timeline, postmortem draft, or root cause analysis and need to identify systematic observability gaps. Guardrail: the prompt requires a concrete incident artifact as input; do not run it on vague recollections or chat transcripts alone.
Bad Fit: Real-Time Incident Response
Avoid when: the incident is still active and you need immediate diagnostic assistance. This prompt is designed for retrospective analysis, not live debugging. Guardrail: use a runbook or diagnostic prompt for active incidents; reserve this for the postmortem phase.
Required Inputs
What you need: an incident timeline with timestamps, a description of the detection method, the diagnostic path taken, and the resolution steps. Guardrail: missing timeline data produces vague gap analysis. Validate that your incident record includes detection latency and diagnostic steps before invoking the prompt.
Operational Risk: Actionable vs. Theoretical Gaps
What to watch: the model may generate theoretically correct gaps that are impractical to close given your stack, budget, or team capacity. Guardrail: add a constraint requiring each gap to include an implementation feasibility note and a cost estimate tier before accepting the output.
Operational Risk: Blame Drift
What to watch: the analysis may drift toward attributing gaps to individual or team decisions rather than systemic observability design. Guardrail: include explicit instructions to frame all gaps as system-level deficiencies, not personal failures, and review output for blame language before sharing.
Scalability: Single Incident vs. Pattern Analysis
What to watch: running this prompt on a single incident may miss recurring patterns across multiple events. Guardrail: batch-process multiple retrospectives and use a follow-up synthesis prompt to identify cross-incident observability themes before prioritizing remediation investments.
Copy-Ready Prompt Template
A reusable prompt with square-bracket placeholders for analyzing observability gaps exposed by an incident.
This is the core prompt for generating an Incident Retrospective Observability Gap Analysis. It is designed to be pasted directly into your LLM interface. The prompt forces the model to map a concrete incident timeline against your existing observability stack, identifying where signals were missing, detection was slow, or diagnosis was blocked by tooling or data gaps. The output is a structured gap analysis document, not a generic postmortem narrative.
textYou are an SRE architect specializing in observability system design. Your task is to analyze a production incident and identify specific gaps in the observability stack that contributed to detection latency, diagnostic friction, or incomplete post-incident understanding. ## INCIDENT DATA **Incident Summary:** [INCIDENT_SUMMARY] **Timeline of Events (UTC):** [INCIDENT_TIMELINE] **Services Affected:** [AFFECTED_SERVICES] **Detection Method:** [DETECTION_METHOD] **Total Time to Detect (TTD):** [TTD] **Total Time to Resolve (TTR):** [TTR] ## CURRENT OBSERVABILITY STACK **Logging:** [LOGGING_STACK_DESCRIPTION] **Metrics:** [METRICS_STACK_DESCRIPTION] **Tracing:** [TRACING_STACK_DESCRIPTION] **Alerting:** [ALERTING_STACK_DESCRIPTION] **Dashboards:** [KEY_DASHBOARDS_USED] ## CONSTRAINTS - Do not propose solutions. Only identify gaps. - Map every gap to a specific point on the incident timeline. - Distinguish between missing signals, insufficient granularity, and tooling/UX friction. - Classify each gap by its impact on Detection, Diagnosis, or Prevention. - If the provided data is insufficient to determine a gap, state that explicitly instead of guessing. ## OUTPUT SCHEMA Return a single JSON object with the following structure: { "incident_id": "string", "analysis_summary": "A 2-3 sentence executive summary of the most critical observability failures.", "gaps": [ { "gap_id": "string", "timeline_reference": "The specific timestamp or event from the timeline where this gap manifested.", "category": "missing_signal | insufficient_granularity | tooling_friction | alert_configuration | data_retention", "impact_phase": "detection | diagnosis | prevention", "description": "A clear, specific description of what was missing or insufficient.", "evidence_from_incident": "Quote or reference the specific timeline event that proves this gap.", "severity": "critical | high | medium | low" } ], "data_quality_notes": ["Any concerns about the completeness or accuracy of the provided incident data."] }
Adapting the template: Replace every [PLACEHOLDER] with concrete data from your incident retrospective. The [INCIDENT_TIMELINE] is the most critical field—provide it in a structured, timestamped format. If your observability stack is complex, be specific about versions and configurations in the stack description fields. For high-severity incidents, run the output through a human review step before adding it to the official postmortem. The JSON output is designed to be ingested by a tracking system; validate it against the schema before closing the incident record.
Prompt Variables
Replace each placeholder with concrete incident data before running the prompt. Validation notes describe how to check that the substituted value is fit for purpose.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[INCIDENT_SUMMARY] | Narrative of what happened, user impact, and resolution | Checkout latency spiked to 12s at 14:03 UTC after cache node restart; 4% of carts abandoned; resolved by draining traffic from the warm cache | Must contain start time, end time, affected service, and user-facing symptom. Reject if purely speculative or missing a measurable impact. |
[INCIDENT_TIMELINE] | Chronological list of events with timestamps, actions, and observations | 14:03:00 — Cache node restart begins; 14:03:12 — p99 latency alert fires; 14:04:01 — On-call acknowledges; 14:09:45 — Traffic drained from node; 14:10:30 — Latency recovers | Each entry must include a timestamp and an event. Reject if gaps exceed 5 minutes during active incident or if the timeline ends before resolution. |
[DETECTION_SOURCE] | How the incident was first discovered | PagerDuty alert from Prometheus latency SLO burn-rate threshold | Must name a specific monitoring system, alert rule, or human report. Reject if 'someone noticed' without a traceable source. |
[OBSERVABILITY_STACK] | List of observability tools available during the incident | Prometheus, Grafana, OpenTelemetry traces to Jaeger, structured logs in Loki | Must enumerate tools actually queried during diagnosis. Reject if tools are listed but no evidence they were used in the timeline. |
[DIAGNOSTIC_PATH] | Step-by-step record of what engineers queried or checked to isolate the cause |
| Each step must name a specific query, dashboard, or log search. Reject if steps are vague like 'looked at metrics' without a concrete target. |
[MISSING_SIGNALS] | Candidate signals that would have accelerated detection or diagnosis | No cache-hit-ratio alert; no pre-warm completion metric; no trace attribute for cache node ID | Each entry must be a measurable signal, not a process complaint. Reject entries like 'better monitoring' without a specific metric or log field. |
[SLO_CONTEXT] | Relevant SLO targets and error budgets for the affected service | Checkout service SLO: 99.5% of requests < 800ms p99 over 28 days; error budget consumed: 12% in this incident | Must include a numeric target and a measurement window. Reject if SLO is undefined or the incident falls outside the measurement window without explanation. |
Implementation Harness Notes
How to wire the gap analysis prompt into an incident review workflow with validation, retries, and human review gates.
This prompt is designed for a single-turn LLM call, not a multi-step agent. It works best when the incident data is pre-assembled before the call. The caller—typically an SRE tool, incident management bot, or retrospective automation—should gather the incident timeline, known signals, diagnostic steps taken, and any existing postmortem notes into a structured context block before invoking the model. The model's job is to produce a structured gap analysis, not to query live telemetry or interview responders.
Input assembly is the most critical pre-call step. Build the [INCIDENT_TIMELINE] as a chronologically ordered list of events with timestamps, severity changes, and responder actions. Populate [OBSERVABILITY_STACK] with the current tooling (e.g., Prometheus, Grafana, Datadog, OpenTelemetry), what each tool is configured to capture, and any known blind spots. Include [DIAGNOSTIC_FRICTION_LOG] as a list of moments where responders couldn't answer a question quickly—these are the raw material for gap identification. If any of these inputs are missing or incomplete, the output quality degrades sharply. Validate inputs before the call: check that the timeline has at least detection, diagnosis, and resolution phases; that the stack description includes what is not instrumented; and that friction log entries are specific (e.g., "could not determine which service was failing" rather than "hard to debug").
Output validation should run immediately after the model responds. Parse the JSON output and check: (1) every gap has a non-empty signal_missing, detection_delay_impact, and remediation field; (2) severity is one of the allowed enum values (critical, high, medium, low); (3) the timeline_to_gap_mapping array references timestamps that actually appear in the input timeline. If validation fails, retry once with the validation errors appended to the prompt as [PREVIOUS_VALIDATION_ERRORS]. If the second attempt also fails, flag the output for human review rather than retrying indefinitely. Log both the raw output and validation results for auditability.
Human review is required before any gap analysis is treated as final or used to prioritize engineering work. The model can miss domain-specific failure modes, misinterpret tool capabilities, or propose remediation that is infeasible given team constraints. Route the validated output to the incident owner or on-call SRE with a review checklist: confirm each gap is real, adjust severity if needed, and mark any gaps that are already known or accepted as tolerable risk. Only after human sign-off should the gaps be converted into tickets or roadmap items. Model choice: use a model with strong structured output capabilities (GPT-4o, Claude 3.5 Sonnet, or equivalent). Avoid smaller models for this task—the reasoning required to connect timeline events to missing signals demands strong causal inference. Set temperature to 0 or very low (0.0–0.2) to maximize consistency across runs.
Do not feed live production telemetry directly into this prompt. The model has no real-time access and will hallucinate metrics. Instead, summarize the relevant signal gaps in the input block. Do not use this prompt during an active incident—it is a retrospective tool. During incidents, use runbook automation and human judgment. Save this analysis for the post-incident review window when the timeline is complete and responders are available to validate findings.
Expected Output Contract
Fields, format, and validation rules for the JSON output. Use this to validate the model response before accepting it into your incident review workflow.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
incident_id | string | Must match the [INCIDENT_ID] input exactly. No truncation or modification allowed. | |
analysis_timestamp | ISO 8601 string | Must be a valid ISO 8601 datetime. Parse check required. Must be within 5 minutes of system clock at generation time. | |
observability_gaps | array of objects | Array must contain at least 1 gap. Schema check: each object must include gap_id, incident_phase, missing_signal, detection_delay_seconds, diagnostic_friction, and severity. | |
observability_gaps[].gap_id | string | Must be a unique slug within the array, e.g. 'GAP-001'. Regex: ^GAP-\d{3}$. | |
observability_gaps[].incident_phase | enum string | Must be one of: 'detection', 'diagnosis', 'resolution', 'post-recovery'. Enum check required. | |
observability_gaps[].missing_signal | string | Must describe a specific missing log, metric, trace, or alert. Non-empty string, minimum 20 characters. | |
observability_gaps[].detection_delay_seconds | integer | Must be a positive integer representing estimated delay caused by this gap. Range: 1-86400. | |
observability_gaps[].diagnostic_friction | string | Must describe the manual workaround or investigation friction caused by the gap. Non-empty string, minimum 20 characters. | |
observability_gaps[].severity | enum string | Must be one of: 'critical', 'high', 'medium', 'low'. Enum check required. | |
improvement_actions | array of objects | Array must contain at least 1 action per critical or high severity gap. Schema check: each object must include action_id, gap_id_reference, action_description, owner_suggestion, and effort_estimate. | |
improvement_actions[].action_id | string | Must be a unique slug within the array, e.g. 'ACT-001'. Regex: ^ACT-\d{3}$. | |
improvement_actions[].gap_id_reference | string | Must reference a valid gap_id from the observability_gaps array. Referential integrity check required. | |
improvement_actions[].action_description | string | Must describe a concrete, implementable improvement. Non-empty string, minimum 30 characters. Must not be a vague aspiration like 'improve monitoring'. | |
improvement_actions[].owner_suggestion | string | Must suggest a team or role, not a specific named individual. Non-empty string. | |
improvement_actions[].effort_estimate | enum string | Must be one of: 'hours', 'days', 'weeks', 'months'. Enum check required. | |
summary | string | Must be a 2-5 sentence executive summary of the top findings. Non-empty string, minimum 50 characters, maximum 1000 characters. |
Common Failure Modes
What breaks first when using the Incident Retrospective Observability Gap Analysis Prompt and how to guard against it.
Vague Improvement Items
What to watch: The model generates generic recommendations like 'improve monitoring' or 'add more alerts' without specifying which signals, thresholds, or services. Guardrail: Require the output schema to include a signal_gap field that maps each finding to a specific metric, log stream, or trace attribute that was missing.
Timeline-to-Signal Misalignment
What to watch: The analysis maps incident timeline events to observability signals that don't actually correspond to that phase of the incident, creating false correlations. Guardrail: Add a temporal_alignment_check in the eval rubric that verifies each gap is anchored to a specific timestamp range from the incident timeline before accepting the output.
Hindsight Bias Overstatement
What to watch: The prompt produces gap analysis that assumes signals would have been obvious in real-time, ignoring the signal-to-noise ratio operators actually faced during the incident. Guardrail: Include a constraint requiring the model to distinguish between 'detectable in retrospect' and 'detectable in real-time given existing dashboards and alert thresholds' for each gap.
Missing Diagnostic Friction Analysis
What to watch: The output focuses only on detection gaps but ignores diagnostic friction—how long it took to triage and isolate the root cause once the alert fired. Guardrail: Add a required diagnostic_friction section to the output schema that captures tool-switching cost, log query complexity, and missing correlation context during the investigation phase.
Unprioritized Gap List
What to watch: The model returns a flat list of gaps without ranking by impact on detection time, diagnostic time, or recurrence risk, making it hard for SREs to decide what to fix first. Guardrail: Require a severity_impact field for each gap that estimates the contribution to total incident duration, and sort output by that field before presenting to the team.
Tool-Specific Assumptions Without Evidence
What to watch: The analysis assumes specific observability tools or query languages are available without the incident report confirming them, producing recommendations that don't fit the team's actual stack. Guardrail: Add a tool_environment input parameter that captures the team's actual observability stack, and instruct the model to flag any recommendation that requires tools not listed in that parameter.
Evaluation Rubric
How to test output quality before shipping. Run these checks on a sample of 5-10 incident retrospectives to calibrate the prompt before production use.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Gap-to-Timeline Mapping | Every identified observability gap is mapped to a specific incident timeline event or phase with a timestamp reference | Gap listed without timeline anchor or references an event not present in the [INCIDENT_TIMELINE] input | Human review: for each gap in output, verify the referenced timeline event exists in the input and the gap logically connects to it |
Signal Coverage Completeness | Output addresses all three signal types (logs, metrics, traces) for each detection delay or diagnostic friction point | Output focuses exclusively on one signal type or omits an entire category when the incident narrative clearly involves multiple signal gaps | Schema check: confirm output contains non-empty entries for logs, metrics, and traces sections; flag if any section is missing or contains only generic placeholder text |
Actionable Recommendation Quality | Each recommendation includes a specific, implementable change (e.g., add metric X with label Y, increase log level for path Z) rather than vague advice | Recommendation uses generic language like 'improve monitoring' or 'add more logging' without specifying what, where, or how | Spot-check: extract all recommendations and rate each on a 1-3 specificity scale; pass requires mean score >= 2.5 across the sample |
Root Cause Linkage | Gap analysis explicitly connects each missing signal to how it delayed or prevented root cause identification during the incident | Output lists missing signals without explaining their role in the diagnostic path or misattributes a gap to a phase where it was not relevant | Traceability check: for each gap, verify the output contains a causal statement linking the missing signal to a specific diagnostic delay described in [INCIDENT_NARRATIVE] |
False Positive Avoidance | Output does not flag as a gap any signal that was actually present and functioning during the incident | Output recommends adding a metric, log, or trace that already exists in the [CURRENT_OBSERVABILITY_STACK] input | Diff check: compare each recommended addition against the provided current stack inventory; any match is a false positive and counts as a failure for that row |
MTTD/MTTR Impact Estimation | Output provides a reasoned estimate of how much each gap contributed to detection time (MTTD) or resolution time (MTTR) | Output omits time impact entirely or provides estimates without any connection to the incident timeline durations | Calculation review: verify that estimated time contributions are internally consistent with the total incident duration and do not exceed it; flag if estimates are absent or contradictory |
Diagnostic Friction Specificity | Output identifies specific diagnostic steps that were slowed by missing signals, not just general observability weaknesses | Output uses vague phrases like 'hard to debug' or 'took too long' without naming the diagnostic action that was blocked | Keyword scan: search output for diagnostic action verbs (query, filter, correlate, trace, grep, dashboard); pass requires at least one specific diagnostic friction point per major incident phase |
Noise-to-Signal Ratio in Recommendations | Recommendations are prioritized and limited to gaps that materially affected the incident outcome, not an exhaustive wishlist | Output contains more than 10 recommendations or includes low-impact suggestions like 'add dashboard widget' for already-visible signals | Count check: if recommendation count exceeds 10, flag for over-generation; human reviewer confirms whether each item passes a materiality threshold |
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
Use the base prompt with a single incident timeline and a lightweight output schema. Remove strict JSON enforcement and let the model produce a structured markdown gap analysis. Focus on getting useful signal categories (missing metrics, absent logs, blind-spot traces) without requiring exhaustive coverage.
Simplify the [INCIDENT_TIMELINE] to key events only. Drop the [OBSERVABILITY_STACK] placeholder if unknown—let the model infer gaps from the timeline alone.
Watch for
- The model inventing signals that don't exist in your stack
- Overly generic recommendations like "add more metrics" without specific signal names
- Missing the distinction between data that exists but wasn't consulted vs. data that was never collected

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