Recipe catalog / motivation-source
Identify a stated source of motivation
Label a stated reason for an activity as intrinsic enjoyment, a separate outcome, both, or not stated.
You need to classify a stated reason for an activity as enjoyment of doing it or pursuit of a separate outcome.
Explore this recipe interactively ยท Source and implementation guide
Use motivation-source 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 { motivationSource } from 'jev-recipes/motivation-source';
const result = await motivationSource({
"activity": "Alex solves puzzles.",
"statement": "Alex says: \"I solve puzzles because I enjoy the challenge itself.\""
});
console.log(result);
Input contract
| Field | Type | Needed |
|---|---|---|
| activity | string | Required |
| 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": {
"activity": {
"type": "string",
"description": "One focal activity and its actor when needed to distinguish whose stated reason is being classified."
},
"statement": {
"type": "string",
"description": "Text stating or reporting why the actor does the activity."
},
"context": {
"type": "string",
"description": "Supplied speaker identities or references needed to interpret the stated reason."
},
"minConfidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"activity",
"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"
]
},
"verdict": {
"type": "string",
"enum": [
"intrinsic",
"extrinsic",
"mixed",
"not_stated",
"unclear"
]
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"probabilities": {
"type": "object",
"propertyNames": {
"type": "string",
"enum": [
"intrinsic",
"extrinsic",
"mixed",
"not_stated",
"unclear"
]
},
"additionalProperties": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"required": [
"intrinsic",
"extrinsic",
"mixed",
"not_stated",
"unclear"
]
}
},
"required": [
"model",
"usage",
"status",
"verdict",
"confidence",
"probabilities"
],
"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 motivation-source.
{
"model": "demo-fixture",
"usage": {
"input_tokens": 0,
"output_tokens": 0
},
"status": "ready",
"verdict": "intrinsic",
"confidence": 0.96,
"probabilities": {
"intrinsic": 0.96,
"extrinsic": 0.01,
"mixed": 0.01,
"not_stated": 0.01,
"unclear": 0.01
}
}
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 expressed or reported reasons, not hidden motives, sincerity, or a psychological profile.
- Extrinsic reasons can be internalized and freely chosen; this label does not measure autonomy or distinguish its subtypes.
- An AI response describing a motive does not establish that the model has that motive.
Related recipes
- causal-attribution: Use causal-attribution to distinguish personal from situational explanations of behavior.
- preference-kind: Use preference-kind to distinguish preferences, facts, and temporary requests rather than reasons for an activity.
- claim-stance: Use claim-stance to label agreement with a specified claim instead of classifying the reason for acting.