记忆即护城河

You've felt this before, even if you didn't have a word for it.

你以前感受过这个,即使你没有一个词来形容它。

You spend an hour walking an AI agent through your project. Your stack. Your style. Your preferences. The way you like to be talked to.

你花一个小时引导 AI agent 了解你的项目。你的技术栈。你的风格。你的偏好。你喜欢被对话的方式。

You close the tab.

你关闭标签页。

The next morning, you open a new chat thread. The agent has no idea who you are.

第二天早上,你打开一个新的聊天线程。代理不知道你是谁。

It's Groundhog Day, and you're Bill Murray.

这是 Groundhog Day,你是 Bill Murray。

This is the memory problem. It's the unsexiest, most important problem in AI right now... and the way teams are solving it has gone through more evolution in the last two years than most people realize.

这是记忆问题。它是目前 AI 中最不性感、最重要的一个问题……团队解决它的方式在过去两年经历了比大多数人意识到的更多的演变。

Get memory right and your agent starts to feel like a coworker who's been with you for years. Get it wrong and every conversation starts from zero.

让 memory 正确,你的 agent 开始感觉像一个和你共事多年的同事。搞错它,每一次对话都从零开始。

Here's how we got from "starts from zero" to where we're going. And spoiler: where we're going, you won't need threads.

这就是我们如何从「从零开始」发展到现在的地步。而且剧透:我们要去的地方,你将不需要 threads。

Stage 1: Message History (the naive answer)

Stage 1:Message History(朴素的答案)

Image

The simplest memory is no memory at all. Just shove every past message back into the context window on each call.

最简单的记忆就是完全没有记忆。只需在每次调用时将每条过去的消息塞回上下文窗口中。

It works. For a while.

它有效。一段时间。

Then the conversation gets long, or the tool calls start dumping JSON into the context, and the window fills up. You hit the wall.

然后对话变长,或者 tool calls 开始将 JSON 倾倒到 context 中,窗口填满。你撞墙了。

So teams patch it. Send only the last X messages. Or the last Y tokens. Or... and this is where the real damage starts... they introduce compaction, where the context gets summarized whenever a threshold is hit.

因此团队们修补它。只发送最后 X 条消息。或者最后 Y 个 tokens。或者……这就是真正损害开始的地方……他们引入了 compaction,每当达到阈值时,上下文就会被总结。

Compaction is brutal. It's lossy. It quietly drops things you needed and you don't know what's gone until the agent says something dumb.

Compaction 很残酷。它是 lossy 的。它悄悄丢弃你需要的东西,你不知道...

开通本站会员,查看完整译文。

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-05-15 06:35
浙ICP备14020137号-1 $Carte des visiteurs$