arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2607.27578cs.AI

提示词为何构成图:提示词图工程的充要条件

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

  • Federal Institute of Goiás(戈亚斯联邦学院)

机构由 AI 辅助整理,请以论文原文为准。

Sandeco Macedo

AI总结:

本研究通过文献分析构建了将提示词视为图节点的定义,提出提示词图工程的四个条件及操作化测试,明确其边界并应用于六个系统,为相关实践提供可操作定义与共享术语。

AI中文摘要:

提示词早已不再是孤立的字符串。在实际系统中,一次模型调用会触发另一次调用,检索与生成交替进行,路由节点会分支,聚合节点会合并并行结果。实践中形成了一种统一的结构来整合这些操作:图。LangGraph、DSPy、Prompt Flow等框架公开采用了这种结构,研究系统也已开始对其进行自动优化。然而,相关术语的发展滞后了。“图”这一名称被用来指代同一采样策略内的推理拓扑、多智能体对话或编排工件,而提示词工程仍被理解为编写一个优质字符串。缺失的是一种参考定义,将提示词视为显式、可执行、可改进图的节点。我们通过对具有持久标识符的文献进行概念分析,并辅以一手灰色文献,构建了该定义。我们追溯了这一理念的谱系:从数据流图和构建系统,到提示词链和思维拓扑(链、树、图),再到作为工件编译和优化的图。随后,我们提出了提示词图工程的构成性定义,明确其四个条件:显式结构、结构与提示词内容分离、可执行语义、图作为一等工程工件,并将其操作化为包含与排除测试。我们划定了其与六个邻近概念的边界,并将该测试应用于六个实际系统(LangGraph、DSPy、Prompt Flow、AutoGen、CrewAI及Claude Code子智能体),测试结果的包含与排除关系始终一致。最后,我们提出了沿四个设计张力轴展开的研究议程。本研究的贡献在于,为工业界已日常实践但未明确命名的这一领域提供了可操作的定义和共享术语。

英文摘要:

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.

↑