Inferensys

Prompt

Incident Severity Scoring Prompt Template

A practical prompt playbook for using an Incident Severity Scoring Prompt Template in production AI workflows. Designed for SRE and on-call teams who need consistent, example-driven severity classification.
Wide-angle shot of a modern WeWork open floor plan with creative walls covered in AI system architecture diagrams, product team collaborating in standing desk area with industrial lighting.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the ideal operational context for the incident severity scoring prompt, its target users, and the critical boundaries where it should not be applied.

This prompt is designed for SRE, NOC, and on-call engineering teams that need to classify unstructured incident reports into standardized severity levels (P0, P1, P2, P3) with high consistency. The primary job-to-be-done is replacing brittle, rule-based severity definitions with a few-shot classification model that learns from labeled examples. The ideal input is a human-written incident report or an aggregated alert summary that has already been composed into a coherent block of text—such as a chat message, an email, or a monitoring system digest. The output is a single severity label with a brief justification, ready to be used as a first-pass triage decision before a human reviews and confirms the classification.

Use this prompt when your incident intake pipeline receives unstructured text and you need a reliable, repeatable severity label that reduces cognitive load on on-call responders. The few-shot examples embedded in the template teach the model to distinguish between a complete service outage affecting all users (P0), a critical feature failure with no workaround (P1), a partial degradation with a viable mitigation (P2), and a minor cosmetic issue or informational alert (P3). This approach adapts faster to new incident patterns than maintaining long rule descriptions, because adding a new example is often sufficient to correct misclassifications. The prompt includes override conditions for ambiguous cases—such as when a report mentions both a P0-level symptom and a P3-level scope—and expects the model to default to the higher severity when evidence is conflicting.

Do not use this prompt for real-time alert streams where latency is measured in milliseconds. This is a classification step for incident reports that have already been written up by a human or aggregated by a monitoring system, not a replacement for streaming alert evaluation. Do not use it as the sole decision-maker for triggering automated remediation or paging workflows without human review; the model can misclassify novel failure modes that are underrepresented in the few-shot examples. If your incident taxonomy includes sub-severities, custom SLA tiers, or regulatory reporting requirements, you must adapt the example set and output schema accordingly. The next step after reading this section is to review the prompt template, substitute your own incident examples, and run the provided eval checks against a golden set of historical incidents before deploying to production.

PRACTICAL GUARDRAILS

Use Case Fit

Where this prompt works and where it does not. Use these cards to decide if example-based severity scoring fits your incident workflow.

01

Good Fit: Consistent Severity Taxonomies

Use when: your organization has a stable P0-P3 severity framework with clear, documented definitions. Few-shot examples can encode nuanced judgment calls that rule-based systems miss. Avoid when: severity definitions change weekly or vary by team without a canonical source.

02

Bad Fit: Novel Failure Modes

Risk: examples trained on historical incidents will miss entirely new classes of failure. The model may force unfamiliar incidents into known severity buckets. Guardrail: pair this prompt with an out-of-distribution detector. Route low-confidence classifications to a human on-call before auto-paging.

03

Required Inputs: Structured Incident Context

What to watch: the prompt needs alert payloads, affected service names, user impact signals, and time context to score accurately. Missing fields cause severity downgrades. Guardrail: validate input completeness before scoring. If required fields are absent, return NEEDS_INFO rather than guessing.

04

Operational Risk: Example Drift Over Time

Risk: as your services and failure patterns evolve, the few-shot examples become stale. Severity inflation or deflation creeps in silently. Guardrail: log every classification with confidence scores. Run weekly drift checks comparing recent classifications against a golden set. Trigger example refresh when accuracy drops below threshold.

05

Operational Risk: Override Conditions

Risk: the model may follow examples too rigidly and miss explicit override rules like 'any data-loss incident is automatically P0.' Guardrail: apply business-rule overrides after model scoring, not before. Let the model score independently, then enforce hard rules in the application layer. Log overrides for audit.

06

Bad Fit: Real-Time Paging Decisions

Risk: model latency and availability are not suitable for sub-second paging decisions. An API outage or model error during a real incident delays response. Guardrail: use this prompt for post-alert triage and retrospective severity assignment. Keep real-time paging on deterministic rules. Async scoring only.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt for scoring incident reports by severity using labeled examples that distinguish P0 through P3 classifications.

This prompt template teaches the model to classify incident severity by providing concrete examples of each level rather than relying solely on abstract definitions. The square-bracket placeholders let you swap in your organization's actual incident categories, severity criteria, and override conditions. Replace the example blocks with your own labeled incidents drawn from real postmortems or runbook archives, and update the severity definitions to match your team's SLO-driven thresholds.

