JEV FOR CLAIM VERIFICATION

Jev Citation Verifier

Paste a claim, the quote you are relying on, and the surrounding source text. Code first verifies that the quote really exists. Jev then judges whether the evidence supports the claim.

01CodeExact quote exists
02JevSemantic relationship
03PolicyAuto or human review

01 / LIVE VERIFIER

Does this source actually support this claim?

The supported example is already filled in. Click Verify citation without editing anything. The quote check runs in your browser; only a verified quote reaches the real TypeSafe Jev model.

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 exact evidence you intend to cite.

248 / 5,000

The surrounding source text the quote came from.

Try the important failure caseDelete one word from the Quote, then verify again.

Exact 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 the exact string locally before Jev is called.

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
Exact quote checkDeterministic code
Jev relationship judgmentBounded Choice
ProbabilityActual returned distribution
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.

03 / WHY VERIFY THE QUOTE FIRST

Use each tool for the job it does well

DETERMINISTIC CODE

Exact and repeatable

  • Exact string matching
  • 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

04 / HOW TO READ THE RESULT

Relation, probability, 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.

The selected relation comes from Jev. Its actual probability drives the local demo policy: at or above the chosen threshold the status is Auto; otherwise it is Human Review. A missing distribution always goes to Human Review. Moving the threshold never calls the model again.

05 / REAL-WORLD PATTERN

The full system can start much earlier

The public Paper Trellis Citation Verifier demonstrates a broader workflow: parse a manuscript, match references, locate source text, verify proposed quotes in code, use Jev for semantic support, and leave the final decision to a person. This page demonstrates only the core verification layer after the evidence has been supplied.

This demo doesAccept a claim, exact quote, and source excerptCheck the quote locallyAsk Jev for one relationship
This demo does notSearch PubMed or CrossrefResolve DOIs or extract PDFsAccept manuscript uploadsPerform academic peer review

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 review threshold afterward.

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

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

const normalizeLines = (text: string) => text.replace(/\r\n?/g, '\n');

export async function verifyCitation(
  claim: string,
  quote: string,
  source: string,
) {
  const quoteFound = normalizeLines(source).includes(normalizeLines(quote));

  if (!quoteFound) throw new Error('Exact quote not found');

  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 topProbability = answer.probabilities?.[answer.choice];
  const reviewThreshold = 0.8; // Your application policy, not Jev's.
  const status = topProbability !== undefined && topProbability >= reviewThreshold
    ? 'AUTO'
    : 'HUMAN REVIEW';

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

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

07 / LIMITATIONS

What this verification cannot prove

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

08 / SOURCES

Architecture checked against working references

Verified 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? Jev Browser Agent