pub struct HallucinationCheck {
pub ai_output: String,
pub hallucinations: Vec<Hallucination>,
pub verified_claims: Vec<GroundedClaim>,
pub hallucination_score: f64,
pub safe_to_use: bool,
}Expand description
Result of checking AI output for hallucinations.
Fields§
§ai_output: StringThe AI output that was checked.
hallucinations: Vec<Hallucination>Detected hallucinations.
verified_claims: Vec<GroundedClaim>Claims that were verified.
hallucination_score: f64Overall hallucination score (0 = none, 1 = all hallucinated).
safe_to_use: boolIs this output safe to use?
Trait Implementations§
Source§impl Clone for HallucinationCheck
impl Clone for HallucinationCheck
Source§fn clone(&self) -> HallucinationCheck
fn clone(&self) -> HallucinationCheck
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HallucinationCheck
impl Debug for HallucinationCheck
Source§impl<'de> Deserialize<'de> for HallucinationCheck
impl<'de> Deserialize<'de> for HallucinationCheck
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HallucinationCheck
impl RefUnwindSafe for HallucinationCheck
impl Send for HallucinationCheck
impl Sync for HallucinationCheck
impl Unpin for HallucinationCheck
impl UnsafeUnpin for HallucinationCheck
impl UnwindSafe for HallucinationCheck
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
Mutably borrows from an owned value. Read more