Skip to content

Docs

Cookbook: Double-Checking Citations

Catch wrong and hallucinated citations against RFC 7519 with a string match plus one Choice question: four accurate citations verified at 0.93 or more and all four planted failures caught.
Format
Docs
Reading time
2 min
Published by
TypeSafe AI
Last verified
Sep 2026

Highlights

  • Eight citations across RFC 7519's 45 sections: four verified at confidence 0.93+, one fabricated, one contradicted, two unsupported.
  • An exact string match catches missing quotes with no model call, while the contradicted example still scored 0.99.
  • Unsupported citations at 0.27 and 0.56 fell below the 0.8 auto-accept gate and went to a human.

Quickstart

python
QUESTIONS = {
    "relation": Choice(
        instructions="How does the section relate to the claim?",
        criteria={
            "supports": "The section states the claim or directly implies it is true",
            "contradicts": "The section states the opposite of the claim",
            "says_nothing": "The section does not address what the claim asserts",
        },
    ),
}
response = client.system_one(
    state={"claim": claim, "section": section}, questions=QUESTIONS, model="jev-1.12"
)
# no quote in the source -> "fabricated"; AUTO_ACCEPT = 0.8 gates human review

Watch out

The string match is exact after normalization, so truncated or lightly reworded quotes come back as fabricated.

Questions about this entry

Short answers drawn from the linked project or page.

Reactions & coverage

Posts, threads, and videos about this entry from around the web.

X: Agent Handoff Gate: agents verify what they hand off

X: Jev as an LLM guardrail inside Agentgateway

X: Vercel's fx safety reviewer, measured at 18× faster

Reddit: Early experiments wiring Jev into Pi as a safety layer and model router.

From the Jev guides

Original write-ups on what this entry is for.

From the Jev AI model community

Posts from builders shipping with Jev right now.

Follow @typesafeai