jevrecipes

Recipe catalog / appeal-grounds-kind

Classify the ground an appeal asserts

What ground does appeal primarily assert: a factual error, a procedural error, new evidence, hardship, a misapplied rule, or something else?

You need to sort incoming appeals of a benefits, permit, enforcement, or academic decision by the kind of argument they make, so each reaches the right reviewer or template before anyone reads the file.

Explore this recipe interactively ยท Source and implementation guide

Use appeal-grounds-kind 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 { appealGroundsKind } from 'jev-recipes/appeal-grounds-kind';

const result = await appealGroundsKind({
  "appeal": "I am appealing the denial dated September 3. The letter says my household income is $4,200 per month, which is over the limit. That number includes my adult son's wages, but he moved out in March and no longer lives with me; I told the office this at my interview. My actual household income is my own $2,600 per month. Please correct the income figure and reconsider my application.",
  "minConfidence": 0.8
});
console.log(result);

Input contract

FieldTypeNeeded
appealstringRequired
minConfidencenumberOptional
Full input and result schemas
{
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "appeal": {
        "type": "string"
      },
      "minConfidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      }
    },
    "required": [
      "appeal"
    ]
  },
  "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"
        ]
      },
      "verdict": {
        "type": "string",
        "enum": [
          "factual_error",
          "procedural_error",
          "new_evidence",
          "hardship",
          "misapplied_rule",
          "other",
          "unclear"
        ]
      },
      "confidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      },
      "probabilities": {
        "type": "object",
        "propertyNames": {
          "type": "string",
          "enum": [
            "factual_error",
            "procedural_error",
            "new_evidence",
            "hardship",
            "misapplied_rule",
            "other",
            "unclear"
          ]
        },
        "additionalProperties": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "required": [
          "factual_error",
          "procedural_error",
          "new_evidence",
          "hardship",
          "misapplied_rule",
          "other",
          "unclear"
        ]
      }
    },
    "required": [
      "model",
      "usage",
      "status",
      "verdict",
      "confidence",
      "probabilities"
    ],
    "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 appeal-grounds-kind.

{
  "model": "demo-fixture",
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0
  },
  "status": "ready",
  "verdict": "factual_error",
  "confidence": 0.86,
  "probabilities": {
    "factual_error": 0.86,
    "procedural_error": 0.01,
    "new_evidence": 0.06,
    "hardship": 0.02,
    "misapplied_rule": 0.03,
    "other": 0.01,
    "unclear": 0.01
  }
}

Evaluation evidence

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.

Limitations

Related recipes