Boom der Gedachten: Doelgericht Probleemoplossen met Grote Taalmodellen
Tree of Thoughts: Deliberate Problem Solving with Large Language Models
May 17, 2023
Auteurs: Shunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran, Thomas L. Griffiths, Yuan Cao, Karthik Narasimhan
cs.AI
Samenvatting
Taalmodellen worden steeds vaker ingezet voor algemeen probleemoplossen
over een breed scala aan taken, maar zijn tijdens inferentie nog steeds beperkt
tot token-niveau, links-naar-rechts besluitvormingsprocessen. Dit betekent dat ze
tekort kunnen schieten bij taken die exploratie, strategische vooruitblik of
waar initiële beslissingen een cruciale rol spelen vereisen. Om deze uitdagingen
te overwinnen, introduceren we een nieuw raamwerk voor taalmodelinferentie, Tree
of Thoughts (ToT), dat een generalisatie is van de populaire Chain of Thought
aanpak voor het aansturen van taalmodellen, en exploratie mogelijk maakt over
samenhangende tekstuele eenheden (gedachten) die als tussenstappen dienen naar
probleemoplossing. ToT stelt taalmodellen in staat om weloverwogen beslissingen
te nemen door meerdere verschillende redeneerpaden te overwegen en keuzes te
zelfevalueren om de volgende actie te bepalen, evenals vooruit te kijken of
terug te keren indien nodig om globale keuzes te maken. Onze experimenten tonen
aan dat ToT de probleemoplossende vaardigheden van taalmodellen aanzienlijk
verbetert bij drie nieuwe taken die niet-triviale planning of zoekstrategieën
vereisen: Game of 24, Creatief Schrijven en Mini Kruiswoordpuzzels. Bijvoorbeeld,
in Game of 24 loste GPT-4 met chain-of-thought prompting slechts 4% van de taken
op, terwijl onze methode een slagingspercentage van 74% behaalde. Code repository
met alle prompts: https://github.com/ysymyth/tree-of-thought-llm.
English
Language models are increasingly being deployed for general problem solving
across a wide range of tasks, but are still confined to token-level,
left-to-right decision-making processes during inference. This means they can
fall short in tasks that require exploration, strategic lookahead, or where
initial decisions play a pivotal role. To surmount these challenges, we
introduce a new framework for language model inference, Tree of Thoughts (ToT),
which generalizes over the popular Chain of Thought approach to prompting
language models, and enables exploration over coherent units of text (thoughts)
that serve as intermediate steps toward problem solving. ToT allows LMs to
perform deliberate decision making by considering multiple different reasoning
paths and self-evaluating choices to decide the next course of action, as well
as looking ahead or backtracking when necessary to make global choices. Our
experiments show that ToT significantly enhances language models'
problem-solving abilities on three novel tasks requiring non-trivial planning
or search: Game of 24, Creative Writing, and Mini Crosswords. For instance, in
Game of 24, while GPT-4 with chain-of-thought prompting only solved 4% of
tasks, our method achieved a success rate of 74%. Code repo with all prompts:
https://github.com/ysymyth/tree-of-thought-llm.