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

如果 LLM 是巫师,那么代码就是魔杖:关于代码如何赋能大型语言模型作为智能体的综述

If LLM Is the Wizard, Then Code Is the Wand: A Survey on How Code Empowers Large Language Models to Serve as Intelligent Agents

University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)

Ke Yang, Jiateng Liu, John Wu, Chaoqi Yang, Yi R. Fung, Sha Li, Zixuan Huang, Xu Cao, Xingyao Wang, Yiquan Wang, Heng Ji, Chengxiang Zhai

AI总结:

本综述探讨了将代码整合到大型语言模型训练数据中的益处,指出代码能解锁模型推理能力、生成结构化中间步骤并通过执行环境提供反馈,从而推动LLMs发展为智能体。

摘要:

当今杰出的大型语言模型(LLMs)与过去的语言模型不同之处不仅在于规模,还在于它们是在自然语言和形式语言(代码)组合上训练的。作为人类与计算机之间的媒介,代码将高层目标转化为可执行步骤,具有标准语法、逻辑一致性、抽象性和模块化特征。在本综述中,我们概述了将代码整合到LLMs训练数据中的各种益处。具体而言,除了增强LLMs的代码生成能力外,我们还观察到代码的这些独特属性有助于:(i)解锁LLMs的推理能力,使其能够应用于一系列更复杂的自然语言任务;(ii)引导LLMs生成结构化且精确的中间步骤,随后可通过函数调用将这些步骤与外部执行端相连;(iii)利用代码编译和执行环境,这也为模型改进提供了多样化反馈。此外,我们追溯了由代码带来的LLMs这些深刻能力如何促使其作为智能体(IAs)而出现,在那些理解指令、分解目标、规划与执行行动以及从反馈中改进的能力对下游任务成功至关重要的场景中。最后,我们提出了用代码赋能LLMs的若干关键挑战与未来方向。

英文摘要:

The prominent large language models (LLMs) of today differ from past language models not only in size, but also in the fact that they are trained on a combination of natural language and formal language (code). As a medium between humans and computers, code translates high-level goals into executable steps, featuring standard syntax, logical consistency, abstraction, and modularity. In this survey, we present an overview of the various benefits of integrating code into LLMs' training data. Specifically, beyond enhancing LLMs in code generation, we observe that these unique properties of code help (i) unlock the reasoning ability of LLMs, enabling their applications to a range of more complex natural language tasks; (ii) steer LLMs to produce structured and precise intermediate steps, which can then be connected to external execution ends through function calls; and (iii) take advantage of code compilation and execution environment, which also provides diverse feedback for model improvement. In addition, we trace how these profound capabilities of LLMs, brought by code, have led to their emergence as intelligent agents (IAs) in situations where the ability to understand instructions, decompose goals, plan and execute actions, and refine from feedback are crucial to their success on downstream tasks. Finally, we present several key challenges and future directions of empowering LLMs with code.

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

↑