StrategyLLM: Large Language Models as Strategy Generators, Executors, Optimizers, and Evaluators for Problem Solving

Chang Gao, Haiyun Jiang, Deng Cai, Shuming Shi, Wai Lam

TL;DR

StrategyLLM is a multi-agent framework that allows Large Language Models (LLMs) to autonomously generate, optimize, and apply general problem-solving strategies. By shifting from instance-specific examples to task-level "blueprints," it significantly improves reasoning performance and out-of-distribution generalization while eliminating the need for human-annotated solutions.

What Problem Does This Paper Address?

Most current prompting techniques, like Chain-of-Thought (CoT), rely on "instance-specific" solutions. You give the model a few examples of a problem and its step-by-step solution, hoping it mimics that logic for a new question.

Comparison of specific solutions vs. strategy-based solutions

However, this approach has two major flaws:

  1. Generalizability: A solution for a system of two linear equations might not help the model solve a system of three. The logic is too tied to the specific numbers and structure of the example.
  2. Consistency: Different examples in a few-shot prompt might use different reasoning styles, which can confuse the model and lead to erratic performance.

Furthermore, creating high-quality CoT prompts usually requires humans to manually write out reasoning chains—a process that is slow, expensive, and difficult to scale.

Methods

The authors propose StrategyLLM, a framework that mimics human cognitive processes by using inductive reasoning (deriving general rules from specific cases) and deductive reasoning (applying those rules to new cases).

The StrategyLLM framework featuring four specialized agents

To do this autonomously, they deploy four specialized LLM-based agents:

  • Strategy Generator: Analyzes a few task examples and "induces" a set of general, step-by-step strategies (e.g., "To solve this, first identify the variables, then set up a matrix, then use Gaussian elimination...").
  • Strategy Executor: Takes these general strategies and "deductively" applies them back to the examples to see if they actually produce the correct answer.
  • Strategy Optimizer: Acts as a debugger. If a strategy fails, this agent analyzes the errors and refines the strategy to make it more robust.
  • Strategy Evaluator: Ranks the final pool of strategies on a validation set to select the most effective ones for the final prompt.

This collaborative loop results in a strategy-based prompt that provides the model with a high-level "how-to" guide rather than just a list of solved problems.

Datasets

The researchers evaluated StrategyLLM across 13 datasets covering four challenging reasoning domains:

  • Math Reasoning: The MATH benchmark (including Algebra, Prealgebra, Geometry, etc.).
  • Commonsense Reasoning: StrategyQA and Date Understanding (DU).
  • Algorithmic Reasoning: Word Sorting (WS) and Multi-step Arithmetic (MA).
  • Symbolic Reasoning: Last Letter Concatenation (LLC), including out-of-distribution (OOD) tests with longer sequences.

Key Insights and Ideas

  • Strategies > Solutions: The core "aha" moment is that a general strategy is more transferable than a specific solution. By forcing the model to articulate a plan before solving, it avoids getting bogged down in the "noise" of specific example data.
  • The Power of Induction: LLMs are surprisingly good at abstracting rules. StrategyLLM proves that models can "self-teach" the underlying logic of a task just by looking at a few (Question, Answer) pairs.
  • Zero-Shot Aggregation: For complex tasks, the authors found that using multiple strategies and letting the LLM determine the final answer in a zero-shot manner (StrategyLLM-ZS) often outperformed simple majority voting.
  • Extreme Cost-Efficiency: Because the strategy generation happens once per task (not per query), it is incredibly cheap. Developing a high-performing prompt for a new task costs less than $0.24 using GPT-3.5-Turbo.

Key Results

StrategyLLM consistently outperformed the competitive CoT-SC (Self-Consistency) baseline, even though the baseline used human-annotated solutions and StrategyLLM did not.

  • Symbolic Reasoning: Performance on the LLC task jumped from 30.0% to 79.2%. This highlights the framework's massive advantage in out-of-distribution generalization.
  • Algorithmic Reasoning: Accuracy improved from 73.7% to 85.0%.
  • Math Reasoning: On the difficult MATH benchmark, it saw a relative improvement of +13.4% over CoT-SC.
  • Universality: The method was shown to be effective across various models, including GPT-4, Claude-3-Sonnet, Llama-3, and Mixtral, proving it isn't just a "GPT-specific" trick.

Limitations and Future Work

  • Knowledge Bottleneck: The framework relies on the LLM's internal knowledge to generate strategies. If a model has zero prior knowledge of a domain (e.g., a highly niche scientific field), it cannot "hallucinate" a valid strategy.
  • Prompt Length: Strategy-based prompts can be longer than standard CoT prompts, which increases the input token count and associated inference costs.
  • Future Directions: The authors suggest exploring ways to make strategies more succinct and investigating how this framework could be integrated into continuous training or fine-tuning pipelines to bake "strategic thinking" directly into model weights.

Summary updated

BibTeX
@inproceedings{gao2024strategyllm,
  author = {Chang Gao and Haiyun Jiang and Deng Cai and Shuming Shi and Wai Lam},
  title = {{StrategyLLM: Large Language Models as Strategy Generators, Executors, Optimizers, and Evaluators for Problem Solving}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=UkxJd64mki},
}
Figure