Specifications: The missing link to making the development of LLM systems an engineering discipline
Ion Stoica, Matei Zaharia, Joseph Gonzalez, Ken Goldberg, Koushik Sen, Hao Zhang, Anastasios Angelopoulos, Shishir G. Patil, Lingjiao Chen, Wei-Lin Chiang, Jared Q. Davis
TL;DR
This paper argues that making LLM-based systems an engineering discipline hinges on precise task and outcome specifications, separating statement specifications (what to do) from solution specifications (how to verify it). It introduces five core software-engineering properties—verifiability, debuggability, modularity, reusability, and automated decision making—and applies them to LLM contexts, outlining challenges and concrete approaches (structured outputs, process supervision, testing, and modular architectures). The authors survey the ambiguity inherent in prompts, propose disambiguation techniques inspired by human communication, and discuss how to build reliable, scalable, and autonomous AI systems through improved specifications. The work aims to accelerate the development of modular, reliable LLM ecosystems with practical impact across AI-powered software and services by providing a formal framework and research directions for specification-driven engineering.
Abstract
Despite the significant strides made by generative AI in just a few short years, its future progress is constrained by the challenge of building modular and robust systems. This capability has been a cornerstone of past technological revolutions, which relied on combining components to create increasingly sophisticated and reliable systems. Cars, airplanes, computers, and software consist of components-such as engines, wheels, CPUs, and libraries-that can be assembled, debugged, and replaced. A key tool for building such reliable and modular systems is specification: the precise description of the expected behavior, inputs, and outputs of each component. However, the generality of LLMs and the inherent ambiguity of natural language make defining specifications for LLM-based components (e.g., agents) both a challenging and urgent problem. In this paper, we discuss the progress the field has made so far-through advances like structured outputs, process supervision, and test-time compute-and outline several future directions for research to enable the development of modular and reliable LLM-based systems through improved specifications.
