Meaning-Typed Programming: Language-level Abstractions and Runtime for GenAI Applications

📅 2024-05-14
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
To address the complexity of LLM integration and the heavy engineering burden of prompt design in generative AI application development, this paper proposes Meaning-Typed Programming (MTP), a novel programming paradigm. MTP treats large language models as semantically interpretable, native code constructs via language-level abstractions and a dedicated runtime system, thereby eliminating explicit prompt authoring. Its core contributions include: (i) the first meaning-oriented intermediate representation (MT-IR); (ii) a compiler-level automatic semantic understanding mechanism; (iii) a dynamic LLM orchestration engine for adaptive model coordination; and (iv) Jac—a Python superset implementation framework. Experimental evaluation demonstrates that MTP achieves accuracy and developer productivity on par with or exceeding state-of-the-art manual and tool-assisted prompt engineering approaches, while substantially reducing development complexity for neuro-symbolic applications.

Technology Category

Application Category

📝 Abstract
Software is rapidly evolving from being programmed with traditional logical code, to neuro-integrated applications that leverage generative AI and large language models (LLMs) for application functionality. This shift increases the complexity of building applications, as developers now must reasoning about, program, and prompt LLMs. Despite efforts to create tools to assist with prompt engineering, these solutions often introduce additional layers of complexity to the development of neuro-integrated applications. This paper proposes meaning-typed programming (MTP), a novel approach to simplify the creation of neuro-integrated applications by introducing new language-level abstractions that hide the complexities of LLM integration. Our key insight is that typical conventional code already possesses a high level of semantic richness that can be automatically reasoned about, as it is designed to be readable and maintainable by humans. Leveraging this insight, we conceptualize LLMs as meaning-typed code constructs and introduce a by abstraction at the language level, MT-IR, a new meaning-based intermediate representation at the compiler level, and MT Runtime, an automated run-time engine for LLM integration and operations. We implement MTP in a production-grade Python super-set language called Jac and perform an extensive evaluation. Our results demonstrate that MTP not only simplifies the development process but also meets or exceeds the efficacy of state-of-the-art manual and tool-assisted prompt engineering techniques in terms of accuracy and usability.
Problem

Research questions and friction points this paper is trying to address.

Artificial Intelligence
Large Language Models
Software Development
Innovation

Methods, ideas, or system contributions that make the work stand out.

Meaning Type Programming
Artificial Intelligence
Large Language Models
🔎 Similar Papers
No similar papers found.
Jason Mars
Jason Mars
Professor of Computer Science and Engineering, University of Michigan
Computer Architecture - Runtime Systems - Compilers - Emerging Cloud/Mobile Platforms
Y
Yiping Kang
University of Michigan, United States
J
Jayanaka L. Dantanarayana
University of Michigan, United States
K
Kugesan Sivasothynathan
University of Moratuwa, Jaseci Labs, Sri Lanka
C
Christopher Clarke
University of Michigan, United States
Baichuan Li
Baichuan Li
The Chinese University of Hong Kong
Lingjia Tang
Lingjia Tang
University of Michigan
Computer systemNLPAI/MLDatacenter Efficiency