Expand description
Context assembler.
Strategies produce ContextFragments with priorities and token
estimates. The assembler orders by priority and packs greedily
into the remaining TokenBudget — high-priority fragments
survive; low-priority ones are dropped first under pressure.
Structs§
- Assembled
Prompt - Result of assembling trusted + untrusted content.
- Context
Assembler - Context
Fragment - One fragment contributed by a strategy.
- Keyword
Injection Screen - A cheap keyword heuristic screen (case-insensitive). Not a complete defense — a first line that flags the most common override phrasings.
- Rendered
Context - Output of
ContextAssembler::assemble. - Trust
Policy - How untrusted content is fenced when assembling a prompt.
- Trusted
Content - A span of content carrying its trust tag and origin.
Enums§
- Trust
- Whether a span of content is authoritative (instructions/system) or untrusted (retrieved/tool/ingested).
Traits§
- Injection
Screen - Flags suspicious untrusted spans before they reach the model.