FASTRIC: Prompt Specification Language for Verifiable LLM Interactions
Wen-Long Jin · 2025
Read FASTRIC: Prompt Specification Language for Verifiable LLM Interactions by Wen-Long Jin (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2512-18940.txt.
Introduction
Wen-Long Jin gives chatbot behavior a specification language. Multi-turn interactions, like a tutor guiding a child, follow hidden state machines, but nothing checks the model stayed on script. His language, FASTRIC, posted to arXiv in December 2025, writes the finite state machine into the prompt itself. It spans seven elements, from states and triggers to roles and constraints. Execution traces are then scored for procedural conformance.
Testing used a three-state kindergarten tutoring machine at four formality levels and three model scales. The scales were 14.7B, 685B, and over a trillion parameters. The lesson: optimal formality depends on model capacity. DeepSeek-V3.2, at 685 billion parameters, conforms perfectly from level two up. A trillion-parameter ChatGPT-5 peaks at level three, 0.90, then collapses to 0.39 when over-specified. The small Phi-4 never stabilizes. Each model has a formality zone where structure helps without strangling, the founding result of prompt specification engineering.
Catalog record
| CREATOR | Wen-Long Jin |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 41 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2512-18940
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
FASTRIC: Prompt Specification Language for Verifiable LLM Interactions Wen-Long Jin Abstract Large Language Models (LLMs) can execute complex multi-turn interaction protocols through intelligent interpretation, but lack formal specifications to verify execution against designer’s interaction 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 in interactions with users and tools. 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) that structure 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 a verification metric measuring execution adherence to these FSM specifications. Testing a 3-state kindergarten tutoring FSM across four formality levels and three model scales (14.7B, 685B, 1T+ parameters) reveals that 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 as a discipline for creating verifiable interaction protocols for multi-agent systems, transforming multi-turn interaction design from heuristic art to systematic engineering with measurable procedural guarantees. Keywords : Prompt Specification Language; Large Language Models; Interaction Protocols; Multi-Agent Systems; Finite State Machines; Specification Formality; Procedural Conformance. 1 Introduction 1.1 Large Language Models: The unprecedented ability and the lack of formal verification Large Language Models (LLMs) have transformed human-computer interaction through their unprecedented ability to understand and generate natural language across diverse contexts, enabled by training on massive text corpora. Unlike traditional computational systems requiring separate specification languages, parsers, and runtime environments, LLMs unify these roles through instruction-following in natural language ( Brown et al. 2020 ; Ouyang et al. 2022 ) . Beyond simple question-answering, LLMs can execute complex multi-turn workflows across education, research, healthcare, customer service, and collaborative decision-making, interacting with humans, other AI systems, and external tools. However, current evaluation methodologies for multi-turn, multi-agent interactions (where each turn represents one agent’s action) focus primarily on output quality (assessing response accuracy, coherence, or task completion rates) but provide no formal mechanism to verify whether an LLM follows the intended interaction structure specified by prompt designers. This gap between heuristic prompt engineering and formal verification creates serious practical consequences: workflow designers discover prompt failures only through costly real-world deployment, multi-turn behaviors cannot be systematically debugged or refined, and safety-critical applications lack guarantees about behavioral compliance. The absence of formal specification languages for LLM-executable interaction protocols prevents the emergence of systematic engineering practices, leaving multi-turn interaction design as an art rather than a science. 1.2 FASTRIC: A Prompt Specification Language to Bridge Power and Verifiability To bridge this gap, we introduce FASTRIC: a Prompt Specification Language (PSL) designed to systematically structure multi-turn prompts. Unlike simple question-answering exchanges, sustained multi-turn interactions require procedural guarantees across complex, stateful workflows. FASTRIC’s core principle is to make the implicit Finite State Machine (FSM) underlying any multi-turn interaction explicit within the prompt itself. This enables designers to inject both procedural structure (how interactions unfold) and domain expertise (what content/constraints apply) into the specification, balancing trade-offs among safety (procedural conformance), efficiency (token usage), transparency (formality level), and quality (task-specific personalization). Unlike approaches that modify model parameters through training or fine-tuning, FASTRIC operates at the specification level—treating prompts as executable behavioral specifications that leverage LLMs’ existing instruction-following capabilities. FASTRIC’s architectural commitment positions the LLM as intelligent execution agent: it interprets designer-encoded FSMs to execute specified roles within interaction procedures. Three agent classes participate: the designer (who creates the FSM specification), the LLM (who executes agent roles per FSM—tutor, assistant, evaluator), and users/tools (who interact according to protocol). This bounded intelligent execution distinguishes FASTRIC from approaches where LLMs autonomously generate interaction patterns: here, the LLM enacts designer procedural intent within explicit FSM constraints rather than inventing coordination logic. A key insight is that optimal specification formality varies across models. 1 1 1 Appendix A provides terminology distinguishing FSMs, interaction protocols, interaction procedures, and formality levels (abbreviated as ‘formality’ where context is clear) used throughout this work. A model with strong instruction-following might correctly execute a high-level description—"ask question, receive answer, provide feedback"—whereas another model (regardless of overall capability) may require detailed procedural steps for reliable execution. FASTRIC accommodates this through varying formality levels, enabling designers to calibrate specification detail to each model’s particular strengths. This work focuses on establishing the relationship between formality level and procedural conformance, providing a foundational design principle for the broader specification design space. FASTRIC exploits a critical property of LLMs: they collapse the traditional language stack. Where conventional systems separate specification languages, parsers, compilers, and runtime environments, the same LLM that executes FASTRIC prompts can also parse them, assist in writing them, and validate conformance through execution traces. This unified infrastructure enables designers to leverage LLMs throughout the specification lifecycle—from generation to verification. 1.3 Our Contributions This paper makes the following key contributions: 1. A Prompt Specification Language Structured Around FSM Principles: We introduce FASTRIC, a Prompt Specification Language whose core elements (Final States, Agents, States, Triggers, Roles, Initial State, and Constraints) guide designers to explicitly articulate interaction protocols as FSM specifications, transforming informal instructions into formal, verifiable behavioral specifications. 2. A Prompt Design Methodology Using Formality as a Control Variable: We establish a methodology where specification formality—the level of explicit detail used to describe the FSM—serves as a design parameter, ranging from implicit natural language structures to explicit procedural instructions. 3. A Prompt Verification Metric Based on Procedural Conformance: We introduce procedural conformance as a metric that quantifies procedural reliability by comparing an agent’s execution trace against the canonical FSM specification over test cases, enabling objective evaluation distinct from output quality assessment. 4. An Empirical Design Principle for Formality Selection: We demonstrate that optimal specification formality varies systematically across models. Through experiments across multiple model families and reasoning modes, we identify model-specific formality ranges that balance procedural reliability with specification flexibility, establishing formality calibration as a principled design practice. The remainder of this paper is organized as follows. Section 2 reviews the theoretical foundations across three research traditions—formal specification languages, multi-agent interaction protocol engineering, and natural language programming—establishing how their convergence enables FASTRIC. Section 3 presents the FASTRIC Specification Language, detailing its core elements, formality levels, and design methodology. Section 4 provides empirical validation of the formality-conformance relationship across multiple model families and scales. Section 5 summarizes our contributions and positions FASTRIC as a universal Interaction Protocol Language. Section 6 discusses scope constraints and methodological limitations. Section 7 outlines research directions for compositional protocols, automated verification, and high-stakes deployment. 2 Theoretical Foundations FASTRIC synthesizes three independent research traditions: formal verification methods based on Finite State Machines (§ 2.1 ), multi-agent protocol engineering including dialogue systems (§ 2.2 ), and natural language programming (§ 2.3 ). FSM-based formal methods provide the