Skip to main content

ScoreWeights

Struct ScoreWeights 

Source
pub struct ScoreWeights {
    pub tool_accuracy: f32,
    pub loop_avoidance: f32,
    pub task_completion: f32,
}
Expand description

Weights used to combine per-candidate metrics into one composite score.

Each weight should be non-negative; the service normalizes the weighted sum by the total weight, so the three values do not need to sum to 1.0.

Fields§

§tool_accuracy: f32

Weight applied to the average tool-call match score (AST-style, partial credit) across all tasks in the suite.

§loop_avoidance: f32

Weight applied to 1 - (loop/stagnation trigger rate).

§task_completion: f32

Weight applied to the fraction of tasks the agent completed (produced a final answer instead of erroring out).

Implementations§

Source§

impl ScoreWeights

Source

pub fn composite_of( &self, tool_accuracy: f64, loop_avoidance: Option<f64>, task_completion: f64, ) -> f64

Weighted mean of the three axes, renormalized over those that were measured. An unmeasured loop-avoidance axis claims no weight rather than scoring 0.0 or an imputed 1.0.

The single definition of the composite, because the number is computed in two places that must not drift: once per arm from its own runs, and again when two arms are compared over the axes they share. A second copy of this arithmetic is how a comparison starts measuring the scale instead of the pipeline.

Trait Implementations§

Source§

impl Clone for ScoreWeights

Source§

fn clone(&self) -> ScoreWeights

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ScoreWeights

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ScoreWeights

Source§

fn default() -> Self

Prioritizes tool-call correctness over loop-avoidance and completion, reflecting that an agentic backend which mis-calls tools is unusable regardless of how it scores elsewhere.

Source§

impl<'de> Deserialize<'de> for ScoreWeights

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ScoreWeights

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,