-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Current search queries the entire knowledge base uniformly. This is wasteful — most queries are answered by recent, high-confidence entries. Searching everything equally burns tokens and can surface stale or low-relevance results.
Proposal
Implement tiered search that starts narrow and widens only if needed:
Search Tiers (in order)
- Working context — Current session/project active entries
- Recent entries — Last 14 days of daily logs
- Structured storage — Permanent entries matching the query domain
- Archive — Historical entries, only if earlier tiers yield nothing
Behavior
- Search starts at Tier 1 and returns early if confident matches are found
- Each tier adds latency/tokens, so early return is the optimization
- User can force a specific tier:
know search --tier archive "old config" - Results include tier source so the user knows where info came from
- Confidence and freshness factor into result ranking
Result Ranking
score = relevance * confidence_weight * freshness_decay
Where:
relevance: semantic/keyword match score (Qdrant)confidence_weight: high=1.0, medium=0.7, low=0.4freshness_decay: exponential decay based on last_verified date
Benefits
- Faster results for common queries
- Token-efficient (don't load archive for simple lookups)
- Fresher, higher-confidence results surface first
- Historical search still available when needed
Acceptance Criteria
- Search implements tiered strategy with early return
- Results show which tier they came from
-
--tierflag to target specific tiers - Ranking incorporates confidence and freshness
- Archive search only triggered when earlier tiers insufficient
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request