pub struct StageClassifier { /* private fields */ }Expand description
Signal-only stage-router classifier: scores each turn onto the capable/efficient tiers from tool-result signals, via the configured picker mode and the confidence the scorer must reach before it acts on the signal alone.
With with_handoff_notes it also splices a note
into the request explaining why the signals sent the turn where they did.
Implementations§
Source§impl StageClassifier
impl StageClassifier
Sourcepub fn new(
targets: StageTargets,
mode: PickerMode,
confidence_threshold: f64,
) -> Self
pub fn new( targets: StageTargets, mode: PickerMode, confidence_threshold: f64, ) -> Self
Scores onto targets, with the given default tier (mode) and
confidence_threshold.
Sourcepub fn with_handoff_notes(self, config: HandoffNoteConfig) -> Self
pub fn with_handoff_notes(self, config: HandoffNoteConfig) -> Self
Hand the routed model a note on a signal-driven escalation, and on a hand-back to the efficient tier when a de-escalation note is configured.
Trait Implementations§
Source§impl Classifier<State> for StageClassifier
impl Classifier<State> for StageClassifier
Source§fn routing_tier(&self, selected_model: &str) -> Option<&'static str>
fn routing_tier(&self, selected_model: &str) -> Option<&'static str>
Stable tier represented by
selected_model, when this classifier defines one.Source§fn score<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
state: &'life1 mut State,
request: &'life2 mut Request,
_driver: Option<&'life3 Driver>,
) -> Pin<Box<dyn Future<Output = Result<(Classification, Option<Response>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn score<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
state: &'life1 mut State,
request: &'life2 mut Request,
_driver: Option<&'life3 Driver>,
) -> Pin<Box<dyn Future<Output = Result<(Classification, Option<Response>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Score the classifier’s targets given the current state and request. Read more
Auto Trait Implementations§
impl Freeze for StageClassifier
impl RefUnwindSafe for StageClassifier
impl Send for StageClassifier
impl Sync for StageClassifier
impl Unpin for StageClassifier
impl UnsafeUnpin for StageClassifier
impl UnwindSafe for StageClassifier
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