Inferensys

Prompt

Failover Behavior Verification Prompt

A practical prompt playbook for using the Failover Behavior Verification Prompt in production reliability workflows.
Operations team reviewing AI workflow automation on laptop, workflow builder visible, casual office setup.
PROMPT PLAYBOOK

When to Use This Prompt

Define the job, reader, and constraints for failover behavior verification.

This prompt is for reliability engineers and SREs who need to verify that a failover event—typically triggered after a configuration change, deployment, or manual cutover—behaved exactly as expected. The job-to-be-done is not just confirming that the secondary system is now active, but producing a structured, evidence-backed report that proves the failover was clean. The ideal user is an engineer who understands the system's architecture, has access to pre- and post-failover metrics, logs, and client-side telemetry, and needs a consistent, auditable artifact to attach to an incident record or change request. The required context includes the expected failover target, the trigger event timestamp, a baseline of normal operating behavior, and the specific data consistency and client impact dimensions that matter for this service.

Do not use this prompt when you only need a simple binary 'is it up?' health check. A standard uptime monitor or a basic curl test is more appropriate for that. This prompt is also the wrong tool when the failover is still in progress or when the system is in a degraded, mid-recovery state; the verification logic assumes a stable post-failover state to compare against the baseline. Avoid it when you lack access to both pre- and post-event data, as the core value is the structured comparison. Finally, this prompt is not a substitute for automated end-to-end failover testing in a staging environment; it is a production verification tool for an event that has already occurred.

The output is a formal failover test report, not a conversational summary. It must include precise timing deltas, data consistency checks (e.g., record counts, checksums, or last-written record verification), and client impact observations (e.g., error rate spikes, latency changes, or connection resets). The prompt is designed to be wired into a post-action verification harness where its structured output can be programmatically validated. Before relying on this report, you should confirm that the model had access to the correct time-bounded data windows and that the report's pass/fail conclusion is cross-referenced with your own monitoring dashboards. The next step after generating this report is to attach it to the change record and, if the verification fails, immediately trigger the rollback decision prompt.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Failover Behavior Verification Prompt works, where it does not, and the operational prerequisites for safe use.

01

Good Fit: Post-Change Failover Testing

Use when: you need a structured report after a planned configuration change, deployment, or infrastructure update that could affect failover behavior. Guardrail: Always scope the test to a specific change window and provide the expected failover behavior as a baseline for comparison.

02

Bad Fit: Real-Time Incident Response

Avoid when: an active incident is in progress and you need an immediate decision. This prompt is designed for post-action verification, not live triage. Guardrail: Use a dedicated incident escalation prompt for active events and reserve this for the post-remediation review phase.

03

Required Inputs: Evidence and Baselines

Risk: The model cannot verify failover without concrete data. Guardrail: Provide logs, metrics, timing data, and the expected state. The prompt must receive structured evidence; it cannot observe systems directly. Wire it to a harness that collects this data before invocation.

04

Operational Risk: Silent Failure Blind Spots

Risk: The model may report a successful failover if client-side impact or data consistency issues are not present in the provided logs. Guardrail: Explicitly require checks for data consistency, client errors, and replication lag in the output schema. Combine this prompt with a canary or smoke test verification step.

05

Operational Risk: Hallucinated Metrics

Risk: Without explicit instructions, the model might invent plausible-sounding timing or consistency values. Guardrail: The prompt template must force the model to cite specific log lines or metric data points for every observation. Use an eval that checks for unattributed claims.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template for verifying failover behavior after a configuration change, producing a structured test report with timing, consistency, and client impact observations.

This prompt template is designed for reliability engineers who need to verify that a failover event—triggered manually or automatically after a configuration change—completed successfully and without silent failures. It instructs the model to act as a verification analyst, consuming pre-collected evidence such as logs, metrics, and client-side observations, and producing a structured report that can be used as an audit artifact or an automated gate before marking an incident as resolved. The template uses square-bracket placeholders for all variable inputs, making it straightforward to integrate into a CI/CD pipeline, a runbook automation system, or a manual review workflow.

text
You are a failover verification analyst for a production infrastructure team. Your task is to review the provided evidence and produce a structured failover test report. You must not speculate beyond the provided data. If evidence is missing or inconclusive, flag it explicitly.

