arXiv:2508.05012cs.DBcs.AI2025-08被引 6

让提示词成为可动态调整的智能组件,提升大模型流程的灵活性与可维护性。

Making Prompts First-Class Citizens for Adaptive LLM Pipelines

  • 将提示词视为第一类对象,支持版本化管理与溯源分析。
  • 运行时根据反馈自动优化提示词,实现动态适应。
  • 通过规则驱动机制,实现提示词的自动化重构,适合复杂AI流程设计者。

现代大模型流水线日益呈现数据驱动应用的复杂性:涉及数据检索、错误修正、外部工具调用及代理间协作。然而,控制整个流程的核心——提示词,仍是一个脆弱且不透明的字符串,与程序逻辑完全脱节。这种割裂严重限制了复用、优化和运行时自适应的可能性。本文提出SPEAR(结构化提示执行与自适应优化)的设计愿景与初步方案,将提示词作为执行模型中的第一类公民。SPEAR实现:(1) 结构化提示管理,通过版本化视图支持溯源与推理;(2) 运行时自适应提示优化,根据反馈动态演化提示内容;(3) 策略驱动控制,以条件-动作规则形式定义自动优化逻辑。该方法在现有提示优化框架与语义查询引擎基础上形成互补,解锁多项优化潜力,初步实验验证了其显著前景。

原文摘要 · Abstract (English)

Modern LLM pipelines increasingly resemble complex data-centric applications: they retrieve data, correct errors, call external tools, and coordinate interactions between agents. Yet, the central element controlling this entire process -- the prompt -- remains a brittle, opaque string that is entirely disconnected from the surrounding program logic. This disconnect fundamentally limits opportunities for reuse, optimization, and runtime adaptivity. In this paper, we describe our vision and an initial design of SPEAR (Structured Prompt Execution and Adaptive Refinement), a new approach to prompt management that treats prompts as first-class citizens in the execution model. Specifically, SPEAR enables: (1) structured prompt management, with prompts organized into versioned views to support introspection and reasoning about provenance; (2) adaptive prompt refinement, whereby prompts can evolve dynamically during execution based on runtime feedback; and (3) policy-driven control, a mechanism for the specification of automatic prompt refinement logic as when-then rules. By tackling the problem of runtime prompt refinement, SPEAR plays a complementary role in the vast ecosystem of existing prompt optimization frameworks and semantic query processing engines. We describe a number of related optimization opportunities unlocked by the SPEAR model, and our preliminary results demonstrate the strong potential of this approach.

提示工程大模型流水线自适应SPEAR

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