pub struct BuiltinScorer;Expand description
The batteries-included scorer: evaluates the built-in Expectation assertions over
a run’s RunArtifacts, ignoring the world entirely (World = ()).
This is what removes the “implement a Scorer” step for the common case. Paired with the
Agent trait + run_suite, a host scores tool-call / parameter /
final-text assertions with zero scoring code of its own.
A malformed regex in a FinalTextMatches expectation
can’t surface a Result through the infallible Scorer::score signature, so it is reported as a
FAILED predicate whose label names the regex error (rather than panicking or being silently dropped).
Trait Implementations§
Source§impl Clone for BuiltinScorer
impl Clone for BuiltinScorer
Source§fn clone(&self) -> BuiltinScorer
fn clone(&self) -> BuiltinScorer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BuiltinScorer
Source§impl Debug for BuiltinScorer
impl Debug for BuiltinScorer
Source§impl Default for BuiltinScorer
impl Default for BuiltinScorer
Source§fn default() -> BuiltinScorer
fn default() -> BuiltinScorer
Returns the “default value” for a type. Read more
Source§impl Scorer for BuiltinScorer
impl Scorer for BuiltinScorer
Source§type World = ()
type World = ()
The world type to score against — must be the same world the paired
Harness::World produces (the runner enforces
Scorer<World = Harness::World>).Source§type Expect = Expectation
type Expect = Expectation
The host’s predicate type — matches the element type of
EvalCase::expect.Source§fn score(
&self,
expect: &Expectation,
artifacts: &RunArtifacts,
_world: &(),
) -> (String, bool)
fn score( &self, expect: &Expectation, artifacts: &RunArtifacts, _world: &(), ) -> (String, bool)
Auto Trait Implementations§
impl Freeze for BuiltinScorer
impl RefUnwindSafe for BuiltinScorer
impl Send for BuiltinScorer
impl Sync for BuiltinScorer
impl Unpin for BuiltinScorer
impl UnsafeUnpin for BuiltinScorer
impl UnwindSafe for BuiltinScorer
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