Skip to content

Define and benchmark evidence aggregation for chunked transformer inference #74

Description

@adaamko

Problem

TransformerDetector._predict_chunked scores each context chunk independently and combines answer-token hallucination probabilities with max(). A token is therefore considered supported only if every chunk considers it supported.

For RAG evidence, support commonly has union semantics: evidence in any retrieved chunk may be sufficient. A chunk that lacks evidence can currently outweigh another chunk that contains it, potentially creating false positives as more context is added. This is related to the behavior reported in #11.

What to determine

  • Add controlled cases where evidence occurs in exactly one chunk, every chunk, or no chunk.
  • Compare current maximum-hallucination aggregation with minimum-hallucination / maximum-support and any explicitly justified alternative.
  • Measure span precision, recall, and calibration on a labeled long-context slice, including evidence near chunk boundaries.
  • Choose and document the intended evidence semantics. Treat any behavior change as release-noted.

Acceptance

  • Network-free regression tests cover controlled cases through both tokens and spans output.
  • A reproducible comparison table supports the selected aggregation.
  • Public documentation explains context chunking and evidence aggregation.
  • The changelog records any behavior change.

This is maintainer-led correctness work, not an open implementation task until the intended semantics are selected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    correctnessCorrectness or methodology fixdesignDesign discussion or RFC before implementation

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions