Language hooks:一种用于增强大语言模型推理的模块化框架,可将工具使用与模型及其提示词解耦
Language hooks: a modular framework for augmenting LLM reasoning that decouples tool usage from the model and its prompt
AI总结:
针对提示工程和微调两种增强大语言模型能力范式的局限,提出language hooks模块化框架,将工具使用与模型及任务提示解耦,通过条件触发模块化程序调用工具等,性能优于任务感知方法且具备新任务泛化能力。
摘要:
提示工程和微调已成为为语言模型赋予工具使用等新能力的两种主流范式。提示方法搭建速度快,但需要在模型提示中为每种工具的使用提供明确示例,这使得工具使用与当前任务绑定,限制了泛化能力。微调方法无需在运行时提供针对特定任务的工具使用演示,但会将新能力绑定到单一模型上,导致本就高昂的搭建成本成为重复性支出。本文提出了一种名为language hooks的新型框架,用于增强语言模型的新能力,该框架既与模型的特定任务提示词解耦,也与模型本身解耦。language hook算法将基础模型的文本生成与模块化程序的执行交替进行,这些程序会根据已有文本和可用能力有条件地触发。触发后,程序可调用外部工具、辅助语言模型(例如使用工具特定提示词),并修改现有上下文。我们将该方法与当前最优基线进行基准测试,发现其性能优于任务感知型方法,并证明了它能泛化到新任务。
英文摘要:
Prompting and fine-tuning have emerged as two competing paradigms for augmenting language models with new capabilities, such as the use of tools. Prompting approaches are quick to set up but rely on providing explicit demonstrations of each tool's usage in the model's prompt, thus coupling tool use to the task at hand and limiting generalisation. Fine-tuning removes the need for task-specific demonstrations of tool usage at runtime; however, this ties new capabilities to a single model, thus making already-heavier setup costs a recurring expense. In this paper, we introduce language hooks, a novel framework for augmenting language models with new capabilities that is decoupled both from the model's task-specific prompt and from the model itself. The language hook algorithm interleaves text generation by the base model with the execution of modular programs that trigger conditionally based on the existing text and the available capabilities. Upon triggering, programs may call external tools, auxiliary language models (e.g. using tool specific prompts), and modify the existing context. We benchmark our method against state-of-the-art baselines, find that it outperforms task-aware approaches, and demonstrate its ability to generalise to novel tasks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。