pub enum RetrievalMode {
VectorOnly,
Bm25Only,
HybridRrf,
Graph,
HarnessAware {
harness: HarnessKind,
format: EnvelopeFormat,
},
}Expand description
Typed recall strategy. Superset of the legacy
RecallRequest.strategy: Option<String> API — the variant ↔ string
mapping is documented on each variant.
Variants§
VectorOnly
Maps to legacy strategy = "semantic" — vector-only path.
Bm25Only
Maps to legacy strategy = "lexical" — Tantivy BM25-only
path.
HybridRrf
Maps to legacy strategy = "auto" — default RRF fusion across
vector + BM25 + recency + decay. Weight overrides continue to
be carried on RecallRequest.hybrid_weights
and RecallRequest.rrf_k
to keep wire compatibility with v0.4.3 SDK clients.
Graph
Maps to legacy strategy = "graph" — vector-seeded +
graph-expanded path.
HarnessAware
New in v0.4.4 — harness-aware envelope reshaping. Inside the
recall path this delegates to RetrievalMode::HybridRrf;
the difference is post-processing: a
HarnessEnvelope adapter renders the typed
ScoredMemory hits into a string envelope shaped for the
nominated agent harness.
Implementations§
Source§impl RetrievalMode
impl RetrievalMode
Sourcepub fn to_strategy_str(&self) -> &'static str
pub fn to_strategy_str(&self) -> &'static str
Map the typed variant back to the legacy strategy string the
engine dispatcher understands. HarnessAware delegates to
"auto" (HybridRrf) for the underlying retrieval; the envelope
adapter handles the post-processing separately.
Sourcepub fn envelope_adapter(&self) -> Option<Box<dyn HarnessEnvelope>>
pub fn envelope_adapter(&self) -> Option<Box<dyn HarnessEnvelope>>
Optional envelope adapter for HarnessAware; returns None
for every other variant. Each adapter is a unit struct (or
a small config struct); call
HarnessEnvelope::shape to render the envelope string.
Trait Implementations§
Source§impl Clone for RetrievalMode
impl Clone for RetrievalMode
Source§fn clone(&self) -> RetrievalMode
fn clone(&self) -> RetrievalMode
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 RetrievalMode
impl Debug for RetrievalMode
Source§impl<'de> Deserialize<'de> for RetrievalMode
impl<'de> Deserialize<'de> for RetrievalMode
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 RetrievalMode
impl PartialEq for RetrievalMode
Source§fn eq(&self, other: &RetrievalMode) -> bool
fn eq(&self, other: &RetrievalMode) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for RetrievalMode
impl Serialize for RetrievalMode
impl StructuralPartialEq for RetrievalMode
Auto Trait Implementations§
impl Freeze for RetrievalMode
impl RefUnwindSafe for RetrievalMode
impl Send for RetrievalMode
impl Sync for RetrievalMode
impl Unpin for RetrievalMode
impl UnsafeUnpin for RetrievalMode
impl UnwindSafe for RetrievalMode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
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