Inferensys

Prompt

Dependency Failure Propagation Prompt

A practical prompt playbook for platform engineers and SREs analyzing cascading failures across services. Traces failure propagation through service dependency graphs, identifies blast radius, impacted critical paths, and amplification points, and outputs a structured propagation map with timing and impact severity per service.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the job-to-be-done, ideal user, required inputs, and boundaries for the dependency failure propagation prompt.

Use this prompt when an incident involves multiple services and you need to understand how a failure in one component propagated through the dependency graph. This is not a root cause prompt for a single service failure. It is designed for platform engineers and SREs who already have a known originating failure and need to map the cascading impact across services, identify amplification points where failures were magnified, and determine the full blast radius including timing and severity per affected service. The prompt assumes you have a service dependency graph, incident timeline data, and per-service health metrics available as input context. It does not replace human architecture knowledge but accelerates the structured analysis that would otherwise require manual correlation across dashboards and runbooks.

The ideal user is a platform engineer or SRE who has already identified the initial failing component and needs to answer 'what else broke because of this?' before the incident review meeting. Required context includes a machine-readable or clearly described service dependency graph, a normalized incident timeline with timestamps, and per-service health metrics (error rates, latency, saturation) for the incident window. Without these inputs, the prompt will produce speculative or incomplete propagation maps. Do not use this prompt when the originating failure is unknown, when only a single service is affected, or when you lack dependency graph data—those scenarios require root cause analysis or single-service debugging prompts instead.

The prompt outputs a structured propagation map with timing and impact severity per service, but it is not a substitute for architecture review. Always validate the output against your own understanding of the system's critical paths and known failure modes. The prompt may miss indirect dependencies, asynchronous side effects, or human-in-the-loop mitigations that are not represented in the provided graph. Use the output as a starting point for discussion, not as the final incident record. For high-severity incidents, pair this prompt's output with a manual review by the service owners before publishing the blast radius analysis.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Dependency Failure Propagation Prompt delivers value and where it introduces risk. Use these cards to decide if this prompt fits your incident context before wiring it into an automated runbook.

01

Good Fit: Post-Incident Blast Radius Analysis

Use when: you have a confirmed downstream or upstream dependency failure and need to map the full propagation path across services. Why it works: the prompt excels at tracing causal chains through a known dependency graph, identifying which services were affected, in what order, and with what severity amplification. Guardrail: always provide a current service dependency graph as input; without it, the model hallucinates plausible but fictional dependencies.

02

Bad Fit: Real-Time Incident Response

Avoid when: you need sub-second latency or are in the first five minutes of an active incident with incomplete data. Risk: the prompt requires a relatively stable set of inputs (dependency graph, timing data, error signatures) that are rarely available during the initial scramble. Using it too early produces low-confidence speculation that can misdirect responders. Guardrail: reserve this prompt for the post-incident analysis phase or after the incident commander has declared the situation stable enough for structured investigation.

03

Required Inputs: Dependency Graph and Timing Data

What you must provide: a machine-readable or clearly described service dependency graph, plus timing data (error start timestamps, latency spikes, failure rates per service). Risk of missing inputs: without a dependency graph, the model invents service relationships. Without timing data, it cannot establish causal order and may reverse cause and effect. Guardrail: validate the dependency graph against your service catalog or infrastructure-as-code before passing it to the prompt. Reject outputs that reference services not in the provided graph.

04

Operational Risk: Amplification Point Blindness

What to watch: the prompt may correctly trace propagation but miss amplification points—services that magnified a small failure into a large outage through retry storms, cache stampedes, or connection pool exhaustion. Why it happens: the prompt focuses on propagation topology, not on per-service behavioral dynamics. Guardrail: pair this prompt with a Cache Stampede Root Cause or Connection Pool Exhaustion prompt for services identified as high-severity nodes in the propagation map. Cross-reference outputs before finalizing the root cause narrative.

05

Data Quality Dependency: Incomplete Observability

What to watch: if your observability stack has gaps—missing services, incomplete traces, or unsampled error logs—the prompt will produce a propagation map with false negatives. Risk: silent failures in unmonitored services appear as the origin point when they are actually victims of an upstream failure you cannot see. Guardrail: run a completeness check on your inputs before invoking the prompt. Flag any service in the dependency graph that lacks timing or error data, and require human review of the output if coverage is below 90%.

