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

  • 2025-01-16 18:56:27
  • Jason Mars, Yiping Kang, Jayanaka L. Dantanarayana, Kugesan Sivasothynathan, Christopher Clarke, Baichuan Li, Krisztian Flautner, Lingjia Tang
  • 0

Abstract

Software is rapidly evolving from being programmed with traditional logicalcode, to neuro-integrated applications that leverage generative AI and largelanguage models (LLMs) for application functionality. This shift increases thecomplexity of building applications, as developers now must reasoning about,program, and prompt LLMs. Despite efforts to create tools to assist with promptengineering, these solutions often introduce additional layers of complexity tothe development of neuro-integrated applications. This paper proposesmeaning-typed programming (MTP), a novel approach to simplify the creation ofneuro-integrated applications by introducing new language-level abstractionsthat hide the complexities of LLM integration. Our key insight is that typicalconventional code already possesses a high level of semantic richness that canbe automatically reasoned about, as it is designed to be readable andmaintainable by humans. Leveraging this insight, we conceptualize LLMs asmeaning-typed code constructs and introduce a by abstraction at the languagelevel, MT-IR, a new meaning-based intermediate representation at the compilerlevel, and MT Runtime, an automated run-time engine for LLM integration andoperations. We implement MTP in a production-grade Python super-set languagecalled Jac and perform an extensive evaluation. Our results demonstrate thatMTP not only simplifies the development process but also meets or exceeds theefficacy of state-of-the-art manual and tool-assisted prompt engineeringtechniques in terms of accuracy and usability.

 

Quick Read (beta)

loading the full paper ...