Skip to main content

RecallScore

Enum RecallScore 

Source
#[non_exhaustive]
pub enum RecallScore {
#[non_exhaustive]
Hybrid { rrf_score: f64, text_contrib: f64, vector_contrib: f64, confidence: f32, effective_confidence: Option<f32>, },
#[non_exhaustive]
TextOnly { rank: usize, bm25_score: f32, confidence: f32, effective_confidence: Option<f32>, }, }
Expand description

Per-channel signal breakdown for a recalled fact.

These are the input signals that the retrieval engine used to rank results — they explain what each channel contributed, not the final composite ranking score. The result ordering in recall_scored() is the authoritative ranking; inspect these fields to understand why a given channel dominated or was weak for a particular fact.

Every variant includes confidence — the fact-level confidence score from the underlying Fact (default 1.0). This lets callers weight or filter results by trustworthiness alongside retrieval signals.

The variant indicates which retrieval path produced the result:

  • Hybrid — RRF fusion input signals (text + vector channels). The engine’s two-stage reranker uses these as inputs alongside temporal feasibility to determine final ordering.
  • TextOnly — fulltext search with BM25 relevance score.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

#[non_exhaustive]
Hybrid

Input signals from hybrid retrieval (text + vector channels).

The rrf_score is the pre-rerank RRF fusion score (sum of text + vector contributions). Final result ordering may differ because the two-stage reranker applies adaptive weighting and temporal feasibility filtering on top of these signals.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§rrf_score: f64

Pre-rerank RRF fusion score (text + vector sum).

§text_contrib: f64

Text-channel contribution from weighted RRF.

§vector_contrib: f64

Vector-channel contribution from weighted RRF.

§confidence: f32

Fact-level confidence [0.0, 1.0] from the stored fact.

§effective_confidence: Option<f32>

Effective confidence after uncertainty model (age decay × source weight). None when uncertainty modeling is disabled.

§

#[non_exhaustive]
TextOnly

Result from fulltext-only retrieval.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§rank: usize

Ordinal rank in the result set (0-indexed).

§bm25_score: f32

Kronroe BM25 relevance score. Higher = stronger lexical match. Comparable within a single query but not across queries.

§confidence: f32

Fact-level confidence [0.0, 1.0] from the stored fact.

§effective_confidence: Option<f32>

Effective confidence after uncertainty model (age decay × source weight). None when uncertainty modeling is disabled.

Implementations§

Source§

impl RecallScore

Source

pub fn display_tag(&self) -> String

Human-readable score tag suitable for debug output or LLM context.

Returns a decimal RRF score "0.032" for hybrid results, or a BM25 score with rank "#1 bm25:4.21" for text-only results.

Source

pub fn confidence(&self) -> f32

The fact-level confidence score, regardless of retrieval path.

Source

pub fn effective_confidence(&self) -> Option<f32>

The effective confidence after uncertainty model processing.

Returns None when uncertainty modeling is disabled. When Some, this reflects: base_confidence × age_decay × source_weight.

Trait Implementations§

Source§

impl Clone for RecallScore

Source§

fn clone(&self) -> RecallScore

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RecallScore

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for RecallScore

Source§

fn eq(&self, other: &RecallScore) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for RecallScore

Source§

impl StructuralPartialEq for RecallScore

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.