pub struct E;Expand description
The E namespace — static factory methods for evaluation criteria.
Implementations§
Source§impl E
impl E
Sourcepub fn response_match() -> EvalCriterion
pub fn response_match() -> EvalCriterion
Exact response match criterion.
Sourcepub fn contains_match() -> EvalCriterion
pub fn contains_match() -> EvalCriterion
Substring containment criterion — scores 1.0 if output contains expected.
Sourcepub fn safety(llm: Arc<dyn BaseLlm>) -> EvalCriterion
pub fn safety(llm: Arc<dyn BaseLlm>) -> EvalCriterion
Safety criterion — LLM judge; scores 1.0 when the output is safe.
Mirrors ADK’s safety evaluation, run locally against the judge llm.
Sourcepub fn semantic_match(llm: Arc<dyn BaseLlm>) -> EvalCriterion
pub fn semantic_match(llm: Arc<dyn BaseLlm>) -> EvalCriterion
Semantic match criterion — LLM judge comparing the output to the expected
reference answer; scores 1.0 when they convey the same answer.
Mirrors ADK’s final_response_match_v2 (LLM-as-judge with a reference).
Sourcepub fn hallucination(llm: Arc<dyn BaseLlm>) -> EvalCriterion
pub fn hallucination(llm: Arc<dyn BaseLlm>) -> EvalCriterion
Hallucination criterion — LLM judge; scores 1.0 when the output is free
of fabricated claims relative to the expected reference.
Sourcepub fn trajectory() -> EvalCriterion
pub fn trajectory() -> EvalCriterion
Tool-trajectory criterion (EXACT match) — mirrors ADK’s
TrajectoryEvaluator. Both output and expected are parsed as tool-call
sequences (a JSON array of names/objects, or a comma-separated list), so an
eval harness can score the agent’s captured tool calls against an expected
sequence. Scores 1.0 on an exact match, else 0.0.
Sourcepub fn trajectory_in_order() -> EvalCriterion
pub fn trajectory_in_order() -> EvalCriterion
Tool-trajectory criterion requiring the expected calls in order
(extras allowed in between) — ADK’s IN_ORDER mode.
Sourcepub fn trajectory_any_order() -> EvalCriterion
pub fn trajectory_any_order() -> EvalCriterion
Tool-trajectory criterion requiring the expected calls in any order
(extras allowed) — ADK’s ANY_ORDER mode.
Sourcepub fn custom(
name: impl Into<String>,
f: impl Fn(&str, &str) -> f64 + Send + Sync + 'static,
) -> EvalCriterion
pub fn custom( name: impl Into<String>, f: impl Fn(&str, &str) -> f64 + Send + Sync + 'static, ) -> EvalCriterion
Custom evaluation criterion from a scoring function.
Auto Trait Implementations§
impl Freeze for E
impl RefUnwindSafe for E
impl Send for E
impl Sync for E
impl Unpin for E
impl UnwindSafe for E
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<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].