pub struct ContextBundle {
pub stage: String,
pub budget_tokens: u32,
pub used_tokens: u32,
pub capsules: Vec<ContextCapsule>,
pub excluded: Vec<ContextCapsule>,
pub skipped: bool,
pub top_score: f32,
pub top_abs_evidence: f32,
pub evidence_coverage: f32,
pub uncovered_terms: Vec<String>,
pub chronological: bool,
pub known_fact_conflicts: Vec<String>,
}Fields§
§stage: String§budget_tokens: u32§used_tokens: u32§capsules: Vec<ContextCapsule>§excluded: Vec<ContextCapsule>§skipped: boolv0.6: true when the top capsule score was below min_score.
All capsules are empty; no tokens were injected.
top_score: f32v0.6: best composite score observed before the skip check. Useful for diagnostics (“why was the brain silent?”).
top_abs_evidence: f32v2.7: best ABSOLUTE cosine evidence any memory candidate achieved.
Unlike top_score this is not normalized, so “0.42” means the same
thing on a 3-memory brain and a 3000-memory brain. -1.0 means no
comparable cosine was available (lean builds or cross-model rows), so
the cosine-calibrated gate has no verdict. Exposed for diagnostics and
threshold sweeps.
evidence_coverage: f32v2.6: what fraction of the query’s discriminating power the returned
capsules cover, collectively, in [0, 1].
Kimetsu already abstains at the bundle level — nothing above
min_score means an empty bundle and zero tokens. What it never did is
say anything about a bundle it does return, so a reader handed three
capsules that touch half the question has no way to tell that from
three that answer it, and confabulates the rest. That is what BEAM’s
abstention track measures, and where Kimetsu scores worst (45% / 30%).
IDF-weighted against the corpus, so a query term present in every memory contributes nothing and a rare one dominates — the same weighting the per-memory lexical floor uses, applied to the bundle as a whole. 1.0 when there is no discriminating term to measure against.
uncovered_terms: Vec<String>v2.6: the discriminating query terms no returned capsule mentions.
The actionable half of evidence_coverage: a reader can be told
precisely what memory does not know about, rather than being handed a
number. Empty when coverage is complete or unmeasurable.
chronological: boolv2.6: true when the query asked about order and the capsules were re-rendered chronologically, oldest first, each carrying its date.
The reader needs to be told, or a time-ordered bundle looks like a
relevance-ranked one whose ranking has gone wrong. See
crate::ordering for why ordering is rendered rather than retrieved.
known_fact_conflicts: Vec<String>Conflicts observed in eligible evidence before delivery trimming.
Trait Implementations§
Source§impl Clone for ContextBundle
impl Clone for ContextBundle
Source§fn clone(&self) -> ContextBundle
fn clone(&self) -> ContextBundle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more