Program Simulation Prompting: Designing Interactive, Stateful Systems Using Large Language Models
Abstract
Large language models (LLMs) are increasingly used as interactive systems rather than single-turn text generators. However, most prompt engineering paradigms remain oriented toward linear or reactive interactions and offer limited support for persistent state, structured workflows, or explicit user control. This paper introduces program simulation prompting, a prompting paradigm in which an LLM is instructed to simulate the behavior of a structured software program using natural language interaction alone. In this approach, the model adopts a persistent program identity, presents menu-driven interaction modes, manages explicit task state, and constrains behavior to a bounded domain. We analyze three domain-diverse program simulation prompts—spanning startup ideation, culinary recipe development, and creative writing—using a qualitative comparative methodology. Across these case studies, we identify recurring design patterns, including main menu abstractions, explicit separation between creating new and continuing existing artifacts, progressive elaboration, summarization-based state compression, and transparent signaling of memory constraints. Based on these findings, we propose a general, reusable framework for program simulation prompting that decomposes prompt design into five layers: initialization, interaction, state management, output constraints, and user control mechanisms. Our results demonstrate that program simulation prompting enables interactive, stateful, and user-controlled LLM behavior without fine-tuning, external tools, or autonomous agents. This paradigm bridges conversational AI and traditional software affordances, offering a lightweight and transparent alternative to agent-based systems. We conclude by discussing implications for LLM usability, system design, and future hybrid approaches.
Fields of Study & Subjects
Software Engineering Research
Natural Language Processing Techniques
Artificial Intelligence Applications
Publication details
- Journal / source
- SSRN Electronic Journal
- Publication date
- 1 January 2026
- Language
- EN
- Document type
- Preprint