pub trait Judge: Send + Sync {
// Required method
fn score<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
baseline: &'life1 Record,
candidate: &'life2 Record,
) -> Pin<Box<dyn Future<Output = f64> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
User-supplied evaluator that scores a single (baseline, candidate)
response pair. Scores are in [0.0, 1.0] where 1.0 means “candidate
is at least as good as baseline.”
Required Methods§
Sourcefn score<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
baseline: &'life1 Record,
candidate: &'life2 Record,
) -> Pin<Box<dyn Future<Output = f64> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn score<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
baseline: &'life1 Record,
candidate: &'life2 Record,
) -> Pin<Box<dyn Future<Output = f64> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Return a score in [0.0, 1.0] for the given pair.