## INPUTS
- [FAILOVER_EVENT_DESCRIPTION]: A natural language description of the expected failover event, including the triggering condition, the source and target systems, and the expected behavior.
- [TIMING_EVIDENCE]: Log excerpts, timestamps, or monitoring data showing the start time, cutover duration, and completion time of the failover.
- [DATA_CONSISTENCY_EVIDENCE]: Checksums, row counts, replication lag metrics, or application-level integrity check results from before and after the failover.
- [CLIENT_IMPACT_EVIDENCE]: Client-side error logs, latency measurements, connection reset counts, or user-reported issues during the failover window.
- [CONFIGURATION_CHANGE_RECORD]: The specific configuration change that preceded or triggered the failover, including the change ID, who approved it, and the expected effect.

## OUTPUT_SCHEMA
Return a single JSON object with the following structure:
{
  "verification_id": "string, a unique identifier for this verification run",
  "failover_event": "string, summary of the failover event from the evidence",
  "verdict": "PASS | FAIL | INCONCLUSIVE",
  "timing_assessment": {
    "observed_cutover_duration_ms": "number or null",
    "expected_cutover_duration_ms": "number or null",
    "within_sla": "boolean",
    "anomalies": ["string, description of any timing anomalies"]
  },
  "data_consistency_assessment": {
    "checks_passed": ["string, name of each check that passed"],
    "checks_failed": ["string, name of each check that failed with details"],
    "overall_consistent": "boolean",
    "anomalies": ["string, description of any data anomalies"]
  },
  "client_impact_assessment": {
    "errors_observed": "boolean",
    "error_details": ["string, summary of each error type and count"],
    "latency_spike_observed": "boolean",
    "connection_resets": "number or null",
    "user_reports": ["string, summary of user-reported issues"]
  },
  "silent_failure_flags": ["string, any indicators of failures that did not trigger alerts"],
  "recommendations": ["string, actionable next steps based on findings"],
  "evidence_gaps": ["string, any missing evidence that prevented a conclusive assessment"]
}

## CONSTRAINTS
- Do not invent evidence. If a field cannot be populated from the provided inputs, use null or an empty array.
- If the verdict is INCONCLUSIVE, you must populate the `evidence_gaps` field with specific missing data.
- Flag any discrepancy between the [CONFIGURATION_CHANGE_RECORD] and the observed behavior in the `silent_failure_flags` field.
- Use precise timestamps and metric values from the evidence; do not round or approximate unless the evidence is ambiguous.
- If client impact is observed, classify its severity as "none", "minor", "major", or "critical" based on the error rate and user reports.

To adapt this template, replace each square-bracket placeholder with data from your observability stack, configuration management system, and incident management tool. The [TIMING_EVIDENCE] and [DATA_CONSISTENCY_EVIDENCE] fields should be populated with raw log lines, metric queries, or pre-computed summaries—avoid editorializing before passing them to the model. If your environment uses a specific SLA for failover duration, hardcode that value into the expected_cutover_duration_ms field in the output schema or pass it as an additional constraint. Before deploying this prompt in an automated pipeline, validate that the JSON output conforms to the schema using a strict JSON Schema validator, and implement a retry with a repair prompt if validation fails. For high-risk production systems, route any verdict of FAIL or INCONCLUSIVE to a human reviewer before closing the incident, and log the full prompt and response as an audit record.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Failover Behavior Verification Prompt. Each placeholder must be populated before the prompt is sent. Validation notes describe how to check the input at runtime before the model receives it.

PlaceholderPurposeExampleValidation Notes

[FAILOVER_EVENT_DESCRIPTION]

Natural language summary of the failover trigger and expected behavior

Planned failover of primary database cluster us-east-1 to secondary us-west-2 after simulated primary outage

Must be non-empty string. Check for ambiguous terms like 'failover' without specifying direction or scope. Reject if under 20 characters.

[PRE_FAILOVER_STATE_SNAPSHOT]

JSON object capturing key metrics, connection counts, and data state before failover initiation

{"active_connections": 1423, "replication_lag_ms": 12, "last_transaction_id": "0x4A2F"}

Must parse as valid JSON. Required fields: active_connections, replication_lag_ms, last_transaction_id. Reject if any field is null or missing.

[POST_FAILOVER_STATE_SNAPSHOT]

JSON object capturing the same metrics after failover completion

{"active_connections": 1389, "replication_lag_ms": 0, "last_transaction_id": "0x4A2F"}

Must parse as valid JSON. Schema must match [PRE_FAILOVER_STATE_SNAPSHOT] exactly. Reject on schema mismatch or missing fields.

[FAILOVER_TIMING_LOG]

Array of timestamped events during the failover process

[{"event": "failover_initiated", "timestamp": "2025-03-15T14:30:00Z"}, {"event": "secondary_promoted", "timestamp": "2025-03-15T14:30:12Z"}]

