pub struct ContextUse {
pub frame: FrameId,
pub selected: bool,
pub rendered: bool,
pub cited: bool,
}Expand description
What actually became of one served frame, as three independent observations
(the context_use vocabulary of ADR 0007).
They are deliberately not a single enum or a score. Each is a distinct,
separately-observable fact, and collapsing them would destroy the signal
that matters most: a frame that was selected and rendered but never
cited is the interesting case — the host paid its tokens and the model
read it, and it changed nothing. A single “used/unused” flag cannot express
that, and a 0–1 usefulness score would invent a precision nobody measured.
The three are ordered by inclusion in practice — a frame is rendered only if
selected, cited only if rendered — but that is an observation about honest
hosts, not an invariant this type enforces. See is_coherent.
Fields§
§frame: FrameIdThe frame this record is about — the same identity the usage report
billed and verify revalidates, never a separate attribution id.
selected: boolThe host chose this frame from the fan-out results: it survived consent, the budget audit, and ranking.
rendered: boolThe frame’s content was actually composed into the prompt the model saw.
Distinct from selected: a frame can win ranking and still be dropped
by budget packing before it reaches the prompt.
cited: boolThe model’s output referred to this frame — by citation label, or by whatever attribution the host can observe.
A claim about observable output, never an inference about influence. Whether a frame changed the model’s reasoning is unobservable from outside; recording “it was cited” is a fact, recording “it helped” would be a guess wearing a fact’s clothes.
Implementations§
Source§impl ContextUse
impl ContextUse
Sourcepub fn selected(frame: FrameId) -> Self
pub fn selected(frame: FrameId) -> Self
A record for a frame the host selected but has not yet observed further.
Sourcepub fn is_coherent(&self) -> bool
pub fn is_coherent(&self) -> bool
Whether the three observations are mutually consistent: a frame cannot be cited without having been rendered, nor rendered without having been selected.
A host that reports an incoherent record has an accounting bug, and scoring on it would silently mis-attribute value — so this is checkable rather than assumed.
Sourcepub fn is_rendered_but_uncited(&self) -> bool
pub fn is_rendered_but_uncited(&self) -> bool
The frame reached the prompt and earned nothing observable — the case worth paying attention to, because it is pure spent budget.
Trait Implementations§
Source§impl Clone for ContextUse
impl Clone for ContextUse
Source§fn clone(&self) -> ContextUse
fn clone(&self) -> ContextUse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more