Recipe catalog / attribution-match
Check a statement's attributed source
attribution-match is a Jev recipe from the jev-recipes TypeScript package. Check whether supplied source text attributes a statement to the claimed speaker or source. Use it when you need to check who said a statement in a transcript or source excerpt, separately from whether it is true.
Last updated .
Explore this recipe interactively · Source and implementation guide · Markdown version
How do I use attribution-match 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 { attributionMatch } from 'jev-recipes/attribution-match';
const result = await attributionMatch({
"statement": "The deadline is Friday.",
"attributedTo": "Mira",
"source": "Oren: The deadline is Friday.\nMira: Thank you for the update."
});
console.log(result);
What input does attribution-match take?
| Field | Type | Needed |
|---|---|---|
| statement | string | Required |
| attributedTo | string | Required |
| source | string | Required |
| minConfidence | number | Optional |
Full input and result schemas
{
"input": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"statement": {
"type": "string",
"description": "One statement or faithful paraphrase whose attributed speaker or source should be checked."
},
"attributedTo": {
"type": "string",
"description": "The speaker or source claimed to have made or explicitly endorsed the statement."
},
"source": {
"type": "string",
"description": "The supplied transcript or excerpt, including speaker labels or attribution context needed to check the claim."
},
"minConfidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"statement",
"attributedTo",
"source"
]
},
"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": [
"matched",
"mismatched",
"not_attributed",
"unclear"
]
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"probabilities": {
"type": "object",
"propertyNames": {
"type": "string",
"enum": [
"matched",
"mismatched",
"not_attributed",
"unclear"
]
},
"additionalProperties": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"required": [
"matched",
"mismatched",
"not_attributed",
"unclear"
]
}
},
"required": [
"model",
"usage",
"status",
"verdict",
"confidence",
"probabilities"
],
"additionalProperties": false
}
}What does a attribution-match 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 attribution-match.
{
"model": "demo-fixture",
"usage": {
"input_tokens": 0,
"output_tokens": 0
},
"status": "ready",
"verdict": "mismatched",
"confidence": 0.97,
"probabilities": {
"matched": 0.01,
"mismatched": 0.97,
"not_attributed": 0.01,
"unclear": 0.01
}
}
Input
Supply non-empty text for each required field. minConfidence defaults to 0.8 and accepts values from 0 to 1.
See shared options and behavior for client configuration, validation, and errors.
Result
| Verdict | Meaning |
|---|---|
matched |
The supplied source attributes the statement or its explicit endorsement to the claimed speaker or source. |
mismatched |
The supplied source clearly attributes the statement elsewhere, without the claimed speaker asserting or endorsing it. |
not_attributed |
The relevant statement appears in the supplied text but has no identified speaker or source. |
unclear |
Missing content, unresolved identity, contradictory attribution, or ambiguous wording prevents a supported attribution decision. |
The result has status: 'ready' when confidence meets minConfidence and the verdict is not unclear. Otherwise it has status: 'review'. An unclear verdict always requires review, even at high confidence or with a zero threshold. ready describes confidence in the annotation, not approval to act.
Decision boundaries
These cases document the intended decision policy. They are not human-adjudicated labels or live model evaluation results.
| Supplied situation | Intended verdict |
|---|---|
| Statement: the deadline is Friday. Claimed speaker: Mira. Source: "Mira: The deadline is Friday." | matched |
| Same statement and speaker. Source only attributes it to Oren; Mira says "Thanks." | mismatched |
| Same statement and speaker. Source: "Mira: Oren said the deadline is Friday" without endorsement. | mismatched |
| Same statement and speaker. Source: "Oren: The deadline is Friday. Mira: I agree, the deadline is Friday." | matched |
| Same statement and speaker. Source contains "The deadline is Friday" with no author or speaker information. | not_attributed |
| Same statement and speaker. Source only discusses the project budget. | unclear |
| Same statement and speaker. Source says "Speaker 2: The deadline is Friday" but never identifies Speaker 2. | unclear |
| Same statement and speaker. Source establishes that Speaker 2 is Mira and records Speaker 2 saying it. | matched |
Reuse
Use this when checking speaker labels in summaries or auditing source attribution in saved model responses. Supply one extracted statement and its claimed speaker per call; extraction and source authenticity remain separate steps. See the AI alignment research guide for evaluator validation.
Uses the shared choice helper and makes one logical Jev request. It does not call another recipe or perform application actions.
Limits
- Checks only the supplied attribution record. It does not authenticate a source or establish original authorship, truth, or copyright ownership.
- Missing statements and unresolved speaker identities require review; absence from an excerpt is not proof of false attribution.
- Nested quotation and endorsement are distinct. Include enough surrounding text to establish who is speaking.
How accurate is attribution-match?
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 attribution-match?
- Checks only the supplied attribution record. It does not authenticate a source or establish original authorship, truth, or copyright ownership.
- Missing statements and unresolved speaker identities require review; absence from an excerpt is not proof of false attribution.
- Nested quotation and endorsement are distinct. Include enough surrounding text to establish who is speaking.
Which recipes are related to attribution-match?
- causal-attribution: Use causal-attribution to classify the kind of cause in an explanation, rather than who made it.
- citation-match: Use citation-match to check which passages support a claim, rather than who made it.
- claim-stance: Use claim-stance to label a response's own position toward a claim, rather than verifying a named attribution.
- reference-resolve: Use reference-resolve to select the referent of an ambiguous expression from supplied candidates.