jevrecipes

Recipe catalog / incident-severity-wording

Grade the severity an incident report describes

incident-severity-wording is a Jev recipe from the jev-recipes TypeScript package. What severity does the wording of report describe, on a five-level rubric from no user impact to total outage or data loss? Use it when 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.

Last updated .

Explore this recipe interactively · Source and implementation guide · Markdown version

How do I 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);

What input does incident-severity-wording take?

FieldTypeNeeded
reportstringRequired
minConfidencenumberOptional
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
  }
}

What does a incident-severity-wording result look like?

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"
}

Input

See shared options and behavior for client configuration, validation, and errors. Types are inferred from this folder's Zod 4 schemas.

Result

severity is one of none, minor, partial, major, critical, taken from the most likely rubric level. level is that level's index from 0 to 4. score is Jev's expected value across the rubric and can fall between levels; use it for ranking or thresholds where a single label loses information.

A result is ready when confidence meets minConfidence. Otherwise it is review and still carries the graded values for inspection. probabilities is keyed by level index.

Reuse and calls

Uses the shared score helper. This folder owns the question, the rubric wording, and the review policy. A live invocation makes one logical Jev request.

Limits

The grade describes the report's wording, not measured impact. A report that omits affected users or regions will be graded lower than the real incident deserves, and a dramatic report will not be graded higher unless it states the impact. The recipe does not know your SEV scale, SLAs, or paging rules, so application code maps levels to them. It does not verify any figure in the report.

Example input

demo.json contains editable input and a hand-authored response. After installing jev-recipes, npx jev-recipes demo incident-severity-wording shows an offline illustration, not an accuracy measurement. Use npx jev-recipes describe incident-severity-wording to inspect the input and result schemas.

How accurate is incident-severity-wording?

Fixture only

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.

What are the limits of incident-severity-wording?