feat(memos-local): make auto-recall Phase 1 search parameters configurable - #1483
Conversation
Auto-recall Phase 1 was using hardcoded maxResults=10 and minScore=0.45 for the quick local search pass before LLM dedup. This makes those values configurable via the existing recall.* config namespace: recall.autoRecallMaxResults (default: 3) recall.autoRecallMinScore (default: 0.50) Lowering Phase 1 defaults from 10→3 and 0.45→0.50 improves auto-recall precision and reduces token usage during the dedup step, especially for users with large memory stores.
|
Thanks for the PR — making these Phase 1 parameters configurable is the right thing to do. Two issues before this can be merged:
Dropping maxResults from 10 → 3 and raising minScore from 0.45 → 0.50 isn't just a configurable default — it changes behavior for all existing users. Phase 1 is intentionally a wide-net pass before LLM dedup, so cutting candidates from 10 to 3 risks discarding relevant memories before the LLM ever sees them. Please revert the defaults to match the previous hardcoded values (10 / 0.45), or provide benchmark data justifying the change.
All defaults are centralized in the DEFAULTS constant. Please move autoRecallMaxResults and autoRecallMinScore there to stay consistent. Happy to approve once these are addressed. |
|
Motivation
Auto-recall Phase 1 was using hardcoded
maxResults=10andminScore=0.45for the quick local search pass before the LLM dedup step. These values are not configurable, which forces users who want different recall behavior to patch the source directly.Changes
Three files changed in
apps/memos-local-openclaw/:src/types.tsrecall{}config interface:autoRecallMaxResults?: numberautoRecallMinScore?: number3and0.50src/config.tscfg.recallwith the new defaults as fallback.index.tsmaxResults: 10, minScore: 0.45in the Phase 1engine.search()call withctx.config.recall.autoRecallMaxResultsandctx.config.recall.autoRecallMinScore.Behavior change
recall.autoRecallMaxResultsrecall.autoRecallMinScoreLowering Phase 1 from 10→3 results and raising minScore from 0.45→0.50 reduces noise passed to the LLM dedup step, improving both precision and token efficiency.
Example config