是否考虑支持长期记忆功能 #1723
|
首先非常感谢大佬可以分享这么优秀的开源项目,确实学到了很多 |
Replies: 2 comments 2 replies
|
其实是非常棒的提议,但并没有想好怎么做,对于会话而言,从我个人角度,我会希望它是一个完全干净的上下文 而长期记忆需要让当前的 agent 记住【你】这个人的关键信息 实现起来会复杂很多
如果提取错了,会很麻烦,污染 prompt,很多时候其实反而会适得其反 当然,如果以后想清楚到底怎么做了,可能会有相关功能出现,非常感谢你的反馈和提议 |
|
你列的这几个子问题,尤其是提取错了会污染 prompt 这一点,是长期记忆做不好的核心原因,比存储本身难得多。 我在做一个本地的 agent 记忆 MCP 服务,正好是围着这几个问题设计的,分享一下具体做法,不一定适合 DeepChat,仅供参考。 提取质量控制:不是每次对话都直接写入,而是先算一个惊讶度分数,跟已有记忆比对,日常重复的内容不会写进去,避免污染。 DeepChat 已经是 MCP client 了,如果以后想清楚具体做法,这类实现可以直接当外部 MCP 服务器接入试试,不用从零自己写一套。仓库在 github.com/samvallad33/vestige,AGPL 协议。 这几个子问题拆得很清楚,尤其是记忆变成指令这个风险,很多做法都没意识到。 English summary for non-Chinese readers: replying to zhangmo8's list of subproblems for long-term memory (extraction, classification, storage design, retrieval, conflict merging, privacy/deletion, quality control, forgetting). Sharing how a local memory MCP server I maintain handles each: gating writes on a surprise score so routine repeats do not pollute the store, treating a correction as superseding the old fact rather than overwriting it so both remain inspectable, FSRS decay so unused memories fade instead of piling up, and deletion that clears the vector too and leaves only a content-free audit marker. Since DeepChat already speaks MCP, this could be tried as an external server rather than built in-house. Good breakdown of the subproblems, especially the risk of memory becoming an instruction nobody decided on. |
当前已经 deepchat 已经支持 长期记忆了,另外也有 nowledge-mem mcp 可以使用