06

Scale Limit: Graph Complexity Threshold

What to watch: dependency graphs with more than approximately 50 nodes or highly interconnected meshes can produce propagation maps that are too complex to be actionable. Risk: the output becomes a dense hairball that obscures rather than clarifies the critical path. Guardrail: pre-process large dependency graphs by scoping to the known failure domain (affected services plus one hop). If the full graph is required, use the prompt iteratively on subgraphs and aggregate results with a human-in-the-loop review step.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt for analyzing cascading failures across a service dependency graph, with placeholders for incident-specific data.

This template is the core of the Dependency Failure Propagation playbook. It is designed to be copied directly into your AI harness, IDE, or orchestration layer. The prompt instructs the model to act as a platform engineer analyzing a cascading failure. It requires a structured [SERVICE_DEPENDENCY_GRAPH], an [INCIDENT_TIMELINE], and a set of [OBSERVED_SYMPTOMS] to produce a detailed propagation map. Before using this prompt, ensure you have assembled these inputs from your service catalog, monitoring tools, and incident channel. The prompt's value lies in its strict output schema, which forces the model to reason about timing, directionality, and amplification points rather than producing a vague narrative.

text
You are a principal platform engineer investigating a cascading failure across a distributed system. Your task is to trace the propagation of a failure through a service dependency graph, identify the blast radius, and pinpoint amplification points.

## INPUT DATA

### Service Dependency Graph
[SERVICE_DEPENDENCY_GRAPH]
# Provide a structured representation of your service topology. This can be a JSON object, a list of directional edges (e.g., ServiceA -> ServiceB), or a textual description of dependencies, health-check configurations, and timeouts.

### Incident Timeline
[INCIDENT_TIMELINE]
# A chronologically ordered list of events, including deployment timestamps, alert firing times, metric spikes, and manual interventions. Use the format: [Timestamp] [Event Description].

### Observed Symptoms
[OBSERVED_SYMPTOMS]
# A list of user-facing and internal symptoms, such as elevated error rates, latency spikes, queue backlogs, or specific error messages. Include the affected service and the time the symptom was first observed.

## CONSTRAINTS
- Base your analysis strictly on the provided graph, timeline, and symptoms. Do not invent services or events.
- Distinguish between a service being the *root cause* and a service being an *amplification point* (e.g., a service that failed due to a lack of a circuit breaker).
- For each impacted service, state the direction of failure propagation.
- If the provided data is insufficient to determine a causal link, explicitly state that uncertainty.

## OUTPUT SCHEMA
Respond with a single JSON object conforming to the following structure. Do not include any text outside the JSON object.
{
  "propagation_map": [
    {
      "impacted_service": "string",
      "failure_source": "string", // The immediate upstream dependency that caused the failure
      "propagation_mechanism": "string", // e.g., 'timeout', 'error propagation', 'connection pool exhaustion', 'cascading backpressure'
      "first_observed_impact_timestamp": "string",
      "severity": "critical" | "degraded" | "unaffected",
      "amplification_point": true | false,
      "amplification_detail": "string", // Explain why it's an amplification point, e.g., 'Missing circuit breaker caused thread pool exhaustion'
      "evidence": ["string"] // List of specific timeline events or symptoms supporting this finding
    }
  ],
  "critical_path_impact": "string", // Summary of how a critical user journey or business function was broken
  "unaffected_services": ["string"], // List of services in the graph that were not impacted
  "analysis_confidence": "high" | "medium" | "low",
  "uncertainty_notes": ["string"] // List of specific questions that need more data to answer
}

To adapt this template, replace the bracketed placeholders with real data from your incident. The [SERVICE_DEPENDENCY_GRAPH] is the most critical input; a machine-readable format like a JSON adjacency list will yield more reliable results than a paragraph of text. If you are wiring this into an automated incident analysis pipeline, the [INCIDENT_TIMELINE] and [OBSERVED_SYMPTOMS] can be programmatically assembled from PagerDuty alerts, Slack transcripts, and Datadog event streams. After receiving the output, you must validate the JSON schema and verify that every propagation_mechanism and evidence field is grounded in the input data you provided. For high-severity incidents, this analysis is a starting point for human discussion, not a final verdict.

