pub trait Evaluator: Send + Sync {
// Required method
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;
}Expand description
Trait for evaluating agent invocations against expected results.
Mirrors ADK-Python’s Evaluator abstract class.
Required Methods§
Sourcefn 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.
§Arguments
actual— The agent’s actual invocations.expected— Optional expected (golden) invocations for comparison.
§Returns
An EvalResult containing per-metric and overall scores.