Skip to main content

Module windows

Module windows 

Source
Expand description

Reconstructive retrieval windows (WG-120).

Inspired by E-mem (arXiv:2601.21714): expand top-k hits into bounded local windows to preserve useful context with fewer irrelevant tokens.

Instead of returning isolated episodes/steps, return a window around each hit, maintaining temporal context.

Structs§

ContextWindow
An expanded context window around a retrieval hit.
RetrievalHit
A single hit from retrieval that will be expanded into a window.
WindowConfig
Configuration for reconstructive window expansion.
WindowExpander
Expands retrieval hits into bounded context windows.
WindowExpansionResult
Result of window expansion containing multiple context windows.

Functions§

merge_overlapping_windows
Merge overlapping windows to avoid duplicate content.