IMPLEMENTATION TABLE

Prompt Variables

Inputs the prompt needs to work reliably. Each variable must be populated with incident-specific data.

PlaceholderPurposeExampleValidation Notes

[SERVICE_DEPENDENCY_GRAPH]

JSON or structured text describing the service topology, including upstream and downstream dependencies, health check endpoints, and communication protocols.

{"services": [{"name": "payment-gateway", "depends_on": ["inventory-service", "auth-service"]}]}

Must parse as valid JSON. Must contain a 'services' array with at least one node. Each node requires a 'name' and 'depends_on' field. Null not allowed.

[INCIDENT_TIMELINE]

A chronologically ordered list of events, alerts, and status changes from the incident window with timestamps.

2024-01-15T10:00:00Z - payment-gateway latency p95 > 500ms 2024-01-15T10:02:00Z - inventory-service error rate 5%

Must contain at least 3 timestamped events. Timestamps must be ISO 8601 format. Gaps larger than 10 minutes should be flagged for review. Null not allowed.

[FAILURE_SIGNATURE]

The specific error codes, exception messages, or metric anomalies that define the initial failure.

HTTP 504 Gateway Timeout from payment-gateway; 'Connection pool exhausted' in inventory-service logs.

Must be a non-empty string. Should include at least one error code or exception type. Null not allowed.

[OBSERVABILITY_DATA]

Relevant logs, metric snapshots, and trace samples from the incident window for each service in the dependency graph.

payment-gateway: CPU 92%, connection pool 100/100, 504 errors 150/min.

Must be a non-empty string or structured object. Should reference specific services from [SERVICE_DEPENDENCY_GRAPH]. Null allowed if no data is available, but propagation analysis will be limited.

[DEPLOYMENT_EVENT_LOG]

A list of recent deployments, feature flag changes, or config updates with timestamps, service names, and diff references.

2024-01-15T09:55:00Z - inventory-service v2.3.1 deployed (commit abc123).

Must contain at least one event if provided. Timestamps must be ISO 8601. Each event must include a service name. Null allowed if no deployments occurred.

[BLAST_RADIUS_CONSTRAINT]

A specific user segment, feature, or business function to scope the analysis, preventing unbounded propagation mapping.

Only trace propagation for services impacting the 'checkout' user flow.

Must be a non-empty string. Should map to a known business function or user journey. Null allowed, but analysis will default to full graph traversal.

[OUTPUT_SCHEMA]

The exact JSON schema or structured format definition for the propagation map output.

{"propagation_path": [{"from": "string", "to": "string", "latency": "number", "impact": "string"}]}

Must be a valid JSON schema definition. Must include fields for source service, target service, timing, and impact severity. Null not allowed.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Dependency Failure Propagation Prompt into an incident analysis application or automated workflow.

This prompt is designed to be called during an active incident or post-incident review, not as a one-off chat interaction. It expects a structured service dependency graph and a failure origin point as input. The output is a propagation map that your application can render as a directed graph, a table, or an alert payload. The primary integration points are your service catalog, your real-time topology data (from a tool like ServiceNow, Backstage, or a CMDB), and your incident management platform (PagerDuty, FireHydrant, etc.). The prompt should be invoked automatically when a critical service degradation is declared, with the dependency graph fetched from the system of record rather than pasted by a human operator.

Build a thin API wrapper that accepts an incident ID, fetches the current dependency graph from your service catalog API, identifies the originating failed service from the incident's affected_component field, and assembles the prompt with the [DEPENDENCY_GRAPH] and [FAILURE_ORIGIN] placeholders populated. Validate the input graph structure before sending: every node must have a name and depends_on list, and the origin node must exist in the graph. If validation fails, return a structured error to the caller rather than sending a malformed prompt. For model selection, use a model with strong reasoning capabilities (GPT-4o, Claude 3.5 Sonnet, or Gemini 1.5 Pro) because the task requires multi-hop graph traversal and impact reasoning. Set temperature=0 or very low to ensure deterministic propagation paths. Implement a retry wrapper with up to 2 retries on 5xx or timeout errors, but do not retry on 4xx validation failures.

