pub struct ProvenanceWeights {
pub weight_external: f64,
pub weight_user: f64,
pub weight_self: f64,
}Expand description
Evidence weight of one observation, by provenance class.
Corroboration adds the weight to α, contradiction adds it to β. The defaults say an independent source counts fully, the human counts nearly fully, and the agent restating itself counts for almost nothing — which is the point of the whole mechanism: repetition by a single source is coherence, not evidence.
Maps to the [graph.provenance] section of .recall-echo.toml.
Fields§
§weight_external: f64Weight of an Provenance::External observation. Default 1.0.
weight_user: f64Weight of a Provenance::User observation. Default 0.8.
weight_self: f64Weight of a Provenance::SelfGenerated observation. Default 0.05.
Implementations§
Source§impl ProvenanceWeights
impl ProvenanceWeights
Sourcepub fn uniform(weight: f64) -> Self
pub fn uniform(weight: f64) -> Self
Weight every class identically — the provenance-blind escape hatch.
uniform(DEFAULT_EVIDENCE_WEIGHT) reproduces pre-provenance behavior
exactly, which is what makes provenance weighting differentially
testable.
Sourcepub fn for_provenance(&self, provenance: Provenance) -> f64
pub fn for_provenance(&self, provenance: Provenance) -> f64
Evidence weight of one observation authored by provenance.
Trait Implementations§
Source§impl Clone for ProvenanceWeights
impl Clone for ProvenanceWeights
Source§fn clone(&self) -> ProvenanceWeights
fn clone(&self) -> ProvenanceWeights
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ProvenanceWeights
Source§impl Debug for ProvenanceWeights
impl Debug for ProvenanceWeights
Source§impl Default for ProvenanceWeights
impl Default for ProvenanceWeights
Source§impl<'de> Deserialize<'de> for ProvenanceWeightswhere
ProvenanceWeights: Default,
impl<'de> Deserialize<'de> for ProvenanceWeightswhere
ProvenanceWeights: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ProvenanceWeights
impl PartialEq for ProvenanceWeights
Source§impl Serialize for ProvenanceWeights
impl Serialize for ProvenanceWeights
impl StructuralPartialEq for ProvenanceWeights
Auto Trait Implementations§
impl Freeze for ProvenanceWeights
impl RefUnwindSafe for ProvenanceWeights
impl Send for ProvenanceWeights
impl Sync for ProvenanceWeights
impl Unpin for ProvenanceWeights
impl UnsafeUnpin for ProvenanceWeights
impl UnwindSafe for ProvenanceWeights
Blanket Implementations§
impl<T> AsyncFriendly for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().