智能体需要控制流,而不是更多的提示
阅读原文· bsuh.bearblog.dev当前AI智能体的开发过度依赖提示工程,导致系统复杂且脆弱。文章主张智能体应转向采用编程中的控制流结构,如条件判断、循环和函数调用,以实现更可靠、可维护的决策与行动序列。这一转变能减少提示长度和调试负担,提升智能体处理复杂、多步骤任务的能力,是构建下一代实用AI助手的关键。
agents need control flow, not more prompts
07 May, 2026
Thesis: reliable agents tackling complex tasks need deterministic control flow encoded in software, not increasingly elaborate prompt chains
If you’ve ever resorted to MANDATORY or DO NOT SKIP, you’ve hit the ceiling of prompting.
Imagine a programming language where statements are suggestions and functions return “Success” while hallucinating. Reasoning becomes impossible; reliability collapses as complexity grows.
Software scales through recursive composability: systems built from libraries, modules, and functions. It’s code all the way down. Code exposes predictable behavior, enabling local reasoning. Prompt chains lack this property. While useful for narrow tasks, prompts are non-deterministic, weakly specified, and difficult to verify.