ToolChain*: Efficiënte Navigatie in Actieruimtes van Grote Taalmodellen met A*-Zoekalgoritme
ToolChain*: Efficient Action Space Navigation in Large Language Models with A* Search
October 20, 2023
Auteurs: Yuchen Zhuang, Xiang Chen, Tong Yu, Saayan Mitra, Victor Bursztyn, Ryan A. Rossi, Somdeb Sarkhel, Chao Zhang
cs.AI
Samenvatting
Grote taalmodellen (LLMs) hebben krachtige besluitvormings- en planningscapaciteiten getoond bij het oplossen van complexe real-world problemen. LLM-gebaseerde autonome agents kunnen interacteren met diverse tools (bijvoorbeeld functionele API's) en oplossingsplannen genereren die een reeks API-functieaanroepen stap voor stap uitvoeren. De veelheid aan kandidaat-API-functieaanroepen vergroot de actieruimte aanzienlijk, wat de kritieke noodzaak voor efficiënte navigatie door de actieruimte versterkt. Bestaande methoden worstelen echter ofwel met unidirectionele exploratie in uitgestrekte actieruimtes, waarbij ze vastlopen in een lokaal optimale oplossing, of lijden onder het uitputtend doorlopen van alle mogelijke acties, wat leidt tot inefficiënte navigatie. Om deze problemen aan te pakken, stellen we ToolChain* voor, een efficiënt op boomzoeken gebaseerd planningsalgoritme voor LLM-gebaseerde agents. Het formuleert de gehele actieruimte als een beslissingsboom, waarbij elk knooppunt een mogelijke API-functieaanroep in een oplossingsplan vertegenwoordigt. Door het A*-zoekalgoritme te combineren met taakspecifieke kostenfunctie-ontwerpen, snoeit het efficiënt hoogkosten takken weg die mogelijk onjuiste acties bevatten, en identificeert het het meest kosteneffectieve geldige pad als oplossing. Uitgebreide experimenten op meerdere tool-gebruik- en redeneertaken tonen aan dat ToolChain* efficiënt balanseert tussen exploratie en exploitatie binnen een uitgestrekte actieruimte. Het overtreft state-of-the-art baseline-methoden op plannings- en redeneertaken met gemiddeld 3,1% en 3,5%, terwijl het respectievelijk 7,35x en 2,31x minder tijd vereist.
English
Large language models (LLMs) have demonstrated powerful decision-making and
planning capabilities in solving complicated real-world problems. LLM-based
autonomous agents can interact with diverse tools (e.g., functional APIs) and
generate solution plans that execute a series of API function calls in a
step-by-step manner. The multitude of candidate API function calls
significantly expands the action space, amplifying the critical need for
efficient action space navigation. However, existing methods either struggle
with unidirectional exploration in expansive action spaces, trapped into a
locally optimal solution, or suffer from exhaustively traversing all potential
actions, causing inefficient navigation. To address these issues, we propose
ToolChain*, an efficient tree search-based planning algorithm for LLM-based
agents. It formulates the entire action space as a decision tree, where each
node represents a possible API function call involved in a solution plan. By
incorporating the A* search algorithm with task-specific cost function design,
it efficiently prunes high-cost branches that may involve incorrect actions,
identifying the most low-cost valid path as the solution. Extensive experiments
on multiple tool-use and reasoning tasks demonstrate that ToolChain*
efficiently balances exploration and exploitation within an expansive action
space. It outperforms state-of-the-art baselines on planning and reasoning
tasks by 3.1% and 3.5% on average while requiring 7.35x and 2.31x less time,
respectively.