Recipe catalog / incident-severity-wording
Grade the severity an incident report describes
What severity does the wording of report describe, on a five-level rubric from no user impact to total outage or data loss?
You need a first severity estimate from a free-text incident report, alert summary, or status update before a human incident commander confirms it, or you want to check that a declared severity matches how the report describes the impact.
Explore this recipe interactively ยท Source and implementation guide
Use incident-severity-wording in TypeScript
Install with npm install jev-recipes. Requires Node.js 22.9 or newer and ES modules. Set TYPESAFE_API_KEY in your server environment for live calls, which send input to TypeSafe and use API quota. See the installation guide.
import { incidentSeverityWording } from 'jev-recipes/incident-severity-wording';
const result = await incidentSeverityWording({
"report": "Since 14:05 UTC, about 30% of requests to the search endpoint on the EU shard return 503. Search results fail to load for mobile users in the EU; web checkout, account pages, and all other regions are unaffected. No data loss observed.",
"minConfidence": 0.8
});
console.log(result);
Input contract
| Field | Type | Needed |
|---|---|---|
| report | string | Required |
| minConfidence | number | Optional |
Full input and result schemas
{
"input": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"report": {
"type": "string"
},
"minConfidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"report"
]
},
"result": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"model": {
"type": "string"
},
"usage": {
"type": "object",
"properties": {
"input_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"output_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"input_tokens",
"output_tokens"
],
"additionalProperties": false
},
"status": {
"type": "string",
"enum": [
"ready",
"review"
]
},
"score": {
"type": "number",
"minimum": 0
},
"level": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"probabilities": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"severity": {
"type": "string",
"enum": [
"none",
"minor",
"partial",
"major",
"critical"
]
}
},
"required": [
"model",
"usage",
"status",
"score",
"level",
"confidence",
"probabilities",
"severity"
],
"additionalProperties": false
}
}Saved example result
This hand-authored response demonstrates the contract. It is not a model accuracy measurement. Run it without an API key: npx jev-recipes demo incident-severity-wording.
{
"model": "demo-fixture",
"usage": {
"input_tokens": 0,
"output_tokens": 0
},
"status": "ready",
"score": 2.12,
"level": 2,
"confidence": 0.8,
"probabilities": {
"0": 0,
"1": 0.05,
"2": 0.8,
"3": 0.13,
"4": 0.02
},
"severity": "partial"
}
Evaluation evidence
No verified live accuracy measurement is available. Evaluate representative cases before using this decision in your workflow.
Use the evaluation guide to measure this decision on your own labeled cases.
Limitations
- Grades what the report says, not measured impact. An understated report yields an understated grade.
- Does not know your severity matrix or SLAs. Map levels to your own SEV scale and paging rules in application code.
- Does not distinguish a report written during an incident from one written after recovery.
Related recipes
- issue-impact: Use issue-impact for bug reports and feature requests where the question is how many users a problem affects rather than how large an outage is.
- policy-severity: Use policy-severity to grade how serious a policy violation is, rather than how serious an operational incident is.