Dynamic Code Orchestration: Harnessing the Power of Large Language Models for Adaptive Script Execution
Justin Del Vecchio, Andrew Perreault, Eliana Furmanek
TL;DR
The paper investigates dynamic code orchestration by housing substantial business logic in written language directives that are interpreted by LLMs at runtime. It demonstrates a dynamically orchestrated Python text editor where LLM-generated code blocks are produced, compiled, and registered in the global namespace for on-the-fly execution. An empirical evaluation on the HumanEval benchmark reveals a partial success rate and highlights practical challenges such as JSON formatting, import restrictions, and infinite loops that shape future safeguards. The work points to significant potential for user-driven customization and evolving security models, with future plans focusing on adaptive scripts and defensive coding to extend functionality while mitigating risks.
Abstract
Computer programming initially required humans to directly translate their goals into machine code. These goals could have easily been expressed as a written (or human) language directive. Computers, however, had no capacity to satisfactorily interpret written language. Large language model's provide exactly this capability; automatic generation of computer programs or even assembly code from written language directives. This research examines dynamic code execution of written language directives within the context of a running application. It implements a text editor whose business logic is purely backed by large language model prompts. That is, the program's execution uses prompts and written language directives to dynamically generate application logic at the point in time it is needed. The research clearly shows how written language directives, backed by a large language model, offer radically new programming and operating system paradigms. For example, empowerment of users to directly implement requirements via written language directives, thus supplanting the need for a team ofprogrammers, a release schedule and the like. Or, new security mechanisms where static executables, always a target for reverse engineering or fuzzing, no longer exist. They are replaced by ephemeral executables that may continually change, be completely removed, and are easily updated.
