Recipe catalog / evidence-strength
Grade evidence strength
evidence-strength is a Jev recipe from the jev-recipes TypeScript package. How strongly does evidence support the entire claim, on a five-level rubric? Use it when you need a graded strength for weighting or ranking evidence, not just a supported or unsupported label.
Last updated .
Explore this recipe interactively · Source and implementation guide · Markdown version
How do I use evidence-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 { evidenceStrength } from 'jev-recipes/evidence-strength';
const result = await evidenceStrength({
"claim": "Guests can export reports as CSV.",
"evidence": "Guest accounts may export any report they can view. Export formats include CSV and PDF.",
"minConfidence": 0.8
});
console.log(result);
What input does evidence-strength take?
| Field | Type | Needed |
|---|---|---|
| claim | string | Required |
| evidence | string | Required |
| minConfidence | number | Optional |
Full input and result schemas
{
"input": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"claim": {
"type": "string"
},
"evidence": {
"type": "string"
},
"minConfidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"claim",
"evidence"
]
},
"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
}
},
"strength": {
"type": "string",
"enum": [
"none",
"weak",
"moderate",
"strong",
"conclusive"
]
}
},
"required": [
"model",
"usage",
"status",
"score",
"level",
"confidence",
"probabilities",
"strength"
],
"additionalProperties": false
}
}What does a evidence-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 evidence-strength.
{
"model": "demo-fixture",
"usage": {
"input_tokens": 0,
"output_tokens": 0
},
"status": "ready",
"score": 3.83,
"level": 4,
"confidence": 0.86,
"probabilities": {
"0": 0.01,
"1": 0.01,
"2": 0.03,
"3": 0.09,
"4": 0.86
},
"strength": "conclusive"
}
Input
See shared options and behavior for client configuration, validation, and errors. Types are inferred from this folder's Zod 4 schemas.
Result
strength is one of none, weak, moderate, strong, or conclusive, 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 for ranking or weighting where a single label loses information.
A result is ready when confidence meets minConfidence. Otherwise it is review and still carries the graded values for inspection. probabilities is keyed by level index.
Reuse and calls
Uses the shared score helper. This folder owns the strength question, the rubric wording, and the review policy. A live invocation makes one logical Jev request.
Limits
The rubric grades support for the whole claim. Evidence that contradicts the claim scores at the lowest level alongside irrelevant evidence; use verify when contradiction must be distinguished. The recipe does not check whether the evidence itself is accurate or current.
Example input
demo.json contains editable input and a hand-authored response. After installing jev-recipes, npx jev-recipes demo evidence-strength shows an offline illustration, not an accuracy measurement. Use npx jev-recipes describe evidence-strength to inspect the input and result schemas.
How accurate is evidence-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 evidence-strength?
- Grades support only. Contradiction lands at the lowest level; use verify to distinguish it.
- The score is an expected value over rubric levels. Application code chooses cutoffs.
Which recipes are related to evidence-strength?
- verify: Use verify for a categorical supported, contradicted, or unsupported verdict per claim.
- answerability: Use answerability to decide whether evidence can answer a whole question.