Large Language Models (LLMs) execute complex multi-turn interaction protocols but lack formal specifications to verify execution against designer intent. We introduce FASTRIC, a Prompt Specification Language that makes implicit Finite State Machines (FSMs) explicit in natural language prompts, enabling conformance verification through execution trace analysis. The LLM serves as intelligent execution agent: interpreting designer-encoded FSMs to execute specified behavioral roles. Unlike symbolic specification languages requiring parsers and compilers, FASTRIC leverages LLMs as unified infrastructure-simultaneously parser, interpreter, runtime environment, and development assistant. FASTRIC guides designers to articulate seven FSM elements (Final States, Agents, States, Triggers, Roles, Initial State, Constraints) structuring multi-turn interactions. Specification formality-ranging from implicit descriptions that frontier models infer to explicit step-by-step instructions for weaker models-serves as a design parameter. We introduce procedural conformance as verification metric measuring execution adherence to FSM specifications. Testing a 3-state kindergarten tutoring FSM across four formality levels and three model scales (14.7B, 685B, 1T+ parameters) reveals optimal specification formality is a function of model capacity. DeepSeek-V3.2 (685B) achieves perfect conformance (1.00) at L2-L4; ChatGPT-5 (~1T) peaks at L3 (0.90) before collapsing at L4 (0.39); Phi4 (14.7B) shows no stable optimum with high variance (SD=0.16-0.36). These findings reveal model-specific formality ranges-"Goldilocks zones"-where specifications provide sufficient structure without over-constraint, establishing Prompt Specification Engineering for creating verifiable interaction protocols, transforming multi-turn interaction design from heuristic art to systematic engineering with measurable procedural guarantees.


翻译:大语言模型(LLMs)执行复杂的多轮交互协议,但缺乏形式化规约来验证执行过程是否符合设计者意图。本文提出FASTRIC,一种提示规约语言,可将自然语言提示中隐含的有限状态机(FSMs)显式化,通过执行轨迹分析实现一致性验证。LLM作为智能执行代理:通过解释设计者编码的FSM来执行指定的行为角色。与需要解析器和编译器的符号规约语言不同,FASTRIC利用LLM作为统一基础设施——同时承担解析器、解释器、运行时环境和开发助手的功能。FASTRIC引导设计者阐明构成多轮交互的七个FSM要素(终止状态、智能体、状态、触发器、角色、初始状态、约束条件)。规约的形式化程度——从前沿模型可推断的隐式描述到为较弱模型提供的显式逐步指令——可作为设计参数。我们提出过程一致性作为验证指标,用于衡量执行过程对FSM规约的遵循程度。通过测试包含3个状态的幼儿园辅导FSM在四种形式化级别和三种模型规模(147亿、6850亿、1万亿+参数)下的表现,发现最优规约形式化程度是模型能力的函数。DeepSeek-V3.2(6850亿)在L2-L4级别实现完美一致性(1.00);ChatGPT-5(约1万亿)在L3达到峰值(0.90)后在L4崩溃(0.39);Phi4(147亿)未显示稳定最优值且具有高方差(SD=0.16-0.36)。这些发现揭示了模型特定的形式化范围——“最佳适配区间”——在此区间内规约能提供足够结构而不产生过度约束,从而建立了用于创建可验证交互协议的提示规约工程学,将多轮交互设计从启发式艺术转变为具有可测量过程保证的系统化工程。

0
下载
关闭预览

相关内容

【KDD2024】HiGPT:异构图语言模型
专知会员服务
19+阅读 · 2024年7月9日
WWW 2024 | GraphTranslator: 将图模型对齐大语言模型
专知会员服务
27+阅读 · 2024年3月25日
《用于代码弱点识别的 LLVM 中间表示》CMU
专知会员服务
14+阅读 · 2022年12月12日
【NeurIPS2019】图变换网络:Graph Transformer Network
如何使用自然语言工具包(NLTK)在Python3中执行情感分析
Python程序员
21+阅读 · 2019年10月28日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
VIP会员
相关VIP内容
【KDD2024】HiGPT:异构图语言模型
专知会员服务
19+阅读 · 2024年7月9日
WWW 2024 | GraphTranslator: 将图模型对齐大语言模型
专知会员服务
27+阅读 · 2024年3月25日
《用于代码弱点识别的 LLVM 中间表示》CMU
专知会员服务
14+阅读 · 2022年12月12日
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员