pub struct RecallPolicy {
pub enabled: bool,
pub max_k_total: usize,
pub max_tokens_injection: usize,
pub min_score_threshold: f64,
pub budgets: RecallBudgets,
pub allowed_uses: Vec<RecallUse>,
pub prior_weight: f64,
}Expand description
Policy controlling recall behavior.
This is the declarative configuration for recall operations. It controls what is allowed, not how it is implemented.
Fields§
§enabled: boolWhether recall is enabled
max_k_total: usizeMaximum number of candidates to return total
max_tokens_injection: usizeMaximum tokens to inject from recall context
min_score_threshold: f64Minimum similarity score threshold
budgets: RecallBudgetsBudget constraints
allowed_uses: Vec<RecallUse>Allowed recall uses (runtime, training, etc.)
Defaults to [RuntimeAugmentation] only - training use must be
explicitly enabled. This preserves “Recall ≠ Training” boundary.
prior_weight: f64How strongly recall results weight planning priors when consumed by
PlanningPriorAgent. 1.0 means full weight; 0.0 disables prior
adjustment without disabling recall itself. Capped to [0.0, 1.0] by
consumers.
Implementations§
Source§impl RecallPolicy
impl RecallPolicy
Sourcepub fn enabled() -> RecallPolicy
pub fn enabled() -> RecallPolicy
Create an enabled recall policy with default settings.
Sourcepub fn disabled() -> RecallPolicy
pub fn disabled() -> RecallPolicy
Create a disabled recall policy.
Sourcepub fn is_use_allowed(&self, purpose: RecallUse) -> bool
pub fn is_use_allowed(&self, purpose: RecallUse) -> bool
Check if a specific recall use is allowed by this policy.
Returns true if the policy allows the given use, false otherwise.
This is the primary enforcement point for “Recall ≠ Training” boundary.
Sourcepub fn snapshot_hash(&self) -> String
pub fn snapshot_hash(&self) -> String
Compute a deterministic hash of this policy for provenance tracking.
This enables replay verification: same policy hash → same behavior.
Note: Includes allowed_uses in the hash for full provenance.
Trait Implementations§
Source§impl Clone for RecallPolicy
impl Clone for RecallPolicy
Source§fn clone(&self) -> RecallPolicy
fn clone(&self) -> RecallPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more