pub struct PairwiseScorer {
pub model: Arc<dyn JudgeModel>,
pub criteria_label: String,
}Fields§
§model: Arc<dyn JudgeModel>§criteria_label: StringImplementations§
Trait Implementations§
Source§impl AsyncScorer for PairwiseScorer
impl AsyncScorer for PairwiseScorer
Source§fn score<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expected: &'life1 Value,
actual: &'life2 Value,
) -> Pin<Box<dyn Future<Output = ScorerOutcome> + 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,
expected: &'life1 Value,
actual: &'life2 Value,
) -> Pin<Box<dyn Future<Output = ScorerOutcome> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Treat expected as Response A and actual as Response B and
run a pairwise judgment. The criterion label doubles as the
task prompt context — sufficient for cases where the comparison
criterion is fully described by criteria_label. Callers
needing a richer prompt should use compare() directly.
Score mapping:
- A wins → score 1.0, passed=true
- tie → score 0.5, passed=true
- B wins → score 0.0, passed=false
Auto Trait Implementations§
impl Freeze for PairwiseScorer
impl !RefUnwindSafe for PairwiseScorer
impl Send for PairwiseScorer
impl Sync for PairwiseScorer
impl Unpin for PairwiseScorer
impl UnsafeUnpin for PairwiseScorer
impl !UnwindSafe for PairwiseScorer
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