pub struct ReflectionBoostConfig {
pub boost: f32,
pub per_depth_increment: f32,
pub max_depth_cap: u32,
}Expand description
v0.7.0 L2-8 — configuration for the reflection-aware reranker boost.
The boost is applied AFTER the cross-encoder blend (i.e. it does NOT
participate in the 0.6 * original + 0.4 * cross_encoder scoring
formula). Boost shape:
per_depth_factor = 1.0 + per_depth_increment * min(reflection_depth, max_depth_cap)
final_score = base_score * (kind == Reflection ? boost * per_depth_factor : 1.0)Default factor = 1.2 (see DEFAULT_REFLECTION_BOOST). Setting
boost = 1.0 makes the reranker reproduce its pre-L2-8 behavior
exactly — a deliberate kill-switch for the recall regression suite.
Fields§
§boost: f32Multiplicative boost applied to Reflection-kind memories.
Default 1.2. 1.0 disables the boost.
per_depth_increment: f32Per-depth additional multiplier increment. Default 0.05.
max_depth_cap: u32Depth cap for the per-depth multiplier. Default 3 (mirrors
the compiled-in default of
GovernancePolicy::effective_max_reflection_depth). Larger
reflection_depth values are clamped to this cap so the
reranker never produces an unbounded multiplier.
Implementations§
Source§impl ReflectionBoostConfig
impl ReflectionBoostConfig
Sourcepub const fn disabled() -> Self
pub const fn disabled() -> Self
Pin to pre-L2-8 behavior: boost = 1.0 ⇒ multiplier is always
1.0 regardless of memory kind or depth. Used by the regression
test that proves the new pathway is a pure addition over the RC
behavior.
Sourcepub fn factor_for(&self, mem: &Memory) -> f64
pub fn factor_for(&self, mem: &Memory) -> f64
Compute the multiplicative factor for a given memory. Returns
1.0 for non-reflections; boost * per_depth_factor for
reflections (with reflection_depth clamped to max_depth_cap).
Pulled out so the same arithmetic is shared by both the per-query
rerank and the G9 batched rerank_batch codepaths — there is
exactly one place to audit the multiplier shape.
Trait Implementations§
Source§impl Clone for ReflectionBoostConfig
impl Clone for ReflectionBoostConfig
Source§fn clone(&self) -> ReflectionBoostConfig
fn clone(&self) -> ReflectionBoostConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ReflectionBoostConfig
Source§impl Debug for ReflectionBoostConfig
impl Debug for ReflectionBoostConfig
Source§impl Default for ReflectionBoostConfig
impl Default for ReflectionBoostConfig
Source§impl From<&ReflectionBoostConfig> for ReflectionBoostReport
impl From<&ReflectionBoostConfig> for ReflectionBoostReport
Source§fn from(cfg: &ReflectionBoostConfig) -> Self
fn from(cfg: &ReflectionBoostConfig) -> Self
Source§impl PartialEq for ReflectionBoostConfig
impl PartialEq for ReflectionBoostConfig
Source§fn eq(&self, other: &ReflectionBoostConfig) -> bool
fn eq(&self, other: &ReflectionBoostConfig) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ReflectionBoostConfig
Auto Trait Implementations§
impl Freeze for ReflectionBoostConfig
impl RefUnwindSafe for ReflectionBoostConfig
impl Send for ReflectionBoostConfig
impl Sync for ReflectionBoostConfig
impl Unpin for ReflectionBoostConfig
impl UnsafeUnpin for ReflectionBoostConfig
impl UnwindSafe for ReflectionBoostConfig
Blanket Implementations§
impl<T> Boilerplate 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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