Recipe catalog / eligibility-facets
Label what an applicant statement addresses
Which of these does statement address: residency, income, household size, identity documents, prior benefits received?
You need several independent checks on an applicant's free-text statement in one call, to see which eligibility topics it already covers and which a caseworker still needs to ask about.
Explore this recipe interactively ยท Source and implementation guide
Use eligibility-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 { eligibilityFacets } from 'jev-recipes/eligibility-facets';
const result = await eligibilityFacets({
"statement": "I have lived at 214 Elm Street, Apt 2, Dayton, Ohio for about six years. I work part time as a cashier at Riverside Market and bring home around $1,400 a month; my hours were cut in July. There are four of us in the household: me, my wife Rosa, and our two kids, ages 7 and 10. I have attached copies of my driver's license and my Social Security card. Please let me know if you need anything else.",
"minConfidence": 0.8
});
console.log(result);
Input contract
| Field | Type | Needed |
|---|---|---|
| statement | string | Required |
| minConfidence | number | Optional |
Full input and result schemas
{
"input": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"statement": {
"type": "string"
},
"minConfidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"statement"
]
},
"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": [
"statesResidency",
"statesIncome",
"statesHouseholdSize",
"statesIdentityDocuments",
"statesPriorBenefits"
]
}
},
"labels": {
"type": "object",
"properties": {
"statesResidency": {
"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
},
"statesIncome": {
"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
},
"statesHouseholdSize": {
"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
},
"statesIdentityDocuments": {
"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
},
"statesPriorBenefits": {
"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": [
"statesResidency",
"statesIncome",
"statesHouseholdSize",
"statesIdentityDocuments",
"statesPriorBenefits"
],
"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 eligibility-facets.
{
"model": "demo-fixture",
"usage": {
"input_tokens": 0,
"output_tokens": 0
},
"status": "ready",
"detected": [
"statesResidency",
"statesIncome",
"statesHouseholdSize",
"statesIdentityDocuments"
],
"labels": {
"statesResidency": {
"status": "ready",
"verdict": "present",
"probability": 0.97,
"confidence": 0.97
},
"statesIncome": {
"status": "ready",
"verdict": "present",
"probability": 0.96,
"confidence": 0.96
},
"statesHouseholdSize": {
"status": "ready",
"verdict": "present",
"probability": 0.96,
"confidence": 0.96
},
"statesIdentityDocuments": {
"status": "ready",
"verdict": "present",
"probability": 0.94,
"confidence": 0.94
},
"statesPriorBenefits": {
"status": "ready",
"verdict": "absent",
"probability": 0.05,
"confidence": 0.95
}
}
}
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 statement addresses the topic, not whether the applicant is eligible or whether what they say is true.
- Amounts, dates, and household counts are not validated against program rules or records. Apply eligibility rules in code.
- Labels are independent, so a statement can carry several, all, or none.
Related recipes
- job-post-facets: Use job-post-facets for the same coverage-check pattern over a job posting instead of a benefits application statement.
- clarify: Use clarify to decide whether an applicant's question is too ambiguous to answer, rather than which eligibility topics their statement addresses.