Recipe catalog / proposal-facets
Label the facets of a grant proposal
Which of these does proposal include: a statement of need, measurable objectives, planned activities, a budget, an evaluation plan?
You screen draft or submitted grant proposals for the sections a funder or an internal reviewer expects, or you want to tell a writer which parts are missing before a deadline.
Explore this recipe interactively ยท Source and implementation guide
Use proposal-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 { proposalFacets } from 'jev-recipes/proposal-facets';
const result = await proposalFacets({
"proposal": "Riverbend Youth Literacy Program. In Riverbend County, 38% of third graders read below grade level, and both public library branches ended their after-school programs in 2024, leaving no free reading support outside school hours. We request $48,000 to run a twice-weekly after-school reading program at three elementary schools during the 2026-27 school year. Objectives: enroll 90 students in grades 2 and 3, and raise participants' reading level by at least one grade band by May 2027. Activities: recruit and train 12 volunteer tutors in September; run 60-minute small-group sessions on Tuesdays and Thursdays from October through May; hold a family reading night at each school every quarter. Budget: program coordinator (0.5 FTE) $30,000; books and materials $9,000; tutor training and background checks $4,000; snacks and family nights $5,000.",
"minConfidence": 0.8
});
console.log(result);
Input contract
| Field | Type | Needed |
|---|---|---|
| proposal | string | Required |
| minConfidence | number | Optional |
Full input and result schemas
{
"input": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"proposal": {
"type": "string"
},
"minConfidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"proposal"
]
},
"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": [
"statesNeed",
"statesObjectives",
"statesActivities",
"statesBudget",
"statesEvaluation"
]
}
},
"labels": {
"type": "object",
"properties": {
"statesNeed": {
"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
},
"statesObjectives": {
"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
},
"statesActivities": {
"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
},
"statesBudget": {
"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
},
"statesEvaluation": {
"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": [
"statesNeed",
"statesObjectives",
"statesActivities",
"statesBudget",
"statesEvaluation"
],
"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 proposal-facets.
{
"model": "demo-fixture",
"usage": {
"input_tokens": 0,
"output_tokens": 0
},
"status": "ready",
"detected": [
"statesNeed",
"statesObjectives",
"statesActivities",
"statesBudget"
],
"labels": {
"statesNeed": {
"status": "ready",
"verdict": "present",
"probability": 0.95,
"confidence": 0.95
},
"statesObjectives": {
"status": "ready",
"verdict": "present",
"probability": 0.91,
"confidence": 0.91
},
"statesActivities": {
"status": "ready",
"verdict": "present",
"probability": 0.94,
"confidence": 0.94
},
"statesBudget": {
"status": "ready",
"verdict": "present",
"probability": 0.93,
"confidence": 0.93
},
"statesEvaluation": {
"status": "ready",
"verdict": "absent",
"probability": 0.09,
"confidence": 0.91
}
}
}
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
- Labels are independent, so a proposal can carry several or none.
- Detects that a facet is present, not that it is convincing. A stated need can be unsupported and a budget can be unrealistic.
- Does not check the proposal against a funder's guidelines, page limits, or required attachments. Enforce format rules in application code.
Related recipes
- plan-completeness: Use plan-completeness to grade how completely a plan covers a specific task, rather than which standard sections a proposal contains.
- content-facets: Use content-facets for the structural elements of an article, such as a thesis and evidence, rather than the parts of a funding request.