Skip to content

Feat: 添加未提取记忆补偿+遗忘曲线门控 - #69

Open
TriDefender wants to merge 9 commits into
adoresever:desktop-2.0from
TriDefender:desktop-2.0
Open

Feat: 添加未提取记忆补偿+遗忘曲线门控#69
TriDefender wants to merge 9 commits into
adoresever:desktop-2.0from
TriDefender:desktop-2.0

Conversation

@TriDefender

Copy link
Copy Markdown
Contributor

本PR添加了两个新功能:

  • 用户可以通过注册的 openclaw graph-memory 这个命令行handle触发对未提取的记忆重新入库+向量化,避免某些技术原因(llm超时等)遗漏过往记忆;
  • 添加了模仿艾宾浩斯记忆曲线的记忆门控机制,长时间未使用的记忆node会被降权处理,避免过期知识污染检索结果。这样更好的模仿人脑神经通路用进废退的效果

可以重新尝试提取之前未提取的记忆节点,在正式提取前会让用户确认。
添加模仿艾宾浩斯遗忘曲线的门控机制,长期不用的节点会被deprecate掉(非硬性删除,可被重新激活)避免过时噪声影响检索结果
移植了adoresever@1fdec04
src/store/store.ts
- CommunitySummary 接口新增 memberSignature: string | null
- upsertCommunitySummary() 增加 memberSignature 参数,MERGE 时写入(沿用 embedding 的 CASE 保留模式:传 null 不清空旧值)
- getCommunitySummary() / getAllCommunitySummaries() 返回 memberSignature
- 新增 getCommunitySummaryBySignature():按签名查社区(ORDER BY updatedAt DESC LIMIT 1),带回 embedding 供复用
src/graph/community.ts
- 新增导出 buildCommunityMemberSignature():成员 ID 排序后 sha1(与上游逐字等价)
- summarizeCommunities() 循环内两层短路:
    1. 签名未变且摘要非空 → 跳过,不调 LLM
    2. 其他社区存在相同签名 + 非空摘要 → 复用其 summary + embedding,不调 LLM
    3. 否则走原有 LLM 生成路径,upsert 时写入签名
This commit aims to tackle more finegrained memory control on cron sessions:
Does a repeating cron session generates 'false popularity' on specific memory nodes?

Now it enables you to:
- disable memory extraction for cron runs
- disable entirely graph functions, so it will not inject context information (it may change workflows, use this with caution since models may lack crucial information. you're advised to test the workflow before hand)
- skip session end actions on cron
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