Skip to content

feat: 增强长期记忆精确召回 - #143

Open
ciko5450 wants to merge 1 commit into
Rvosy:devfrom
ciko5450:feat/memory-recall
Open

ciko5450 wants to merge 1 commit into
Rvosy:devfrom
ciko5450:feat/memory-recall

Conversation

@ciko5450

Copy link
Copy Markdown

改动

  • 对“还记得、上次、之前”等显式回忆查询,优先从本地长期记忆中做实体匹配。
  • 名字、地点、项目标识等短实体命中后直接进入现有召回结果,减少向量相似度漏召回。
  • 本地没有命中、记忆尚未就绪或命中记录已过期时,继续使用原有语义召回路径。
  • 不扩大最终召回条数,不修改记忆存储格式,也不启用自动清理。

原因

短名称和专有实体在轻量嵌入模型中的相似度可能偏低。用户明确询问过去事实时,即使本地已有准确记录,也可能因为向量阈值而无法召回。

验证

  • tests/unit/test_memory_recall.py:7 passed
  • 完整测试:1463 passed, 3 skipped
  • git diff --check 通过
  • 未发现凭据或本地数据

兼容性

没有配置格式或存储格式变化。精确匹配只在显式回忆意图下启用,普通聊天仍使用原有语义召回。

@ciko5450
ciko5450 marked this pull request as ready for review July 14, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant