pub struct RetrievalConfig {
pub deterministic_partial_extraction: bool,
pub llm_final_extraction: bool,
pub max_memories: usize,
pub target_tokens: usize,
pub max_tokens: usize,
pub immediate_lexical_timeout_ms: u64,
pub semantic_fallback_timeout_ms: u64,
pub immediate_semantic_timeout_ms: u64,
pub minimum_candidate_score: f32,
pub max_per_predicate: usize,
}Expand description
Retrieval budgets and timeouts.
Fields§
§deterministic_partial_extraction: boolRun deterministic extraction against partial transcripts.
llm_final_extraction: boolRun out-of-band model extraction on final transcripts.
max_memories: usizeHard cap on memories returned to the model.
target_tokens: usizeSoft target for the assembled context.
max_tokens: usizeHard cap for the assembled context.
immediate_lexical_timeout_ms: u64Deadline for a synchronous lexical fallback on the tool path.
semantic_fallback_timeout_ms: u64Deadline for the optional semantic fallback.
immediate_semantic_timeout_ms: u64Deadline for the semantic fallback on the tool path, where the model is waiting. Zero disables it there.
This was a prohibition rather than a deadline, on the reasoning that a network round trip would turn a slow answer into a late one. That is right for a remote backend and wrong for a local one: an in-process vector scan over a few thousand records costs well under a millisecond, and refusing to ask it cost every question a semantic layer exists to answer. A deadline gets both — a local backend replies inside it, a remote one times out and the lexical results stand, which is exactly what the old zero achieved for the remote case.
Set to 0 to restore the previous behaviour.
minimum_candidate_score: f32Minimum fused score for a candidate to be considered a hit at all.
max_per_predicate: usizeMaximum candidates of the same predicate unless explicitly requested.
Trait Implementations§
Source§impl Clone for RetrievalConfig
impl Clone for RetrievalConfig
Source§fn clone(&self) -> RetrievalConfig
fn clone(&self) -> RetrievalConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RetrievalConfig
impl Debug for RetrievalConfig
Source§impl Default for RetrievalConfig
impl Default for RetrievalConfig
Source§impl<'de> Deserialize<'de> for RetrievalConfigwhere
RetrievalConfig: Default,
impl<'de> Deserialize<'de> for RetrievalConfigwhere
RetrievalConfig: Default,
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 RetrievalConfig
impl PartialEq for RetrievalConfig
Source§impl Serialize for RetrievalConfig
impl Serialize for RetrievalConfig
impl StructuralPartialEq for RetrievalConfig
Auto Trait Implementations§
impl Freeze for RetrievalConfig
impl RefUnwindSafe for RetrievalConfig
impl Send for RetrievalConfig
impl Sync for RetrievalConfig
impl Unpin for RetrievalConfig
impl UnwindSafe for RetrievalConfig
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,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].