Large Language Models (LLMs) are increasingly embedded in software systems (GenAIware), enabling new forms of automation and interaction. However, their probabilistic nature and reliance on prompt programming challenge reliability, robustness, and maintainability. In current practice, prompt-related concerns (e.g., context management, interaction logic, output validation) are embedded in general-purpose code, leading to implicit, hard-to-analyze systems. We argue that prompt programming should be treated as a first-class Software Engineering (SE) concern and propose LLM Scripting Language (LSL), a Domain Specific Language (DSL) for structuring LLM interactions as analyzable programs. LSL introduces abstractions for interaction blocks, context scopes, output constraints, and control flow, separating deterministic logic from probabilistic model behavior while ensuring syntactic compliance. From an SE perspective, LSL supports disciplined development by making interaction logic explicit, analyzable, and amenable to verification and validation. It also acts as cognitive scaffolding, externalizing prompt design into programmable artifacts that reduce implicit reasoning and support systematic debugging, evolution, and reuse. We illustrate these properties in a structured generation scenario, showing improved failure localization and interaction transparency. While LSL does not guarantee semantic correctness or factual accuracy, it provides a principled foundation for more analyzable and maintainable prompt-based systems.
Scotti et al. (Mon,) studied this question.