pub struct ToolFeedback {
pub tool_success_rates: HashMap<String, f64>,
}Expand description
Historical tool success rates computed from the trajectory store.
Pass to rank_with_feedback() to bias scoring based on past outcomes.
Fields§
§tool_success_rates: HashMap<String, f64>Per-tool success rate (0.0–1.0). Tools not in the map are assumed 0.5 (no data).
Implementations§
Source§impl ToolFeedback
impl ToolFeedback
Sourcepub fn from_trajectories(trajectories: &[Trajectory]) -> ToolFeedback
pub fn from_trajectories(trajectories: &[Trajectory]) -> ToolFeedback
Compute tool feedback from a trajectory store.
Sourcepub fn rate(&self, tool: &str) -> f64
pub fn rate(&self, tool: &str) -> f64
Get the success rate for a tool, defaulting to 0.5 (no data).
Sourcepub fn proposal_tool_confidence(&self, proposal: &ActionProposal) -> f64
pub fn proposal_tool_confidence(&self, proposal: &ActionProposal) -> f64
Average success rate across all tools in a proposal.
Trait Implementations§
Source§impl Clone for ToolFeedback
impl Clone for ToolFeedback
Source§fn clone(&self) -> ToolFeedback
fn clone(&self) -> ToolFeedback
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 moreSource§impl Debug for ToolFeedback
impl Debug for ToolFeedback
Source§impl Default for ToolFeedback
impl Default for ToolFeedback
Source§fn default() -> ToolFeedback
fn default() -> ToolFeedback
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ToolFeedback
impl RefUnwindSafe for ToolFeedback
impl Send for ToolFeedback
impl Sync for ToolFeedback
impl Unpin for ToolFeedback
impl UnsafeUnpin for ToolFeedback
impl UnwindSafe for ToolFeedback
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more