arXiv:2607.27578cs.AI2026-07被引 1

给提示词设计一套可执行的图结构标准,让复杂AI流程有章可循。

What makes prompts a graph: necessary and sufficient conditions for prompt graph engineering

论文配图:What makes prompts a graph: necessary and sufficient conditions for prompt graph engineering
图 1 · 摘自论文原文
  • 提出提示图工程的四要素:显式结构、结构与内容分离、可执行语义、图作为核心工程对象
  • 通过包含/排除测试验证六款主流系统(如LangGraph、AutoGen)是否符合定义
  • 为行业已用但未明确定义的提示图实践提供统一语言和边界

提示词已不再是孤立字符串。在真实系统中,模型调用相互依赖,检索与生成交错,路由分叉,聚合合并并行结果。实践逐渐统一于一种结构——图。LangGraph、DSPy、Prompt Flow等框架已公开暴露此结构,研究系统也已开始自动优化。然而术语滞后:图被混用为单一采样策略中的推理拓扑、多智能体对话或编排产物,而提示工程仍被理解为写一个好字符串。缺失的是对提示作为显式、可执行、可改进图节点的参考定义。本文通过概念分析与带持久标识符的源文献,重构该思想谱系:从数据流图与构建系统,经提示链与思维拓扑(链、树、图),到编译优化后的图化产物。我们提出提示图工程的构成性定义,明确四项条件(显式结构、结构与内容分离、可执行语义、图作为首类工程对象),并将其操作化为包含/排除检验。划定与六类相邻概念的边界,并应用于六项真实系统(LangGraph、DSPy、Prompt Flow、AutoGen、CrewAI、Claude Code子代理),结果一致。最后提出沿四个设计张力轴展开的研究议程。贡献在于为产业每日实践却未精确命名的提示图方法,提供操作化定义与共享词汇。

原文摘要 · Abstract (English)

Prompts stopped being isolated strings some time ago. In real systems, one model call feeds another, retrieval interleaves with generation, routers branch, and aggregators merge parallel results. Practice converged on a single structure to hold this together: the graph. Frameworks such as LangGraph, DSPy, and Prompt Flow expose it openly, and research systems already optimize it automatically. The vocabulary, however, lags behind. Graph names, variously, a reasoning topology inside one sampling strategy, a multi-agent conversation, or an orchestration artifact, while prompt engineering still evokes writing one good string. What is missing is a reference definition treating prompts as nodes of an explicit, executable, improvable graph. We build that definition through conceptual analysis over sources with persistent identifiers, complemented by primary grey literature. We reconstruct the genealogy of the idea, from dataflow graphs and build systems, through prompt chaining and the thought topologies (chain, tree, graph), to graphs compiled and optimized as artifacts. We then propose a constitutive definition of prompt graph engineering, state its four conditions (explicit structure, separation between structure and prompt content, executable semantics, and the graph as a first-class engineering artifact), and operationalize them as an inclusion and exclusion test. We draw the boundary against six neighboring concepts and apply the test to six real systems (LangGraph, DSPy, Prompt Flow, AutoGen, CrewAI, and Claude Code subagents); it includes and excludes consistently. We close with a research agenda organized along four design tension axes. The contribution is an operational definition and a shared vocabulary for a practice that industry already exercises daily without naming precisely.

提示工程图结构AI架构系统设计

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。