Recipe catalog / commitment-strength
Grade commitment strength
commitment-strength is a Jev recipe from the jev-recipes TypeScript package. How firmly does statement commit its speaker to an action or outcome, on a five-level rubric? Use it when you need to grade how strongly a message commits someone to act before tracking it as a promise or follow-up.
Last updated .
Explore this recipe interactively · Source and implementation guide · Markdown version
How do I use commitment-strength 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 { commitmentStrength } from 'jev-recipes/commitment-strength';
const result = await commitmentStrength({
"statement": "I will have the revised contract in your inbox by 5pm Thursday, and I will call you as soon as it is sent.",
"minConfidence": 0.8
});
console.log(result);
What input does commitment-strength take?
| Field | Type | Needed |
|---|---|---|
| statement | string | Required |
| context | string | Optional |
| minConfidence | number | Optional |
Full input and result schemas
{
"input": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"statement": {
"type": "string"
},
"context": {
"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"
]
},
"score": {
"type": "number",
"minimum": 0
},
"level": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"probabilities": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"commitment": {
"type": "string",
"enum": [
"none",
"vague",
"conditional",
"firm",
"binding"
]
}
},
"required": [
"model",
"usage",
"status",
"score",
"level",
"confidence",
"probabilities",
"commitment"
],
"additionalProperties": false
}
}What does a commitment-strength 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 commitment-strength.
{
"model": "demo-fixture",
"usage": {
"input_tokens": 0,
"output_tokens": 0
},
"status": "ready",
"score": 3.85,
"level": 4,
"confidence": 0.87,
"probabilities": {
"0": 0,
"1": 0,
"2": 0.02,
"3": 0.11,
"4": 0.87
},
"commitment": "binding"
}
Input
See shared options and behavior for client configuration, validation, and errors. Types are inferred from this folder's Zod 4 schemas. context is optional and is omitted from the request when absent.
Result
commitment is one of none, vague, conditional, firm, or binding, taken from the most likely rubric level. level is that level's index from 0 to 4. score is Jev's expected value across the rubric and can fall between levels; use it to rank follow-ups or to decide which statements to track as obligations.
A result is ready when confidence meets minConfidence. Otherwise it is review and still carries the graded values. probabilities is keyed by level index.
Reuse and calls
Uses the shared score helper. This folder owns the commitment question, the rubric wording, and the review policy. A live invocation makes one logical Jev request.
Limits
The grade reads the wording of a statement. It does not know whether the speaker is sincere, has the authority to commit, or will follow through, and a binding grade is not a legal finding. Statements about other people's obligations grade on how firmly the speaker commits, not on what the third party will do. Use promise-check when you only need to know whether a promise is present. Application code decides which levels to track and remind on.
Example input
demo.json contains editable input and a hand-authored response. After installing jev-recipes, npx jev-recipes demo commitment-strength shows an offline illustration, not an accuracy measurement. Use npx jev-recipes describe commitment-strength to inspect the input and result schemas.
How accurate is commitment-strength?
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 commitment-strength?
- Grades expressed wording, not the speaker's sincerity, authority, or likelihood of following through.
- The score is an expected value over rubric levels. Application code chooses cutoffs.
Which recipes are related to commitment-strength?
- promise-check: Use promise-check to detect whether a message contains a promise at all.
- certainty-match: Use certainty-match to compare expressed certainty with the evidence rather than commitment to act.