MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / final_score

Function final_score

atomic-cli/src/commands/vault/context.rs:626–633  ·  view source on GitHub ↗

Combine the candidate score parts into the final ranking score.

(candidate: &CandidateScore, recency: f64)

Source from the content-addressed store, hash-verified

624
625/// Combine the candidate score parts into the final ranking score.
626fn final_score(candidate: &CandidateScore, recency: f64) -> f64 {
627 let neighbor = if candidate.neighbor {
628 NEIGHBOR_BONUS
629 } else {
630 0.0
631 };
632 candidate.base + neighbor + RECENCY_WEIGHT * recency
633}
634
635fn why_matched(candidate: &CandidateScore) -> &'static str {
636 match (candidate.base > 0.0, candidate.neighbor) {

Callers 2

resolve_and_rankFunction · 0.70

Calls

no outgoing calls

Tested by 1