pub struct EvidenceBudget {
pub max_evidence: Option<usize>,
pub stop_when_sufficient: bool,
pub sufficiency_threshold: f32,
pub scorer: ScorerKind,
}Expand description
Serializable per-query evidence budget.
Attach via
RecallRequest::evidence_budget.
All fields are optional knobs; the zero-config default
(EvidenceBudget::default) caps nothing and never early-stops,
so an explicitly-Some(EvidenceBudget::default()) request still
behaves like the legacy path.
Fields§
§max_evidence: Option<usize>Hard cap on the number of evidence chunks returned. None
leaves the count bounded only by the recall limit.
stop_when_sufficient: boolWhen true, stop accumulating evidence as soon as the running
sufficiency score clears [sufficiency_threshold]. The caller
gets the smallest prefix that clears the bar.
sufficiency_threshold: f32Cumulative sufficiency score the selected set must reach before
early-stop fires. Scores are summed across selected chunks, so
for a cosine signal in [0, 1] a threshold of 0.8 is cleared
by one 0.85 chunk or two 0.4/0.45 chunks. Ignored when
stop_when_sufficient is false.
scorer: ScorerKindWhich scorer computes the per-chunk relevance.
Implementations§
Trait Implementations§
Source§impl Clone for EvidenceBudget
impl Clone for EvidenceBudget
Source§fn clone(&self) -> EvidenceBudget
fn clone(&self) -> EvidenceBudget
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EvidenceBudget
impl Debug for EvidenceBudget
Source§impl Default for EvidenceBudget
impl Default for EvidenceBudget
Source§impl<'de> Deserialize<'de> for EvidenceBudget
impl<'de> Deserialize<'de> for EvidenceBudget
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for EvidenceBudget
impl PartialEq for EvidenceBudget
Source§impl Serialize for EvidenceBudget
impl Serialize for EvidenceBudget
impl StructuralPartialEq for EvidenceBudget
Auto Trait Implementations§
impl Freeze for EvidenceBudget
impl RefUnwindSafe for EvidenceBudget
impl Send for EvidenceBudget
impl Sync for EvidenceBudget
impl Unpin for EvidenceBudget
impl UnsafeUnpin for EvidenceBudget
impl UnwindSafe for EvidenceBudget
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
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>
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>
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