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

Function final_score

atomic-cli/src/commands/vault/context.rs:598–605  ·  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

596
597/// Combine the candidate score parts into the final ranking score.
598fn final_score(candidate: &CandidateScore, recency: f64) -> f64 {
599 let neighbor = if candidate.neighbor {
600 NEIGHBOR_BONUS
601 } else {
602 0.0
603 };
604 candidate.base + neighbor + RECENCY_WEIGHT * recency
605}
606
607fn why_matched(candidate: &CandidateScore) -> &'static str {
608 match (candidate.base > 0.0, candidate.neighbor) {

Callers 2

resolve_and_rankFunction · 0.85

Calls

no outgoing calls

Tested by 1