Skip to main content

build_prefix

Function build_prefix 

Source
pub fn build_prefix(plan: PrefixPlan) -> Result<FrozenPrefix, AxError>
Expand description

Builds the four segments from source documents: UTF-8 only, per-slot caps with explicit truncation markers, cross-slot dedup by address (first slot wins), skips accounted in the notes. The notes travel inside the returned prefix and surface in prompt_assembled — they are what makes the prefix offline-rebuildable (A15, C16).