text
You are an incident severity classifier for an SRE team. Your task is to read an incident report and assign a severity level of P0, P1, P2, or P3 based on the examples and criteria provided.

## SEVERITY DEFINITIONS
[SEVERITY_DEFINITIONS]

## CLASSIFICATION RULES
- Match the incident against the examples first. If a close example exists, follow its classification.
- If no example matches, apply the severity definitions directly.
- [OVERRIDE_CONDITIONS]
- If the incident matches multiple severity levels, choose the highest (most critical) level.
- If the report is too vague to classify, return "INSUFFICIENT_DATA" with a brief explanation.

## FEW-SHOT EXAMPLES

### Example 1
Incident Report: [EXAMPLE_INCIDENT_1]
Severity: [EXAMPLE_SEVERITY_1]
Rationale: [EXAMPLE_RATIONALE_1]

### Example 2
Incident Report: [EXAMPLE_INCIDENT_2]
Severity: [EXAMPLE_SEVERITY_2]
Rationale: [EXAMPLE_RATIONALE_2]

### Example 3
Incident Report: [EXAMPLE_INCIDENT_3]
Severity: [EXAMPLE_SEVERITY_3]
Rationale: [EXAMPLE_RATIONALE_3]

### Example 4
Incident Report: [EXAMPLE_INCIDENT_4]
Severity: [EXAMPLE_SEVERITY_4]
Rationale: [EXAMPLE_RATIONALE_4]

## INPUT
Incident Report: [INCIDENT_REPORT]

## OUTPUT FORMAT
Return a JSON object with the following fields:
{
  "severity": "P0" | "P1" | "P2" | "P3" | "INSUFFICIENT_DATA",
  "rationale": "Brief explanation referencing the matched example or severity definition",
  "matched_example": "Example number that most closely matches, or 'none' if no example matched",
  "confidence": "HIGH" | "MEDIUM" | "LOW"
}

To adapt this template, start by replacing [SEVERITY_DEFINITIONS] with your team's actual criteria—for example, P0 might mean 'complete service outage affecting all users,' while P3 might mean 'cosmetic issue with no user impact.' Populate the four example slots with real incidents that clearly illustrate the boundaries between levels. Include at least one example that sits near a boundary between two severity levels to teach the model how to handle ambiguous cases. The [OVERRIDE_CONDITIONS] placeholder should capture rules like 'any security incident involving customer data is automatically P0 regardless of user impact' or 'scheduled maintenance is never classified as an incident.' Test the prompt with incidents that fall between your examples to verify the model generalizes correctly rather than memorizing exact phrasing.

Before deploying this prompt into an on-call workflow, validate its output against a golden set of 20-30 pre-scored incidents that span all severity levels and include edge cases like multi-service failures, partial degradations, and incidents with conflicting signals. Run the prompt against these cases and measure exact-match accuracy for severity assignment. Pay special attention to incidents scored as INSUFFICIENT_DATA—if the model returns this for reports a human would classify, your examples may be too narrow. For high-risk production use, route LOW-confidence classifications to a human on-call responder for review rather than auto-escalating based on uncertain model output.

IMPLEMENTATION TABLE

Prompt Variables

Inputs the prompt needs to work reliably. Each variable must be populated before the prompt is sent to the model.

PlaceholderPurposeExampleValidation Notes

[INCIDENT_REPORT]

Raw incident report text from monitoring, user report, or on-call handoff

Service 'payment-api' returning 503 errors since 14:22 UTC. All payment transactions failing. No recent deployments.

Must be non-empty string. Minimum 10 characters. Truncate to 8000 tokens if longer.

[SEVERITY_EXAMPLES]

Labeled few-shot examples demonstrating P0, P1, P2, P3 classification boundaries

P0: Complete outage, revenue impact, no workaround. P1: Major feature broken, partial workaround exists. P2: Non-critical feature degraded. P3: Cosmetic issue, no user impact.

Must contain at least one example per severity level. Validate example format matches expected input-output pair structure.

[OVERRIDE_CONDITIONS]

Business rules that override example-based scoring

If 'payment-api' is affected, minimum severity is P1. If CEO reports issue, minimum severity is P1.

Optional field. If provided, must be parseable as list of condition-action pairs. Null allowed.

[OUTPUT_SCHEMA]

Expected JSON structure for severity scoring output

