MTP: A Meaning-Typed Language Abstraction for AI-Integrated Programming

Jayanaka L. Dantanarayana, Yiping Kang, Kugesan Sivasothynathan, Christopher Clarke, Baichuan Li +4 more
5/14/2024
cs.PLcs.AI

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Software development is shifting from traditional programming to AI-integrated applications that leverage generative AI and large language models (LLMs) during runtime. However, integrating LLMs remains complex, requiring developers to manually craft prompts and process outputs.

Show full abstract

Existing tools attempt to assist with prompt engineering, but often introduce additional complexity. This paper presents Meaning-Typed Programming (MTP), a novel paradigm that abstracts LLM integration through intuitive language-level constructs. By leveraging the inherent semantic richness of code, MTP automates prompt generation and response handling without additional developer effort. We introduce the (1) by operator for seamless LLM invocation, (2) MT-IR, a meaning-based intermediate representation for semantic extraction, and (3) MT-Runtime, an automated system for managing LLM interactions. We implement MTP in Jac, a programming language that supersets Python, and find that MTP significantly reduces coding complexity while maintaining accuracy and efficiency. MTP significantly reduces development complexity, lines of code modifications needed, and costs while improving run-time performance and maintaining or exceeding the accuracy of existing approaches. Our user study shows that developers using MTP completed tasks 3.2x faster with 45% fewer lines of code compared to existing frameworks. Moreover, MTP demonstrates resilience even when up to 50% of naming conventions are degraded, demonstrating robustness to suboptimal code. MTP is developed as part of the Jaseci open-source project, and is available under the module byLLM.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{dantanarayana2024mtp,
  title  = {MTP: A Meaning-Typed Language Abstraction for AI-Integrated Programming},
  author = {Jayanaka L. Dantanarayana and Yiping Kang and Kugesan Sivasothynathan and Christopher Clarke and Baichuan Li and Savini Kashmira and Krisztian Flautner and Lingjia Tang and Jason Mars},
  year   = {2024},
  eprint = {2405.08965},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.08965v6}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.08965.svg)](https://codeofpaper.com/paper/2405.08965)

Discussion