Skip to main content

EvidenceScorer

Trait EvidenceScorer 

Source
pub trait EvidenceScorer: Send + Sync {
    // Required methods
    fn score(&self, ctx: &EvidenceContext<'_>) -> f32;
    fn name(&self) -> &str;
}
Expand description

Pluggable relevance signal for the evidence budget.

Implementors return a score in [0, 1] representing how much this candidate contributes to answering the query given what is already selected. The budget sums these to decide sufficiency.

Required Methods§

Source

fn score(&self, ctx: &EvidenceContext<'_>) -> f32

Score one candidate in [0, 1].

Source

fn name(&self) -> &str

Stable identifier surfaced in the selection diagnostics.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§