Expand description
Context assembly — orchestrates rendering, budget allocation, ordering, and sections.
ContextAssembler takes &[SearchHit] + FormatPolicy and produces a
FormattedContext ready for LLM consumption.
§RF-4: Structured Context Rendering
Three intent-aware rendering modes improve how grains are presented:
- Aggregation mode — entity summary header + grouped-by-entity rendering
when
entity_countis present in theRecallResult. - Timeline mode — chronological rendering with date prefixes when temporal intent is detected (temporal_expr, time range, or multi-day span).
- Relevance highlighting — top-5 “Most Relevant” section + “Additional Context” when result set exceeds 10 grains.
Modes are mutually exclusive, checked in priority order (aggregation > timeline > relevance). JSON output bypasses all modes.
Structs§
- Context
Assembler - The main assembly engine.
- Formatted
Context - Assembled context ready for LLM consumption.
- Rendering
Hints - RF-4: Hints from the recall query/result that guide rendering mode selection.