This prompt is for incident response teams, SREs, and ML engineers who need to triage a production AI quality failure quickly. Use it when model outputs have degraded below acceptable thresholds, when downstream systems are receiving malformed or harmful responses, or when an automated quality gate has triggered an alert. The prompt produces a structured incident assessment that includes root cause hypotheses, affected output scope, severity classification, and immediate mitigation steps. It assumes you already have observability data, sample outputs, and quality metrics available.
Prompt
Output Quality Incident Response Prompt Template

When to Use This Prompt
Defines the production incident context required before using the Output Quality Incident Response Prompt Template.
Do not use this prompt for routine output review or pre-release testing; it is designed for active incident response where time to mitigation matters. The prompt requires concrete evidence as input—such as eval scores, error logs, and flagged examples—and will not perform well if asked to speculate without data. Before invoking this prompt, ensure you have gathered at least three representative failure samples, the output of your quality gate or eval pipeline, and any relevant deployment or model version change logs. The prompt is most effective when paired with a human-in-the-loop approval step before any automated mitigation action is executed.
After running the prompt, validate the severity classification against your internal incident taxonomy. If the model proposes a root cause that involves a recent prompt or model change, cross-reference it against your CI/CD and model registry logs. The output of this prompt should feed directly into your incident management tooling, not replace it. Avoid using this prompt for low-urgency quality fluctuations or for outputs that are still in staging; it is calibrated for production impact where every minute of degraded quality affects users or downstream systems.
Use Case Fit
Where the Output Quality Incident Response Prompt Template delivers value and where it introduces risk. Use these cards to decide if this prompt fits your incident response workflow before wiring it into production.
Good Fit: Structured Post-Mortem Triage
Use when: a production quality failure has already been detected by monitoring, and the on-call responder needs a structured initial assessment with root cause hypotheses, affected scope, and severity classification. Guardrail: always feed the prompt concrete incident signals (error logs, affected output samples, timestamp ranges) rather than vague descriptions.
Bad Fit: Real-Time Blocking Decisions
Avoid when: the system needs to block or reroute outputs in the hot path during a live incident. This prompt is designed for asynchronous assessment, not sub-second gating. Guardrail: pair this prompt with a separate real-time quality gate for automated blocking, and use the incident response prompt only for human-readable post-hoc analysis.
Required Inputs: Incident Signals and Output Samples
What to watch: the prompt produces vague or incorrect assessments when given only a high-level incident description without concrete evidence. Guardrail: require at minimum a set of affected output samples, the expected versus actual behavior, and the time window of impact before invoking the prompt.
Operational Risk: Over-Confident Root Cause Attribution
What to watch: the model may confidently assert a single root cause without sufficient evidence, leading the response team down the wrong investigation path. Guardrail: configure the prompt to produce multiple ranked hypotheses with explicit uncertainty markers, and require human confirmation before acting on any single cause.
Operational Risk: Severity Misclassification
What to watch: the model may under-classify or over-classify incident severity, causing either delayed response or unnecessary escalations. Guardrail: include a severity definitions schema in the prompt with clear criteria, and validate the classification against your incident management platform's severity rules before publishing.
Operational Risk: Stale Context in Long-Running Incidents
What to watch: if the prompt is re-invoked during a prolonged incident without updated context, it may repeat earlier assessments or miss new failure modes. Guardrail: timestamp each invocation and include a diff of what changed since the last assessment. Escalate to a human incident commander when the prompt's assessment conflicts with on-the-ground observations.
Copy-Ready Prompt Template
A production-ready prompt template for generating structured incident assessments from quality failure reports.
This section provides a copy-ready prompt template you can drop directly into your incident response runbook or automated remediation pipeline. The template is designed to receive raw incident data—such as error logs, affected output samples, and detection timestamps—and produce a structured incident assessment with root cause hypotheses, severity classification, and immediate mitigation steps. Every square-bracket placeholder must be replaced with incident-specific data before the prompt is sent to the model. Do not leave placeholders unresolved in production; missing context will degrade the quality of the assessment and may produce hallucinated incident details.
textYou are an incident response analyst for a production AI system. Your task is to assess an output quality incident and produce a structured incident assessment. ## INCIDENT DATA [INCIDENT_REPORT] ## AFFECTED OUTPUT SAMPLES [OUTPUT_SAMPLES] ## DETECTION CONTEXT - Detection time: [DETECTION_TIMESTAMP] - Detected by: [DETECTION_METHOD] - Affected pipeline stage: [PIPELINE_STAGE] - Output volume affected (estimated): [AFFECTED_VOLUME] ## OUTPUT SCHEMA Return a valid JSON object with exactly these fields: { "incident_id": "string", "severity": "critical|high|medium|low", "root_cause_hypotheses": [ { "hypothesis": "string (description of one possible root cause)", "likelihood": "high|medium|low", "supporting_evidence": "string (specific evidence from the incident data)" } ], "affected_output_scope": { "output_types": ["string"], "estimated_impact_percentage": "number (0-100)", "downstream_systems_affected": ["string"] }, "immediate_mitigation_steps": [ { "step": "string (actionable mitigation step)", "priority": "critical|high|medium|low", "owner": "string (suggested team or role)" } ], "recommended_investigation_actions": ["string"], "confidence_assessment": { "overall_confidence": "high|medium|low", "uncertainty_sources": ["string"] } } ## CONSTRAINTS - Do not fabricate incident details not present in the input data. - If evidence is insufficient for a high-confidence root cause, state that explicitly and lower the likelihood rating. - Severity must reflect actual downstream impact, not just output volume. - Mitigation steps must be actionable within the current incident response window. - If the incident data contains PII or credentials, do not reproduce them in the assessment.
Before integrating this prompt into your incident response pipeline, verify that your incident data feed populates every placeholder completely. The [INCIDENT_REPORT] placeholder should contain the raw incident description, error messages, and any initial observations from the on-call responder. The [OUTPUT_SAMPLES] placeholder must include actual model outputs that triggered the quality gate—include both passing and failing examples if available to help the model calibrate severity. If your incident management system already assigns an incident ID, pass it through the harness rather than relying on the model to generate one. After receiving the model's assessment, always validate the JSON structure against the declared schema before routing the assessment to your incident commander or posting it to your incident channel. A failed parse at this stage delays response time when it matters most.
Prompt Variables
Inputs the Output Quality Incident Response Prompt Template needs to work reliably. Validate each before sending.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[INCIDENT_REPORT] | Raw incident ticket, alert payload, or user report describing the quality failure | Alert: factuality_score dropped below 0.7 for finance-summarizer in prod-us-east-1 at 14:22 UTC | Must be non-empty string. Check for minimum 50 characters to ensure sufficient context. Reject if only a single sentence fragment. |
[AFFECTED_OUTPUT_SAMPLES] | Array of recent model outputs that triggered the quality gate or user complaint | [{"id":"gen-9821","output":"...","score":0.62}, {"id":"gen-9824","output":"...","score":0.58}] | Must be valid JSON array with at least 1 object. Each object requires id and output fields. Validate schema before prompt assembly. Null allowed if incident is pre-output. |
[QUALITY_THRESHOLDS] | Current quality gate configuration including metric names, thresholds, and severity levels | {"factuality":{"min":0.85,"severity":"critical"},"relevance":{"min":0.70,"severity":"high"}} | Must be valid JSON object. Each metric requires min and severity fields. Check that severity values match allowed enum: critical, high, medium, low. Reject if thresholds are missing or unparseable. |
[RECENT_DEPLOYMENTS] | List of recent model, prompt, or config changes that may be causal factors | [{"change":"prompt-v2.3.1","deployed":"2025-01-15T12:00Z","type":"prompt_update"}] | Must be valid JSON array. Each entry requires change, deployed, and type fields. deployed must parse as ISO 8601. Null allowed if no recent changes. Validate type against allowed enum: model_update, prompt_update, config_change, infra_change. |
[OBSERVABILITY_DATA] | Metrics, traces, or logs from the monitoring system showing the quality degradation pattern | {"metric":"factuality_score","current":0.62,"baseline":0.89,"p99_latency_ms":1240,"error_rate":0.03} | Must be valid JSON object. Require at minimum current and baseline fields for the primary degraded metric. Check that numeric fields are within reasonable ranges. Reject if baseline is missing. |
[INCIDENT_TIMELINE] | Timeline of detection, notification, and initial response actions already taken | Detected: 14:22 UTC via automated alert. Acknowledged: 14:25 UTC by on-call. Initial triage: 14:30 UTC confirmed degradation. | Must be non-empty string. Check for at least 3 timeline entries with timestamps. Reject if no timestamps present. Parse timestamps to confirm chronological order. |
[TEAM_CONTEXT] | On-call rotation, escalation policy, and responsible team information | {"team":"ai-platform","on_call":"alex.chen@company.com","escalation":"eng-manager@company.com","slack_channel":"#ai-incidents"} | Must be valid JSON object. Require team and on_call fields. Validate email format for on_call and escalation. Check that team matches known service ownership registry. Null allowed for escalation if not yet triggered. |
[PREVIOUS_INCIDENTS] | Related past incidents for pattern matching and recurrence detection | [{"id":"INC-142","date":"2025-01-10","similarity":"factuality_drop_after_prompt_update"}] | Must be valid JSON array. Each entry requires id and date fields. date must parse as ISO 8601. Null allowed if no prior related incidents. Validate similarity against known incident categories if present. |
Implementation Harness Notes
How to wire the Output Quality Incident Response prompt into a production incident management workflow.
This prompt is designed to be the first automated responder in an incident management pipeline, not a standalone chatbot. It should be triggered by a monitoring alert that detects a statistically significant deviation in output quality metrics—such as a drop in your LLM-as-judge scores, a spike in user-reported issues, or a schema validation failure rate exceeding a defined threshold. The prompt's primary job is to structure the initial chaos into a consistent incident document that on-call engineers can immediately act on, reducing mean-time-to-acknowledge (MTTA).
To wire this into an application, wrap the prompt in a function that is called by your monitoring webhook. The function must assemble the [INCIDENT_TRIGGER_DETAILS] and [RECENT_OUTPUT_SAMPLES] from your logging database or observability platform. Critical harness checks include: (1) Input validation—ensure [RECENT_OUTPUT_SAMPLES] contains a representative mix of failing and passing examples, not just the worst cases, to prevent biased root cause analysis. (2) Output schema validation—parse the model's JSON response and strictly validate the severity field against your internal SEV levels (e.g., SEV1-SEV5) and confirm that affected_output_scope contains a quantifiable percentage or count. If validation fails, retry once with a stricter [CONSTRAINTS] block appended to the prompt. (3) Human-in-the-loop gating—for any incident classified as SEV1 or SEV2, the system must not auto-post to a shared incident channel. Instead, it should create a draft incident ticket and page the primary on-call with a summary, requiring human acknowledgment before broadcast.
For logging and evaluation, store the full prompt, the raw model output, the parsed incident JSON, and the human's final severity reclassification in a structured incident log. This dataset becomes your ground truth for evaluating the prompt's classification accuracy over time. A common failure mode is the model hallucinating a root cause that sounds plausible but is not grounded in the provided [RECENT_OUTPUT_SAMPLES]. To mitigate this, implement an automated eval that checks if the evidence array in the output directly quotes or references the input samples. If the evidence grounding score falls below a threshold, flag the incident assessment for mandatory human review, regardless of its severity classification. Avoid using this prompt for real-time, sub-second gating decisions; it is an asynchronous diagnostic tool, not a low-latency filter.
Expected Output Contract
Fields, format, and validation rules for the model response. Use this contract to parse, validate, and route the incident assessment before it reaches downstream systems or human reviewers.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
incident_id | string | Must match the [INCIDENT_ID] input exactly. Fail if missing or altered. | |
severity_classification | enum: SEV1 | SEV2 | SEV3 | SEV4 | Must be one of the four allowed values. Reject any other string. Compare against [SEVERITY_DEFINITIONS] if provided. | |
affected_output_scope | object | Must contain | |
root_cause_hypotheses | array of objects | Each object must have | |
immediate_mitigation_steps | array of objects | Each object must have | |
detection_timestamp | ISO 8601 datetime string | Must parse as valid ISO 8601. Reject if unparseable or in the future relative to [CURRENT_TIMESTAMP]. | |
assessment_confidence | float | Must be between 0.0 and 1.0 inclusive. If below [MIN_CONFIDENCE_THRESHOLD], route to human review regardless of other fields. | |
requires_human_review | boolean | Must be true if |
Common Failure Modes
What breaks first when using an LLM for incident response and how to guard against it.
Hallucinated Root Cause
What to watch: The model invents a plausible but incorrect root cause hypothesis, especially when incident data is sparse or ambiguous. Guardrail: Require the prompt to cite specific log lines, metrics, or events for each hypothesis. If no evidence exists, the model must output 'INSUFFICIENT_DATA' for that hypothesis.
Severity Misclassification
What to watch: The model downplays a critical outage (SEV0) as minor or escalates a cosmetic bug to a major incident, causing misrouted notifications and wasted responder time. Guardrail: Implement a post-generation validation step that checks the severity against a predefined rubric based on user impact and data loss, and flag mismatches for human review.
Stale or Missing Context
What to watch: The incident response prompt runs without the latest runbook, recent deploy logs, or current on-call schedule, leading to outdated mitigation steps or incorrect personnel assignments. Guardrail: Build a pre-prompt retrieval step that fetches the current runbook, the last 30 minutes of deployment events, and the active on-call roster, injecting them into the [CONTEXT] block.
Overconfident Mitigation Steps
What to watch: The model recommends a destructive action like a database rollback or a full service restart without flagging the risk or asking for explicit human approval. Guardrail: Add a hard constraint in the prompt: 'For any mitigation step that is destructive or irreversible, prepend the text [REQUIRES_HUMAN_APPROVAL] and do not execute it automatically.'
Ambiguous Affected Scope
What to watch: The output describes the affected scope vaguely, such as 'some users' or 'the payment service,' making it impossible to assess blast radius or communicate accurately to stakeholders. Guardrail: Require the output schema to include an affected_scope object with specific fields for percentage_of_users, affected_services_list, and geographic_regions using data from the incident payload.
Prompt Drift During Incident Updates
What to watch: As the incident evolves and new information is appended to the prompt, the model loses focus on the original task, starts summarizing instead of analyzing, or ignores earlier constraints. Guardrail: Structure the prompt with a fixed [CURRENT_STATE] section at the top and a stable [INSTRUCTIONS] block at the bottom, ensuring new data is inserted in between without overwriting the core task.
Evaluation Rubric
Use this rubric to test output quality before shipping the Output Quality Incident Response Prompt into your incident runbook. Each criterion targets a specific failure mode observed in production incident classification and mitigation prompts.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Severity Classification Accuracy | Severity matches runbook definitions (SEV1-SEV5) based on user impact and data loss scope described in [INCIDENT_CONTEXT] | Severity is overridden to SEV1 for non-critical issues or downgraded to SEV5 for data-loss events | Run 10 historical incidents with known severity labels; require exact match on 9/10 |
Root Cause Hypothesis Grounding | Every root cause hypothesis cites a specific log line, metric anomaly, or timestamp from [OBSERVABILITY_DATA] | Hypothesis contains speculative causes not present in provided data or uses phrases like 'could be anything' | Parse output for citation markers; flag any hypothesis block with zero references to input data |
Affected Output Scope Completeness | Lists all affected services, output types, and time ranges with start/end timestamps from [INCIDENT_CONTEXT] | Omits a known affected service or reports time range that contradicts incident timeline in input | Diff output scope against a manually verified scope list for 5 known incidents; require 100% recall |
Mitigation Step Actionability | Each mitigation step contains a specific action, owner role, and expected effect; no step is 'monitor the situation' without a concrete monitoring query | Contains vague steps like 'investigate further' or 'check logs' without specifying what to check | Have 2 on-call engineers rate actionability on a 3-point scale; require average score >= 2.5 |
Incident Summary Conciseness | Executive summary is <= 4 sentences and contains: what broke, user impact, current status, and estimated resolution time | Summary exceeds 6 sentences or repeats raw log data without synthesis | Character-count check for sentence count; spot-check 5 summaries for inclusion of all 4 required elements |
False Positive Avoidance | Does not classify a non-incident (routine deployment, planned maintenance) as an active incident | Flags a known-good deployment or scheduled maintenance window as a quality incident | Feed 5 non-incident events; require 0 incident classifications produced |
Output Schema Compliance | Output is valid JSON matching the [OUTPUT_SCHEMA] with all required fields present and no extra top-level keys | JSON parse fails, required field is missing, or output contains markdown wrapping around JSON | Automated schema validation with Ajv or Zod; reject any output that fails strict validation |
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 simplified output schema. Remove the severity classification matrix and replace it with a single severity field. Drop the affected-output-scope enumeration in favor of free-text description. Run the prompt in a notebook or chat interface without validation harness.
Watch for
- Inconsistent severity labels across incidents
- Missing root cause hypotheses when evidence is thin
- Overly broad affected scope descriptions that don't help triage

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