Skip to main content
QUICK REVIEW

[Paper Review] Algorithm of Thoughts: Enhancing Exploration of Ideas in Large Language Models

Bilgehan Sel, Ahmad Al-Tawaha|arXiv (Cornell University)|Aug 20, 2023
Topic ModelingComputer Science12 citations
TL;DR

AoT introduces in-context algorithmic reasoning to explore solution spaces with minimal queries, outperforming single-query methods and rivaling external tree-search approaches like ToT.

ABSTRACT

Current literature, aiming to surpass the "Chain-of-Thought" approach, often resorts to external modi operandi involving halting, modifying, and then resuming the generation process to boost Large Language Models' (LLMs) reasoning capacities. Due to their myopic perspective, they escalate the number of query requests, leading to increased costs, memory, and computational overheads. Addressing this, we propose the Algorithm of Thoughts -- a novel strategy that propels LLMs through algorithmic reasoning pathways. By employing algorithmic examples fully in-context, this overarching view of the whole process exploits the innate recurrence dynamics of LLMs, expanding their idea exploration with merely one or a few queries. Our technique outperforms earlier single-query methods and even more recent multi-query strategies that employ an extensive tree search algorithms while using significantly fewer tokens. Intriguingly, our results suggest that instructing an LLM using an algorithm can lead to performance surpassing that of the algorithm itself, hinting at LLM's inherent ability to weave its intuition into optimized searches. We probe into the underpinnings of our method's efficacy and its nuances in application. The code and related content can be found in: https://algorithm-of-thoughts.github.io.

Motivation & Objective

  • Motivate reducing query demands in multi-step reasoning for LLMs to save costs and energy.
  • Introduce a new in-context learning paradigm that internalizes algorithmic exploration within a single or minimal number of queries.
  • Leverage recursive and heuristic reasoning in LLMs to broaden exploration of solution spaces beyond standard prompting and CoT.
  • Demonstrate that algorithmic in-context prompts can outperform single-query methods and compete with external tree-search approaches.
  • Investigate the bounds and limitations of AoT, including token efficiency and dependence on model capability (e.g., GPT-4).

Proposed method

  • Propose Algorithm of Thoughts (AoT) that encodes search-process algorithms (DFS/BFS-like) as in-context algorithmic examples within a single generation window.
  • Enable continuous generation to create and evaluate whole sequences without pausing for external evaluations, addressing the limitations of token-probability sampling.
  • Use DFS-oriented prompts with pruning to backtrack to promising nodes, while incorporating LLM’s own heuristics to prioritize local, promising branches.
  • Compare AoT against standard prompting, Chain-of-Thought (CoT), CoT with Self-Consistency, Standard+Refine, and Tree-of-Thought (ToT) across reasoning tasks.
  • Demonstrate that AoT can achieve high success with one query and analyze error types to guide future prompt design.
  • Explore variations of algorithm choices (AoT(DFS), AoT(BFS), AoT(Random)) and prompt lengths (AoT Short/Long) to study their impact on performance.

Experimental results

Research questions

  • RQ1Can AoT surpass the efficiency and performance of external tree-search methods while using far fewer LLM queries?
  • RQ2How does embedding algorithmic search behaviors in prompts influence the quality and speed of reasoning in LLMs?
  • RQ3What are the trade-offs in token usage and generation length when using AoT compared to ToT and other prompting methods?
  • RQ4Do different tree-search strategies (DFS vs BFS vs random) affect AoT’s effectiveness and efficiency?
  • RQ5What are the primary error modes in AoT, and how can prompts be tuned to mitigate them?

Key findings

  • AoT outperforms single-prompt methods like Standard prompting and CoT/CoT-SC in the Game of 24 and mini crosswords.
  • AoT matches or exceeds ToT performance on several tasks while requiring dramatically fewer LLM queries (AoT uses about 1 query vs. ToT’s ~109.1 avg. queries for Game of 24).
  • In the Game of 24, AoT achieves 71% success with 1 average query, compared to ToT’s 69% with ~109 queries.
  • In 5x5 mini crosswords, AoT reaches 52% word success with 2 avg. queries, while ToT achieves 60% with >200 queries; AoT’s error profile shows different dominant failure modes.
  • Error analysis reveals categories such as expression missteps and non-finalization, with AoT+Manual Resolution reaching 78% success in Game of 24.
  • AoT variants (DFS/BFS/Random) demonstrate that structured algorithms (DFS/BFS) outperform random search, with AoT(DFS) at 71% success and AoT(BFS) at 48% in Game of 24.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.