pub struct SourceContribution {
pub retriever_id: String,
pub original_rank: Option<usize>,
pub original_score: Option<f32>,
pub normalized_score: Option<f32>,
pub contribution: f32,
}Expand description
Contribution from a single retriever to a document’s final score.
Fields§
§retriever_id: StringIdentifier for this retriever (e.g., “bm25”, “dense_vector”).
original_rank: Option<usize>Original rank in this retriever’s list (0-indexed, None if not present).
original_score: Option<f32>Original score from this retriever (None for rank-based methods or if not present).
normalized_score: Option<f32>Normalized score (for score-based methods, None for rank-based).
contribution: f32How much this source contributed to the final fused score.
For RRF: 1/(k + rank) or weight / (k + rank) for weighted.
For CombSUM: normalized score.
For CombMNZ: normalized score × overlap count.
Trait Implementations§
Source§impl Clone for SourceContribution
impl Clone for SourceContribution
Source§fn clone(&self) -> SourceContribution
fn clone(&self) -> SourceContribution
Returns a duplicate of the value. Read more
1.0.0 · 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 SourceContribution
impl Debug for SourceContribution
Source§impl<'de> Deserialize<'de> for SourceContribution
impl<'de> Deserialize<'de> for SourceContribution
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SourceContribution
impl PartialEq for SourceContribution
Source§impl Serialize for SourceContribution
impl Serialize for SourceContribution
impl StructuralPartialEq for SourceContribution
Auto Trait Implementations§
impl Freeze for SourceContribution
impl RefUnwindSafe for SourceContribution
impl Send for SourceContribution
impl Sync for SourceContribution
impl Unpin for SourceContribution
impl UnsafeUnpin for SourceContribution
impl UnwindSafe for SourceContribution
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