The Prompt Is a Program
A prompt is not a suggestion. It is an instruction set.
When a developer writes a system prompt, they are authoring a program — one that will be executed at runtime against variable user input. The prompt defines roles, constraints, output formats, and behavior under edge cases. That is not natural language. That is specification.
Researchers at Carnegie Mellon confirmed this framing empirically. Their 2024 study found that developers already treat certain prompts as software artifacts: versioned, parameterized, shared across teams, and tested against inputs. They coined the term prompt programming — prompts authored at design-time, executed at runtime, written in natural language but behaving like code.
The implication matters. If a prompt is a program, then:
- Bugs are specification errors. When your LLM misbehaves, the first question is not "why did the model fail?" It is "what did my specification permit?"
- Testing is mandatory. You would not ship code without tests. A prompt that handles variable runtime input is code.
- Versioning is required. Changing a prompt changes behavior. That change should be tracked, reviewed, and rolled back if needed.
- Ambiguity is a defect. Natural language is imprecise by default. A prompt that works 90% of the time has a specification gap in the remaining 10%.
Multiple research groups have now built prompt programming languages — IBM's PDL (Prompt Declaration Language), Microsoft's SAMMO (compile-time prompt optimization), APPL (a Python-native prompt programming framework from ETH Zürich). The field is moving toward treating prompts as structured, typed, optimizable artifacts.
The engineering community is catching up to what the best prompt authors already knew: the model does not fail you. Your specification fails the model.
Write prompts like you write code. Because that is what they are.
References
- Liang, J.T., Lin, M., Rao, N., Myers, B.A. (2024). Prompts Are Programs Too! Understanding How Developers Build Software Containing Prompts. arXiv:2409.12447. https://arxiv.org/abs/2409.12447
- Schnabel, T., Neville, J. (2024). Prompts as Programs: A Structure-Aware Approach to Efficient Compile-Time Prompt Optimization (SAMMO). arXiv:2404.02319. https://arxiv.org/abs/2404.02319
- Arora, R., et al. (2024). PDL: A Declarative Prompt Programming Language. arXiv:2410.19135. https://arxiv.org/abs/2410.19135
- Chen, Q., et al. (2025). APPL: A Prompt Programming Language for Harmonious Integration of Programs and Large Language Model Prompts. ACL 2025. https://aclanthology.org/2025.acl-long.63
- Guy, T., de Halleux, P., Sharma, R.K., Zorn, B. (2024). Prompts are Programs. SIGPLAN Blog. https://blog.sigplan.org/2024/10/22/prompts-are-programs/
Cite as
devinfo.dev. (2026). "The Prompt Is a Program." devinfo.dev:2026.0033. https://devinfo.dev/d/2026.0033
devinfo.dev | https://devinfo.dev/d/2026.0033
Content licensed under CC BY-NC 4.0. Free to share with attribution for non-commercial use.
https://devinfo.dev