The output must be validated against a schema before it enters any downstream system. Require that the propagation_map array contains at least the origin service, that every impacted_service name matches a node in the input graph, and that propagation_path entries form valid edges in the dependency graph. If the model returns a service not present in the input, flag it as a hallucination and either retry or escalate for human review. Log every invocation with the input graph hash, the origin service, the model version, and the output propagation map for post-incident auditability. In high-severity incidents, route the output to a human incident commander for confirmation before triggering automated remediation actions such as circuit breaker flips or traffic shedding. The propagation map should be rendered in your incident dashboard as a visual graph with color-coded severity levels, allowing responders to see the blast radius at a glance. Avoid using this prompt for low-severity or transient blips where the dependency graph is stable and the propagation path is already well-understood; in those cases, a simpler rule-based traversal of the graph is faster and cheaper.

IMPLEMENTATION TABLE

Expected Output Contract

Structured JSON schema for the dependency failure propagation map. Validate each field before storing or displaying results.

Field or ElementType or FormatRequiredValidation Rule

propagation_map

array of objects

Must contain at least one service node. Schema check: validate array length > 0.

propagation_map[].service_name

string

Must match a known service identifier from the dependency graph input. Regex: ^[a-z][a-z0-9-]*$.

propagation_map[].failure_mode

string (enum)

Must be one of: 'direct_dependency', 'transitive_dependency', 'resource_contention', 'cascading_timeout', 'circuit_breaker_trip', 'data_corruption_propagation'.

propagation_map[].blast_radius

string (enum)

Must be one of: 'isolated', 'partial_tenant', 'full_tenant', 'region_wide', 'global'. If null, flag for human review.

propagation_map[].impact_severity

string (enum)

Must be one of: 'critical', 'high', 'medium', 'low', 'none'. If 'critical' or 'high', require a linked remediation_candidate entry.

propagation_map[].time_to_propagate_ms

integer

Must be a non-negative integer. If 0, validate that the service is the origin node. If > 300000, flag for timing anomaly review.

propagation_map[].amplification_factor

float

Must be >= 1.0. A value of 1.0 indicates no amplification. If > 10.0, require an evidence citation in the amplification_evidence field.

propagation_map[].amplification_evidence

string or null

If amplification_factor > 1.0, this field must be a non-empty string citing log patterns, metric ratios, or trace evidence. If null while factor > 1.0, flag for incomplete evidence.

PRACTICAL GUARDRAILS

Common Failure Modes

When tracing cascading failures across service dependency graphs, these failure modes can corrupt the analysis, hide the true root cause, or produce misleading propagation maps. Each card identifies a specific risk and the guardrail that prevents it.

01

Hallucinated Dependency Links

What to watch: The model invents service dependencies that don't exist in the provided topology, creating false propagation paths and inflating the blast radius. This happens when the graph is underspecified or the model defaults to common architectural patterns. Guardrail: Require the prompt to cite specific evidence from the dependency graph for every edge in the propagation map. Add a validator that rejects any service-to-service link not present in the input topology.

02

Temporal Ordering Reversal

What to watch: The model misorders failure events, placing an effect before its cause. This corrupts the propagation chain and leads teams to investigate downstream symptoms as root causes. Common when timestamps are sparse or formatted inconsistently. Guardrail: Include a strict timestamp normalization step in the prompt and add an eval check that verifies every parent node's failure time precedes its children's. Flag and re-prompt on ordering violations.

03

Amplification Point Blindness

What to watch: The model correctly traces the propagation path but misses amplification points—services where a small input degradation causes a disproportionately large output failure. This understates the criticality of specific nodes. Guardrail: Add an explicit instruction to identify nodes where error rate or latency multiplies beyond a configurable threshold. Include a dedicated amplification score field in the output schema that must be populated for every node.

04

Symptom-Confuses-Cause Collapse

