Daily Arxiv

This is a page that curates AI-related papers published worldwide.
All content here is summarized using Google Gemini and operated on a non-profit basis.
Copyright for each paper belongs to the authors and their institutions; please make sure to credit the source when sharing.

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

Created by
  • Haebom

Author

Jayanaka L. Dantanarayana, Yiping Kang, Kugesan Sivasothynathan, Christopher Clarke, Baichuan Li, Savini Kashmira, Krisztian Flautner, Lingjia Tang, Jason Mars

Outline

This paper focuses on the transition of software development toward AI-integrated applications that leverage generative AI and large-scale language models (LLMs) at runtime. While existing LLM integrations introduce complexity due to the difficulty of prompt engineering, our proposed Semantic Type Programming (MTP) addresses this challenge by abstracting LLM integration through intuitive language-level constructs. MTP leverages the semantic richness of code to automate prompt generation and response processing without additional developer effort. Its core components include the by operator for LLM invocation, a semantic-based intermediate representation (MT-IR), and MT-Runtime, an automated system for managing LLM interactions. We implement MTP in the Jac programming language, a superset of Python, demonstrating that it significantly reduces code complexity while maintaining correctness and efficiency. User studies show that developers using MTP work 3.2x faster and with 45% fewer lines of code compared to existing frameworks. Furthermore, we demonstrate robustness even when naming conventions are degraded by up to 50%. MTP is developed as part of the Jaseci open source project and is available in the byLLM module.

Takeaways, Limitations

Takeaways:
We significantly reduced the complexity of LLM integration, improving development efficiency (3.2x faster work, 45% fewer lines of code).
We solve the challenge of prompt engineering by leveraging the semantic richness of code.
We built a system that is robust to naming convention inaccuracies (up to 50% performance degradation).
It is open source and highly accessible.
Limitations:
It is specialized for the Jac language and needs to be reviewed for extensibility to other programming languages.
Currently, this is implemented within the Jac language, so further research is needed on portability and applicability to other languages.
Since it depends on the performance of LLM, limitations of LLM may affect the performance of MTP.
Further research is needed on applicability and scalability in large-scale projects.
👍