Must parse as valid JSON array. Each element must have event (string) and timestamp (ISO 8601). Reject if array is empty or timestamps are out of order.

[CLIENT_IMPACT_OBSERVATIONS]

Structured log of client-facing errors, timeouts, or disruptions during the cutover window

{"total_errors": 47, "error_types": {"connection_refused": 42, "timeout": 5}, "affected_clients": 38}

Must parse as valid JSON. total_errors must be non-negative integer. affected_clients must not exceed total_errors. Reject if error_types keys are empty strings.

[DATA_CONSISTENCY_CHECKS]

Results of pre-defined consistency checks comparing pre- and post-failover data

[{"check_name": "row_count_users_table", "pre_count": 104532, "post_count": 104532, "match": true}]

Must parse as valid JSON array. Each check must include check_name, pre_count, post_count, and match (boolean). Reject if any check is missing match field or if counts are negative.

[ACCEPTABLE_DEGRADATION_THRESHOLDS]

Thresholds defining acceptable vs. unacceptable failover behavior

{"max_connection_drop_percent": 5, "max_replication_lag_recovery_seconds": 30, "max_client_errors": 100}

Must parse as valid JSON. All values must be positive numbers. Reject if any threshold is zero (implies no tolerance) without explicit annotation. Warn if thresholds appear unrealistically strict for the environment.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the failover behavior verification prompt into a reliable, automated SRE workflow with validation, retries, and human escalation.

The failover verification prompt is designed to be invoked automatically after a configuration change triggers a failover event, not as a standalone chat interaction. Wire it into your CI/CD or runbook automation pipeline so that the prompt receives structured telemetry, timing logs, and client-side observation data as input. The model's job is to produce a machine-readable report, not a narrative summary for a human to read first. The output should be parsed by your orchestration layer to decide whether to auto-close the change ticket, page the on-call, or trigger a rollback. Treat this prompt as a decision-support component inside a larger reliability workflow, not as the final authority.

Build the harness around a strict input schema. Before calling the model, assemble a JSON payload containing: the failover start and end timestamps, a list of expected vs. actual service endpoints, client-side error rate and latency percentiles from your observability platform, any data consistency check results (e.g., checksum comparisons, row counts), and a [CHANGE_CONTEXT] string describing the configuration change that initiated the failover. Validate this payload against a schema before sending it to the model—reject the run if required fields like actual_failover_duration_ms or client_impact.error_budget_consumed are missing. After receiving the model's output, validate the JSON structure against your expected [OUTPUT_SCHEMA] (fields like failover_successful, data_consistency_passed, client_impact_severity, and recommendations). If parsing fails, retry once with a stricter prompt that includes the parse error message. If the retry also fails, escalate to a human with the raw output and the validation error attached.

Log every invocation, including the full prompt, the model's raw response, the parsed output, and the final action taken (auto-close, warn, escalate). This audit trail is critical for post-incident review and for tuning the prompt's thresholds over time. Pay special attention to silent failure modes: a failover that appears successful at the infrastructure layer but introduces data inconsistency or elevated client-side errors. Your eval harness should include golden test cases that simulate exactly these scenarios—e.g., a failover where all health checks pass but a downstream replica is lagging by 30 seconds. Run these evals on a schedule and after any prompt change. If the model's failover_successful field is true but the eval expects false, block the prompt update and investigate the regression before it reaches production.

IMPLEMENTATION TABLE

Expected Output Contract

Define the exact fields, types, and validation rules for the failover verification report. Use this contract to parse the model output programmatically and gate downstream automation.

Field or ElementType or FormatRequiredValidation Rule

failover_event_id

string

Must match the [FAILOVER_EVENT_ID] input exactly; reject on mismatch.

verification_timestamp

ISO 8601 datetime

Must be parseable as a valid ISO 8601 datetime; must be after the failover start time.

overall_status

enum: pass | fail | inconclusive

Must be one of the three allowed values; reject any other string.

timing_analysis

object

Must contain total_cutover_duration_ms (integer) and downtime_detected (boolean); reject if total_cutover_duration_ms is negative.

data_consistency_checks

array of objects

Each object must have check_name (string), passed (boolean), and detail (string); reject if array is empty.

client_impact_observations

array of strings

Must be a non-empty array; each string must be non-empty; reject if array is empty or contains empty strings.

silent_failure_flags

array of strings

If present, must be an array of non-empty strings; null is allowed; reject if array contains empty strings.

human_review_required

boolean

Must be true if overall_status is fail or inconclusive; flag for manual inspection if this rule is violated.

PRACTICAL GUARDRAILS

Common Failure Modes

