citeformer.verify¶
Verification module for citeformer.
Three checks compose into one VerificationReport:
Existence — do cited source_ids resolve to real sources? Trivially true under Tier 1 grammar enforcement; valuable on other backends.
Entailment — NLI-score each citation against its cited source.
Coverage — for uncited sentences, ask whether any source would entail them.
Public API:
Verifier— orchestrator. Instantiate with a threshold + optional preloadedNLIModel.NLIModel— the transformers-based NLI scorer (DeBERTa-v3-MNLI by default).Data shapes:
VerificationReport,CitationSupport,UncitedClaim.
GenerationResult.verify(sources=...) wraps Verifier with sensible
defaults and is the usual entry point for callers.