pub struct Plan {
pub stage: Stage,
pub rows: Vec<Hit>,
pub lexical: Option<Lex>,
pub passed: Vec<Hit>,
pub threshold: f32,
}Expand description
The outcome of the decision cascade for one prompt.
Fields§
§stage: StageWhich stage produced the decision.
rows: Vec<Hit>The winning stage’s ranking, for display: the reranked list when the
cross-encoder fired, otherwise the stage-1 hits. (For the lexical fast-path
these are still the stage-1 hits; the winner is in Plan::lexical.)
lexical: Option<Lex>The lexical fast-path winner, if one fired.
passed: Vec<Hit>Hits that clear the winning stage’s gate, in rank order, before
deny / dedup / slash-removal / cap. For the lexical stage this is the single
dominant winner (its stage-1 Hit, pulled from rows).
threshold: f32Display threshold for the winning stage (min_similarity / rerank_min /
lexical_min).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Plan
impl RefUnwindSafe for Plan
impl Send for Plan
impl Sync for Plan
impl Unpin for Plan
impl UnsafeUnpin for Plan
impl UnwindSafe for Plan
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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