Failover verification prompts are brittle when the model assumes success, ignores timing, or masks data inconsistency. These failure modes help you build a harness that catches silent failures before they reach production.

01

Silent Success Assumption

What to watch: The model reports a successful failover without verifying actual traffic shift, DNS propagation, or health check status. It assumes the cutover command succeeded. Guardrail: Require the prompt to cross-reference at least two independent signals (e.g., load balancer metrics and application health endpoints) before declaring success.

02

Timing Window Blindness

What to watch: The model ignores the failover duration and treats a 30-second cutover the same as a 5-minute one, missing client impact during the gap. Guardrail: Include explicit timing thresholds in the prompt schema and flag any observation where the cutover window exceeds the defined SLO for client disruption.

03

Data Consistency Drift

What to watch: The model confirms failover but doesn't compare primary and secondary data states, missing replication lag or partial writes that occurred during the cutover. Guardrail: Add a mandatory checksum or record-count comparison step between the old primary and new primary, with a defined tolerance for acceptable drift.

04

Client Impact Omission

What to watch: The report focuses on infrastructure health but omits client-side errors, latency spikes, or connection resets that real users experienced. Guardrail: Require the prompt to ingest client-side telemetry or synthetic probe results and flag any increase in 5xx errors or timeout rates during the failover window.

05

Rollback Condition Neglect

What to watch: The model produces a pass/fail verdict without defining what conditions would trigger an automatic rollback, leaving operators without clear decision criteria. Guardrail: Structure the output to include explicit rollback gates—such as data inconsistency above threshold or client error rate exceeding baseline—and require a go/no-go recommendation tied to those gates.

06

Partial Failover Masking

What to watch: The model reports overall success when some services, regions, or endpoints failed to cut over, averaging out the failure signal. Guardrail: Require per-component, per-region granularity in the verification report and flag any individual component that didn't meet the success criteria, even if the aggregate looks healthy.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test the Failover Behavior Verification Prompt before production deployment. Each criterion targets a known failure mode in automated failover testing.

CriterionPass StandardFailure SignalTest Method

Timing Accuracy

Reported failover duration matches log timestamps within ±2 seconds

Reported duration is negative, zero, or differs from logs by >5 seconds

Parse reported start/end timestamps; compare against ground-truth log entries for the failover event

Data Consistency Detection

Prompt correctly flags any row-count mismatch or checksum failure between primary and secondary

Prompt reports 'consistent' when row counts differ or checksums do not match

Inject a known checksum mismatch into the test context; verify the output contains a 'data_inconsistency' flag set to true

Client Impact Observation

Output includes a structured list of observed client errors with error codes and counts

Output states 'no client impact' when provided logs contain 5xx errors during the cutover window

Provide logs with synthetic 503 errors during the failover window; check that the 'client_impact.errors' array is populated

Silent Failure Detection

Prompt identifies a failover that completed without error logs but where health checks failed

Output classifies the failover as 'successful' when health check logs show repeated failures

Provide a scenario with zero error logs but failing health check probes; verify 'silent_failure_detected' is true

Rollback Recommendation

Prompt recommends rollback when data inconsistency or client impact exceeds defined thresholds

Prompt recommends 'no action' when data inconsistency is detected

Inject a data inconsistency flag; verify the 'recommendation.action' field equals 'rollback'

Output Schema Compliance

Output validates against the defined JSON schema with all required fields present

Output is missing the 'verification_summary' object or contains extra untyped fields

Run output through a JSON Schema validator using the expected [OUTPUT_SCHEMA]; check for strict compliance

Context Grounding

Every observation in the report cites a specific log line or metric timestamp

Report contains a claim like 'latency increased' with no reference to a specific metric or log entry

Scan the output for any sentence containing a performance claim; confirm it is immediately followed by a source reference in the format '(source: [LOG_ID])'

Edge Case: Zero Duration Failover

Prompt handles a sub-second failover without division-by-zero errors or null duration fields

Output contains 'null' or 'Infinity' for the duration field

Provide a test scenario where failover start and end timestamps are identical; assert that 'duration_seconds' is 0.0

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a single failover scenario. Use a lightweight checklist instead of a full schema. Run the prompt against a known test environment where you control the cutover.

code
[FAILOVER_EVENT_DESCRIPTION]
[OBSERVED_TIMING]
[DATA_CONSISTENCY_NOTES]
[CLIENT_IMPACT_OBSERVATIONS]

Watch for

  • The model inventing timing data when none is provided
  • Skipping data consistency checks entirely
  • Overly broad pass/fail conclusions without evidence
  • Missing silent failure modes like partial data loss or delayed replication
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.