pub struct CascadeRetriever { /* private fields */ }Expand description
Cascading retrieval orchestrator.
Coordinates the 4-tier retrieval pipeline, falling back to API only when CPU-local tiers cannot satisfy the query.
Implementations§
Source§impl CascadeRetriever
impl CascadeRetriever
Sourcepub fn new(config: CascadeConfig) -> Self
pub fn new(config: CascadeConfig) -> Self
Create a new cascade retriever with given configuration.
Sourcepub fn retrieve(&self, _query: &str) -> Result<CascadeResult>
pub fn retrieve(&self, _query: &str) -> Result<CascadeResult>
Execute the cascading retrieval pipeline.
This is a placeholder that returns empty results when the csm
feature is not enabled. With csm enabled, it uses BM25, HDC,
and ConceptGraph from the chaotic_semantic_memory crate.
Note: This placeholder is non-async. The full CSM implementation will be async to allow for concurrent tier queries.
Sourcepub fn config(&self) -> &CascadeConfig
pub fn config(&self) -> &CascadeConfig
Get the configuration for this retriever.
Sourcepub fn estimate_api_call_probability(&self, _query: &str) -> f32
pub fn estimate_api_call_probability(&self, _query: &str) -> f32
Estimate the number of API calls that would be saved for a query.
Returns 1.0 if the query would likely require an API call, or 0.0 if CPU-local tiers would likely suffice.
Auto Trait Implementations§
impl Freeze for CascadeRetriever
impl RefUnwindSafe for CascadeRetriever
impl Send for CascadeRetriever
impl Sync for CascadeRetriever
impl Unpin for CascadeRetriever
impl UnsafeUnpin for CascadeRetriever
impl UnwindSafe for CascadeRetriever
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
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 moreSource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.