pub struct HelaFact {
pub edge: Edge,
pub score: f32,
pub depth: u32,
pub path_weight: f32,
pub cosine: Option<f32>,
}Expand description
A graph edge surfaced by HL-F5 spreading activation (#3346), scored by
path_weight × max(cosine_query_to_endpoint, 0.0).
Mirrors ActivatedFact so callers can dispatch over a single
Vec<HelaFact> ↔ Vec<ActivatedFact> ↔ Vec<GraphFact> shape at the
strategy-selection site.
Fields§
§edge: EdgeThe edge by which the higher-scored endpoint was reached.
score: f32Final HL-F5 score: path_weight × cosine_clamped. Range: [0.0, +∞).
depth: u32BFS depth at which edge was traversed (1..=spread_depth).
0 is reserved for the synthetic anchor edge in the isolated-anchor fallback.
path_weight: f32Multiplicative product of edge weights along the BFS path that reached
this edge’s far endpoint. Range: [0.0, +∞).
cosine: Option<f32>Clamped cosine similarity of the far endpoint’s entity embedding
to the query embedding, in [0.0, 1.0]. None when the endpoint
has no stored embedding (skipped from results in that case).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HelaFact
impl RefUnwindSafe for HelaFact
impl Send for HelaFact
impl Sync for HelaFact
impl Unpin for HelaFact
impl UnsafeUnpin for HelaFact
impl UnwindSafe for HelaFact
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> 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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request