citeformer.verify.coverage

Uncited-but-entailed coverage check.

Walks every sentence in the generated text. For each sentence that has no citation, pairs it with every source and runs NLI. If any source’s entailment exceeds the threshold, we flag the sentence — under the AUTO policy this is how users catch claims that should have been cited; under REQUIRED this should be empty (the grammar guarantees every sentence has a cite).

Module Contents

Functions

find_uncited_but_entailed

Flag uncited sentences that any source would entail.

API

citeformer.verify.coverage.find_uncited_but_entailed(citations: list[citeformer.core.Citation], sentence_spans: list[citeformer.verify.sentences.SentenceSpan], sources: list[citeformer.core.Source], *, nli: citeformer.verify.nli.NLIModel, threshold: float = 0.5) list[citeformer.verify.report.UncitedClaim]

Flag uncited sentences that any source would entail.

Args: citations: Citations emitted in generation. sentence_spans: Sentence spans over the generated text. sources: All sources in scope. nli: The NLI backend. threshold: Entailment probability above which a sentence is flagged.

Returns: One UncitedClaim per flagged sentence, with its best-matching source as candidate_source_id. Sentences that have at least one citation, or that no source entails, are omitted.