让大模型先按蓝图执行,再处理任务,提升流程可靠性。
Blueprint First, Model Second: A Framework for Deterministic LLM Workflow
- 先写好代码化的执行蓝图,再由确定性引擎执行,模型仅处理子任务。
- 在旅行规划任务中通过率提升至35.56%,约束违规减少96%。
- 适合需要严格流程控制的生产级智能系统部署。
大型语言模型代理固有的非确定性限制了其在结构化操作环境中的应用,因高阶规划与低阶执行混杂于单一生成过程。为此,我们提出基于“蓝图优先,模型次之”理念的 extsc{Source Code Agent} 框架,将工作流逻辑与生成模型解耦。专家定义的操作流程首先被编码为基于源码的执行蓝图,再由确定性引擎执行。大模型仅作为专用工具处理有限范围内的复杂子任务,不参与流程路径决策。在面向约束感知旅行规划的 TravelPlanner 基准测试中,该框架在 Claude-Sonnet-4 骨干下实现 35.56% 的最终通过率,相比 SOTA 基线 ATLAS(18.00%)提升 97.6%;约束违规从 275 次降至 11 次(减少 96.0%),执行效率提高 27.1%(10.2±0.7 步 vs 14.0 步)。两个生产环境故障诊断部署及 ScienceWorld、ALFWorld 上的结果表明,该架构可泛化至其他程序化、强约束工作流。本工作实现了可在严格流程逻辑下验证与可靠部署的自主代理。
原文摘要 · Abstract (English)
While powerful, the inherent non-determinism of large language model (LLM) agents limits their application in structured operational environments where procedural fidelity and predictable execution are strict requirements. This limitation stems from current architectures that conflate probabilistic, high-level planning with low-level action execution within a single generative process. To address this, we introduce the \textsc{Source Code Agent} framework, a new paradigm built on the ``Blueprint First, Model Second'' philosophy that decouples workflow logic from the generative model. An expert-defined operational procedure is first codified into a source code-based Execution Blueprint, which is then executed by a deterministic engine. The LLM is strategically invoked as a specialized tool to handle bounded, complex sub-tasks within the workflow, but never to decide the workflow's path. We evaluate on the TravelPlanner benchmark for constraint-aware travel planning. The \textsc{Source Code Agent} achieves a 35.56\% final pass rate, a 97.6\% improvement over the state-of-the-art ATLAS baseline (18.00\%) on the same Claude-Sonnet-4 backbone. Critically, it reduces constraint violations by 96.0\% (11 vs 275) while improving execution efficiency by 27.1\% (10.2$\pm$0.7 steps vs 14.0). Two production incident-diagnosis deployments and additional results on ScienceWorld and ALFWorld confirm that the architecture transfers beyond travel planning to procedurally well-defined, constraint-intensive workflows. Our work enables the verifiable and reliable deployment of autonomous agents in applications governed by strict procedural logic.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。