Language models trained on internet-scale data sets have shown an impressive ability to solve problems in Natural Language Processing and Computer Vision. However, experience is showing that these models are frequently brittle in unexpected ways, and require significant scaffolding to ensure that they operate correctly in the larger systems that comprise "language-model agents." In this paper, we argue that behavior trees provide a unifying framework for combining language models with classical AI and traditional programming. We introduce Dendron, a Python library for programming language model agents using behavior trees. We demonstrate the approach embodied by Dendron in three case studies: building a chat agent, a camera-based infrastructure inspection agent for use on a mobile robot or vehicle, and an agent that has been built to satisfy safety constraints that it did not receive through instruction tuning or RLHF.
翻译:在大规模互联网数据集上训练的语言模型已在自然语言处理和计算机视觉中展现出解决复杂问题的惊人能力。然而,实践经验表明,这些模型常以难以预料的方式表现出脆弱性,需要大量辅助架构来确保其在构成"语言模型代理"的复杂系统中可靠运行。本文论证了行为树作为统一框架的潜力,可将语言模型与经典人工智能及传统编程范式有机结合。我们提出Dendron——一个基于行为树构建语言模型代理的Python库。通过三个典型案例研究展示Dendron所体现的方法:构建聊天代理、用于移动机器人或车辆的摄像头基础设施检测代理,以及为满足未通过指令微调或RLHF获得的安全约束而设计的代理。