jevrecipes

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

FieldTypeNeeded
activitystringRequired
statementstringRequired
contextstringOptional
minConfidencenumberOptional
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

Fixture only

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

Related recipes