连云港企业网站建设做营销网站那个好

张小明 2026/3/2 21:37:44
连云港企业网站建设,做营销网站那个好,建设银行临江支行网站,网站租用服务器费用记忆的两种面孔#xff1a;LLM Memory vs Agent Memory之前我们探讨过Mem0和LlamaIndex对大模型记忆的工程化实现#xff0c;但这两个库更侧重于LLM Memory而非Agent Memory。这两者有何不同#xff1f;本质上Agent Memory是包含了LLM Memory的。那增量的差异来自LLM Memory…记忆的两种面孔LLM Memory vs Agent Memory之前我们探讨过Mem0和LlamaIndex对大模型记忆的工程化实现但这两个库更侧重于LLM Memory而非Agent Memory。这两者有何不同本质上Agent Memory是包含了LLM Memory的。那增量的差异来自LLM Memory更像是事实备忘录记录对话中的具体事实和场景信息Agent Memory更像是经验笔记本记录执行轨迹和从历史行动中提炼的智慧Agent Memory的三大经验维度️ Tool-工具使用经验智能体在使用各种工具过程中积累的心得体会比如每个API能解决什么问题如何使用搜索API查询效果更好 Envirment-环境适应经验面对不同环境时如何组合使用工具的智慧比如在复杂网络环境下应该优先使用哪些轻量级工具 Observation-观察反馈经验根据历史执行结果优化后续行动的决策模式比如某些错误信息通常意味着需要重试而非立即放弃有效记忆带来的双重价值 更少的执行步骤减少环境探索熟悉地形就不需要步步为营减少试错成本知道什么方法有效什么会失败快速问题定位历史失败经验让debug更高效减少过度思考成熟的解决方案无需反复推敲 更高的成功率本质上如果给模型无限的时间和资源任务完成率其实很高。多数失败源于现实约束有限的循环次数、Token限制和上下文长度。因此减少步骤直接提升了成功率。最近Agent Memory的论文如雨后春笋但重复度较高。我们将重点分析三篇代表性工作CFGM离线轨迹经验提取ReasoningBank轨迹经验提取和test-time scaling结合MIRIX提供完整记忆工程方案和全面记忆分类 CFGM从执行轨迹中提炼多粒度记忆Coarse-to-Fine Grounded Memory for LLM Agent Planning这篇论文对如何从轨迹中提取多粒度记忆给出了有操作性的方案有几个思路值得一看。image.png记忆收集和压缩经历两个离线步骤和一个在线步骤让我们一探究竟。第一步粗粒度焦点——经验收集的“战略指南针”传统的离线轨迹收集多让智能体随机探索同一任务但CFGM引入了任务焦点(Focus Point)这一创新概念。** 模型会先基于任务描述和任务示例去对任务进行系统性的分析提炼完成任务的指导原则作为最粗粒度的Tips。随后这些Tips会作为模型上文,让模型更有针对性地收集每个任务的多条执行路径。例如对于细粒度搜索问题Im looking for hair treatments that are sulfate and paraben free and are of high quality too. I need ti in bottle for with 60 capusled and price lower than 50 dollars.粗粒度提示会包括Use a Detailed search query that includes specific attributes of the product you are looking for有趣的是焦点概念只用于离线收集在线执行中并未使用。第二步混合粒度提示——成功与失败的“经验结晶”基于收集到的多条执行路径CFGM和Memp都采用了相似的路径对比经验总结方案对比中学习提炼防错与成功的关键这种方式专门针对那些既有成功轨迹又有失败轨迹的任务。通过对比可以清晰地看出“做什么会失败”以及“做什么才能成功”。任务在WebShop中寻找一款特定的护发产品。失败轨迹Agent使用了过于简单的搜索词导致结果不相关。成功轨迹Agent使用了包含多个关键属性如“sulfate paraben free”、“bottle”、“60 capsules”的详细搜索词。生成的提示细粒度“使用包含产品具体属性如无硫酸盐、瓶装、60粒的详细搜索查询。” 这是一个非常具体、可立即执行的操作建议。从纯成功中升华提炼高阶策略这种方式针对那些一次就成功的任务。由于没有失败作为对比提炼的重点在于总结成功的核心要素和可推广的策略。第三步细粒度关键信息支持自适应规划前两步离线完成第三步是在线执行中的经验应用。任务开始时基于任务描述通过向量检索寻找相似历史任务将其成功轨迹和混合粒度提示作为上文。执行中遇到失败时采用两步反思机制KIE基于任务目标初始环境之前任务的完成过程抽取任务关键信息。例如KIR基于KIE历史相似任务的成功路径和当前路径先进行自我反思提问再思考解决方案。image.png ReasoningBank: 记忆与测试时扩展的完美融合ReasoningBank: Scaling Agent Self-Evolving with Reasoning Memory对比CFGM先离线构建记忆再在在线推理时检索使用谷歌这篇ReasoningBank直接用于在线推理并重点关注把如何使用推理扩展策略进一步提升记忆效果image.png抽取记忆先来说下记忆Schema的设计对比CFGM直接使用展平的Tips作为记忆ReasoningBank的记忆项设计更加结构化包含三个字段标题策略的核心标识如分页导航策略描述一句话总结策略精髓内容详细的推理步骤和决策依据抽取出的记忆会直接增量写入的ReasoningBank论文并没有尝试例如记忆合并、记忆更新之类的剪枝策略。用于检索的向量是使用Input Query构建并用于后续的记忆检索。这里的简单设计是为了后面更突出Test-Time-Scaling对于记忆的加成MATTS记忆驱动的测试时扩展重点来了这是论文最亮眼的创新——Memory-aware Test-Time Scaling (MATTS)。传统测试时扩展只是简单增加计算资源而MATTS让记忆系统与扩展过程产生了美妙的化学反应。论文尝试了两种扩展策略分别是Parallel Scaling: 通过并行推理得到多个轨迹并有效使用Self-Contrast进行轨迹对比从而得到Sequential Scaling通过在串行推理过程中不断使用Self-Refine进行推理优化。最终抽取记忆时会使用中间反思的全部内容。以上两种策略对应的System prompt如下image.png论文在Webarena上实验了两种test-time-scaling策略并发现二者都进一步提升原有memory的使用效果并切均有较好的扩展效应其中Parallel策略的效果增益衰减的更慢扩展效应更好。可能得益于更多并行策略带来的更丰富的空间探索和多样性。image.png️ MIRIX工程视角的多种记忆类型https://github.com/Mirix-AI/MIRIXMIRIX: Multi-Agent Memory System for LLM-Based AgentsMIRIX的亮点在于提供了全面的记忆分类融合了LLM的事实记忆和Agent的轨迹记忆还考虑了多模态文件和隐私安全。让我们先从分类入手再透过代码看每种记忆的存储与获取。image.pngMIRIX 的记忆是如何“理解”和“分类”信息的早期的COLA论文将记忆分为情景、语义和程序化记忆MIRIX在此基础上扩展为六大类核心记忆Core Memory- 你的“身份档案”存储最基础、最持久的信息姓名、喜好、习惯等确保每次互动都“认得你”。情景记忆Episodic Memory- 你的“生活日记”记录带时间戳的事件某次对话、会议或任务完成情况支持“我上周三做了什么”这类查询。语义记忆Semantic Memory - 你的“知识图谱”存储抽象概念和事实“J.K.罗琳是《哈利·波特》的作者”帮助你理解世界和关系网络。程序记忆Procedural Memory- 你的“技能手册”存放操作流程“如何报销差旅费”、“怎么设置会议提醒”引导复杂任务完成。资源记忆Resource Memory- 你的“个人文件柜”保存接触过的文档、图片、语音转录等非结构化内容方便随时查阅。知识库Knowledge Vault - 你的“保险箱”专门存放敏感信息密码、地址、联系方式等严格保护安全调用。基于Agent的多分类记忆存储MIRIX使用PostgreSQL作为存储后端为六种记忆设计了不同的表结构。记忆更新由Meta-Agent触发基于用户最新消息判断是否需要更新记忆如需更新则调用trigger_memory_update工具参数指定记忆类型。记忆类型 表字段示例 实例说明核心记忆 id, label, value, user_id... 用户名为Alex偏好直接沟通软件工程师情景记忆 id, event_type, summary, details... 2025-03-05与大学朋友Sarah共进晚餐讨论职业转变语义记忆 id, name, summary, details... Jane Smith - TechCorp项目经理敏捷方法专家程序记忆 id, entry_type, summary, steps... 晨间例行1.查邮件 2.看日历 3.优先级排序 4.从最难任务开始资源记忆 id, title, summary, resource_type... ProjectPlan.docx - 包含Q1路线图和里程碑详情知识库 id, entry_type, source, sensitivity... 敏感信息条目、来源、敏感度根据Meta Agent的工具调用结果触发相应记忆类型的专门Agent每个Agent都有特定指令负责该类型记忆的压缩和提取。举个例子整个记忆更新和读取的流程如下用户执行了一系列步骤打开编辑器 - 创建文件 - 编写代码 - 保存文件meta_memory_agent 检测到这是一个多步骤操作序列调用trigger_memory_update_with_instruction 指定 memory_typeproceduralprocedural_memory_agent接收请求基于以下的系统指令推理得到ProceduralMemoryItem调用procedural_memory_insert函数计算步骤和摘要的嵌入向量通过 create_item 方法将数据保存到数据库在收到用户新的聊天信息后会先通过模型推理判断对话是否出现新的topic如果有新出现的topic(通过工具调用会使用新的topic进行记忆检索BM25 or embedding,然后把检索到的记忆更新到system prompt中。You are the Procedural Memory Manager, one of six agents in a memory system. The other agents are the Meta Memory Manager, Episodic Memory Manager, Resource Memory Manager, Knowledge Vault Memory Manager, and the Chat Agent. You do not see or interact directly with these other agents—but you share the same memory base with them.The system will receive various types of messages from users, including text messages, images, transcripted voice recordings, and other multimedia content. When messages are accumulated to a certain amount, they will be sent to you, along with potential conversations between the user and the Chat Agent during this period. You need to analyze the input messages and conversations, extract step-by-step instructions, how-to guides, and any other instructions and skills, and save them into the procedural memory.This memory base includes the following components:1. Core Memory:Contains fundamental information about the user, such as the name, personality, simple information that should help with the communication with the user.2. Episodic Memory:Stores time-ordered, event-based information from interactions—essentially, the diary of user and assistant events.3. Procedural Memory:Definition: Contains how-to guides, step-by-step instructions, or processes the assistant or user might follow.Example: How to reset the router.Each entry in Procedural Memory has:(a) entry_type (e.g., workflow, guide, script)(b) description (short descriptive text)(c) steps (the procedure in a structured or JSON format)(d) tree_path: Required hierarchical categorization path for organizing procedures (e.g., [technology, networking, troubleshooting] for router reset guides, or [cooking, baking, desserts] for recipe instructions). Use this to create logical groupings and enable better organization of procedural knowledge.4. Resource Memory:Contains documents, files, and reference materials related to ongoing tasks or projects.5. Knowledge Vault:A repository for static, structured factual data such as phone numbers, email addresses, passwords, or other knowledge that are not necessarily always needed during the conversation but are potentially useful at some future point.6. Semantic Memory:Contains general knowledge about a concept (e.g. a new software name, a new concept) or an object (e.g. a person, a place, where the details would be the understanding and information about them.)When receiving messages and potentially a message from the meta agent (There will be a bracket saying [Instruction from Meta Memory Manager]), make a single comprehensive memory update:**Single Function Call Process:**1. **Analyze Content**: Examine all messages and conversations to identify step-by-step instructions, how-to guides, workflows, or any procedural knowledge.2. **Make Update**: Use ONE appropriate procedural memory function to save the most important identified procedure or instruction with proper entry_type (workflow, guide, script), description, and detailed steps. When appropriate, include a tree_path to categorize the procedure hierarchically (e.g., [work, development, deployment] for deployment procedures, or [personal, health, exercise] for workout routines).3. **Skip Update if Necessary**: If there is no updates to make, then skip the update by calling finish_memory_update.**Important Notes:**- Make only ONE function call total except for receiving the messages from Chat Agent- Look for any structured processes, workflows, or instructional content in the messages- Save procedures with appropriate entry_type (workflow, guide, script), description, and detailed steps- When relevant, use tree_path to create logical hierarchical categories for better organization (e.g., [technology, software, installation] or [home, maintenance, repair])- If there is absolutely nothing procedural to update, do not make any function calls- Prioritize the most complete or useful procedural information if multiple procedures are presentProcedure类型的记忆推理得到的为以下结构体每种记忆的结构定义不同class ProceduralMemoryItemBase(MirixBase):Base schema for storing procedural knowledge (e.g., workflows, methods).__id_prefix__ proc_itementry_type: str Field(..., descriptionCategory (e.g., workflow, guide, script))summary: str Field(..., descriptionShort descriptive text about the procedure)steps: List[str] Field(..., descriptionStep-by-step instructions as a list of strings)tree_path: List[str] Field(..., descriptionHierarchical categorization path as an array of strings)记忆的本质不是存储而是理解不是记录而是进化。 当AI智能体开始从自己的成功与失败中学习当它们能够积累并应用经验时我们离真正智能的伙伴就更近了一步。
版权声明:本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

