jevrecipes

Recipe catalog / verify

Verify claims

verify is a Jev recipe from the jev-recipes TypeScript package. Check each supplied claim against its paired evidence. Use it when you need to know whether a claim is supported by its supplied evidence.

Last updated .

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

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

const result = await verify({
  "claims": [
    {
      "id": "refund-window",
      "claim": "Customers can request a refund within 60 days.",
      "evidence": "Refunds are available only within 30 days of purchase."
    },
    {
      "id": "support-hours",
      "claim": "Support is available on weekdays.",
      "evidence": "Contact our support team Monday through Friday, 9 am to 5 pm."
    }
  ],
  "minConfidence": 0.8
});
console.log(result);

What input does verify take?

FieldTypeNeeded
claimsarrayRequired
minConfidencenumberOptional
Full input and result schemas
{
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "claims": {
        "minItems": 1,
        "maxItems": 100,
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "claim": {
              "type": "string"
            },
            "evidence": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "claim",
            "evidence"
          ]
        }
      },
      "minConfidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      }
    },
    "required": [
      "claims"
    ]
  },
  "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
      },
      "checks": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "status": {
              "type": "string",
              "enum": [
                "ready",
                "review"
              ]
            },
            "verdict": {
              "type": "string",
              "enum": [
                "supported",
                "contradicted",
                "unsupported"
              ]
            },
            "confidence": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "probabilities": {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "enum": [
                  "supported",
                  "contradicted",
                  "unsupported"
                ]
              },
              "additionalProperties": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "required": [
                "supported",
                "contradicted",
                "unsupported"
              ]
            }
          },
          "required": [
            "id",
            "status",
            "verdict",
            "confidence",
            "probabilities"
          ],
          "additionalProperties": false
        }
      },
      "allSupported": {
        "type": "boolean"
      }
    },
    "required": [
      "model",
      "usage",
      "checks",
      "allSupported"
    ],
    "additionalProperties": false
  }
}

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

{
  "model": "demo-fixture",
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0
  },
  "checks": [
    {
      "id": "refund-window",
      "status": "ready",
      "verdict": "contradicted",
      "confidence": 0.94,
      "probabilities": {
        "supported": 0.01,
        "contradicted": 0.97,
        "unsupported": 0.02
      }
    },
    {
      "id": "support-hours",
      "status": "ready",
      "verdict": "supported",
      "confidence": 0.92,
      "probabilities": {
        "supported": 0.96,
        "contradicted": 0.01,
        "unsupported": 0.03
      }
    }
  ],
  "allSupported": false
}

Input

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

Result

checks preserves each claim ID and returns its verdict, status, confidence, and choice probabilities.

Verdict Meaning
supported The paired evidence supports the entire claim.
contradicted The paired evidence establishes something incompatible with the claim.
unsupported The paired evidence is insufficient to support or contradict the entire claim.

Each check is ready at or above minConfidence, otherwise review. A ready check can still be contradicted or unsupported. allSupported is true only when every check is ready and supported. Read individual check statuses; the result has no top-level status.

The result includes model and token usage. Inspect the outcome as well as its review status.

Reuse and calls

Uses the shared item-check helper. This folder owns the evidence criteria and the all-supported decision. All claim questions are sent in one request. The citation-match recipe calls this public function to select supporting passages. A live invocation makes one logical Jev request; SDK retries can add transport attempts.

Limits

Checks only supplied claim/evidence pairs. It does not extract claims, retrieve sources, establish source truth, or check whether an answer addresses every requested point. Exact arithmetic and date comparisons belong in code.

Example input

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

How accurate is verify?

Current measurement; labels unspecified

jev-1.13.0 / 2026-10-04 / 50 development cases

Scoring revision 2.

96%All-case accuracy
7Sent for review
0Failed calls / cases

43 ready decisions, with 100% accuracy among those decisions.

95% case-level interval: 87% to 99%. Related synthetic cases are correlated.

This measures the recorded dataset, not general readiness. Label sources: unspecified: Not recorded by the dataset author.

Use the evaluation guide to measure this decision on your own labeled cases.

What are the limits of verify?