创建

登录 ReadmeX

或

了解我们如何处理你的信息: 隐私政策

ReadmeX

陪你读懂 AI 动态

今天,想先了解什么?

选一份动态总结,或直接聊聊你的问题。

社区和关注动态总结只属于你自己。

资讯

AI Agent Clinic 比较四种记忆方案与三种上下文修复方法

AI 总结

AI Agent Clinic 的一集节目邀请 Google Cloud 工程师 Laxmi Harikumar 和开发者 Miles Libbey,演示 Scribant 的记忆与上下文管理。Scribant 是 Libbey 使用 TypeScript 和 Agent Development Kit 构建的语音转行动智能体。演示比较了平铺提示、向量 RAG、知识图谱和 Gemini 平台的 Memory Bank,并区分检索知识库所需的 RAG 与维护用户当前事实所需的记忆。节目还针对不同时间范围加入了 40 词滚动窗口、滚动摘要和 Memory Bank。在约 200 个口语词的单次测试中,40 词窗口比重发完整语音流少用约 86% 的分类器 Token。滚动摘要为 92 个 Token;Memory Bank 存储约 24 个事实 Token,而摄取完整对话约需 1,400 个 Token。这些数据来自一次演示,并非标准化基准测试;40 词只是建议起点,需要根据用户的说话方式调整。

深度见解

该节目具体比较了不同的记忆架构和上下文缩减方法,并提供 Token 跟踪代码,供开发者测量自己的智能体。原报告明确提醒,实测结果并非基准测试。

Most AI agents have two memory problems. They forget what a user told them last week, and every turn costs more than the one before.

Both come from the same place: how much of the conversation you send to the model, and what you keep between sessions.

In this episode of AI Agent Clinic, Google Cloud engineer Laxmi Harikumar and developer Miles Libbey fix both in Scribant, a voice to action agent Miles built in TypeScript with Agent Development Kit (ADK).

Which memory option should you use?

The episode compares 4 ways to give an agent memory, using one test. A user says "I'm in New York", later says "I moved to San Francisco", then asks "Where do I live now?"

OptionWhat the model getsTradeoff
Flat promptingThe full chat historyEasy to build, but tokens grow every turn
Vector RAGEvery chunk that matches, old and newSaves tokens, but retrieval alone doesn't say which fact is current
Knowledge graphThe current factTracks changes, but you build the extraction, schemas and update logic
Memory Bank in Gemini platformThe current factExtracts, deduplicates and updates facts for you in the background

#Scribant#Agent Development Kit#Memory Bank#Gemini#Google Cloud

原文约 2 分钟读完阅读原文
群聊

还没有评论,来说说你的看法。