pub trait FitnessEvaluator: Send + Sync {
// Required method
fn evaluate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
response: &'life1 str,
context: &'life2 EvaluationContext,
) -> Pin<Box<dyn Future<Output = FitnessReport> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Trait for fitness evaluators
Implementations can use LLM-as-judge, heuristics, or other methods to evaluate response quality.
Required Methods§
Sourcefn evaluate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
response: &'life1 str,
context: &'life2 EvaluationContext,
) -> Pin<Box<dyn Future<Output = FitnessReport> + 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,
response: &'life1 str,
context: &'life2 EvaluationContext,
) -> Pin<Box<dyn Future<Output = FitnessReport> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Evaluate agent response and return fitness report