pub struct CoeConfig {
pub enabled: bool,
pub intra_threshold: f64,
pub inter_threshold: f64,
pub shadow_sample_rate: f64,
pub secondary_provider: ProviderName,
pub embed_provider: ProviderName,
}Expand description
Configuration for the Collaborative Entropy (CoE) subsystem ([llm.coe] TOML section).
CoE detects uncertain responses from the primary provider and escalates to a
secondary provider when either the intra-entropy or inter-divergence signal crosses
its threshold. Only active for RouterStrategy::Ema and RouterStrategy::Thompson.
§Example
[llm.coe]
enabled = true
intra_threshold = 0.8
inter_threshold = 0.20
shadow_sample_rate = 0.1
secondary_provider = "quality"
embed_provider = ""Fields§
§enabled: boolEnable CoE. When false, the struct is ignored.
intra_threshold: f64Mean negative log-prob threshold; responses above this trigger intra escalation.
inter_threshold: f64Divergence threshold in [0.0, 1.0].
shadow_sample_rate: f64Baseline rate at which secondary is called even when intra is low.
secondary_provider: ProviderNameProvider name from [[llm.providers]] used as the escalation target.
embed_provider: ProviderNameProvider name for inter-divergence embeddings. Empty → inherit bandit’s embed provider.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CoeConfig
impl<'de> Deserialize<'de> for CoeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CoeConfig
impl RefUnwindSafe for CoeConfig
impl Send for CoeConfig
impl Sync for CoeConfig
impl Unpin for CoeConfig
impl UnsafeUnpin for CoeConfig
impl UnwindSafe for CoeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more