pub struct PilotLearner { /* private fields */ }Expand description
Pilot learner that adjusts decisions based on feedback.
Uses collected feedback to:
- Adjust confidence thresholds for different intervention points
- Decide when to skip intervention (trust algorithm)
- Adjust the weight between algorithm and LLM scores
Implementations§
Source§impl PilotLearner
impl PilotLearner
Sourcepub fn new(store: Arc<FeedbackStore>) -> Self
pub fn new(store: Arc<FeedbackStore>) -> Self
Create a new learner with the given feedback store.
Sourcepub fn with_config(store: Arc<FeedbackStore>, config: LearnerConfig) -> Self
pub fn with_config(store: Arc<FeedbackStore>, config: LearnerConfig) -> Self
Create a learner with custom configuration.
Sourcepub fn get_adjustment(
&self,
intervention_point: InterventionPoint,
query_hash: u64,
path_hash: u64,
) -> DecisionAdjustment
pub fn get_adjustment( &self, intervention_point: InterventionPoint, query_hash: u64, path_hash: u64, ) -> DecisionAdjustment
Get decision adjustment for a given context.
Sourcepub fn store(&self) -> &FeedbackStore
pub fn store(&self) -> &FeedbackStore
Get the feedback store.
Sourcepub fn overall_accuracy(&self) -> f64
pub fn overall_accuracy(&self) -> f64
Get overall accuracy.
Sourcepub fn has_sufficient_data(&self) -> bool
pub fn has_sufficient_data(&self) -> bool
Check if enough feedback has been collected.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PilotLearner
impl RefUnwindSafe for PilotLearner
impl Send for PilotLearner
impl Sync for PilotLearner
impl Unpin for PilotLearner
impl UnsafeUnpin for PilotLearner
impl UnwindSafe for PilotLearner
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> 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