citeformer.verify

Verification module for citeformer.

Three checks compose into one VerificationReport:

  1. Existence — do cited source_ids resolve to real sources? Trivially true under Tier 1 grammar enforcement; valuable on other backends.

  2. Entailment — NLI-score each citation against its cited source.

  3. Coverage — for uncited sentences, ask whether any source would entail them.

Public API:

  • Verifier — orchestrator. Instantiate with a threshold + optional preloaded NLIModel.

  • 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.

Submodules