pub struct UtilityScoringConfig {
pub enabled: bool,
pub threshold: f32,
pub gain_weight: f32,
pub cost_weight: f32,
pub redundancy_weight: f32,
pub uncertainty_bonus: f32,
pub exempt_tools: Vec<String>,
}Expand description
Configuration for utility-guided tool dispatch ([tools.utility] TOML section).
Implements the utility gate from arXiv:2603.19896: each tool call is scored
U = gain_weight*gain - cost_weight*cost - redundancy_weight*redundancy + uncertainty_bonus*uncertainty.
Calls with U < threshold are skipped (fail-closed on scoring errors).
Fields§
§enabled: boolEnable utility-guided gating. Default: false (opt-in).
threshold: f32Minimum utility score required to execute a tool call. Default: 0.1.
gain_weight: f32Weight for the estimated gain component. Must be >= 0. Default: 1.0.
cost_weight: f32Weight for the step cost component. Must be >= 0. Default: 0.5.
redundancy_weight: f32Weight for the redundancy penalty. Must be >= 0. Default: 0.3.
uncertainty_bonus: f32Weight for the exploration bonus. Must be >= 0. Default: 0.2.
exempt_tools: Vec<String>Tool names that bypass the utility gate unconditionally (case-insensitive).
Auto-populated with file-read tools when MagicDocs is enabled. User-specified
entries are preserved and merged additively with any auto-populated names.
Implementations§
Trait Implementations§
Source§impl Clone for UtilityScoringConfig
impl Clone for UtilityScoringConfig
Source§fn clone(&self) -> UtilityScoringConfig
fn clone(&self) -> UtilityScoringConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more