mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 03:59:34 +00:00
feat(memory): Add opt-in temporal decay for hybrid search scoring
Exponential decay (half-life configurable, default 30 days) applied
before MMR re-ranking. Dated daily files (memory/YYYY-MM-DD.md) use
filename date; evergreen files (MEMORY.md, topic files) are not
decayed; other sources fall back to file mtime.
Config: memorySearch.query.hybrid.temporalDecay.{enabled, halfLifeDays}
Default: disabled (backwards compatible, opt-in).
This commit is contained in:
committed by
Peter Steinberger
parent
fa9420069a
commit
6b3e0710f4
@@ -334,6 +334,20 @@ export type MemorySearchConfig = {
|
||||
textWeight?: number;
|
||||
/** Multiplier for candidate pool size (default: 4). */
|
||||
candidateMultiplier?: number;
|
||||
/** Optional MMR re-ranking for result diversity. */
|
||||
mmr?: {
|
||||
/** Enable MMR re-ranking (default: false). */
|
||||
enabled?: boolean;
|
||||
/** Lambda: 0 = max diversity, 1 = max relevance (default: 0.7). */
|
||||
lambda?: number;
|
||||
};
|
||||
/** Optional temporal decay to boost recency in hybrid scoring. */
|
||||
temporalDecay?: {
|
||||
/** Enable temporal decay (default: false). */
|
||||
enabled?: boolean;
|
||||
/** Half-life in days for exponential decay (default: 30). */
|
||||
halfLifeDays?: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
/** Index cache behavior. */
|
||||
|
||||
Reference in New Issue
Block a user