In this paper, we reexamine prompt engineering for large language models through the lens of automata theory. We argue that language models function as automata and, like all automata, should be programmed in the languages they accept, a unified collection of all natural and formal languages. Therefore, traditional software engineering practices--conditioned on the clear separation of programming languages and natural languages--must be rethought. We introduce the Ann Arbor Architecture, a conceptual framework for agent-oriented programming of language models, as a higher-level abstraction over raw token generation, and provide a new perspective on in-context learning. Based on this framework, we present the design of our agent platform Postline, and report on our initial experiments in agent training.
翻译:本文从自动机理论的角度重新审视大型语言模型的提示工程。我们认为语言模型本质上作为自动机运行,与所有自动机类似,应当在其接受的语言——即所有自然语言与形式语言的统一集合——中进行编程。因此,传统软件工程实践中关于编程语言与自然语言的明确分离原则亟待重新思考。我们提出安阿伯架构,这是一个面向语言模型智能体编程的概念框架,作为原始令牌生成机制的高层抽象,并为上下文学习提供了新的理论视角。基于该框架,我们展示了智能体平台Postline的设计方案,并汇报了在智能体训练方面的初步实验结果。