This playbook is for SREs and on-call engineers who need to move from observing an anomalous metric spike to generating a testable root cause hypothesis. The prompt takes structured metric data, infrastructure topology, and a known failure mode catalog and produces ranked hypotheses with supporting evidence and specific validation steps. Use this when you have a clear spike in latency, error rate, or throughput and need to narrow the search space before diving into raw logs.
Prompt
Metric Spike Root Cause Hypothesis Prompt

When to Use This Prompt
Defines the job-to-be-done, ideal user, required context, and boundaries for the Metric Spike Root Cause Hypothesis Prompt.
The ideal user has access to a monitoring dashboard or API that can provide a time-series slice of the anomalous metric, a service dependency map, and a list of recent deployment or configuration changes. The prompt requires these inputs to be pre-assembled into the [METRIC_DATA], [TOPOLOGY], and [CHANGE_LOG] placeholders. Without this structured context, the model will generate plausible but ungrounded speculation. The prompt also expects a [FAILURE_MODE_CATALOG]—a curated list of known failure patterns for your system—to anchor hypotheses in observed reality rather than generic troubleshooting advice.
Do not use this prompt for general debugging without metric data, or when the incident is purely a user-reported functional bug with no observable telemetry anomaly. It is also unsuitable for security incident response where the primary signal is an alert from an intrusion detection system rather than a performance metric. If you lack a clear spike in a specific metric, start with the Log Anomaly Pattern Extraction Prompt or the Incident Timeline Extraction Prompt instead. After generating hypotheses, always validate them against raw logs, traces, or direct system inspection before declaring a root cause.
Use Case Fit
Where this prompt works and where it does not. Use these cards to decide if the Metric Spike Root Cause Hypothesis Prompt fits your incident context before wiring it into your on-call or postmortem workflow.
Good Fit: Structured Metric Data Available
Use when: You have time-series metric data (latency, error rate, throughput) with clear timestamps and service labels. Why it works: The prompt correlates metric patterns against known failure modes and topology, which requires structured input. Guardrail: Validate that metric data is complete for the incident window before invoking the prompt.
Bad Fit: No Infrastructure Topology Context
Avoid when: You lack a service dependency map or infrastructure topology. Why it fails: The prompt relies on topology to trace failure propagation and identify blast radius. Without it, hypotheses become generic guesses. Guardrail: Pre-load a service graph or dependency map into the prompt context, or use the Dependency Failure Propagation Prompt first.
Required Inputs: Metrics, Topology, and Failure Catalog
What you need: 1) Metric time-series for the anomaly window, 2) Service dependency graph or topology description, 3) Known failure modes catalog for your stack. Why: Each input constrains the hypothesis space—missing any one increases hallucination risk. Guardrail: Implement a pre-flight check that verifies all three inputs are present before generating hypotheses.
Operational Risk: Over-Confident Single Hypothesis
What to watch: The model may converge on a single plausible-sounding hypothesis and underweight alternatives, especially when metrics are noisy. Risk: Premature focus on one root cause delays investigation of other paths. Guardrail: Require the prompt to output at least three ranked hypotheses with confidence scores and distinguishing evidence for each.
Operational Risk: Stale or Incomplete Failure Modes
What to watch: The prompt's hypotheses are only as good as the known failure mode catalog you provide. Risk: Novel failure modes or recent architecture changes won't appear in the hypothesis list. Guardrail: Update the failure mode catalog after every incident postmortem and version it alongside the prompt template.
Operational Risk: Metric Correlation Confusion
What to watch: The model may confuse correlation with causation, especially when multiple metrics spike simultaneously due to a shared upstream cause. Risk: Hypotheses that blame a correlated symptom rather than the root trigger. Guardrail: Include explicit instructions to distinguish causal direction and to flag correlated-but-not-causal metric relationships in the output.
Copy-Ready Prompt Template
A reusable prompt template for generating testable root cause hypotheses from anomalous metric spikes, ready for adaptation with your observability data.
This template is designed to be copied directly into your incident response tooling or AI harness. It accepts structured observability data—metric names, spike characteristics, infrastructure topology, and recent changes—and produces a ranked list of root cause hypotheses. Each hypothesis includes supporting evidence from the provided data, testability criteria, and a confidence estimate. The template uses square-bracket placeholders that you must replace with real data from your monitoring stack before sending to the model.
codeYou are an SRE root cause analyst. Your task is to generate testable root cause hypotheses for an anomalous metric spike. ## INPUT DATA ### Metric Spike Details - Metric name: [METRIC_NAME] - Observed value: [OBSERVED_VALUE] - Baseline value (7-day average at this time): [BASELINE_VALUE] - Spike magnitude (multiples of baseline): [SPIKE_MAGNITUDE] - Spike start time (UTC): [SPIKE_START_TIME] - Spike duration so far: [SPIKE_DURATION] - Direction: [SPIKE_DIRECTION] (options: upward, downward) - Rate of change: [RATE_OF_CHANGE] (options: sudden, gradual, oscillating) ### Correlated Metrics For each correlated metric, provide: - Metric name: [CORRELATED_METRIC_NAME] - Behavior during spike: [CORRELATED_BEHAVIOR] (options: also spiking, dropping, flat, inverse correlation) - Lag relative to primary spike: [CORRELATED_LAG] (options: leading by X minutes, lagging by X minutes, simultaneous) ### Infrastructure Context - Affected services: [AFFECTED_SERVICES] - Affected hosts/pods/instances: [AFFECTED_INSTANCES] - Affected availability zones or regions: [AFFECTED_REGIONS] - Service dependency graph (upstream and downstream): [DEPENDENCY_GRAPH] - Relevant load balancer or traffic routing: [TRAFFIC_ROUTING] ### Recent Changes (last 24 hours) - Deployments: [RECENT_DEPLOYMENTS] - Configuration changes: [RECENT_CONFIG_CHANGES] - Feature flag toggles: [RECENT_FEATURE_FLAGS] - Infrastructure scaling events: [RECENT_SCALING_EVENTS] - Third-party dependency status: [THIRD_PARTY_STATUS] ### Known Failure Modes - Documented failure modes for affected services: [KNOWN_FAILURE_MODES] - Previous similar incidents: [PREVIOUS_INCIDENTS] ## OUTPUT REQUIREMENTS Generate exactly [HYPOTHESIS_COUNT] root cause hypotheses, ranked by likelihood. For each hypothesis, produce: 1. **Hypothesis statement**: A specific, falsifiable statement describing the suspected root cause. 2. **Supporting evidence**: Which data points from the input support this hypothesis. 3. **Contradicting evidence**: Which data points, if any, weaken this hypothesis. 4. **Confidence score**: Low, Medium, or High with a brief justification. 5. **Test to confirm**: A specific, executable check that would confirm or rule out this hypothesis. 6. **Test to rule out**: A specific check that would falsify this hypothesis. 7. **Expected time to test**: Estimated minutes to execute the confirmation test. 8. **Immediate mitigation**: If the hypothesis is correct, what action should be taken now. ## CONSTRAINTS - Do not fabricate evidence. Only use data provided in the input. - If the input data is insufficient to generate strong hypotheses, state what additional data would be needed. - Distinguish between correlation and causation explicitly. - Flag any hypothesis that requires human judgment to confirm. - If [RISK_LEVEL] is "high", include a warning about the blast radius of each proposed mitigation.
Adaptation guidance: Replace each bracketed placeholder with live data from your observability stack—Prometheus, Datadog, Grafana, or your internal monitoring system. The [DEPENDENCY_GRAPH] field should include both upstream callers and downstream dependencies so the model can reason about propagation direction. The [KNOWN_FAILURE_MODES] field is critical for hypothesis quality; populate it from your incident database, runbooks, or service READMEs. If you lack structured data for a field, replace it with "Not available" rather than omitting it, so the model can explicitly note data gaps. For production use, wrap this prompt in a harness that validates the output contains exactly the requested number of hypotheses, each with all eight required fields, before surfacing results to an on-call engineer.
Prompt Variables
Required inputs for the Metric Spike Root Cause Hypothesis Prompt. Each placeholder must be populated with structured data before the prompt is assembled and sent to the model. Incomplete or malformed inputs are the most common cause of vague or untestable hypotheses.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[METRIC_NAME] | Identifies the specific metric that spiked for targeted analysis | p99_latency_ms | Must match a known metric key in the observability platform. Reject if not found in the metric catalog. |
[SPIKE_WINDOW_START] | ISO 8601 timestamp marking the beginning of the anomalous period | 2025-03-15T14:31:00Z | Parse as datetime. Must be before [SPIKE_WINDOW_END]. Reject if more than 30 days in the past without explicit override. |
[SPIKE_WINDOW_END] | ISO 8601 timestamp marking the end of the anomalous period | 2025-03-15T14:47:00Z | Parse as datetime. Duration must be at least 1 minute. Warn if window exceeds 24 hours without aggregation justification. |
[BASELINE_WINDOW_START] | ISO 8601 timestamp for the start of the normal comparison period | 2025-03-15T13:31:00Z | Parse as datetime. Must end before [SPIKE_WINDOW_START]. Reject if baseline window overlaps the spike window. |
[BASELINE_WINDOW_END] | ISO 8601 timestamp for the end of the normal comparison period | 2025-03-15T14:31:00Z | Parse as datetime. Duration should be comparable to the spike window. Warn if baseline is less than 25% of spike window duration. |
[METRIC_TIMESERIES_DATA] | Array of timestamp-value pairs for the metric during both windows | [{"ts":"...","value":245},...] | Must be valid JSON array. Each object must contain ts (ISO 8601) and value (number). Reject if fewer than 10 data points in the spike window. |
[SERVICE_TOPOLOGY] | Map of service dependencies, upstream and downstream, for the affected component | {"service":"checkout","upstream":["cart","inventory"],"downstream":["payment"]} | Must be valid JSON object. Reject if the service name does not appear in the topology. Warn if upstream or downstream arrays are empty. |
[RECENT_DEPLOYMENTS] | List of deployments, config changes, and feature flag toggles within the lookback period | [{"type":"deploy","service":"checkout","sha":"abc123","time":"..."}] | Must be valid JSON array. Each object must have type and time. Reject if time is outside the 24-hour pre-spike lookback without explicit justification. |
Implementation Harness Notes
How to wire the Metric Spike Root Cause Hypothesis Prompt into an incident response application or automated analysis workflow.
This prompt is designed to be called during an active incident or post-incident review when an anomalous metric spike has been identified. The implementation harness should treat the prompt as a hypothesis generation engine, not a final answer. The output is a set of testable hypotheses that an on-call engineer must validate against live systems, logs, and deployment records before taking action. Wire this prompt into your incident management bot, Slack command, or internal SRE dashboard so that responders can invoke it with a metric name, spike window, and relevant topology context.
The application layer must enforce strict input validation before calling the model. Require the [METRIC_NAME], [SPIKE_TIMESTAMP], [SPIKE_MAGNITUDE], and [INFRASTRUCTURE_TOPOLOGY] fields to be non-empty. If the topology is large, pre-process it to include only services upstream and downstream of the affected component. For model choice, use a model with strong reasoning capabilities (such as GPT-4o or Claude 3.5 Sonnet) because the task requires correlating metric behavior with failure mode knowledge. Set temperature to 0.2–0.3 to balance structured output with some hypothesis diversity. Implement a retry wrapper that catches malformed JSON outputs, extracts the raw text, and re-prompts the model with a repair instruction: 'The previous output was not valid JSON. Return only the corrected JSON object matching the schema.' After three failed retries, log the failure and escalate to a human responder with the raw model output attached.
Post-processing must validate that each hypothesis in the returned array contains a non-empty hypothesis, supporting_evidence, and test_steps field. Strip any hypotheses where the confidence_score is outside the 0.0–1.0 range or where test_steps is fewer than two concrete actions. Log every invocation with the input parameters, model version, raw response, and validated output for post-incident auditability. Never automatically execute remediation based on these hypotheses; always require a human to review the output, run the test steps, and confirm or reject each hypothesis before any mitigation is applied. The harness should surface the hypotheses in your incident channel with a clear 'Needs Human Validation' label and a button to mark each hypothesis as confirmed, rejected, or inconclusive.
Expected Output Contract
Defines the required fields, types, and validation rules for the structured JSON output of the Metric Spike Root Cause Hypothesis Prompt. Use this contract to parse and validate the model response before surfacing it in an incident response tool.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
hypothesis_id | string (UUID v4) | Must match UUID v4 regex. Auto-generated if null. | |
metric_spike | object | Must contain 'metric_name' (string), 'observed_value' (number), 'baseline_value' (number), and 'deviation_percent' (number). | |
root_cause_hypothesis | string | Must be a single, falsifiable statement. Minimum 50 characters. Must not contain hedging phrases like 'could be many things'. | |
confidence_score | number (0.0 - 1.0) | Must be a float between 0 and 1 inclusive. Values above 0.95 require explicit strong evidence in the 'supporting_evidence' field. | |
supporting_evidence | array of strings | Must contain at least 1 item. Each string must be a concrete observation from the provided [METRICS_CONTEXT] or [TOPOLOGY_CONTEXT]. | |
alternative_hypotheses | array of strings | If present, each string must be a distinct, falsifiable alternative. Null is allowed if no credible alternatives exist. | |
test_steps | array of objects | Must contain at least 1 step. Each object requires 'action' (string, a specific query or command) and 'expected_result_if_hypothesis_true' (string). | |
infrastructure_components_implicated | array of strings | Must contain at least 1 component name. Each name must match an entity ID from the provided [TOPOLOGY_CONTEXT]. |
Common Failure Modes
Metric spike root cause analysis fails in predictable ways. These are the most common failure modes and the guardrails that catch them before they mislead an incident response.
Correlation Confused with Causation
What to watch: The model latches onto a deployment or config change that happened around the same time as the spike and presents it as the root cause without causal evidence. Guardrail: Require the prompt to explicitly separate correlated events from causal hypotheses and demand supporting evidence (log signatures, error rate shifts, dependency graphs) for each causal claim.
Single-Cause Oversimplification
What to watch: The model proposes one root cause and ignores compounding factors such as a cache miss combined with a connection pool exhaustion. Guardrail: Add a required output section for contributing factors and interaction effects. Use eval criteria that penalize single-cause answers when multiple metrics shifted simultaneously.
Stale Topology Assumptions
What to watch: The model reasons from an outdated or generic infrastructure topology instead of the actual service dependency graph provided in the prompt. Guardrail: Require the topology to be passed as a structured input. Include a validation step that checks whether every cited dependency exists in the provided topology before accepting the hypothesis.
Metric Magnitude Blindness
What to watch: The model treats a 5% latency increase and a 500% error rate spike with equal weight, missing the severity signal. Guardrail: Include baseline and threshold values in the prompt input. Add an eval check that verifies the hypothesis addresses the metric with the largest deviation from baseline first.
Hallucinated Failure Signatures
What to watch: The model invents plausible-sounding error messages, stack traces, or log patterns that were never present in the actual incident data. Guardrail: Constrain the prompt to cite only evidence provided in the input. Add a grounding check that flags any quoted log line or error string not found in the source material.
Untestable Hypothesis Generation
What to watch: The model produces vague hypotheses like 'a network issue' or 'a resource bottleneck' without specifying what to check, where, or how. Guardrail: Require each hypothesis to include a specific test (query to run, dashboard to check, log filter to apply) that would confirm or refute it. Score hypotheses on testability during evaluation.
Evaluation Rubric
Use this rubric to test the quality of root cause hypotheses generated by the Metric Spike Root Cause Hypothesis Prompt before shipping the prompt to production. Each criterion targets a specific failure mode common in incident analysis.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Hypothesis Specificity | Hypothesis names a specific component, service, or configuration change, not a generic category like 'a code change' or 'a network issue'. | Output contains vague phrases like 'a recent change', 'a misconfiguration', or 'a resource issue' without identifying the specific entity. | Manual review: check if the hypothesis can be turned into a single, targeted investigation step without further decomposition. |
Metric-to-Cause Linkage | Hypothesis explicitly connects the observed metric spike pattern (latency, error rate, throughput) to the proposed cause with a causal mechanism statement. | Output lists a possible cause without explaining why that cause would produce the specific metric signature observed in [METRIC_DATA]. | Parse check: confirm the output contains at least one sentence matching the pattern 'Because [cause], we would expect [metric] to [behavior]'. |
Topology Grounding | Hypothesis references at least one specific node, service, or dependency from [INFRASTRUCTURE_TOPOLOGY] and explains its role in the failure. | Hypothesis describes a failure mode that could apply to any system without referencing the provided topology context. | Schema check: verify that at least one entity name from the [INFRASTRUCTURE_TOPOLOGY] input appears in the hypothesis text. |
Testability | Hypothesis includes a falsifiable prediction: a specific log query, metric check, or diagnostic command that would confirm or refute the hypothesis. | Output states a cause without any way to verify it, or proposes a test that requires access to data not available in the current incident context. | Actionability check: confirm the output contains at least one concrete verification step that an on-call engineer could execute in under 5 minutes. |
Failure Mode Relevance | Hypothesis maps to a known failure mode from [KNOWN_FAILURE_MODES] or explains why a novel failure mode is more likely given the evidence. | Output ignores the provided known failure mode catalog and proposes a cause with no precedent or justification for novelty. | Coverage check: if [KNOWN_FAILURE_MODES] is non-empty, at least one hypothesis must reference a mode from the list or explicitly state why none apply. |
Alternative Hypothesis Coverage | Output includes at least two distinct hypotheses that explain the same metric spike through different causal paths, not minor variations of the same idea. | All hypotheses share the same root component and differ only in wording or minor detail. | Diversity check: cluster hypotheses by the primary component they implicate; a pass requires at least two distinct clusters. |
Confidence Calibration | Each hypothesis includes a confidence indicator (High/Medium/Low) that aligns with the strength of supporting evidence and acknowledges missing data. | All hypotheses are marked High confidence, or confidence levels are present but ignore obvious evidence gaps. | Calibration check: for each High-confidence hypothesis, verify that at least two independent pieces of evidence from [METRIC_DATA] or [INCIDENT_CONTEXT] directly support it. |
Remediation Alignment | Each hypothesis is paired with a suggested remediation action that directly addresses the proposed cause, not a generic rollback or restart. | Remediation suggestions are copy-pasted across hypotheses or default to 'roll back recent deployment' without cause-specific justification. | Traceability check: for each hypothesis, confirm the remediation action would not apply to the other hypotheses in the output. |
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 metric spike (e.g., p99 latency). Use plain-text output without strict schema enforcement. Focus on getting a coherent hypothesis chain before adding validation.
Simplify the [INFRASTRUCTURE_TOPOLOGY] to a short text description rather than a structured graph. Replace [KNOWN_FAILURE_MODES] with a few bullet points of common issues.
Watch for
- Hypotheses that sound plausible but lack specific evidence links
- Missing correlation between the spike timing and the proposed cause
- Overly generic root causes ("high traffic") without mechanism detail

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