最新资讯
dev.to 用 Switch 构建 AI 投资委员会:多空研究员 Agent 协作 bloomberg.com 微软正结束向甲骨文租用 AI 云算力的协议 the-decoder.com Perplexity 推出常驻 AI Agent“Teammates” dev.to osFoundry的Loop和Graph是什么,何时该用哪个? dev.to 限制上下文而非限制评审:面向开源补丁的字节预算证据包 dev.to 约束自主智能体:用 GKE Agent Sandbox 实现亚秒级零信任执行 dev.to 实测:给 Claude Code 十个翻译工具,三次运行中有一次完全不用 unite.ai Ramp 数据:企业 AI token 用量增速超过支出增速 pub.towardsai.net AI 生成的 ICLR 评审对被拒论文更宽松:如何压力测试你的 rebuttal blogs.nvidia.com NVIDIA 开源工具如何助力研究者构建下一代 6G 网络 wired.com AI 公司正积极收购企业工作文件与邮件用于模型训练 wechat 网友用AI搓出来的“App”,可以直接在小红书玩起来了?
多元动态
登录 注册
智能体 dev.to · @Sudeep Hazra

你的 Agent 不需要写一篇小作文来做决策

原文 我的收藏

文章观察到近期 LocalLLaMA 项目展示中出现一批不生成散文的小模型:输入状态、问题和固定选项,输出每个选项的概率。作者认为工具调用流程中的选工具、判断命令是否可自动执行、上一步是否成功、是否重试或转人工、下一步看哪篇检索文档等,都是封闭集合决策,用生成模型写段落再解析来选择枚举值过于复杂。作者主张开放式推理和内容生成用生成模型,约束式决策用专门的决策组件。

AI推荐理由 提出 Agent 循环中的封闭集合决策(选工具、判断命令是否安全、是否重试等)更适合用输出概率的约束式决策组件,而非让生成模型写段落再解析;观点明确且对 Agent 架构设计有实际参考价值,但基于 LocalLLaMA 项目展示的观察,属个人观点而非验证结论。

70

正文

Something interesting appeared in a recent LocalLLaMA project showcase. Several projects were exploring small models that do not generate prose. They take a state, a question, and a fixed set of choices, then return a probability for each choice. That sounds less impressive than an autonomous agent narrating its plan. It may also be exactly what many agent loops need. Consider the decisions inside a typical tool-using workflow: Which tool should handle this request? Is this command safe enough to run automatically? Did the previous step succeed? Should the workflow retry, stop, or ask a person? Which retrieved document should be examined next? These are closed-set decisions. Asking a generative model to produce a paragraph, parsing that paragraph, and hoping it stayed inside the allowed choices is a surprisingly elaborate way to select one value from an enum. My current view is simple: use generative models for open-ended reasoning and content. Use constrained decision components when the answer space is already known. Generation and decision are different jobs A generative model is useful when the output cannot be enumerated in advance. Writing a migration plan, diagnosing an unfamiliar failure, explaining a trade-off, or proposing a patch all need flexible output. Routing a ticket to one of twelve queues does not. We often use the same large model for both jobs because the API is convenient. The model receives a prompt such as: Choose one action: retry, stop, escalate. Return JSON only. Enter fullscreen mode Exit fullscreen mode The application then validates the response, repairs malformed JSON, rejects invented actions, and perhaps asks the same model to try again. We added a language generator, then built a fence around its language generation. Structured output improves the interface, but it does not change the underlying job. The system still generates tokens to choose from a fixed set. Projects such as Contrastive Language Models approach the problem differently. CLM encodes the current state and candidate actions, scores their relationship, and returns a distribution over the supplied actions. The repository describes uses such as tool routing, trajectory ranking, and retrieval shortlisting. Decider takes another route. It reads a state and typed questions, then produces probabilities for fixed choices, yes-or-no decisions, or described score levels in one pass. Its core promise is deliberately narrow: no free-form decoding and no output outside the choices supplied by the application. These projects are early and their benchmark claims need independent validation. The architecture is still worth paying attention to. The application should own the choice set In a production agent, the model should not decide which actions exist. The application should. application state + allowed actions ↓ decision component ↓ probabilities ↓ policy and threshold ↓ execute, ask, or stop Enter fullscreen mode Exit fullscreen mode That boundary gives us several useful properties. First, impossible actions stay impossible. If delete_customer is not in the candidate set, the decision component cannot select it. This is stronger than telling a model in a prompt not to mention deletion. Second, the result is inspectable. A distribution such as this is easier to evaluate than a persuasive paragraph: { "retry": 0.18, "stop": 0.07, "escalate": 0.75 } Enter fullscreen mode Exit fullscreen mode Third, the application can apply policy after inference. A high score is evidence, not authority. if decision == "retry" and probability >= 0.90 and retry_count = 2 does not need inference. A model becomes useful when the state contains language or evidence that code cannot classify reliably with a small, stable rule set. Run shadow evaluations before granting automation. Record the model's decision and probability without executing it. Compare that output with the actual operator or workflow decision. This shows where a threshold would automate safely and where it would merely automate confidence. Do not create a second platform by accident There is a predictable failure mode here. A team sees specialized decision models, creates a separate serving stack, a feature store, a training pipeline, an evaluation service, and a new control plane before proving that one decision benefits from any of it. Start with one bounded choice that occurs frequently enough to matter. Tool routing is a reasonable candidate. Define the allowed tools, create a representative test set, compare rules and models, and measure error cost. Serve a smaller model only if it produces a material latency, cost, privacy, or accuracy benefit. For low-volume workflows, a general model with strict structured output may remain the simplest operational choice. Fewer services can be worth a little extra inference cost. The recommendation changes when decision calls dominate the loop. If an agent makes dozens of small choices per task, generation latency and token cost accumulate. A fast decision component can then reduce both, while giving the application a consistent probability interface. Keep the agent for the parts that need an agent Open-ended work still benefits from capable generative models. A decision model will not investigate an unfamiliar production failure, compare architecture options, or write a useful migration plan. It can decide which diagnostic to run next from an approved list. It can estimate whether the evidence supports another step. It can route uncertainty to a person before the workflow turns a weak guess into an action. That is enough. An agent does not become less intelligent because some decisions move into smaller, constrained components. The system becomes clearer about where intelligence is needed, where policy belongs, and where ordinary code is still the better tool. If the answer must be one of five choices, make the system choose one of five choices. Save the essay for the part that needs an explanation.

来源报道 · 1 篇 · 以下链接均前往原始媒体

← 返回精选动态 原文

更多内容