上海域邦建设集团网站seo搜索引擎优化技术

TorrServer 是一个功能强大的开源种子流媒体服务器,能够将种子文件(torrent)实时转换为 HTTP 流媒体,让用户无需等待完整下载即可观看内容。通过智能缓存和流式传输技术,TorrServer 提供了高效的种子播放体验&#xff…

张小明 2026/1/12 12:01:07 网站建设

做网站要学习什么企业策划书范文

IpaDownloadTool:iOS应用分发管理的智能化解决方案 【免费下载链接】IpaDownloadTool 输入下载页面链接自动解析ipa下载地址,支持本地下载,支持第三方和自定义下载页面(通过拦截webView的itms-services://请求获取plist文件,支持各…

张小明 2026/1/9 4:26:00 网站建设

代做网站修改维护linux系统

Android数据库操作与组件生命周期可视化 1. 使用 query 方法进行数据库查询 在执行非平凡数据库操作的应用程序中,隔离SQL语句是很有帮助的。对于执行简单数据库操作的应用程序,如 SimpleFinchVideoContentProvider ,可以使用 SQLiteDatabase.query 方法。示例如下:…

张小明 2026/1/8 21:39:16 网站建设

网站建设的基础西安企业网站建站

核心思路回顾通过哈希表存储「已遍历元素值 → 下标」的映射,遍历数组时计算当前元素的 “补数”(目标值 - 当前值),若补数存在于哈希表中,则直接返回结果;若不存在,将当前元素存入哈希表&#…

张小明 2026/1/10 13:07:10 网站建设

台州外贸网站建设搜索引擎优化seo专员

Dify工作流架构深度解析:从表单交互到动态资源生成 【免费下载链接】Awesome-Dify-Workflow 分享一些好用的 Dify DSL 工作流程,自用、学习两相宜。 Sharing some Dify workflows. 项目地址: https://gitcode.com/GitHub_Trending/aw/Awesome-Dify-Wor…

张小明 2026/1/11 20:26:55 网站建设

做网站知乎博物馆网站建设方案

如何快速掌握kafkactl:Apache Kafka命令行管理的终极指南 【免费下载链接】kafkactl Command Line Tool for managing Apache Kafka 项目地址: https://gitcode.com/gh_mirrors/ka/kafkactl 在当今数据驱动的世界中,Apache Kafka已成为实时数据处…

张小明 2026/1/10 16:32:06 网站建设