{"severity": "P1", "confidence": 0.92, "evidence": ["payment transactions failing"], "override_applied": false}

Must be valid JSON schema or example. Validate parseable before prompt assembly. Required field.

[CONSTRAINTS]

Hard constraints on classification behavior

Never classify as P0 without revenue impact evidence. Require human review for P0 classifications. Confidence below 0.7 must trigger P1 default.

Must be non-empty string. Validate each constraint is actionable and testable. Required field.

[TEAM_CONTEXT]

On-call team, service ownership, and escalation path information

Optional field. If provided, must include team name and escalation contact. Null allowed for generic scoring.

[PREVIOUS_INCIDENTS]

Recent incident history for deduplication and pattern matching

INC-1042: payment-api partial outage resolved 2h ago. INC-1043: related database connection pool exhaustion.

Optional field. If provided, must be array of incident summaries with IDs. Null allowed. Validate no circular references.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Incident Severity Scoring prompt into an application or incident management workflow.

The Incident Severity Scoring prompt is designed to be a deterministic component within a larger incident management pipeline, not a standalone chatbot. It should be called programmatically via an API, receiving a structured incident report and returning a structured severity assessment. The application layer is responsible for assembling the input context, enforcing the output schema, and acting on the result. This prompt is a classification step; it does not create tickets, page on-call engineers, or update status pages. Those actions must be handled by the surrounding application logic after the severity score is validated.

To integrate this prompt, build a service function that accepts an incident object with fields like title, description, affected_service, and customer_impact. The function injects these values into the prompt's [INCIDENT_REPORT] placeholder along with the [SEVERITY_EXAMPLES] and [OUTPUT_SCHEMA]. After receiving the model's response, the harness must validate the JSON output against a strict schema, checking that severity_level is one of the allowed enums (P0, P1, P2, P3), confidence_score is a float between 0 and 1, and justification is a non-empty string. If validation fails, implement a retry loop with a maximum of 2 attempts, feeding the validation error back into the prompt's [CONSTRAINTS] section. For high-stakes environments, always route P0 and P1 classifications to a human on-call for explicit approval before triggering any automated paging or status page updates. Log the raw prompt, the model's response, the validation result, and the final severity score for auditability and prompt regression testing.

For model choice, a fast, cost-effective model like GPT-4o-mini or Claude 3.5 Haiku is sufficient for this classification task, as it relies on pattern matching against provided examples rather than deep reasoning. Avoid using this prompt in isolation for incidents with ambiguous or highly novel failure modes; in those cases, the low confidence score should trigger a fallback to a more capable model or direct human triage. The primary failure mode in production will be schema non-compliance or a severity score that contradicts the provided examples. Mitigate this by running a weekly eval job that tests the prompt against a golden dataset of 50 historical incidents with known severity labels, measuring exact match accuracy and flagging any drift for prompt maintenance.

IMPLEMENTATION TABLE

Expected Output Contract

Defines the required fields, types, and validation rules for the model's JSON response when scoring an incident report. Use this contract to build a parser that can reliably ingest the model's output into your incident management system.

Field or ElementType or FormatRequiredValidation Rule

severity_score

string (enum)

Must be exactly one of: P0, P1, P2, P3. Case-sensitive. No other values allowed.

confidence

number (float)

Must be a float between 0.0 and 1.0 inclusive. Values below 0.7 should trigger a human review flag.

primary_reason

string

Must be a non-empty string with a minimum length of 10 characters. Must reference at least one specific detail from [INCIDENT_REPORT].

matched_example_id

string or null

If confidence >= 0.8, must be a non-null string matching an example ID from [FEW_SHOT_EXAMPLES]. If confidence < 0.8, must be null.

override_flag

boolean

Must be true if the classification overrides a rule-based default, otherwise false. If true, [OVERRIDE_CONDITIONS] must be non-empty.

override_conditions

array of strings

Required only if override_flag is true. Each string must describe a specific condition from [OVERRIDE_CONDITIONS] that was met. Empty array if override_flag is false.

affected_service

string or null

Must be a non-null string extracted from [INCIDENT_REPORT] if the report mentions a service name. Otherwise, must be null. Do not hallucinate service names.

human_review_required

boolean

Must be true if confidence < 0.7 OR override_flag is true OR severity_score is P0. Otherwise, can be false. This field gates downstream automation.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when scoring incident severity with few-shot prompts and how to guard against it.

01

Example Drift Over Time

