pub struct SemanticSupportRule { /* private fields */ }Expand description
Semantic-support rule for one invocation: the evidence bodies (ref id → excerpt text) a support judge reads to decide whether a claim’s cited evidence actually supports what the claim says, and the minimum confidence (percent, 0–100) a verdict must reach.
This is the second gate behind EvidenceGroundingRule: grounding
checks that the citation exists; semantic support checks that the
citation holds. The judgment itself comes from a wired
EvidenceSupportJudgePort implementation — the rule only carries
what the judge needs and the deterministic acceptance threshold, so
the decision stays a rule even when the signal comes from a model.
Implementations§
Source§impl SemanticSupportRule
impl SemanticSupportRule
Sourcepub fn new(
min_confidence: u8,
bodies: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>,
) -> Result<Self, DomainError>
pub fn new( min_confidence: u8, bodies: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>, ) -> Result<Self, DomainError>
Build a semantic-support rule. bodies must be non-empty: a
support gate with nothing to read is a configuration error, not
a stricter gate (mirroring the grounding rule’s posture on an
empty pack).
Sourcepub const fn min_confidence(&self) -> u8
pub const fn min_confidence(&self) -> u8
Minimum confidence (percent, 0–100) a support verdict must reach for the claim to count as supported.
Trait Implementations§
Source§impl Clone for SemanticSupportRule
impl Clone for SemanticSupportRule
Source§fn clone(&self) -> SemanticSupportRule
fn clone(&self) -> SemanticSupportRule
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more