JEV FOR CLAIM VERIFICATION

Jev Citation Verifier

Paste a claim, quote, and source text to check whether the source supports the claim.

01 / LIVE VERIFIER

Does this source actually support this claim?

Edit the claim, quote, and source if you wish, then check whether the source supports the claim.

Try an example
READY-TO-RUN EXAMPLES

Switching an example changes the fields but never runs Jev.

Claim and source evidence
INPUT DOCUMENT
69 / 1,000

The statement you want to verify.

84 / 1,500

The evidence you intend to cite. Whitespace and curly quotes are normalized for matching.

248 / 5,000

The surrounding source text the quote came from.

Try a quote that fails the source check
Try the important failure caseDelete one word from the Quote, then verify again.

Normalized quote check first · At most one Jev request

Free to try · Usage limits apply
VERIFICATIONCode → Jev → Policy
Ready to verify a citation.
PHASE 1 · QUOTE CHECKWaiting for verification

Application code checks a substring after normalizing whitespace and curly quotes. It does not allow paraphrases.

Your verification will appear here.

Run the populated example without changing anything.

02 / HOW IT WORKS

One workflow, three different responsibilities

Claim + Quote + SourceUser-supplied evidence
Normalized quote checkDeterministic code
Jev relationship judgmentBounded Choice
ProbabilityActual returned distribution
Provider confidenceFor the relation question
Application review policyAdjustable demo threshold
Auto / Human ReviewApplication status

“Supports” is not the same as “true.” Jev judges the relationship between the supplied claim and supplied evidence. A source can support a claim and still be unreliable, outdated, or incomplete.

Advanced

04 / HOW TO READ THE RESULT

Relation, probabilities, confidence, then review status

SUPPORTSEvidence directly supports or clearly entails the claim.
CONTRADICTSEvidence states or clearly implies the opposite.
INSUFFICIENTRelevant evidence does not establish the claim.
UNRELATEDEvidence does not address the claim.

Jev returns the selected relation, its probability distribution, and a separate confidence value for this question. The probabilities describe the four relations. Only valid provider confidence drives this demo’s local review policy: at or above your chosen threshold, the verdict is marked Auto; otherwise it needs Human Review. Missing or invalid confidence also requires Human Review, even if a relation has a high probability. This threshold is an application choice, not a TypeSafe-recommended cutoff. Moving it never calls the model again.

Implementation

03 / WHY VERIFY THE QUOTE FIRST

Use each tool for the job it does well

DETERMINISTIC CODE

Exact and repeatable

  • Substring matching after whitespace and curly-quote normalization
  • Required-field validation
  • Input-size limits
TYPE SAFE JEV

Semantic judgment

  • Support vs contradiction
  • Insufficient evidence
  • Meaning in source context
APPLICATION / HUMAN

Acceptance and action

  • Set review policy
  • Assess source quality
  • Decide whether to publish

05 / REAL-WORLD PATTERN

The full system can start much earlier

The public Paper Trellis Citation Verifier demonstrates a broader workflow. It imports manuscripts and matches citation markers to references, resolves DOI, PMID, arXiv, or title against PubMed, OpenAlex, and Crossref, then tries full text or a PDF before falling back to an abstract. Claude can transcribe references and propose quotes; code checks quote location and numeric consistency; Jev judges support; a person makes the final call. This demo starts after a user has supplied the evidence.

This demo doesAccept a claim, quote, and user-supplied source excerptCheck a normalized quote substring locallyAsk Jev for one relation and apply a confidence-based local review policy
This demo does notResolve references or acquire source documentsDistinguish abstract from full text or parse PDFsValidate numeric claims or source provenance beyond the supplied textAccept manuscripts or replace human review

Paper Trellis uses bring-your-own provider keys stored in the browser and a same-origin TypeSafe proxy. This demo uses Jev Playground’s server-side key through its public evaluation API; it does not request your provider key or read your mailbox or manuscripts.

Attributed example: Paper Trellis Citation Verifier on GitHub (opens in a new tab).

06 / IMPLEMENTATION

The same two-stage check in TypeScript

This original example uses the same Vercel AI Gateway integration as Jev Playground. It stops before the model when the quote is absent, asks one Choice question when it is present, and applies a local confidence threshold afterward. The distribution remains visible independently of that policy.

citation-verifier.ts
import { createGateway, experimental_evaluate as evaluate } from 'ai';

const gateway = createGateway({
  apiKey: process.env.AI_GATEWAY_API_KEY,
});

const normalizeQuote = (text: string) => text
  .replace(/[“”]/g, '"')
  .replace(/[‘’]/g, "'")
  .replace(/\s+/g, ' ')
  .trim();

export async function verifyCitation(
  claim: string,
  quote: string,
  source: string,
) {
  const normalizedQuote = normalizeQuote(quote);
  const quoteFound = normalizedQuote.length > 0 &&
    normalizeQuote(source).includes(normalizedQuote);

  if (!quoteFound) throw new Error('Quote not found after typography normalization');

  const result = await evaluate({
    model: gateway.evaluationModel('typesafe-ai/jev'),
    state: `CLAIM:
${claim}

VERIFIED QUOTE:
${quote}

SOURCE:
${source}`,
    questions: {
      relation: {
        type: 'choice',
        instructions: 'How does the verified evidence relate to the claim?',
        criteria: {
          SUPPORTS: 'The evidence directly supports or clearly entails the claim.',
          CONTRADICTS: 'The evidence states or clearly implies the opposite.',
          INSUFFICIENT: 'Relevant, but not enough to establish the claim.',
          UNRELATED: 'The evidence does not address the claim.',
        },
      },
    },
    maxRetries: 0,
    abortSignal: AbortSignal.timeout(30_000),
    providerOptions: { gateway: { zeroDataRetention: true } },
  });

  const answer = result.answers.relation;
  const confidence = result.providerMetadata?.typesafe?.confidence?.relation;
  const reviewThreshold = 0.8; // Your application policy, not Jev's.
  const usableConfidence = typeof confidence === 'number' &&
    Number.isFinite(confidence) && confidence >= 0 && confidence <= 1
    ? confidence : null;
  const status = usableConfidence !== null && usableConfidence >= reviewThreshold
    ? 'AUTO'
    : 'HUMAN REVIEW';

  return { relation: answer.choice, probabilities: answer.probabilities, confidence: usableConfidence, status };
}

For request contracts, production error handling, and server-side credentials, continue to the Jev API guide.

A supplied quote and source are checked here; reference resolution and full-source verification still require a separate workflow.

Limits & privacy

07 / LIMITATIONS

What this verification cannot prove

  • The source itself is trustworthy.
  • The source is current.
  • The claim is universally true.
  • The quote is interpreted correctly across the full document.
  • An academic citation meets a journal’s standards.

The demo evaluates only the relationship between the supplied claim and supplied evidence.

Sources

08 / SOURCES

Architecture checked against working references

Source code and documentation checked on .

Jev Playground is independent and is not affiliated with TypeSafe AI or the referenced community projects.

KEEP LEARNING

Understand the model, then inspect a second real workflow.

What is Jev? How to use Jev Jev Browser Agent