LLMs are Meaning-Typed Code Constructs
<|reference_start|>LLMs are Meaning-Typed Code Constructs: Programming with Generative AI (GenAI) models is a type of Neurosymbolic programming and has seen tremendous adoption across many domains. However, leveraging GenAI models in code today can be complex, counter-intuitive and often require specialized frameworks, leading to increased complexity. This is because it is currently unclear as to the right abstractions through which we should marry GenAI models with the nature of traditional programming code constructs. In this paper, we introduce a set of novel abstractions to help bridge the gap between Neuro- and symbolic programming. We introduce Meaning, a new specialized type that represents the underlying semantic value of traditional types (e.g., string). We make the case that GenAI models, LLMs in particular, should be reasoned as a meaning-type wrapped code construct at the language level. We formulate the problem of translation between meaning and traditional types and propose Automatic Meaning-Type Transformation (A-MTT), a runtime feature that abstracts this translation away from the developers by automatically converting between M eaning and types at the interface of LLM invocation. Leveraging this new set of code constructs and OTT, we demonstrate example implementation of neurosymbolic programs that seamlessly utilizes LLMs to solve problems in place of potentially complex traditional programming logic.<|reference_end|>
@article{mars2024mtllm:,
    title={MTLLM: LLMs are Meaning-Typed Code Constructs},
    author={Jason Mars, Yiping Kang, Jayanaka L. Dantanarayana, Chandra
  Irugalbandara, Kugesan Sivasothynathan, Christopher Clarke, Baichuan Li,
  Lingjia Tang},
    journal={arXiv preprint arXiv:2405.08965},
    year={2024},
    archivePrefix={arXiv},
    eprint={2405.08965},
    primaryClass={cs.PL cs.AI}
}