pub enum GuaranteeMode {
Approximate,
Calibrated {
recall_target: f32,
confidence: f32,
},
Certified,
}Expand description
Guarantee mode for search correctness
Variants§
Approximate
Fast approximate search - ignores quantization error
Returns top-k by proxy score (e.g., PQ/ADC distance). Fastest but may miss true nearest neighbors.
Calibrated
Calibrated high-recall search - probabilistic guarantees
Uses learned error envelopes to bound approximation error. Guarantees P(recall@k ≥ ρ) ≥ 1-δ with configurable ρ and δ.
Certified
Certified search - deterministic correctness
Uses lower/upper bound envelopes for all candidates. Guarantees exact top-k results (same as brute force).
Implementations§
Source§impl GuaranteeMode
impl GuaranteeMode
Sourcepub fn calibrated(recall_target: f32, confidence: f32) -> Self
pub fn calibrated(recall_target: f32, confidence: f32) -> Self
Create calibrated mode with given recall target
Sourcepub fn requires_rerank(&self) -> bool
pub fn requires_rerank(&self) -> bool
Returns true if this mode requires rerank verification
Sourcepub fn uses_error_envelopes(&self) -> bool
pub fn uses_error_envelopes(&self) -> bool
Returns true if this mode uses error envelopes
Sourcepub fn error_quantile(&self) -> Option<f32>
pub fn error_quantile(&self) -> Option<f32>
Get the error quantile to use for this mode
Trait Implementations§
Source§impl Clone for GuaranteeMode
impl Clone for GuaranteeMode
Source§fn clone(&self) -> GuaranteeMode
fn clone(&self) -> GuaranteeMode
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 moreimpl Copy for GuaranteeMode
Source§impl Debug for GuaranteeMode
impl Debug for GuaranteeMode
Source§impl Default for GuaranteeMode
impl Default for GuaranteeMode
Source§impl PartialEq for GuaranteeMode
impl PartialEq for GuaranteeMode
Source§fn eq(&self, other: &GuaranteeMode) -> bool
fn eq(&self, other: &GuaranteeMode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GuaranteeMode
Auto Trait Implementations§
impl Freeze for GuaranteeMode
impl RefUnwindSafe for GuaranteeMode
impl Send for GuaranteeMode
impl Sync for GuaranteeMode
impl Unpin for GuaranteeMode
impl UnsafeUnpin for GuaranteeMode
impl UnwindSafe for GuaranteeMode
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
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> 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