Language hooks: a modular framework for augmenting LLM reasoning that decouples tool usage from the model and its prompt

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: de Mijolla, Damien, Yang, Wen, Duckett, Philippa, Frye, Christopher, Worrall, Mark
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866929619984187392
author de Mijolla, Damien
Yang, Wen
Duckett, Philippa
Frye, Christopher
Worrall, Mark
author_facet de Mijolla, Damien
Yang, Wen
Duckett, Philippa
Frye, Christopher
Worrall, Mark
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2412_05967
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Language hooks: a modular framework for augmenting LLM reasoning that decouples tool usage from the model and its prompt
de Mijolla, Damien
Yang, Wen
Duckett, Philippa
Frye, Christopher
Worrall, Mark
Computation and Language
Artificial Intelligence
Machine Learning
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.
title Language hooks: a modular framework for augmenting LLM reasoning that decouples tool usage from the model and its prompt
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2412.05967