pub struct PitFusionScoring {
pub ego_depth: usize,
pub blend: f64,
pub agreement_bonus: f64,
pub agreement_top_k: usize,
}Expand description
Percentile fusion: the same two signals as RRF, blended on their empirical distribution position rather than on rank alone.
RRF converts each component to a pure rank, which throws away the magnitude
that says “this scored near zero”. Measured on the oracle corpus that costs
97 cases against EGO and wins 18, all on precision: BM25 gives any
generic-token match a small positive score, and 1/(k + rank) promotes that
noise to real fused mass (#125).
The probability-integral transform keeps the position. A fragment in the 5th
percentile of a component contributes 0.05 from it, not 1/(k + 12). Two
signals that disagree therefore cannot manufacture a strong candidate out of
two weak opinions, which is precisely what the rank form allowed.
score = blend * PIT(ego) + (1 - blend) * PIT(bm25) + bonus * [both in top-k]
The agreement term is what fusion is actually for — a fragment both signals rank highly is more trustworthy than either alone — and it is additive and small so it breaks ties rather than deciding the ranking.
Fields§
§ego_depth: usize§blend: f64§agreement_bonus: f64§agreement_top_k: usizeImplementations§
Trait Implementations§
Source§impl ScoringStrategy for PitFusionScoring
impl ScoringStrategy for PitFusionScoring
fn score_and_filter( &self, all_fragments: &[Fragment], core_ids: &FxHashSet<FragmentId>, hunks: &[DiffHunk], repo_root: Option<&Path>, seed_weights: Option<&FxHashMap<FragmentId, f64>>, discovered_paths: Option<&FxHashSet<Arc<str>>>, deadline: Deadline, ) -> ScoringResult
Auto Trait Implementations§
impl Freeze for PitFusionScoring
impl RefUnwindSafe for PitFusionScoring
impl Send for PitFusionScoring
impl Sync for PitFusionScoring
impl Unpin for PitFusionScoring
impl UnsafeUnpin for PitFusionScoring
impl UnwindSafe for PitFusionScoring
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> 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