pub struct ECriterion { /* private fields */ }Expand description
An evaluation criterion applied to agent output.
Implementations§
Source§impl ECriterion
impl ECriterion
Sourcepub fn score(&self, output: &str, expected: &str) -> f64
pub fn score(&self, output: &str, expected: &str) -> f64
Synchronously score the output against expected (0.0–1.0). LLM-judge
criteria cannot run on the sync path and return 1.0 here — use
ECriterion::score_async for those.
Sourcepub async fn score_async(&self, output: &str, expected: &str) -> f64
pub async fn score_async(&self, output: &str, expected: &str) -> f64
Score the output, running an LLM judge if this is a judge criterion.
A judge criterion scores 1.0 when no violation is flagged, else 0.0.
Trait Implementations§
Source§impl BitOr<ECriterion> for EComposite
impl BitOr<ECriterion> for EComposite
Source§type Output = EComposite
type Output = EComposite
The resulting type after applying the
| operator.Source§impl BitOr for ECriterion
Compose two criteria with |.
impl BitOr for ECriterion
Compose two criteria with |.
Source§type Output = EComposite
type Output = EComposite
The resulting type after applying the
| operator.Source§impl Clone for ECriterion
impl Clone for ECriterion
Source§fn clone(&self) -> ECriterion
fn clone(&self) -> ECriterion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ECriterion
impl !RefUnwindSafe for ECriterion
impl Send for ECriterion
impl Sync for ECriterion
impl Unpin for ECriterion
impl !UnwindSafe for ECriterion
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