SPL:使用声明式确定性-概率性组合编排工作流
SPL: Orchestrating Workflows with Declarative Deterministic-Probabilistic Composition
AI总结:
研究提出SPL语言统一确定性与概率性计算模式,通过共享语法等实现跨平台运行。经实验验证,求解器分支有较高机器验证正确性,对比仅用大语言模型的分支,呈现后端难度梯度,主要失败模式为求解器错误。
摘要:
我们提出了SPL(结构化提示语言),这是一种在单个规范中组合确定性和概率性计算模式的声明式语言。现有框架将两者分开,而SPL将它们统一起来。它为概率计算提供GENERATE/EVALUATE,为确定性计算提供SOLVE/ASSERT,共享语法、变量绑定和运行时路由。一个.spl规范可在本地节点、云API和分布式网格上不变地运行。我们通过一个广泛的78个食谱的菜谱和一个1200次运行的对照实验验证了SPL。求解器分支实现了82%-93%的机器验证正确性,而仅使用大语言模型的分支衡量的是未经数学验证的输出生成。出现了后端难度梯度,主要失败模式是求解器错误,而非格式不兼容。
英文摘要:
We present SPL (Structured Prompt Language), a declarative language that composes deterministic and probabilistic computation modes in a single specification. While existing frameworks separate these -- orchestration systems (AutoGen, CrewAI, LangGraph) for LLM calls, symbolic tools (SymPy, SageMath, Lean) for computation -- SPL unifies them. It provides GENERATE/EVALUATE for probabilistic computation and SOLVE/ASSERT for deterministic computation, sharing syntax, variable bindings, and runtime routing. A .spl specification runs unchanged across local nodes (Ollama), cloud APIs (OpenRouter, Anthropic), and distributed grids (Momagrid), with model and verifier selection deferred to invocation time. We validate SPL through an extensive 78-recipe cookbook and a controlled 1,200-run experiment (10 models x 20 problems x 2 arms x 3 repetitions; the 20 problems span 6 difficulty tiers). The solver arm achieves 82-93% machine-verified correctness (sonnet-4-6: 85%, gemma4:e2b: 93%) while the LLM-only arm measures output production without mathematical verification, making the comparison one of verified correctness against unverified fluency. A backend difficulty gradient emerges (SymPy 78%, Sage 54%), and the dominant failure mode is solver_error (kernel-rejected expressions), not format non-compliance.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。