pub struct LLMEvaluation {
pub relevance: DimensionScore,
pub faithfulness: DimensionScore,
pub completeness: DimensionScore,
pub coherence: DimensionScore,
pub groundedness: DimensionScore,
pub overall_score: f32,
pub summary: String,
}Expand description
Parsed LLM evaluation result
Fields§
§relevance: DimensionScoreRelevance score and reasoning
faithfulness: DimensionScoreFaithfulness score and reasoning
completeness: DimensionScoreCompleteness score and reasoning
coherence: DimensionScoreCoherence score and reasoning
groundedness: DimensionScoreGroundedness score and reasoning
overall_score: f32Overall average score
summary: StringSummary assessment
Implementations§
Source§impl LLMEvaluation
impl LLMEvaluation
Sourcepub fn from_json(json_str: &str) -> Result<Self>
pub fn from_json(json_str: &str) -> Result<Self>
Parse LLM response JSON into structured evaluation
Sourcepub fn passes_threshold(&self, min_score: f32) -> bool
pub fn passes_threshold(&self, min_score: f32) -> bool
Check if the evaluation passes a minimum quality threshold
Sourcepub fn weakest_dimension(&self) -> (&str, &DimensionScore)
pub fn weakest_dimension(&self) -> (&str, &DimensionScore)
Get the dimension with the lowest score
Trait Implementations§
Source§impl Clone for LLMEvaluation
impl Clone for LLMEvaluation
Source§fn clone(&self) -> LLMEvaluation
fn clone(&self) -> LLMEvaluation
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 LLMEvaluation
impl Debug for LLMEvaluation
Source§impl<'de> Deserialize<'de> for LLMEvaluation
impl<'de> Deserialize<'de> for LLMEvaluation
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 LLMEvaluation
impl RefUnwindSafe for LLMEvaluation
impl Send for LLMEvaluation
impl Sync for LLMEvaluation
impl Unpin for LLMEvaluation
impl UnsafeUnpin for LLMEvaluation
impl UnwindSafe for LLMEvaluation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 more