Agent可靠性靠代码控制流,非提示工程
推荐指数 69.0 NO. 014 · 2026.05.08
发布2026/05/07Score125Comments60
为什么值得看
作者提出复杂任务Agent的可靠性瓶颈在于缺乏确定性控制流,而非提示词不够精巧。这对正在用提示词硬撑Agent复杂度的工程师有直接警示意义。
编辑判断
这篇文章切中了一个正在扩散的行业误区:很多人把LangChain、AutoGPT这类框架的prompt模板越堆越厚,本质上是在用概率系统模拟确定性逻辑。实际上更成熟的工程实践已经出现分化——像Temporal、Cadence这类工作流引擎正在被重新发现用于Agent编排,而OpenAI的Responses API和Anthropic的MCP也在把工具调用结构化。如果你现在的Agent还在靠"MANDATORY"和"DO NOT SKIP"维持秩序,建议直接评估把关键路径迁移到确定性状态机或规则引擎,LLM只保留在真正需要推理的节点,而不是让它决定流程走向。
社区反馈
意见分歧 58 条评论
核心争论:LLM可靠性应靠确定性代码控制流,还是提示工程仍有价值空间
If you're trying to get reliability and determinism out of the LLM, you've already lost
Wait... why? Making an unreliable, nondeterministic system give reliable results for a bounded task with well-understood parameters is... like half of engineering, no? There's a huge difference between "generate this code here's a vague feature description" and "here's a list of criteria, assign thi
Because it's not possible. There is nothing you can say to the LLM that will guarantee that something happens. It's not how it works. It will maybe be taken into consideration if you're lucky. But if you're trying to tell me that every time you list criteria you get them all perfectly matched, you'r