pub struct SemanticConfig {
pub top_k: usize,
pub min_score: f32,
pub gap_threshold: f32,
pub component_weights: ComponentWeights,
pub use_adaptive_k: bool,
}Expand description
Configuration for semantic selection.
Fields§
§top_k: usizeMaximum candidates to return.
min_score: f32Minimum similarity threshold.
gap_threshold: f32Score gap for adaptive cutoff.
component_weights: ComponentWeightsComponent weights for multi-component embeddings.
use_adaptive_k: boolEnable gap-based adaptive selection.
Implementations§
Source§impl SemanticConfig
impl SemanticConfig
Sourcepub fn with_top_k(self, top_k: usize) -> Self
pub fn with_top_k(self, top_k: usize) -> Self
Create with custom top_k.
Sourcepub fn with_min_score(self, min_score: f32) -> Self
pub fn with_min_score(self, min_score: f32) -> Self
Create with custom minimum score.
Sourcepub fn with_gap_threshold(self, gap: f32) -> Self
pub fn with_gap_threshold(self, gap: f32) -> Self
Create with custom gap threshold.
Sourcepub fn without_adaptive_k(self) -> Self
pub fn without_adaptive_k(self) -> Self
Disable adaptive k (always return top_k).
Trait Implementations§
Source§impl Clone for SemanticConfig
impl Clone for SemanticConfig
Source§fn clone(&self) -> SemanticConfig
fn clone(&self) -> SemanticConfig
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 moreSource§impl Debug for SemanticConfig
impl Debug for SemanticConfig
Auto Trait Implementations§
impl Freeze for SemanticConfig
impl RefUnwindSafe for SemanticConfig
impl Send for SemanticConfig
impl Sync for SemanticConfig
impl Unpin for SemanticConfig
impl UnsafeUnpin for SemanticConfig
impl UnwindSafe for SemanticConfig
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
Mutably borrows from an owned value. Read more
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().