jevrecipes

Recipe catalog / settlement-offer-facets

Label the facets a settlement offer letter states

settlement-offer-facets is a Jev recipe from the jev-recipes TypeScript package. Which of these does offer state: the settlement amount, the basis for that amount, a deadline to respond, release terms, and how to dispute or appeal? Use it when a claims quality or consumer-advocacy tool reviews settlement offer letters and needs to know which standard elements each letter contains before checking it against a policy or template.

Last updated .

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

How do I use settlement-offer-facets 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 { settlementOfferFacets } from 'jev-recipes/settlement-offer-facets';

const result = await settlementOfferFacets({
  "offer": "Re: Claim 44-01927, water damage at 27 Alder Court. Dear Ms. Okafor, we have completed our review and are pleased to offer $18,640.00 in full settlement of this claim. This figure reflects the contractor's repair estimate of $21,140.00, less your $2,500.00 policy deductible. Please sign and return the enclosed acceptance form within 30 days of the date of this letter. By accepting this payment you agree that it constitutes full and final settlement of all claims arising from the 8 March incident and release Northbridge Mutual from any further liability in connection with it. Payment will be issued within 10 business days of receiving your signed form.",
  "minConfidence": 0.8
});
console.log(result);

What input does settlement-offer-facets take?

FieldTypeNeeded
offerstringRequired
minConfidencenumberOptional
Full input and result schemas
{
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "offer": {
        "type": "string"
      },
      "minConfidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      }
    },
    "required": [
      "offer"
    ]
  },
  "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"
        ]
      },
      "detected": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "statesAmount",
            "statesBasis",
            "statesDeadline",
            "statesReleaseTerms",
            "statesDisputePath"
          ]
        }
      },
      "labels": {
        "type": "object",
        "properties": {
          "statesAmount": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "ready",
                  "review"
                ]
              },
              "verdict": {
                "type": "string",
                "enum": [
                  "present",
                  "absent"
                ]
              },
              "probability": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "confidence": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "status",
              "verdict",
              "probability",
              "confidence"
            ],
            "additionalProperties": false
          },
          "statesBasis": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "ready",
                  "review"
                ]
              },
              "verdict": {
                "type": "string",
                "enum": [
                  "present",
                  "absent"
                ]
              },
              "probability": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "confidence": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "status",
              "verdict",
              "probability",
              "confidence"
            ],
            "additionalProperties": false
          },
          "statesDeadline": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "ready",
                  "review"
                ]
              },
              "verdict": {
                "type": "string",
                "enum": [
                  "present",
                  "absent"
                ]
              },
              "probability": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "confidence": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "status",
              "verdict",
              "probability",
              "confidence"
            ],
            "additionalProperties": false
          },
          "statesReleaseTerms": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "ready",
                  "review"
                ]
              },
              "verdict": {
                "type": "string",
                "enum": [
                  "present",
                  "absent"
                ]
              },
              "probability": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "confidence": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "status",
              "verdict",
              "probability",
              "confidence"
            ],
            "additionalProperties": false
          },
          "statesDisputePath": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "ready",
                  "review"
                ]
              },
              "verdict": {
                "type": "string",
                "enum": [
                  "present",
                  "absent"
                ]
              },
              "probability": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "confidence": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "status",
              "verdict",
              "probability",
              "confidence"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "statesAmount",
          "statesBasis",
          "statesDeadline",
          "statesReleaseTerms",
          "statesDisputePath"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "model",
      "usage",
      "status",
      "detected",
      "labels"
    ],
    "additionalProperties": false
  }
}

What does a settlement-offer-facets 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 settlement-offer-facets.

{
  "model": "demo-fixture",
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0
  },
  "status": "ready",
  "detected": [
    "statesAmount",
    "statesBasis",
    "statesDeadline",
    "statesReleaseTerms"
  ],
  "labels": {
    "statesAmount": {
      "status": "ready",
      "verdict": "present",
      "probability": 0.97,
      "confidence": 0.97
    },
    "statesBasis": {
      "status": "ready",
      "verdict": "present",
      "probability": 0.94,
      "confidence": 0.94
    },
    "statesDeadline": {
      "status": "ready",
      "verdict": "present",
      "probability": 0.95,
      "confidence": 0.95
    },
    "statesReleaseTerms": {
      "status": "ready",
      "verdict": "present",
      "probability": 0.93,
      "confidence": 0.93
    },
    "statesDisputePath": {
      "status": "ready",
      "verdict": "absent",
      "probability": 0.06,
      "confidence": 0.94
    }
  }
}

Input

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

Result

labels holds one check per label: statesAmount, statesBasis, statesDeadline, statesReleaseTerms, statesDisputePath. Each check has a verdict of present or absent, the yes probability, confidence for the chosen side, and its own status. detected lists the present labels in declaration order.

The overall status is review when any single label falls below minConfidence. Labels that are individually ready remain usable in that case.

Reuse and calls

Uses the shared labels helper, which places one yes/no question per label in a single Jev request. This folder owns the questions and their outcome descriptions. A live invocation makes one logical Jev request.

Limits

Each element reports only that the letter's wording states it; a letter that says "we will pay a fair amount" does not state an amount, while one that writes a figure does, regardless of whether the figure is reasonable. The recipe makes no judgment about fairness, accuracy, or enforceability, and a letter that states every element can still be unlawful or misleading; route legal and regulatory questions to a qualified reviewer. Parse actual amounts, dates, and response windows in application code, and use clarify to decide whether to ask the sender about an element the letter omits.

Example input

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

How accurate is settlement-offer-facets?

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 settlement-offer-facets?