What to watch: Incident patterns change as services evolve. Examples that perfectly defined P0 vs. P1 six months ago may misclassify new failure modes, silently degrading scoring accuracy. Guardrail: Schedule monthly example audits. Compare example distributions against recent incident data. Flag examples that no longer match production patterns for review or retirement.

02

Severity Inflation from Example Bias

What to watch: If few-shot examples skew toward higher severities, the model over-classifies incidents as P0/P1. This creates alert fatigue and erodes trust in the scoring system. Guardrail: Balance example sets across all severity levels. Include clear P2 and P3 examples with explicit reasoning for why they are not higher severity. Test with a held-out set of known P2/P3 incidents.

03

Ambiguous Boundary Collapse

What to watch: When P1 and P2 examples share overlapping signals (e.g., 'partial outage' vs. 'degraded performance'), the model defaults to the higher severity or produces inconsistent scores. Guardrail: Include contrastive example pairs that explicitly highlight the distinguishing factors between adjacent severity levels. Add a confidence score requirement and route low-confidence classifications for human review.

04

Override Condition Neglect

What to watch: The model follows example patterns but ignores explicit override rules (e.g., 'any customer data exposure is automatically P0'). Few-shot patterns can overpower instruction-based constraints. Guardrail: Place override rules in the system prompt before examples. Include at least one example where an override condition changes the severity from what surface patterns would suggest. Post-process outputs with a rule engine that enforces non-negotiable overrides.

05

Context Window Truncation

What to watch: Long incident reports with extensive logs or timelines push critical severity signals out of the model's effective attention window. The model scores based on the beginning or end of the report, missing key evidence in the middle. Guardrail: Pre-process incident reports to extract and front-load severity-relevant signals (customer impact, scope, duration) before the full narrative. Place these structured summaries immediately before the few-shot examples.

06

Silent Scoring Inconsistency

What to watch: The same incident described with slightly different wording receives different severity scores. Few-shot examples reduce but don't eliminate this variance, and without eval checks, the drift goes unnoticed. Guardrail: Build a golden test set of 20-30 incidents with consensus severity labels. Run scoring against this set on every prompt change. Flag any prompt version where agreement drops below 90%. Log per-incident scores for audit trails.

IMPLEMENTATION TABLE

Evaluation Rubric

Run these checks against a golden dataset of 20-50 labeled incidents before shipping the severity scoring prompt. Each criterion targets a specific failure mode observed in production triage systems.

CriterionPass StandardFailure SignalTest Method

Severity Class Accuracy

= 90% exact match with labeled severity (P0-P3)

Systematic misclassification between adjacent severities (e.g., P1 vs P2)

Confusion matrix on golden dataset; flag any off-by-one error rate > 15%

Override Condition Adherence

100% of incidents matching override rules receive correct severity regardless of example similarity

Override-eligible incident scored by nearest-neighbor example instead of rule

Inject 5 incidents with explicit override triggers; verify output matches override, not example pattern

Evidence Grounding

Every severity assignment cites >= 1 specific field from [INCIDENT_REPORT] as justification

Severity assigned with generic rationale or no field citation

Parse output for [EVIDENCE] field; fail if empty or contains only paraphrased summary

Confidence Score Calibration

Mean confidence for correct predictions >= 0.85; mean confidence for incorrect predictions <= 0.65

High confidence on wrong answers or uniformly high confidence across all outputs

Bin predictions by confidence decile; plot accuracy per bin; expect monotonic increase

P0 Recall

100% recall on P0 incidents (no critical incident missed)

Any P0 incident classified as P1, P2, or P3

Isolate P0 subset in golden dataset; require zero false negatives

P3 Precision

= 85% precision on P3 (low-severity incidents not over-escalated)

Noise and minor incidents classified as P2 or higher

Isolate P3 predictions; verify <= 15% are actually P2+ in labeled data

Cross-Category Consistency

Same incident type + same signals = same severity regardless of wording variation

Paraphrased version of same incident receives different severity

Create 5 paraphrase pairs in golden dataset; require identical severity output for each pair

Null Input Handling

Returns structured error with severity=null and reason when [INCIDENT_REPORT] is empty or missing

Hallucinates severity from empty input or returns unstructured error

Submit empty string and missing field variants; validate output schema has null severity and non-empty reason

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and 3-4 example severity pairs. Use a simple JSON output schema without strict validation. Run against 10-20 historical incidents and manually review scores.

Watch for

  • Overfitting to your example incidents
  • Missing severity definitions for infrastructure-specific failures
  • Model defaulting to P2 when uncertain instead of flagging ambiguity
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.