pub struct FactualityAnalysisResult {
pub factuality_score: Option<f32>,
pub claim_like_sentences: usize,
pub uncertainty_indicator_hits: usize,
pub uncertainty_density: Option<f32>,
pub confidence_scores: Vec<f32>,
pub knowledge_gaps: Vec<String>,
}Fields§
§factuality_score: Option<f32>How factually correct the response is.
Always None: deciding that requires checking claims against a
knowledge base, and this crate ships none (fact_databases names
“wikipedia”/“wikidata” but nothing queries them). It used to be a
two-valued ladder – 0.9 if the response contained the literal
substring “fact”, else 0.7, docked 0.05 per uncertainty word – which
measured nothing about the response’s actual factual accuracy.
claim_like_sentences: usizeNumber of claim-like sentences found: .-separated segments longer
than 10 characters. Nothing verifies them, which is why this is no
longer called verified_claims.
uncertainty_indicator_hits: usizeTotal occurrences of an uncertainty indicator
(“might”/“possibly”/“unclear”/“uncertain”) in the response. Previously
called unverified_claims, which it never counted.
uncertainty_density: Option<f32>Fraction of Self::claim_like_sentences that contain at least one
uncertainty indicator – a real, reproducible property of the text
(None when the response has no claim-like sentence to divide by).
This is the honest signal that the old factuality_score was dressing
up as fact-checking.
confidence_scores: Vec<f32>§knowledge_gaps: Vec<String>Trait Implementations§
Source§impl Clone for FactualityAnalysisResult
impl Clone for FactualityAnalysisResult
Source§fn clone(&self) -> FactualityAnalysisResult
fn clone(&self) -> FactualityAnalysisResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FactualityAnalysisResult
impl Debug for FactualityAnalysisResult
Source§impl<'de> Deserialize<'de> for FactualityAnalysisResult
impl<'de> Deserialize<'de> for FactualityAnalysisResult
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>,
Auto Trait Implementations§
impl Freeze for FactualityAnalysisResult
impl RefUnwindSafe for FactualityAnalysisResult
impl Send for FactualityAnalysisResult
impl Sync for FactualityAnalysisResult
impl Unpin for FactualityAnalysisResult
impl UnsafeUnpin for FactualityAnalysisResult
impl UnwindSafe for FactualityAnalysisResult
Blanket Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ConfigSerializable for Twhere
T: Serialize + for<'de> Deserialize<'de>,
impl<T> ConfigSerializable for Twhere
T: Serialize + for<'de> Deserialize<'de>,
Source§fn save_to_file(&self, path: &Path) -> Result<(), TrustformersError>
fn save_to_file(&self, path: &Path) -> Result<(), TrustformersError>
Source§fn load_from_file(path: &Path) -> Result<Self, TrustformersError>where
Self: Sized,
fn load_from_file(path: &Path) -> Result<Self, TrustformersError>where
Self: Sized,
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> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.