arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.18940cs.CLcs.SE
收藏

FASTRIC:用于可验证大语言模型交互的提示规范语言

FASTRIC: Prompt Specification Language for Verifiable LLM Interactions

Department of Civil and Environmental Engineering(土木与环境工程系);California Institute for Telecommunications and Information Technology(电信与信息科技学院);Institute of Transportation Studies(交通研究学院);University of California, Irvine, CA 92697-3600(加州大学伊维德分校)

Wen-Long Jin

AI总结:

FASTRIC通过显式化有限状态机构建可验证的大语言模型交互协议,揭示模型特定的规范正式程度范围,实现交互设计的系统化工程。

摘要:

大型语言模型(LLMs)能够执行复杂的多轮交互协议,但缺乏正式规范来验证其执行是否符合设计意图。我们介绍了FASTRIC,一种提示规范语言,它使隐含的有限状态机(FSMs)在自然语言提示中显式化,从而通过执行轨迹分析实现符合性验证。LLM充当智能执行代理:解读设计师编码的FSMs以执行指定的行为角色。与需要解析器和编译器的符号规范语言不同,FASTRIC利用LLM作为统一的基础设施——同时是解析器、解释器、运行时环境和开发助手。FASTRIC指导设计师阐述七个FSM元素(终态、代理、状态、触发器、角色、初始态、约束),以构建多轮交互。规范的正式程度——从隐含描述由前沿模型推断到为较弱模型提供明确的逐步指令——作为设计参数。我们引入了程序符合性作为验证度量,用于衡量执行对FSM规范的符合程度。在测试一个3态幼儿园教学FSM时,跨越四个正式程度级别和三种模型规模(14.7B、685B、1T+参数)发现,最佳规范正式程度是模型容量的函数。DeepSeek-V3.2(685B)在L2-L4级别实现完美符合(1.00);ChatGPT-5(~1T)在L3(0.90)达到峰值后在L4(0.39)崩溃;Phi4(14.7B)则表现出没有稳定最优值的高方差(SD=0.16-0.36)。这些发现揭示了模型特定的正式程度范围——“Goldilocks区域”——其中规范提供了足够的结构而不至于过度约束,从而建立了提示规范工程,用于创建可验证的交互协议,将多轮交互设计从启发式艺术转变为具有可测量程序保证的系统工程。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