agent-source-repository 0.1.0

Agent Source Repository local context registry for coding agents
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::ranking::boosting::is_symbol_query;

const ALPHA_SYMBOL: f64 = 0.3;
const ALPHA_NL: f64 = 0.5;

pub fn resolve_alpha(query: &str, alpha: Option<f64>) -> f64 {
    if let Some(a) = alpha {
        return a;
    }
    if is_symbol_query(query) {
        ALPHA_SYMBOL
    } else {
        ALPHA_NL
    }
}