Skip to content

nhra_gt.domain.evidence

Evidence Types and Reliability Schemas.

Defines the structure of evidence entries used in the registry.

Classes

Evidence dataclass

Represents a piece of evidence supporting or refuting a claim.

Source code in src/nhra_gt/domain/evidence.py
@dataclass(frozen=True)
class Evidence:
    """Represents a piece of evidence supporting or refuting a claim."""

    source: str
    content: str
    type: EvidenceType
    strength: float  # 0.0 to 1.0
    sentiment: float  # -1.0 (refutes) to 1.0 (supports)

ConstraintEvidence dataclass

Enhanced evidence structure with dual confidence scoring.

Source code in src/nhra_gt/domain/evidence.py
@dataclass(frozen=True)
class ConstraintEvidence:
    """Enhanced evidence structure with dual confidence scoring."""

    source: str
    citation: str
    value: float
    unit: str
    confidence_positive: float  # Supporting confidence (0..1)
    confidence_negative: float  # Contradicting confidence (0..1)
    uncertainty: float  # Residual uncertainty (0..1)
    tags: tuple[str, ...] = ()