This prompt is designed for the final escalation step in a multi-layered data pipeline recovery strategy. It should be invoked only after automated retry and self-correction prompts have been exhausted. The ideal user is a data platform operator or SRE who needs to convert raw, machine-generated failure context—including error logs, retry history, and SLA impact—into a structured, human-readable incident notification. The core job-to-be-done is deciding whether to wake up an on-call engineer and providing them with a pre-triaged summary that accelerates their response. The required context is rich: you must supply the specific error message, the number of retries attempted, the pipeline run ID, the affected dataset or table, and a clear statement of the SLA risk (e.g., 'data freshness will breach 2-hour SLO in 15 minutes').
Prompt
ETL Error Notification and Escalation Prompt Template

When to Use This Prompt
Defines the precise operational moment for using the ETL error escalation prompt and clarifies when it is the wrong tool.
Do not use this prompt for transient errors that a self-correction prompt can still resolve, such as a single malformed CSV row or a schema mismatch that has a known mapping. Using it too early creates alert fatigue. Conversely, do not use this prompt for purely informational pipeline events like a successful run with a warning. The prompt's value is in its structured decision output: it must produce a severity classification (e.g., SEV1, SEV2), an impact summary, a suggested owner team, and a boolean page_oncall decision. A concrete implementation will validate this output against a strict schema before sending it to an alerting system. For example, if the page_oncall field is true but the severity is not SEV1, the harness should flag this inconsistency for human review before dispatching a page. This prevents a misconfigured prompt from waking an engineer for a low-priority issue.
Before wiring this prompt into a PagerDuty or Slack integration, run it against a golden dataset of historical pipeline failures where you know the correct escalation decision. Measure precision and recall on the page_oncall decision specifically. A common failure mode is the model defaulting to 'page' for any error that mentions a critical dataset, even if the error is a known, self-resolving blip. To counter this, include a [CONSTRAINTS] block that explicitly instructs the model to consider retry exhaustion and SLA margin as the primary gating factors. The next step after reading this section should be to review the prompt template and adapt the [OUTPUT_SCHEMA] to match your exact incident management payload contract.
Use Case Fit
Where this prompt works and where it does not. Understand the operational boundaries before wiring it into your incident response pipeline.
Good Fit: Structured Incident Generation
Use when: you have a structured error context (pipeline name, error message, retry count, SLA window) and need a consistent, human-readable notification for Slack, PagerDuty, or email. Guardrail: The prompt template forces severity classification and owner suggestion, reducing ad-hoc operator guesswork.
Bad Fit: Root Cause Analysis
Avoid when: you need the model to diagnose the underlying cause of a novel pipeline failure from raw logs alone. Guardrail: This prompt summarizes and escalates known error context; it does not perform deep log forensics. Pair with a dedicated diagnosis prompt for root cause analysis.
Required Inputs
What you must provide: error message, pipeline name, retry history (count and timestamps), SLA definition, and the affected data asset. Guardrail: Missing inputs cause the model to hallucinate severity or owner. The harness must validate all required fields are present before calling the prompt.
Operational Risk: False Urgency
What to watch: The model may over-escalate transient errors (e.g., a single network timeout) and suggest paging on-call when a retry would suffice. Guardrail: Implement a retry-budget check in the harness before invoking this prompt. Only trigger notification generation after retries are exhausted.
Operational Risk: Owner Misassignment
What to watch: The model may suggest an incorrect team or on-call rotation based on ambiguous error text. Guardrail: Always map the model's suggested owner against a service catalog or escalation policy in the application layer. Never route a page directly from the model's output without verification.
Integration Surface
What to watch: The prompt produces a structured notification, but delivery to Slack, PagerDuty, or email requires a post-processing harness. Guardrail: Build a thin integration layer that takes the prompt's JSON output and formats it for the target channel. Test with dry-run delivery before enabling production pages.
Copy-Ready Prompt Template
A reusable prompt template for generating structured ETL error notifications and escalation decisions from pipeline failure context.
This template is designed to be dropped directly into an AI harness that monitors data pipeline execution. It consumes structured error context, retry history, and SLA metadata, then produces a human-readable incident notification and a clear escalation decision. The output is intended for delivery to Slack, PagerDuty, email, or a runbook automation system. Every placeholder is a square-bracket token that your application must populate before sending the prompt to the model.
textYou are an ETL incident notification assistant for a data platform operations team. Your job is to convert pipeline failure context into a structured, human-readable notification and an escalation decision. ## INPUT [ERROR_CONTEXT] ## RETRY HISTORY [RETRY_HISTORY] ## SLA CONTEXT [SLA_CONTEXT] ## CONSTRAINTS [CONSTRAINTS] ## OUTPUT SCHEMA Return a single JSON object with these fields: - "severity": "critical" | "high" | "medium" | "low" - "incident_summary": string (one sentence, plain language, max 200 characters) - "impact_summary": string (what downstream systems, SLAs, or data products are affected, max 300 characters) - "suggested_owner": string (team or on-call rotation name, or "unclear" if you cannot determine it) - "escalation_decision": "page_on_call" | "notify_channel" | "log_only" | "human_review_required" - "escalation_reason": string (why this decision was made, referencing retry budget, SLA breach, or data impact, max 250 characters) - "next_steps": array of strings (ordered, actionable steps for the responder) - "confidence": number between 0.0 and 1.0 (your confidence in the severity and escalation decision) ## RULES 1. If the retry budget is exhausted and SLA breach is imminent, severity must be "critical" and escalation_decision must be "page_on_call". 2. If the error is transient and retries remain, prefer "notify_channel" or "log_only". 3. If you cannot determine the owner from the context, set suggested_owner to "unclear" and escalation_decision to "human_review_required". 4. Never invent impact details. If impact is unknown, state "Impact unknown; manual investigation required." 5. If confidence is below 0.7, set escalation_decision to "human_review_required" regardless of other signals. 6. Do not include markdown formatting in the JSON values. Return only the JSON object. No preamble, no commentary.
To adapt this template, replace each placeholder with live data from your pipeline observability layer. [ERROR_CONTEXT] should include the pipeline name, run ID, error message, stack trace, and the specific component that failed. [RETRY_HISTORY] should list each retry attempt with its timestamp, outcome, and any error variation. [SLA_CONTEXT] should specify the data freshness SLA, the current delay, and the downstream consumers affected. [CONSTRAINTS] is where you inject organization-specific policies—for example, "Never page on-call between 22:00 and 06:00 for medium-severity pipeline failures" or "Escalate to the data-engineering-oncall rotation for any failure in the fact_sales pipeline." The output schema is intentionally flat and machine-readable so that your harness can parse the JSON, route the notification to the correct channel, and trigger a pager if the escalation decision demands it. Before deploying, run this prompt against a golden dataset of historical pipeline incidents where you know the correct severity and escalation outcome, and measure whether the model's decisions match your on-call team's expectations.
Prompt Variables
Inputs the ETL Error Notification and Escalation Prompt needs to produce a reliable, structured incident notification. Each placeholder must be populated by the pipeline harness before the prompt is sent to the model.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[PIPELINE_NAME] | Identifies the failing pipeline for routing and context. | customer_orders_ingestion_dag | Must match a known pipeline ID in the data platform registry. Null not allowed. |
[ERROR_MESSAGE] | The raw, unredacted error from the pipeline orchestrator or task log. | ValueError: Column 'order_total' expected int64, got object | Must be the complete error string. Truncation risks misdiagnosis. Null not allowed. |
[RETRY_HISTORY] | A structured log of previous attempts, including attempt number, timestamp, and outcome. | [{"attempt": 1, "timestamp": "2025-03-15T10:00:00Z", "outcome": "FAILED"}, {"attempt": 2, "timestamp": "2025-03-15T10:05:00Z", "outcome": "FAILED"}] | Must be a valid JSON array. An empty array indicates a first-attempt failure. Schema check required. |
[SLA_IMPACT] | A description of the business impact if the pipeline does not recover within its SLA window. | Order revenue reporting delayed by 30 minutes; 15 downstream models stale. | Must be a non-empty string. If no SLA is defined, use 'No formal SLA defined; impact unknown'. Human review recommended for high-severity pipelines. |
[CURRENT_RETRY_COUNT] | The number of retries already attempted, used to enforce the retry budget. | 3 | Must be an integer >= 0. The harness must increment this before each retry. If count exceeds [MAX_RETRIES], the prompt should not be sent; escalate directly. |
[MAX_RETRIES] | The hard limit on retries before mandatory escalation. | 5 | Must be a positive integer. Defined in the pipeline's runbook configuration. Null not allowed. |
[ON_CALL_SCHEDULE] | The current on-call rotation data to suggest a specific owner. | {"primary": "data-eng-team", "secondary": "platform-sre", "escalation_policy_id": "P0ABCDE"} | Must be a valid JSON object. If the schedule is unavailable, use null. A null value forces the prompt to infer ownership from [PIPELINE_NAME]. |
Implementation Harness Notes
How to wire the ETL error notification prompt into a production pipeline with validation, routing, and escalation controls.
The ETL Error Notification and Escalation Prompt Template is designed to sit at the boundary between automated pipeline recovery and human incident response. It consumes structured error context—failure type, retry history, SLA impact, and affected datasets—and produces a notification payload that downstream systems can route to Slack, PagerDuty, or email. The harness must enforce that the prompt only fires after automated retries are exhausted, preventing noisy alerts for transient failures that self-resolve.
Wire the prompt into your pipeline orchestrator (Airflow, Dagster, Prefect) as a final step in the error-handling DAG. Before calling the model, assemble the input context from pipeline metadata: the task ID, the exception message and stack trace, the number of retry attempts consumed, the retry budget limit, the SLA window for the affected dataset, and a list of downstream consumers. Pass these as [ERROR_CONTEXT], [RETRY_HISTORY], [SLA_IMPACT], and [DOWNSTREAM_DEPENDENCIES]. The model should return a structured JSON object with fields for severity (INFO, WARN, CRITICAL), summary, suggested_owner_team, page_on_call (boolean), and notification_channel (slack, pagerduty, email). Validate the output against this schema immediately. If the model returns a page_on_call: true decision, route to PagerDuty only after a human-in-the-loop confirmation step—never auto-page directly from model output. Log every notification decision, including the raw prompt, the model response, and the routing action taken, for post-incident review.
For retry and fallback behavior, implement a circuit breaker: if the model call fails or returns unparseable JSON, retry once with a simplified prompt that omits the downstream dependency detail. If that also fails, fall back to a static notification template that includes the raw error context and a severity: WARN default. This ensures that a model outage does not silence pipeline failures. When integrating with PagerDuty, map the severity field to PagerDuty urgency levels and include the suggested_owner_team as the routing key. For Slack, use the summary as the message text and attach the full error context in a thread. Evaluate the prompt's performance quarterly by sampling notification decisions and comparing them against actual incident outcomes—look for over-escalation (paging for self-resolving errors) and under-escalation (missing critical failures). Adjust the retry budget thresholds and SLA impact weights in the prompt based on these findings.
Expected Output Contract
Defines the structured notification object that the ETL Error Notification and Escalation Prompt must produce. Use this contract to validate the model's output before sending it to Slack, PagerDuty, or email.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
notification_id | string (UUID v4) | Must match UUID v4 regex. Generate if not provided in [ERROR_CONTEXT]. | |
severity | enum: 'P1-Critical', 'P2-High', 'P3-Medium', 'P4-Low', 'P5-Info' | Must be one of the listed enum values. Validate against [SLA_IMPACT] context. | |
incident_title | string (max 120 chars) | Must be a concise summary of the failure. Length must be <= 120 characters. | |
impact_summary | string (max 500 chars) | Must describe the business or data freshness impact. Must not exceed 500 characters. Must reference [SLA_IMPACT] if provided. | |
root_cause_classification | string | Must be a specific category derived from [ERROR_CONTEXT] (e.g., 'Schema Drift', 'Constraint Violation'). Must not be 'Unknown' unless explicitly stated in context. | |
suggested_owner | string or null | Must be a team name or on-call rotation from [ESCALATION_POLICY]. Set to null only if no policy is provided. | |
page_on_call | boolean | Must be true if severity is 'P1-Critical' or 'P2-High', otherwise false. Override allowed only if [ESCALATION_POLICY] explicitly dictates. | |
retry_summary | object | Must contain 'attempts_made' (integer) and 'last_error' (string) extracted from [RETRY_HISTORY]. Validate integer is non-negative. |
Common Failure Modes
What breaks first when generating incident notifications from pipeline failures and how to guard against it.
Severity Inflation Under Pressure
What to watch: The model over-classifies severity when error context includes cascading failures or urgent language, causing unnecessary PagerDuty alerts. Guardrail: Provide a strict severity rubric with concrete thresholds (e.g., 'P1 only if data freshness > 4 hours AND downstream consumers blocked') and require the model to cite the specific condition met.
Hallucinated Owner Assignment
What to watch: The model fabricates an on-call owner or team name when the error context lacks clear ownership signals, leading to misrouted pages. Guardrail: Require the prompt to output owner: null and owner_confidence: 0 when no owner is identifiable from runbook metadata, and route to a fallback escalation policy in the harness.
SLA Impact Miscalculation
What to watch: The model misinterprets retry history or checkpoint timestamps, reporting an SLA breach when the pipeline is still within its error budget. Guardrail: Pre-calculate SLA status in the harness (not the prompt) and pass it as a hard input field [SLA_STATUS]. The prompt should only summarize, not compute.
Retry History Omission
What to watch: The notification drops critical retry context, making the incident look like a first-time failure and causing responders to re-try already-failed steps. Guardrail: Include a mandatory [RETRY_HISTORY] section in the output schema and validate its presence with a post-generation check before sending.
Runbook Link Drift
What to watch: The model generates plausible but incorrect runbook URLs or references outdated playbook names. Guardrail: Pass a [RUNBOOK_MAP] as a lookup table in the prompt context and instruct the model to use only exact keys from that map. Validate any generated URL against the map in the harness.
Overly Verbose Notifications for Slack
What to watch: The model produces a long-form email-style narrative that exceeds Slack's character limit or buries the actionable signal. Guardrail: Enforce a character limit in the prompt constraints and require a one-line summary field at the top of the output for mobile-friendly triage.
Evaluation Rubric
Criteria for testing the ETL Error Notification and Escalation Prompt before integrating it into Slack, PagerDuty, or email pipelines. Each row defines a pass standard, a failure signal, and a test method.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Severity Classification Accuracy | Severity matches a predefined matrix (e.g., P1 for SLA breach, P4 for transient parse error) given the [ERROR_CONTEXT] and [SLA_IMPACT]. | Severity is downgraded when SLA impact is present, or upgraded for a known transient error. | Run 10 labeled error scenarios through the prompt. Assert exact severity match for 9/10 cases. |
Owner Suggestion Relevance | Suggested owner maps to the service or team responsible for the failing component (e.g., 'Payments Team' for a payment gateway timeout). | Owner is 'Unknown', a generic 'On-Call', or a team unrelated to the error source. | Provide error logs with known owning services. Check that the output matches the expected team from a service catalog mapping. |
Impact Summary Grounding | Impact summary references specific entities from [ERROR_CONTEXT] (e.g., '3,412 orders failed to load into Snowflake') and the SLA window. | Summary contains hallucinated numbers, generic phrases like 'some records failed', or omits SLA impact. | Diff the summary against the input context. Assert no invented metrics. Check for presence of at least one concrete entity from the input. |
Escalation Decision Logic | Decision to page on-call is true only when severity is P1 or P2 AND [RETRY_HISTORY] shows exhaustion of the retry budget. | Pages on a P3/P4 error, or fails to page when retries are exhausted on a P1 error. | Parameterize tests with all combinations of severity and retry status. Assert boolean match for each combination. |
Output Schema Compliance | Output is valid JSON matching the [OUTPUT_SCHEMA] with all required fields present and correctly typed. | Missing required field (e.g., 'escalation_decision'), wrong type (string instead of boolean), or extra unvalidated keys. | Parse output with a JSON schema validator. Assert no validation errors. Run for 5 different error inputs. |
Retry History Interpretation | Notification correctly states 'Retries Exhausted: Yes' when [RETRY_HISTORY] shows max attempts reached, and includes the last error message. | Notification says 'Retries Exhausted: No' when the retry count equals the max, or omits the terminal error. | Provide retry histories at max attempts and below max. Assert boolean field and presence of the last error message. |
Channel Format Adaptation | Output includes a plain-text summary field suitable for PagerDuty and a markdown field suitable for Slack when [CHANNEL] is 'both'. | Only one format is produced, or markdown contains unescaped characters that break JSON serialization. | Validate that both 'slack_mrkdwn' and 'pagerduty_summary' fields are present and non-empty when channel is 'both'. |
Uncertainty Flagging | When [ERROR_CONTEXT] is ambiguous or missing key details, the output sets 'requires_human_review' to true and notes what is unclear. | Output confidently assigns a root cause and owner when the error message is 'Unknown error' or context is truncated. | Provide a minimal error context with a generic error code. Assert 'requires_human_review' is true and the uncertainty note is populated. |
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
Add strict JSON output schema, required fields, enum constraints, and a validator in the harness. Include retry budget tracking and an escalation flag that gates whether the notification routes to Slack, email, or PagerDuty.
code[ERROR_CONTEXT] [RETRY_HISTORY] [SLA_DEFINITION] [OUTPUT_SCHEMA] Return valid JSON matching the schema. Set "page_on_call": true only when severity is CRITICAL and retry_count exceeds [MAX_RETRIES].
Watch for
- Silent schema drift when the model renames fields
- Missing "page_on_call" when severity is ambiguous
- Hallucinated owner assignments when the on-call rotation is not provided in context

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