Recipe catalog / notice-facets
Label what an official notice states
Which of these does notice state: an action the recipient must take, a deadline, the consequence of inaction, a contact for questions, a right to appeal?
You need several independent checks on a government or institutional notice in one call, to catch letters that tell recipients nothing about what to do, by when, or how to contest a decision before they are sent or when they are received.
Explore this recipe interactively ยท Source and implementation guide
Use notice-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 { noticeFacets } from 'jev-recipes/notice-facets';
const result = await noticeFacets({
"notice": "County Housing Assistance Program\nNotice of Missing Documentation\n\nCase number: HA-2026-44817\n\nDear Ms. Okafor,\n\nWe are reviewing your application for rental assistance. To continue processing it, we need a copy of your most recent 30 days of pay stubs and a signed copy of your current lease.\n\nPlease submit these documents by October 10, 2026. You may upload them through the resident portal or bring them to our office at 300 Civic Center Drive, Suite 110, Monday through Friday, 8:30 AM to 4:30 PM.\n\nIf we do not receive the documents by that date, your application will be closed and you will need to reapply.\n\nIf you have questions, call your case worker, Daniel Ruiz, at (555) 014-2270.\n\nSincerely,\nCounty Housing Assistance Program",
"minConfidence": 0.8
});
console.log(result);
Input contract
| Field | Type | Needed |
|---|---|---|
| notice | string | Required |
| minConfidence | number | Optional |
Full input and result schemas
{
"input": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"notice": {
"type": "string"
},
"minConfidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"notice"
]
},
"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": [
"statesAction",
"statesDeadline",
"statesConsequence",
"statesContact",
"statesAppealRight"
]
}
},
"labels": {
"type": "object",
"properties": {
"statesAction": {
"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
},
"statesConsequence": {
"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
},
"statesContact": {
"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
},
"statesAppealRight": {
"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": [
"statesAction",
"statesDeadline",
"statesConsequence",
"statesContact",
"statesAppealRight"
],
"additionalProperties": false
}
},
"required": [
"model",
"usage",
"status",
"detected",
"labels"
],
"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 notice-facets.
{
"model": "demo-fixture",
"usage": {
"input_tokens": 0,
"output_tokens": 0
},
"status": "ready",
"detected": [
"statesAction",
"statesDeadline",
"statesConsequence",
"statesContact"
],
"labels": {
"statesAction": {
"status": "ready",
"verdict": "present",
"probability": 0.98,
"confidence": 0.98
},
"statesDeadline": {
"status": "ready",
"verdict": "present",
"probability": 0.97,
"confidence": 0.97
},
"statesConsequence": {
"status": "ready",
"verdict": "present",
"probability": 0.96,
"confidence": 0.96
},
"statesContact": {
"status": "ready",
"verdict": "present",
"probability": 0.95,
"confidence": 0.95
},
"statesAppealRight": {
"status": "ready",
"verdict": "absent",
"probability": 0.04,
"confidence": 0.96
}
}
}
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
- Each label reports whether the notice states the element, not whether the element is correct, lawful, or adequately explained.
- Dates and deadlines are not computed or checked against the notice date. Parse them in code.
- Labels are independent, so a notice can carry several, all, or none.
Related recipes
- message-facets: Use message-facets for the same presence-check pattern over a general message rather than an official notice.
- response-needed: Use response-needed to decide whether a message requires a reply at all, rather than which elements a notice states.