AIOS Compiler: LLM as Interpreter for Natural Language Programming and Flow Programming of AI Agents

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Xu, Shuyuan, Li, Zelong, Mei, Kai, Zhang, Yongfeng
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909208049352704
author Xu, Shuyuan
Li, Zelong
Mei, Kai
Zhang, Yongfeng
author_facet Xu, Shuyuan
Li, Zelong
Mei, Kai
Zhang, Yongfeng
contents Since their inception, programming languages have trended towards greater readability and lower barriers for programmers. Following this trend, natural language can be a promising type of programming language that provides great flexibility and usability and helps towards the democracy of programming. However, the inherent vagueness, ambiguity, and verbosity of natural language pose significant challenges in developing an interpreter that can accurately understand the programming logic and execute instructions written in natural language. Fortunately, recent advancements in Large Language Models (LLMs) have demonstrated remarkable proficiency in interpreting complex natural language. Inspired by this, we develop a novel system for Code Representation and Execution (CoRE), which employs LLM as interpreter to interpret and execute natural language instructions. The proposed system unifies natural language programming, pseudo-code programming, and flow programming under the same representation for constructing language agents, while LLM serves as the interpreter to interpret and execute the agent programs. In this paper, we begin with defining the programming syntax that structures natural language instructions logically. During the execution, we incorporate external memory to minimize redundancy. Furthermore, we equip the designed interpreter with the capability to invoke external tools, compensating for the limitations of LLM in specialized domains or when accessing real-time information. This work is open-source at https://github.com/agiresearch/CoRE, https://github.com/agiresearch/OpenAGI, and https://github.com/agiresearch/AIOS.
format Preprint
id arxiv_https___arxiv_org_abs_2405_06907
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle AIOS Compiler: LLM as Interpreter for Natural Language Programming and Flow Programming of AI Agents
Xu, Shuyuan
Li, Zelong
Mei, Kai
Zhang, Yongfeng
Computation and Language
Artificial Intelligence
Machine Learning
Programming Languages
Since their inception, programming languages have trended towards greater readability and lower barriers for programmers. Following this trend, natural language can be a promising type of programming language that provides great flexibility and usability and helps towards the democracy of programming. However, the inherent vagueness, ambiguity, and verbosity of natural language pose significant challenges in developing an interpreter that can accurately understand the programming logic and execute instructions written in natural language. Fortunately, recent advancements in Large Language Models (LLMs) have demonstrated remarkable proficiency in interpreting complex natural language. Inspired by this, we develop a novel system for Code Representation and Execution (CoRE), which employs LLM as interpreter to interpret and execute natural language instructions. The proposed system unifies natural language programming, pseudo-code programming, and flow programming under the same representation for constructing language agents, while LLM serves as the interpreter to interpret and execute the agent programs. In this paper, we begin with defining the programming syntax that structures natural language instructions logically. During the execution, we incorporate external memory to minimize redundancy. Furthermore, we equip the designed interpreter with the capability to invoke external tools, compensating for the limitations of LLM in specialized domains or when accessing real-time information. This work is open-source at https://github.com/agiresearch/CoRE, https://github.com/agiresearch/OpenAGI, and https://github.com/agiresearch/AIOS.
title AIOS Compiler: LLM as Interpreter for Natural Language Programming and Flow Programming of AI Agents
topic Computation and Language
Artificial Intelligence
Machine Learning
Programming Languages
url https://arxiv.org/abs/2405.06907