What to watch: The model treats a highly visible symptom (e.g., a frontend error spike) as the root cause, collapsing the propagation tree into a single-level fan-out from the wrong origin. This misdirects remediation effort. Guardrail: Require the prompt to distinguish between 'triggering event' and 'observed symptom' explicitly. Add a validation step that checks whether the proposed root cause has any upstream dependencies that could have caused it, and re-prompt if any exist.

05

Incomplete Blast Radius from Partial Data

What to watch: When monitoring gaps or incomplete telemetry leave some services unobserved, the model silently omits them from the propagation map rather than flagging the uncertainty. This creates false confidence in a limited blast radius. Guardrail: Include a required 'observation_status' field for every service in the topology. The prompt must classify each as 'observed,' 'inferred,' or 'unobserved.' Add an eval that fails if any service in the input graph is missing from the output entirely.

06

Correlation-As-Causation Overreach

What to watch: The model asserts a causal link between two services based solely on temporal correlation in metrics, ignoring that both may be downstream of a common cause or that the correlation is spurious. Guardrail: Instruct the model to test each proposed causal link against alternative explanations (common cause, reverse causation, coincidence). Require a 'confidence' field per edge and downgrade links supported only by temporal proximity without mechanistic evidence.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test the quality of the Dependency Failure Propagation Prompt output before integrating it into an automated incident analysis workflow. Each criterion targets a specific failure mode common in propagation analysis.

CriterionPass StandardFailure SignalTest Method

Service Coverage

All services in the provided [DEPENDENCY_GRAPH] appear in the propagation map with a status.

A service from the input graph is missing from the output.

Parse the output JSON. Extract all service names. Compare against the input graph's node list. Flag any missing entries.

Propagation Path Completeness

For each failed service, the output traces a complete path back to the root cause service through valid graph edges.

A propagation path contains a hop between two services that are not directly connected in [DEPENDENCY_GRAPH].

For each path in the output, verify every consecutive pair of services exists as an edge in the input graph. Flag invalid hops.

Timing Consistency

Failure timestamps for downstream services are strictly greater than or equal to the timestamp of their upstream dependency's failure.

A downstream service shows a failure time earlier than its upstream dependency.

Sort the propagation chain by reported timestamp. Check that each service's failure time is >= the time of the service it depends on in the chain.

Blast Radius Quantification

The blast_radius field contains a concrete integer or percentage of total services, not a vague descriptor.

The blast_radius field contains a string like 'large' or 'significant' instead of a number.

Assert that output.blast_radius is of type number. Check that the value is between 0 and the total number of services in [DEPENDENCY_GRAPH].

Amplification Point Identification

Any service that increases error rate or latency beyond its upstream dependency's rate is flagged as an amplification point with a specific metric delta.

A service with a 10x error rate increase is not flagged, or the amplification reason is missing a quantitative comparison.

For each flagged amplification point, confirm the output includes a metric field (e.g., error_rate_multiplier) with a numeric value > 1.0.

Critical Path Ranking

The output identifies a single critical path and ranks it by total downstream impact, not just the first service to fail.

The critical path is simply the first chronological failure, ignoring a separate path with a larger blast radius.

Extract all paths. Calculate total downstream impact per path. Assert the path with the highest impact score is marked as the critical path.

Remediation Scope Suggestion

The output suggests a remediation action targeting the root cause service, not a symptomatic downstream service.

The suggested remediation is to restart a downstream service that is only failing because of an upstream outage.

Check that the target of the remediation action matches the service identified as the root cause in the propagation map.

Schema Adherence

The output is valid JSON that strictly matches the [OUTPUT_SCHEMA] with all required fields present.

The output is missing a required field like 'propagation_map' or contains an extra, undefined field.

Validate the raw output string against the [OUTPUT_SCHEMA] using a JSON schema validator. Reject on any schema violation.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a manually constructed dependency graph in [SERVICE_DEPENDENCY_GRAPH]. Use a simplified JSON schema for the propagation map—focus on service_name, failure_type, propagation_path, and impact_severity only. Run against a single known incident timeline to validate the shape before adding complexity.

Watch for

  • The model inventing dependencies not present in your graph
  • Overly broad impact descriptions without timing
  • Missing amplification points when services retry or queue
Prasad Kumkar

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.