jevrecipes

Recipe catalog / objective-fit

Check question alignment to a learning objective

objective-fit is a Jev recipe from the jev-recipes TypeScript package. Does question assess the skill or knowledge stated in objective, rather than something adjacent? Use it when you generate or review quiz and exam items and want to catch questions that test recall or a neighboring topic instead of the stated objective.

Last updated .

Explore this recipe interactively · Source and implementation guide · Markdown version

How do I use objective-fit 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 { objectiveFit } from 'jev-recipes/objective-fit';

const result = await objectiveFit({
  "objective": "Students will be able to apply Newton's second law to compute the net force on an object given its mass and acceleration.",
  "question": "State Newton's second law of motion in words and give the name of the unit of force.",
  "minConfidence": 0.8
});
console.log(result);

What input does objective-fit take?

FieldTypeNeeded
objectivestringRequired
questionstringRequired
minConfidencenumberOptional
Full input and result schemas
{
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "objective": {
        "type": "string"
      },
      "question": {
        "type": "string"
      },
      "minConfidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      }
    },
    "required": [
      "objective",
      "question"
    ]
  },
  "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"
        ]
      },
      "probability": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      },
      "confidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      },
      "verdict": {
        "type": "string",
        "enum": [
          "assesses",
          "misses"
        ]
      }
    },
    "required": [
      "model",
      "usage",
      "status",
      "probability",
      "confidence",
      "verdict"
    ],
    "additionalProperties": false
  }
}

What does a objective-fit 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 objective-fit.

{
  "model": "demo-fixture",
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0
  },
  "status": "ready",
  "probability": 0.08,
  "confidence": 0.92,
  "verdict": "misses"
}

Input

See shared options and behavior for client configuration, validation, and errors. Types are inferred from this folder's Zod 4 schemas.

Result

verdict is assesses when Jev's yes probability is at least 0.5 and misses otherwise. probability is that yes probability. confidence is the probability of the chosen side, so a 0.08 yes probability yields misses with 0.92 confidence.

A result is ready when confidence meets minConfidence. Otherwise it is review. Treat a review result as unknown and hold the item for an instructor to check rather than adding it to the assessment.

Reuse and calls

Uses the shared gate helper, a single yes/no question. This folder owns the question wording, the outcome descriptions, and the review policy. A live invocation makes one logical Jev request.

Limits

The recipe checks whether answering the question requires the skill or knowledge the objective names, at the level it names. A recall question against an "apply" objective is misses, as is a question on a neighboring topic the objective does not cover. It does not judge difficulty, clarity, or whether the answer key is correct, and an assesses verdict says nothing about how well the item discriminates between students. The check is only as sharp as the objective: an objective that names a broad topic without a verb or level will accept many questions.

Example input

demo.json contains editable input and a hand-authored response. After installing jev-recipes, npx jev-recipes demo objective-fit shows an offline illustration, not an accuracy measurement. Use npx jev-recipes describe objective-fit to inspect the input and result schemas.

How accurate is objective-fit?

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.

What are the limits of objective-fit?