arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.13233cs.SE
收藏

创建基于LLM的AI-agent:一种用API增强LLM的高层方法论

Creating an LLM-based AI-agent: A high-level methodology towards enhancing LLMs with APIs

Ioannis Tzachristas

AI总结:

本文提出一种7步方法论,通过API集成赋予LLMs外部工具调用能力,并探讨端侧架构及现有框架的不足,为构建更自主的AI agents提供指南。

摘要:

大型语言模型(LLMs)彻底改变了工程和科学的各个方面。其实用性往往因缺乏与外部数字环境的交互而受到瓶颈制约。为了克服这一限制并实现LLMs和人工智能(AI)在现实世界应用中的集成,人们正在构建定制的AI agents。基于技术趋势和技术手段,我们提取了一种用于构建这些AI agents的高层方法,重点关注其底层架构。本论文作为一份综合指南,阐明了一种多层面的方法,以赋予LLMs利用应用程序编程接口(APIs)的能力。我们提出了一种7步方法论,首先从选择合适的LLMs和解决复杂问题所需的任务分解开始。该方法论包括为API交互生成训练数据的技术,以及在众多选项中选择合适API的启发式方法。这些步骤最终生成的API调用在语法和语义上都与LLM对给定任务的理解保持一致。此外,我们回顾了促进这些过程的现有框架和工具,并指出了当前尝试中的差距。在这一方向上,我们提出了一种端侧架构,旨在利用Hugging Face社区的小型模型来发挥随身设备的功能。我们考察了这些方法在包括钢琴乐谱生成在内的各个领域现实应用中的有效性。通过对文献和可用技术的广泛分析,本论文旨在为研究人员和从业者设定一个指南针,以充分利用通过外部工具能力增强的LLMs的潜力,从而为更加自主、稳健和具备上下文感知能力的AI agents铺平道路。

英文摘要:

Large Language Models (LLMs) have revolutionized various aspects of engineering and science. Their utility is often bottlenecked by the lack of interaction with the external digital environment. To overcome this limitation and achieve integration of LLMs and Artificial Intelligence (AI) into real-world applications, customized AI agents are being constructed. Based on the technological trends and techniques, we extract a high-level approach for constructing these AI agents, focusing on their underlying architecture. This thesis serves as a comprehensive guide that elucidates a multi-faceted approach for empowering LLMs with the capability to leverage Application Programming Interfaces (APIs). We present a 7-step methodology that begins with the selection of suitable LLMs and the task decomposition that is necessary for complex problem-solving. This methodology includes techniques for generating training data for API interactions and heuristics for selecting the appropriate API among a plethora of options. These steps eventually lead to the generation of API calls that are both syntactically and semantically aligned with the LLM's understanding of a given task. Moreover, we review existing frameworks and tools that facilitate these processes and highlight the gaps in current attempts. In this direction, we propose an on-device architecture that aims to exploit the functionality of carry-on devices by using small models from the Hugging Face community. We examine the effectiveness of these approaches on real-world applications of various domains, including the generation of a piano sheet. Through an extensive analysis of the literature and available technologies, this thesis aims to set a compass for researchers and practitioners to harness the full potential of LLMs augmented with external tool capabilities, thus paving the way for more autonomous, robust, and context-aware AI agents.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