pub struct HallucinationEvaluator { /* private fields */ }Expand description
Evaluates whether agent responses are grounded (not hallucinated).
Uses an LLM-as-judge to assess whether the model’s claims are supported by the conversation context, tool outputs, and provided information.
Implementations§
Source§impl HallucinationEvaluator
impl HallucinationEvaluator
Sourcepub fn with_intermediate(self, eval: bool) -> Self
pub fn with_intermediate(self, eval: bool) -> Self
Set whether to evaluate intermediate responses in addition to the final response.
Sourcepub fn with_judge_model(self, model: impl Into<String>) -> Self
pub fn with_judge_model(self, model: impl Into<String>) -> Self
Set an override judge model name.
Trait Implementations§
Source§impl Default for HallucinationEvaluator
impl Default for HallucinationEvaluator
Source§impl Evaluator for HallucinationEvaluator
impl Evaluator for HallucinationEvaluator
Source§fn evaluate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
actual: &'life1 [Invocation],
_expected: Option<&'life2 [Invocation]>,
) -> Pin<Box<dyn Future<Output = Result<EvalResult, EvalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn evaluate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
actual: &'life1 [Invocation],
_expected: Option<&'life2 [Invocation]>,
) -> Pin<Box<dyn Future<Output = Result<EvalResult, EvalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Evaluate agent invocations. Read more
Auto Trait Implementations§
impl Freeze for HallucinationEvaluator
impl !RefUnwindSafe for HallucinationEvaluator
impl Send for HallucinationEvaluator
impl Sync for HallucinationEvaluator
impl Unpin for HallucinationEvaluator
impl !UnwindSafe for HallucinationEvaluator
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