This prompt is for architects and platform engineers who need to conduct a structured Failure Mode and Effects Analysis (FMEA) on an event-driven architecture before it reaches production. The job-to-be-done is identifying silent failure modes—message loss, duplicate delivery, out-of-order processing, broker failure cascades, and consumer crash scenarios—that are invisible in happy-path testing but cause data corruption and operational pain in production. The ideal user has a concrete system design in hand: a topology diagram, event schemas, broker configuration, and consumer logic. They are not looking for generic advice; they need a systematic scan of their specific architecture against known asynchronous failure patterns.
Prompt
Event-Driven System Failure Mode Analysis Prompt

When to Use This Prompt
Define the job, reader, and constraints for the Event-Driven System Failure Mode Analysis Prompt.
Use this prompt when you have a defined event-driven design and need to surface risks before implementation or deployment. It works best with detailed input: describe your brokers, producers, consumers, message channels, delivery guarantees, retry policies, dead-letter strategies, and idempotency mechanisms. The prompt produces a structured FMEA table with failure modes, effects, severity, detectability, and mitigation recommendations. It also flags undetected failure cascades—scenarios where one component's failure silently propagates to downstream systems without triggering alerts. This is not a prompt for initial architecture selection or high-level trade-off discussions; use the Choreography vs Orchestration Decision Prompt or Eventual Consistency Trade-Off Analysis Prompt for those decisions.
Do not use this prompt when you lack a concrete design to analyze. It cannot invent failure modes for a system you haven't described. It is also not a substitute for chaos engineering or production testing—it identifies risks for further investigation, not runtime behavior. The output requires human review: severity and detectability ratings are model judgments that must be calibrated against your operational context, SLAs, and risk tolerance. For regulated systems or financial event processing, always pair this analysis with formal verification, load testing, and operational runbooks. The next step after running this prompt is to prioritize the identified failure modes by risk score and design mitigation strategies for the top-tier items before writing consumer code.
Use Case Fit
Where this prompt works, where it fails, and what inputs it assumes for event-driven failure mode analysis.
Good Fit: Pre-Design Review
Use when: you have a draft event topology, schema, or flow diagram and want to identify failure modes before implementation. Guardrail: require a concrete artifact (diagram, AsyncAPI spec, or architecture decision record) as input. The prompt produces higher-quality analysis when it can reference specific components rather than abstract descriptions.
Bad Fit: Runtime Incident Triage
Avoid when: you need real-time root cause analysis during an active production incident. Guardrail: this prompt is designed for deliberate design review, not live debugging. For incident response, use an operational runbook prompt with access to live metrics, logs, and traces instead.
Required Input: Architecture Artifact
What to watch: the prompt produces generic, low-value output when given only vague descriptions like 'we use Kafka.' Guardrail: always provide a specific artifact—a topology diagram description, a list of topics and consumers, or an event schema. The more concrete the input, the more actionable the failure mode analysis.
Operational Risk: Over-Engineering
What to watch: the prompt may surface every theoretical failure mode, including edge cases with negligible probability, leading teams to over-engineer solutions. Guardrail: add a constraint in the prompt to prioritize failure modes by business impact and likelihood. Ask for a severity-ranked output rather than an exhaustive catalog.
Operational Risk: Missing Context
What to watch: the prompt cannot detect failure modes that depend on deployment-specific details it hasn't been given—such as network topology, broker configuration, or consumer group settings. Guardrail: include deployment context in the input. If you omit infrastructure details, the analysis will have blind spots around partition placement, replication factor, and cross-AZ latency.
Scope Boundary: Design Review Only
What to watch: teams may treat the prompt output as a complete safety assessment without verifying it against real infrastructure. Guardrail: the output is a design review artifact, not a substitute for chaos engineering, load testing, or production monitoring. Pair this prompt with actual fault injection and observability validation before claiming coverage.
Copy-Ready Prompt Template
A reusable prompt with square-bracket placeholders for conducting a structured FMEA on event-driven systems.
This prompt template is designed to be copied directly into your AI harness, IDE, or orchestration layer. It forces a structured Failure Mode and Effects Analysis (FMEA) on an event-driven architecture by requiring the model to reason about specific failure domains—message loss, duplication, ordering, broker failure, and consumer crashes—rather than producing a generic risk list. Every placeholder is a control point you can populate programmatically or manually before execution.
textYou are a senior platform architect specializing in event-driven systems. Perform a structured Failure Mode and Effects Analysis (FMEA) on the event-driven architecture described below. Your analysis must be exhaustive, specific to the provided context, and avoid generic advice. ## SYSTEM CONTEXT [SYSTEM_DESCRIPTION] ## ARCHITECTURE ARTIFACTS - Event Flow Diagram: [EVENT_FLOW_DESCRIPTION] - Broker/Topic Configuration: [BROKER_TOPOLOGY] - Consumer Group Details: [CONSUMER_GROUPS] - Producer Configuration: [PRODUCER_CONFIGS] ## ANALYSIS CONSTRAINTS - Risk Classification: Use [RISK_LEVEL] (Low/Medium/High/Critical) based on data integrity and business impact. - Depth: Analyze [ANALYSIS_DEPTH] (e.g., 'happy path only', 'edge cases', 'full fault injection'). - Output Schema: Strictly adhere to the JSON schema defined in [OUTPUT_SCHEMA]. ## FAILURE DOMAINS TO COVER For each component in the flow, analyze these specific failure modes: 1. **Message Loss:** Where can a message be lost (producer fire-and-forget, broker flush interval, consumer crash before ack)? 2. **Duplicate Delivery:** Where can at-least-once semantics cause a duplicate (producer retries, consumer rebalancing)? 3. **Out-of-Order Processing:** Where can ordering guarantees break (partition rebalancing, competing consumers, retry queues)? 4. **Broker Failure:** What happens if the broker becomes unavailable (leader election, disk full, network partition)? 5. **Consumer Crash:** What happens if a consumer crashes mid-processing (offset commit timing, long-running transactions)? ## OUTPUT REQUIREMENTS Generate a JSON object conforming to [OUTPUT_SCHEMA]. For each identified failure mode, provide: - `failure_mode`: A concise name. - `component`: The specific component (e.g., 'OrderProducer', 'PaymentTopic-Partition2'). - `effect`: The downstream business or data impact. - `detection_mechanism`: How this failure would be observed (e.g., 'consumer lag metric', 'duplicate order ID in DB'). - `mitigation`: A concrete design or operational mitigation. - `risk_level`: The classified risk level. ## ADDITIONAL CONTEXT [ADDITIONAL_CONTEXT]
To adapt this template, replace the square-bracket placeholders with concrete details from your design documents. [SYSTEM_DESCRIPTION] should be a dense paragraph describing the business flow. [OUTPUT_SCHEMA] is critical—provide a strict JSON Schema definition to prevent the model from drifting into prose. If you are running this analysis in a CI pipeline, populate [RISK_LEVEL] and [ANALYSIS_DEPTH] from a config file to enforce consistent review standards. For high-risk systems, always route the generated FMEA to a human reviewer for approval before merging any architectural changes.
Prompt Variables
Inputs the prompt needs to work reliably, including the architecture description, scope boundaries, and risk thresholds. Each placeholder must be populated before the prompt is sent to the model.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[ARCHITECTURE_DESCRIPTION] | Full description of the event-driven system under analysis, including producers, consumers, brokers, topics/queues, and message flows | Order Processing System: REST API producer -> Kafka 'orders' topic -> Payment Consumer -> Kafka 'payments' topic -> Fulfillment Consumer | Must contain at least 3 components and 2 message channels. Reject if only synchronous endpoints are described. |
[SCOPE_BOUNDARIES] | Explicit declaration of what is in-scope and out-of-scope for this failure mode analysis | In-scope: message delivery between Order API and Fulfillment. Out-of-scope: payment gateway external API failures, database replication lag | Must include both in-scope and out-of-scope sections. Reject if scope is 'everything' or undefined. |
[FAILURE_CLASSES] | List of failure categories to analyze, drawn from event-driven failure taxonomy | Message loss, duplicate delivery, out-of-order processing, broker failure, consumer crash, schema evolution breakage | Must contain at least 3 classes from the taxonomy. Warn if classes are too generic like 'errors' or 'bugs'. |
[RISK_THRESHOLD] | Severity threshold for inclusion in the analysis output. Failures below this threshold are omitted | Medium: include Medium, High, and Critical severity failures. Exclude Low severity | Must be one of: Low, Medium, High, Critical. Reject numeric values or custom scales. |
[CONSUMER_CRASH_SCENARIO] | Specific consumer failure scenario to analyze, including offset commit strategy and processing guarantees | Payment Consumer crashes after debiting account but before committing offset. At-least-once delivery with no idempotency key check | Must describe the crash point relative to processing and offset commit. Reject if scenario is 'consumer fails' without specifics. |
[BROKER_CONFIGURATION] | Broker replication, acknowledgment, and retention settings relevant to failure analysis | Kafka: acks=all, min.insync.replicas=2, replication factor=3, retention=7 days, unclean.leader.election.enable=false | Must include acknowledgment mode and replication factor. Warn if acks=0 or replication factor=1. |
[OUTPUT_SCHEMA] | Expected structure for the FMEA output, defining required fields per failure mode | JSON array of objects with: failure_mode, severity, likelihood, detection_mechanism, impact_description, mitigation, residual_risk | Must define at least 5 required fields. Reject if output is 'free text' or 'whatever the model thinks'. |
[CONSTRAINTS] | Hard constraints the analysis must respect, such as regulatory requirements, latency budgets, or data residency | PCI-DSS compliance required for payment events. PII must not appear in dead letter queues. Max end-to-end latency 500ms p99 | Must be concrete and verifiable. Reject vague constraints like 'be secure' or 'perform well'. |
Implementation Harness Notes
How to wire the failure mode analysis prompt into an architecture review workflow with validation, retries, and human review gates.
This prompt is designed to be integrated into a structured architecture review pipeline, not used as a one-off chat. The harness should treat the prompt as a deterministic analysis step that produces a machine-readable FMEA table alongside a human-readable summary. Because the output informs design decisions for production event-driven systems, the harness must enforce validation, log every invocation, and gate high-severity findings for human review before the analysis is accepted into the architecture record.
Wire the prompt as an API call with a structured output request. Use a JSON schema that enforces the FMEA table shape: each row must include failure_mode, component, severity, detection_mechanism, mitigation, and residual_risk. The harness should validate the response against this schema immediately. If validation fails, retry once with the validation error injected into the prompt as a correction instruction. If the second attempt also fails, log the failure and escalate to a human reviewer rather than silently accepting a malformed analysis. For model choice, prefer a model with strong structured output support and a context window large enough to hold the full system description plus the output schema. Claude 3.5 Sonnet or GPT-4o with response_format set to json_schema are good defaults.
The harness should also run a set of automated eval checks before the analysis reaches a human. Check that the number of identified failure modes is within a reasonable range for the system complexity described—too few suggests shallow analysis, too many suggests noise. Verify that each failure mode references a specific component or interaction in the input system description, not a generic event-driven concern. Flag any severity rating of critical or high for mandatory human review. For regulated or high-risk domains, require explicit evidence grounding: the prompt should be instructed to cite the specific architectural element that enables each failure mode, and the harness should verify that citations are present and map to components named in the input.
Log every invocation with the input system description hash, the model version, the raw and validated outputs, the eval results, and the human review decision. This audit trail is essential for architecture governance—when a failure mode that was dismissed during review later manifests in production, the team needs to trace back to the analysis that missed it. Store the validated FMEA table in a queryable format so that future architecture reviews can reference prior analyses and check whether previously identified risks were actually mitigated. Avoid treating this prompt as a fire-and-forget generator; the harness is what makes it a reliable part of the architecture review process.
Expected Output Contract
Structured FMEA output fields, types, and validation rules for the event-driven system failure mode analysis prompt.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
failure_mode_id | string (kebab-case) | Matches pattern ^FMEA-[a-z0-9-]+$. Must be unique within the output array. | |
component | string | Must match an element from the provided [SYSTEM_TOPOLOGY] input. Non-empty check required. | |
failure_mode | string | Describes a specific, observable failure. Must not be a generic category like 'network failure'. Minimum 20 characters. | |
potential_effects | array of strings | Array must contain at least 1 item. Each string must be a distinct downstream consequence, not a restatement of the failure mode. | |
severity | string (enum) | Must be one of: 'Low', 'Medium', 'High', 'Critical'. If 'Critical', a human review flag must be set in the harness. | |
detection_mechanism | string or null | If null, the harness must log a warning for 'undetectable failure mode'. If a string, must describe a specific metric, alert, or observable signal. | |
mitigation_strategy | string | Must reference a specific architectural pattern (e.g., 'circuit breaker', 'idempotency key'). Generic advice like 'monitor it' fails validation. | |
requires_human_review | boolean | Must be true if severity is 'Critical' or if detection_mechanism is null. Harness must flag any false value that violates this rule. |
Common Failure Modes
What breaks first when using an LLM for event-driven failure mode analysis, and how to guard against incomplete or hallucinated failure scenarios.
Hallucinated Failure Scenarios
What to watch: The model invents plausible-sounding but non-existent failure modes (e.g., a 'partition rebalance cascade' in a system that doesn't use Kafka). Guardrail: Require the prompt to ground every failure mode in a specific component from the provided architecture diagram or description. Add a validator that flags any failure mode referencing a component not present in the input context.
Missing Silent Failure Modes
What to watch: The model focuses on loud, obvious failures (crashes, timeouts) while omitting silent data loss scenarios like message misrouting, bit flips, or subtle serialization errors. Guardrail: Include a checklist of silent failure categories in the prompt (data corruption, routing errors, configuration drift) and instruct the model to explicitly address each category or state why it's not applicable.
Overlooking Cascading Failures
What to watch: The analysis treats each component in isolation, missing how a consumer crash triggers producer backpressure, which then fills broker disks and causes a cluster-wide outage. Guardrail: Add a dedicated prompt step for dependency chain analysis. Require the output to include a 'failure cascade map' showing second-order and third-order effects for each identified failure mode.
Incomplete Mitigation Recommendations
What to watch: The model suggests generic mitigations ('add monitoring') without specifying what to monitor, what threshold triggers an alert, or what the runbook response should be. Guardrail: Constrain the output schema to require specific alert conditions, metric names, and remediation steps for each mitigation. Use a post-generation check to flag vague recommendations.
Ignoring Operational and Human Factors
What to watch: The analysis covers only technical failures, missing operator errors (wrong config push, accidental topic deletion) and organizational failures (no one on-call, runbook outdated). Guardrail: Include a section in the prompt that explicitly requests human-factor failure modes: misconfiguration, procedural gaps, and on-call readiness. Validate that the output contains at least one non-technical failure mode.
Stale or Context-Free Analysis
What to watch: The model generates a generic FMEA that could apply to any event-driven system, ignoring the specific throughput, latency, and consistency requirements stated in the input. Guardrail: Require the prompt to reference specific SLAs, throughput numbers, and consistency guarantees from the input. Add an eval that checks whether the output mentions at least two concrete constraints from the provided context.
Evaluation Rubric
Use this rubric to evaluate the quality of the failure mode analysis output before integrating it into an architecture review or operational runbook. Each criterion targets a known failure pattern in event-driven system analysis.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Failure Mode Coverage | Output identifies at least one failure mode for each of the five core categories: message loss, duplicate delivery, out-of-order processing, broker failure, and consumer crash. | Missing category entirely or substituting a non-failure category (e.g., 'latency' without a specific failure trigger). | Parse output into a structured list of failure modes. Check for presence of all five required category labels using keyword match. |
Cascade Detection | For each identified failure mode, the analysis describes at least one downstream system or component that would be affected. | Failure modes listed in isolation without propagation paths (e.g., 'broker down' with no consumer impact described). | For each failure mode entry, verify a downstream impact field is non-null and contains a component name distinct from the source. |
Severity Calibration | Each failure mode includes a severity rating (e.g., Critical, High, Medium, Low) with a justification tied to data loss, downtime, or revenue impact. | Severity ratings are missing, all rated 'Critical' without differentiation, or justification is generic ('bad'). | Extract severity labels. Assert count of unique severity levels >= 2. For each, check that justification field length > 50 characters. |
Detection Mechanism | Each failure mode includes a specific observable signal (e.g., consumer lag metric, dead-letter queue depth, duplicate key violation log). | Detection described as 'monitor the system' or 'check logs' without naming a specific metric, log pattern, or alert condition. | For each failure mode, check that the detection field contains a metric name, log query fragment, or alert threshold value. |
Mitigation Completeness | Output includes both an immediate mitigation (e.g., restart consumer group) and a long-term prevention (e.g., add idempotency key) for Critical and High severity items. | Only immediate fixes provided, or long-term preventions are vague ('make it more reliable'). | Filter rows by severity Critical or High. Assert that both immediate_mitigation and long_term_prevention fields are non-null and differ in content. |
Silent Failure Identification | Analysis explicitly calls out at least one failure mode that produces no default alert (e.g., message silently dropped by a misconfigured filter). | All listed failure modes assume existing alerting coverage; no silent or unmonitored failure paths identified. | Scan output for keywords: 'silent', 'no alert', 'unmonitored', 'undetected'. Assert count >= 1. |
Idempotency Gap Analysis | For duplicate delivery scenarios, output evaluates whether downstream consumers are idempotent and identifies specific handlers that are not. | Duplicate delivery listed as a risk but no consumer idempotency assessment performed. | Search for 'idempotent' in output. Assert that at least one consumer or handler is explicitly flagged as non-idempotent with a reason. |
Out-of-Order Consequence | For out-of-order processing scenarios, output specifies the business consequence of reversed message sequence (e.g., 'order cancelled after shipped'). | Out-of-order listed as a technical risk without a concrete business or data integrity consequence. | For each out-of-order entry, check that consequence field contains a domain-specific example, not just 'data inconsistency'. |
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 broker and a simplified architecture diagram. Focus on the top 5 failure modes rather than a full FMEA matrix. Remove the [OUTPUT_SCHEMA] requirement and accept a structured markdown table instead. Use a frontier model with default temperature.
Watch for
- Overly broad failure mode categories that miss broker-specific failure modes
- Missing severity ratings when the model skips the structured format
- Hallucinated failure modes for components not present in the input description

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