pub struct PathQuality;Expand description
Path quality utilities.
Implementations§
Source§impl PathQuality
impl PathQuality
Sourcepub fn enhance_salience(base_salience: f32, quality: f32, blend: f32) -> f32
pub fn enhance_salience(base_salience: f32, quality: f32, blend: f32) -> f32
Enhance a base salience score using path quality.
§Arguments
base_salience- Original salience score [0, 1]quality- Path quality score [0, 1]blend- How much quality affects salience [0, 1]- 0.0 = quality has no effect
- 1.0 = quality fully replaces base salience
§Returns
Enhanced salience in [0, 1].
Sourcepub fn terminal_boost(
base_salience: f32,
quality: f32,
is_terminal: bool,
) -> f32
pub fn terminal_boost( base_salience: f32, quality: f32, is_terminal: bool, ) -> f32
Boost terminal nodes based on path quality.
Terminal nodes in high-quality paths get boosted more.
Sourcepub fn compute(
depths: &[u32],
homogeneities: &[f32],
max_depth: u32,
is_terminal: bool,
terminal_quality: f32,
) -> PathQualityFactors
pub fn compute( depths: &[u32], homogeneities: &[f32], max_depth: u32, is_terminal: bool, terminal_quality: f32, ) -> PathQualityFactors
Compute path quality for a sequence of episodes.
§Arguments
depths- Depth of each episodehomogeneities- Homogeneity (semantic similarity to parent) of each episodemax_depth- Maximum depth in the full trajectoryis_terminal- Whether the last episode is a terminal nodeterminal_quality- Quality score for terminal (use feedback if available)
Sourcepub fn terminal_quality_from_phase(phase: Option<&str>) -> f32
pub fn terminal_quality_from_phase(phase: Option<&str>) -> f32
Estimate terminal quality from phase.
Synthesis and Planning phases typically end better than Debugging.
Sourcepub fn terminal_quality_from_feedback(
has_thumbs_up: bool,
has_thumbs_down: bool,
) -> f32
pub fn terminal_quality_from_feedback( has_thumbs_up: bool, has_thumbs_down: bool, ) -> f32
Estimate terminal quality from feedback.
Auto Trait Implementations§
impl Freeze for PathQuality
impl RefUnwindSafe for PathQuality
impl Send for PathQuality
impl Sync for PathQuality
impl Unpin for PathQuality
impl UnwindSafe for PathQuality
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.