Skip to main content

Module relevance_tracker

Module relevance_tracker 

Source
Expand description

Proactive context expansion (#1122): automatically injects previously compressed data when it becomes relevant to the current request.

When lean-ctx compresses content (via CCR tee-store), this module indexes keywords from the original. On subsequent tool calls, if the current request context matches indexed keywords above a threshold, the relevant compressed content is proactively expanded and appended.

Determinism (#498): expansion decisions are pure functions of (query_terms, stored_entries, budget). No timestamps in scoring — age eviction uses monotonic seq_ticks.

Structs§

CompressedContentEntry
Entry representing one piece of compressed content.
ExpansionMatch
Match result for proactive expansion.
RelevanceTracker
The relevance tracker maintains a keyword index of all compressed content.