openclaw/extensions/memory-lancedb
Mike Nott 91c3e49b63 fix(memory-lancedb): improve capture/recall filtering and relevance
Three improvements to autoCapture and autoRecall:

1. Skip system prompts in capture and recall
   - Heartbeat prompts (HEARTBEAT.md, Read HEARTBEAT.md)
   - Security webhook messages ([SECURITY DETECTION - ANALYZE])
   - Pre-compaction flush prompts
   - HEARTBEAT_OK / NO_REPLY responses

   These system-generated messages clutter memory and aren't useful
   for recall context.

2. Strip injected memory context before capture evaluation
   - autoRecall prepends <relevant-memories> to user messages
   - Extract and reuse isSystemPrompt() helper for consistency

3. Improve recall relevance with higher threshold and re-ranking
   - Raise similarity threshold from 0.3 to 0.5
   - Fetch 8 candidates, re-rank by: score × recency × importance
   - Return top 3 after re-ranking
   - Recency: recent memories boosted (decays over 60 days)
   - Importance: uses stored importance field (default 0.7)

This results in more relevant memories being surfaced while keeping
automated system messages out of the memory store.
2026-01-28 15:32:41 +00:00
..
clawdbot.plugin.json fix: enforce plugin config schemas (#1272) (thanks @thewilloftheshadow) 2026-01-20 11:03:17 +00:00
config.ts fix: enforce strict config validation 2026-01-19 03:39:25 +00:00
index.test.ts refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
index.ts fix(memory-lancedb): improve capture/recall filtering and relevance 2026-01-28 15:32:41 +00:00
package.json chore: prep 2026.1.27-beta.1 release 2026-01-28 01:35:58 +01:00