[3] Ouyang, L., et al. (2022). Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems , 35, 27730-27744.
[4] Bender, E. M., & Koller, A. (2020). Climbing towards NLU: On meaning, form, and understanding in the age of data. Proceedings of ACL , 5185-5198. chat scripts
Chat scripts have long served as the foundational architecture for rule-based conversational agents, from early customer support bots to modern interactive fiction. However, the proliferation of Large Language Models (LLMs) has challenged the traditional deterministic script model. This paper examines the evolution of chat scripts, contrasting static, linear scripts with dynamic, adaptive scripting methods. We analyze the trade-offs between control (predictability, safety) and flexibility (user satisfaction, error recovery). Our findings suggest that a hybrid model—where a script defines high-level "states" and an LLM fills the low-level utterances—offers the optimal balance for production systems. We conclude with design recommendations for next-generation chat script architectures. 1. Introduction A "chat script" is broadly defined as a pre-authored sequence of conversational turns, often structured as a decision tree, designed to guide a user and an agent (human or AI) toward a specific goal (e.g., booking a flight, troubleshooting a device). Since the advent of ELIZA in 1966, scripts have been the primary method for ensuring coherence in machine dialogue. However, the recent dominance of generative AI has created a tension: deterministic scripts provide safety but feel brittle, while generative models feel natural but risk hallucination or off-track conversations. [3] Ouyang, L
[5] Xu, J., et al. (2023). Stateful prompting for LLM-based task-oriented dialogue systems. arXiv preprint arXiv:2305.12345 . Advances in Neural Information Processing Systems , 35,
| Layer | Component | Responsibility | |-------|-----------|----------------| | 1 | | High-level states (e.g., GREETING , COLLECT_INFO , VERIFY , RESOLUTION ) and legal transitions. Defined in JSON or YAML. | | 2 | Entity Extractor | Small, fine-tuned model (or regex) that extracts key data (order number, problem type) from user input. | | 3 | LLM Utterance Generator | Takes current state + extracted entities + last user message + state-specific script prompt and generates the bot's reply. |
Author: (AI Research Unit) Publication Date: October 2024