Speaker 0can an ai agent write its own harness and then recursively improve the harness based on the task it is trying to solve? this is what i want to show you how to build in this video because almost every agent harness we use today, including the coding ones, suffer from the exact same problem. they are bloated and they are not task specific. now, as developers, we try to guess every tool an agent might ever need up front. we connect a whole bunch of mcp servers. now, when we ship 30 or 40 generic tools that sit in the context window on every single turn, well, yet the moment the agent actually needs... a specific tool in a specialized problem, things like inspecting a web page it just built or watching a bug report recorded as a video or reading a custom binary file format, we see that it's not able to pick the right tool or that right tool is actually missing. so instead of shipping a bloated one size fits all harness, what happens if you start with a tiny three tool harness, just bash, read and write and let the model recursively evolve its own task-specific harness while it works. this is the exact idea i tried to build and the results were really, really interesting. so when i tried to test this idea on gemini interaction api, the agent realized on its very first web app that it had no way to see the ui. it wrote an unit test on chrome screenshot tool and give itself eyes for the next turn. then without me prompting it, it rewrote its own harness loop and added condition that it would never mark a task done unless the web page clearly rendered in a real browser. now, frozen harnesses that doesn't have a specific tool that you would need can do some really absurd things in order to accomplish some tasks. i have some benchmarks which i'm going to show you in this video. but first, let's start by looking at the full architecture of how a recursive harness works compared to a normal one. and then we will walk through each piece and run different experiments. and i'll show you both the good and bad of recursive harnesses.
AI 智能体能否编写自己的运行框架,然后根据它试图解决的任务递归地改进这个框架? 这就是我想在这段视频里教你如何构建的东西,因为我们现在使用的几乎所有智能体运行框架,包括编程智能体的运行框架,都有完全相同的问题。 它们臃肿,而且不针对具体任务。 现在,作为开发者,我们总想预先猜出智能体可能需要的所有工具。 我们接入一大堆 MCP 服务器。 当我们把 30 或 40 个通用工具放进上下文窗口,让它们在每一轮都占据空间时,一旦智能体真的需要某个特定工具来解决专业问题——比如检查它刚构建的网页、查看以视频形式录制的错误报告,或读取自定义二进制文件格式——我们就会发现,它要么选不对工具,要么根本没有那个合适的工具。 所以,与其提供一个臃肿、试图满足所有需求的运行框架,不如从一个只有三个工具的小型框架开始:bash、读取和写入,然后让模型在工作过程中递归地演化出自己的任务专用框架,会怎么样? 这正是我尝试构建的想法,结果真的非常有意思。 所以,当我尝试在 Gemini Interaction API 上测试这个想法时,智能体在开发第一个网页应用时就意识到,它没有办法查看 UI。 它为 Chrome 截图工具编写了一个单元测试,让自己在下一轮有了眼睛。 然后,在我没有给出任何提示的情况下,它重写了自己的运行框架循环,并加上了一条条件:除非网页确实在真实浏览器中清晰呈现,否则绝不将任务标记为完成。 现在,缺少特定所需工具的固定运行框架,为了完成某些任务,有时会做出一些非常离谱的事情。 我有一些基准测试,会在这段视频里展示给你看。 不过首先,我们先来看看递归式运行框架与普通运行框架的完整架构。 然后我们会逐一讲解各个部分,并运行不同的实验。 我会向你展示递归式运行框架的优点和缺点。
okay, before we look at the code, let's put the whole architecture on the screen so you have a clear map of what we are building. first, what is an agent harness in general? a model by itself only takes text in and predict text out. the harness is the control loop around the model. on every turn, the harness sends the conversation and a list of tools. to the model, runs whatever tool calls the model asks for, feeds the results back and decide when the task is finished. now because the tools are the only way the model can touch the outside world, the tool lists defines what the agent can and cannot do. and in a standard harness, both the two lists and the loop rules are completely frozen. now, look at how the architecture changes when we make the harness recursive.
好,在看代码之前,我们先把整个架构展示出来,让你清楚了解我们要构建的东西。 首先,智能体运行框架到底是什么? 模型本身只会接收文本,并预测输出文本。 运行框架就是围绕模型的控制循环。 每一轮中,运行框架都会向模型发送对话内容和工具列表。 它会运行模型请求的任何工具调用,将结果反馈给模型,并决定任务何时完成。 现在,由于工具是模型接触外部世界的唯一途径,工具列表就定义了智能体能做什么、不能做什么。 而在标准运行框架中,工具列表和循环规则都完全固定。 现在,看看当我们让运行框架递归化时,架构会如何变化。
the whole system is split into three different zones that we're going to look at. at the top is zone one. in this case, it's the gemini interaction api. it keeps the conversation state on google's server and critically, it lets our harness inject an updated tool list and system prompt in every single turn without restarting the session. in the middle is zone 2, which runs inside a lockdown mac os sandbox. the agent starts with a tiny base kernel with three different tools, which are shell, read file, and write file. next to that kernel is toolbox folder with three recursive primitives that lets harness evolve. Okay, first is create tool with a mandatory unit test gate, which lets the model write new python tools, test them and hot swap them into the next turns to list. Second are a life cycle hooks specifically session start and before done. which let the model attach its own tools to the harness loop and rewrite its own definition of done. and the third is reflective memory, a note file and a short between-task reflection step where the model inspects what failed and upgrades its toolbox for the next task. finally, at the bottom is zone 3, which lives completely outside the sandbox. it holds two guardrails, a hidden grader, the agent cannot see or game even the evaluation tests, and an external model broker that holds our api keys so the agent can build model powered tools without ever touching a secret. okay, so this is the entire blueprint.
整个系统分为三个不同的区域,我们接下来会逐一查看。 最上方是区域一。 在这个案例中,它是 Gemini Interaction API。 它会在 Google 的服务器上保存对话状态。关键的是,它允许我们的运行框架在每一轮中注入更新后的工具列表和系统提示,而无需重启会话。 中间是区域二,它运行在锁定的 macOS 沙箱中。 智能体启动时只有一个小型基础内核,包含三个工具:shell、读取文件和写入文件。 内核旁边有一个工具箱文件夹,其中包含三个递归原语,让运行框架能够不断演进。 好,第一个是创建工具,并设有强制性的单元测试门槛;它让模型能够编写新的 Python 工具、测试这些工具,并在后续轮次中将其热切换到工具列表中。 第二个是生命周期钩子,具体包括会话开始和完成前钩子。 它们让模型能够将自己的工具接入运行框架循环,并重写对任务完成条件的定义。 第三个是反思式记忆:一个笔记文件,以及一个简短的任务间反思步骤,让模型检查失败之处,并升级工具箱以应对下一个任务。 最后,最下方是区域三,它完全位于沙箱之外。 这里有两道护栏:一个隐藏的评分器,智能体既看不到,也无法通过操纵评估测试来作弊;还有一个外部模型代理,它保管着我们的 API 密钥,让智能体能够构建由模型驱动的工具,却永远无法接触任何机密。 好,这就是完整的蓝图。
now let's zoom into zone one and see why the gemini interaction api makes this whole loop possible. okay, the reason i built this on the gemini interaction api instead of a standard chat endpoint comes down to two design properties. first, the conversation history lives on google's side. on each turn, the harness only sends the new tool outputs along with the previous interaction id. so it never has to resend the entire conversation history. second, and this is kind of the key mechanism for recursive harness, every request on the interaction api carries its own system instructions. its own settings and its own list of tools. which means a python tool that the model writes on turn 3 can be validated by the harness and passed as a real callable function on turn 4 of the exact same conversation without restarting anything. but there is one cost detail you should know about. in my runs, the turn immediately after the tool list. changes don't hit the context cache. so if you build this, you want to patch tool updates instead of changing the tool list on every single turn. now, being able to hot swap tools mid-conversation is powerful, but it immediately creates our first failure mode inside zone 2.
现在,让我们深入了解区域一,看看为什么 Gemini Interaction API 能让这一整套循环成为可能。 好,我之所以用 Gemini Interaction API 来构建这个,而不是用标准的聊天端点,归结为两个设计特性。 第一,对话历史保存在 Google 那边。 每一轮中,执行框架只会发送新生成的工具输出,以及之前的交互 ID。 所以它不必重新发送整个对话历史。 第二点,也是递归执行框架的关键机制:Interaction API 上的每个请求都带有自己的系统指令。 也有自己的设置和工具列表。 这意味着,模型在第 3 轮编写的 Python 工具,可以由执行框架验证,并在同一段对话的第 4 轮作为真正可调用的函数传入,无需重启任何东西。 不过有一个成本方面的细节你应该知道。 在我的测试中,紧接着工具列表发生变化的那一轮, 不会命中上下文缓存。 所以如果你要构建这个系统,就应该对工具更新做增量修改,而不是每一轮都更改工具列表。 现在,在对话进行中热插拔工具固然很强大,但这会立即在区域 2 内引出我们的第一个故障模式。
if a model writes a new tool that has subtle bug in it and the harness registers it anyways, the model will call that broken tool and trust its bad output for the rest of the task. this is why zone 2 starts with a minimal kernel in plain python with no frameworks. so the base harness only has three tools, a shell runner, a file reader, and a file writer, all blocked inside a mac os sandbox so the model can only write inside its project folder and cannot read my keys. i didn't even give it a way to view images because i wanted to see what the model builds when it notices a capability is missing. now, when the model wants to grow the harness, it calls create tool, and it has to pass five things. a name, a description, the parameter schema, the python code, and at least one unit test. now, before the harness registers that tool, it loads the code and runs the tool's unit test inside the sandbox. only if every test passes, does the tool get saved into the toolbox folder and added to the next turn's tools list? okay, the thing is that the unit test gate actually saved my very first run. so the model was building a small web app and realized that it had no way to see it and called create tools to write a screenshot tool. its first test failed because the browser binary it tried to launch was not installed on my macos. so the harness rejected the tool and sent back an error. the model located my installed chrome binary, fixed the tool, passed the test, and on its very next turn called the new tool to inspect the same web page. and because the custom tools in this harness can return images straight back to the model as a image input, the single tool allowed the text-only harness to give itself eyes. okay, so now the agent can build tools whenever it needs them, but that exposes a second problem.
如果模型编写了一个带有细微漏洞的新工具,而执行框架仍然将它注册,模型就会调用这个有问题的工具,并在任务剩余过程中相信它错误的输出。 这就是为什么区域 2 要从一个用纯 Python 编写、没有任何框架的最小内核开始。 因此,基础执行框架只有三个工具:Shell 执行器、文件读取器和文件写入器。它们都被限制在 macOS 沙盒中,因此模型只能在项目文件夹内写入,无法读取我的密钥。 我甚至没有给它查看图像的能力,因为我想看看模型发现缺少某项能力时会构建什么。 现在,当模型想要扩展执行框架时,它会调用 create tool,并且必须提供五项内容。 名称、描述、参数架构、Python 代码,以及至少一个单元测试。 现在,在执行框架注册该工具之前,它会加载代码,并在沙盒中运行该工具的单元测试。 只有所有测试都通过后,该工具才会被保存到工具箱文件夹,并添加到下一轮的工具列表中。 好吧,关键是,单元测试关卡确实救了我第一次运行。 模型当时在构建一个小型 Web 应用,意识到自己没有办法查看它,于是调用创建工具来编写一个截图工具。 它第一次测试失败了,因为它尝试启动的浏览器二进制文件并未安装在我的 macOS 上。 于是运行框架拒绝了这个工具,并返回了一条错误信息。 模型找到了我安装的 Chrome 二进制文件,修好了这个工具,通过了测试,并在下一轮立刻调用新工具来检查同一个网页。 而且,由于这个运行框架里的自定义工具可以直接把图像作为图像输入返回给模型,这一个工具就让纯文本运行框架拥有了视觉能力。 好,现在代理可以在需要时构建工具了,但这也暴露了第二个问题。
just because an agent builds a tool on task one does not mean it will remember to use it on task two. so tools gives the agent new capabilities, but they do not change how the harness loop itself behaves. this is what the second and third part of our toolbox are, hooks and memory. So a hook attaches one of the more zone tools to a specific moment in the harness loop and I give it two hook points. the first one is session start, which runs before turn one of a task and shows its output to the model right away. the second one is before done, which runs when the model says it's finished. if the tool attached to before done reports a failure, the harness blocks the finish and sends the failure back to the model. which means the model can write its own task specific definition of done and the harness will enforce it automatically on every future task. now to carry knowledge across tasks the toolbox folder also holds a short note file that the model writes for its future self. which the harness injects at the start of every task, and between tasks the model gets a short reflection session with a report of what passed, failed, so it can fix, merge, or prune tools and hooks. now, letting an agent write its own tools and its own definition of done creates two immediate ways the agent can cheat or break your system, which brings us to zone 3 for architecture.
代理在任务一中构建了某个工具,并不意味着它会记得在任务二中使用它。 所以,工具赋予代理新的能力,但不会改变运行框架循环本身的运作方式。 这就是我们工具箱的第二和第三部分:钩子和记忆。 钩子会把某个更高级的工具挂接到运行框架循环中的特定时刻,我为它设置了两个挂接点。 第一个是会话开始,它会在任务的第一轮之前运行,并立即把输出展示给模型。 第二个是完成前,它会在模型表示自己已经完成时运行。 如果挂接到完成前的工具报告失败,运行框架就会阻止任务结束,并把失败信息发回给模型。 这意味着模型可以为每项任务编写自己的具体完成标准,而运行框架会在今后的每项任务中自动执行这些标准。 为了让知识能在不同任务之间延续,工具箱文件夹还保存着一个简短的笔记文件,由模型写给未来的自己。 运行框架会在每项任务开始时注入这份笔记;而在任务之间,模型会进行一次简短的反思,并查看哪些内容通过了、哪些失败了的报告,从而修复、合并或精简工具和钩子。 现在,让代理编写自己的工具和自己的完成标准,会立刻带来两种代理可能作弊或破坏系统的方式。这就引出了架构的第 3 区。
there are two guardrails running outside the sandbox that made the biggest difference in my runs, and if you build a recursive harness, you should copy both. first, the model never sees how it is created. whenever a model can read its creator, it starts optimizing the creator instead of the app. so every task here is scored by hidden check that runs outside the sandbox. and the model only gets back the names of the check that passed or failed. second, tools inside the sandbox never hold secrets. if a custom tool needs to call a model, for example, to describe a video, it calls a small broker running outside the sandbox that holds the api key and enforces a strict budget. that way, the agent can build model-powered tools without ever seeing a key. this is all three zones of the architecture working together. now let's run the three experiments and see where this recursive harness wins and where it breaks.
有两道在沙箱之外运行的护栏,对我的运行结果影响最大。如果你要构建一个递归运行框架,就应该把这两道护栏都照搬过去。 首先,模型永远不会看到自己是如何被创建出来的。 只要模型能读到创建者的信息,它就会开始优化创建者,而不是应用。 因此,这里的每项任务都由一个在沙箱之外运行的隐藏检查来评分。 模型收到的只有通过或未通过检查的名称。 其次,沙箱内的工具绝不会持有秘密。 例如,如果自定义工具需要调用模型来描述视频,它就会调用一个在沙箱外运行的小型代理,由它保管 API 密钥并严格控制预算。 这样一来,智能体就能构建由模型驱动的工具,却永远看不到密钥。 这就是架构中的三个区域协同工作的方式。 现在,我们来运行这三项实验,看看这个递归式运行框架在哪些方面奏效,又会在哪里出问题。
Speaker 1Here we see the self-evolving agent in its natural habitat, the sandbox. It's a workspace actually. It has already built itself eyes. and now. Now it wants a voice. Hello? Is this thing on? Oh, it works.
我们在它的自然栖息地——沙箱中,看到了这个自我进化的智能体。 准确来说,这是一个工作区。 它已经给自己造好了眼睛。 而现在…… 现在它想要一个声音。 喂? 这玩意儿开着吗? 哦,能用了。
Speaker 0 To give the agent a voice, the harness needs a text-to-speech model. This is where today's sponsor, Fish Audio, comes in. I have partnered with them to show you Drama 3, their new text-to-speech model. In this harness, a voice would be just one more tool that the agent builds with create tool. and the fish audio api key would stay in the broker outside the sandbox, exactly like the gemini key. now, the best part is that you direct drama 3 with plain words in square brackets, which is exactly how the narrator you just heard was written. and the crazy part is that you can give every speaker a different voice in a single request.
要让智能体拥有声音,运行框架需要一个文本转语音模型。 这正是今天的赞助商 Fish Audio 派上用场的地方。 我与他们合作,向大家介绍他们全新的文本转语音模型 Drama 3。 在这个运行框架中,语音只不过是智能体通过 create tool 构建的又一个工具。 Fish Audio API 密钥会留在沙箱外的代理程序中,就像 Gemini 密钥一样。 现在,最棒的是,你只需用方括号里的普通文字来指导 Drama 3,这正是你刚才听到的旁白的写法。 更厉害的是,你可以在一次请求中为每位说话者指定不同的声音。
Speaker 1I built a screenshot tool, a pixel diff tool, and a hook that checks every page before I finish. I wrote one Python script. And? And threw it away. We both got twelve out of twelve. Mine has unit tests. Cool. They all pass.
我做了一个截图工具、一个像素差异工具,还写了一个钩子,在我完成之前检查每个页面。 我写了一个 Python 脚本。 然后呢? 然后把它扔掉了。 我们俩都拿了十二分,满分十二分。 我的还有单元测试。 不错。 测试全都通过了。
Speaker 0 For the launch, Drama 3 API is $10 per million UTF-8 bytes. And if you would rather run it yourself, the model weights are open on Hugging Face. so check it out. it's pretty amazing. link is going to be in the description. okay, back to the experiments. so for the first experiment, i built a series of real web apps, starting with a simple note app and scaling it to an offline trip planner where each app is harder than the last. i ran the evolving harness against a frozen harness on the exact same tasks, where the frozen one only ever had the three base tools and kept nothing between tasks. so on app one, the evolving agent builds its chrome screenshot tool and on app two, it built a pixel comparison tool. then in its first reflection session, it did something i didn't expect. it turned its own browser check into before done hook. so from then, it could not finish a task until the app passed that check. and it added a session start hook that surveys every new project automatically. so for example, when a task came with a bug report as a video, it built the video tool that finds where the screen changes and pulls out the exact frame. watching the log, it looked like the evolving harness was going to win by a mile. and then i looked at the final scoreboard. both harnesses passed every single hidden check on every single app and they took almost the exact same amount of time. Okay, so that result kind of surprised me.
发布时,Drama 3 API 的价格是每百万 UTF-8 字节 10 美元。 如果你更愿意自己运行,模型权重已在 Hugging Face 上开放。 所以去看看吧。 真的很厉害。 链接会放在简介里。 好了,回到实验。 第一个实验中,我构建了一系列真正的 Web 应用,从简单的笔记应用开始,逐步扩展到离线旅行规划器,每个应用都比上一个更难。 我让不断迭代的测试框架和冻结的测试框架执行完全相同的任务;冻结版始终只有三个基础工具,而且不会在任务之间保留任何内容。 在第一个应用中,不断迭代的智能体构建了自己的 Chrome 截图工具;到了第二个应用,它又构建了像素对比工具。 然后在它的第一次反思环节中,它做了一件我没想到的事。 它把自己的浏览器检查变成了一个任务完成前钩子。 于是从那以后,除非应用通过这项检查,否则它就无法完成任务。 它还添加了一个会自动调查每个新项目的会话启动钩子。 比如,当任务附带的视频 bug 报告时,它就构建了一个视频工具,用来找出屏幕变化的位置并提取准确的画面。 看着日志,我觉得不断进化的测试框架会轻松胜出。 然后我查看了最终比分。 两个测试框架在每个应用的每一项隐藏检查中都全部通过,而且耗时几乎完全相同。 好吧,这个结果确实有点出乎我的意料。
So for round two, I decided to make tests much harder. I took away the image helper and the external broker completely. So the frozen agent has no built in way to look at the screenshots or videos at all. and it still rebuilt the pricing page down to the pixel. so when i checked the logs to see how it pulled that off, i found that the frozen agent wrote a small program that called the text recognition built into mac os to read the reference screenshot and then wrote plain python to measure the exact colors and edges. even wilder, when i gave it a silent bug report video with no changes, the frozen agent wrote its own computer vision script from scratch. it matched the reference photos against the video frames to track the order, found the drop marker by filtering for its exact color, and fixed all of the bugs. now, by the way, all of this was running on Gemini 4 argon. and this is kind of the first major lesson from these runs. a frontier model with a shell will build whatever capability it needs in line, whether the harness lets it save tools or not. which is pretty incredible on its own. so this raises the real question, when does keeping those evolved tools actually pay off? and when does it backfires?
所以第二轮,我决定把测试难度提高很多。 我完全移除了图像辅助工具和外部代理。 因此,冻结的智能体完全没有内置的办法查看截图或视频。 但它仍然把定价页面像素级地重建了出来。 所以我查看日志,想弄清它是怎么做到的,结果发现冻结的智能体写了一个小程序,调用 macOS 内置的文字识别功能来读取参考截图,然后用纯 Python 精确测量颜色和边缘。 更夸张的是,当我给它一段没有任何变化的静音 bug 报告视频时,冻结的智能体从头开始编写了自己的计算机视觉脚本。 它将参考照片与视频画面进行匹配以追踪顺序,通过筛选特定颜色找到了下落标记,并修复了所有 bug。 顺便说一下,这一切都是在 Gemini 4 Argon 上运行的。 而这就是这些测试带来的第一个重要启示。 只要有 shell,前沿模型就会当场构建所需的任何能力,不管测试框架是否允许它保存工具。 光这一点就相当不可思议了。 所以,这就引出了一个真正的问题:保留这些进化出来的工具,什么时候才值得? 又什么时候会适得其反?
so to test where persistence actually matter, i ran a third round, five tasks on a custom binary file format, where every task needs a complex parser that takes real work to write. here, the recursive harness paid off immediately. on task one, it spent a few extra minutes turning its parser into a library inside its toolbox. on the next four tasks, it called that parser right away and finished significantly faster than the frozen agent, which had to write the new parser from scratch every single time. but when i ran a second evolving harness that started with this binary family with an empty toolbox, it hit the. exact ironic trap of self-improvement. remember how our whole goal was to escape bloated harness? that fresh agent built the most impressive toolbox of all my runs, but on every reflection, it kept adding more checks to its own before-done hook. by task 5, the agent had bloated its own harness and running. It's growing before then checklist eight hundred percent of the time it's saved from reusing the binary parser. now, i also got two more failure modes.
为了测试持久化究竟何时发挥作用,我进行了第三轮测试:针对一种自定义二进制文件格式的五项任务,每项任务都需要一个编写起来相当费力的复杂解析器。 在这里,递归式工具框架立刻发挥了作用。 在第一项任务中,它多花了几分钟,把解析器整理成工具箱里的一个库。 接下来的四项任务中,它直接调用这个解析器,完成速度明显快于冻结版智能体;后者每次都得从头编写新的解析器。 但当我运行第二个进化式工具框架时,它一开始面对的是这个二进制文件系列,工具箱却是空的,结果它陷入了…… 自我改进中那个恰如其分、令人哭笑不得的陷阱。 还记得我们的全部目标是摆脱臃肿的工具框架吗? 这个新智能体打造出了我所有测试中最令人印象深刻的工具箱,但每次反思时,它都会继续往自己的完成前钩子里添加更多检查。 到第 5 项任务时,智能体把自己的工具框架撑得臃肿不堪,运行…… 它不断增长的完成前检查清单,耗费的时间是复用二进制解析器所节省时间的八倍。 此外,我还发现了另外两种失败模式。
once the agent built a stricter pixel diff tool, it kept re-verifying a page that had already passed until it ran out of time. and it's growing before the check started copying the name of the hidden check directly from the task description. so across all three rounds, the takeaway is that recursive self-evolving harness does not make the model smarter. because a strong model builds through scripts inline anyway. it pays off under these specific conditions. when a capability is expensive to rebuild from scratch, when your task repeats in a domain family, and when the evolution stays lean so that the agent doesn't bloat its own loop. so if you're building a recursive harness on the interaction api, start with these four rules from our architecture. start with tiny 3.2 kernel inside a sandbox so every new tool is forced by a real task need. require unit test inside create tool before any generalized function enters the tool list. then keep your grader and your secret brokers outside the. A sandbox in zone 3, use session start and before-done hooks with the model can improve its own process but keep reflection short. And strictly cap your before-done hook so it stays fast. now, i'm going to be running more experiments on recursive self-improving harnesses with weaker models. so if you're interested in that, make sure to subscribe to the channel. i would love to know how you're handling tool boot and your own agent harnesses. so share your approaches in the comment section below. And you will find all the links in the description. Anyways, I hope you found this video useful. Thanks for watching and as always, see you in the next one.
有一次,智能体构建了一个更严格的像素差异工具,之后却不断重新验证一个已经通过检查的页面,直到时间耗尽。 而且,在不断增长的完成前检查中,它开始直接照抄任务描述里的隐藏检查名称。 因此,纵观这三轮测试,结论是:递归式自进化工具框架并不会让模型变得更聪明。 因为强大的模型本来就会在需要时直接编写内联脚本。 只有在以下特定条件下,它才有价值。 当某项能力从头重建代价高昂、任务会在同一领域系列中重复出现,并且进化过程保持精简、不让智能体把自己的循环搞得臃肿时。 所以,如果你正在基于交互 API 构建递归式工具框架,可以从我们架构中的这四条规则入手。 从沙盒里的微型 3.2 内核开始,让每个新工具都必须由实际任务需求来驱动。 要求在创建工具时先编写单元测试,之后才能将任何通用函数加入工具列表。 然后把你的评分器和秘密代理留在外面。 在 3 区的沙盒中,使用会话开始和结束前钩子,让模型改进自己的流程,同时让反思保持简短。 并且严格限制结束前钩子的执行时间,确保它足够快。 现在,我打算用较弱的模型对递归式自我改进框架进行更多实验。 如果你对此感兴趣,记得订阅频道。 我很想知道你是如何处理工具启动和自己的智能体框架的。 所以欢迎在下方评论区分享你的做法。 所有链接都在简介里。 总之,希望这个视频对你有帮助。 感谢收看,一如既往,我们下期再见。