Complexity-Based Prompting for Multi-step Reasoning

Yao Fu, Hao Peng, Ashish Sabharwal, Peter Clark, Tushar Khot

Overview

Large Language Models (LLMs) like GPT-3 have demonstrated remarkable multi-step reasoning capabilities when guided by Chain-of-Thought (CoT) prompting. However, selecting the optimal examples for these prompts remains a significant challenge. This paper introduces Complexity-Based Prompting, a principled approach demonstrating that selecting few-shot prompts with more reasoning steps—and voting only on the most complex generated outputs—significantly boosts performance on challenging math and logic benchmarks.

The Problem: Bottlenecks in Example Selection

Chain-of-Thought prompting elicits reasoning in massive models by providing a few examples of a problem followed by its step-by-step solution. Despite its success, prompt engineering is often a manual process of trial and error. Should examples be simple or hard? Should they closely match the test question?

The lack of a principled, intuitive, and annotation-efficient scheme for selecting reasoning examples often limits the true reasoning potential of LLMs.

Methodology: Complexity Breeds Better Reasoning

The authors propose two main techniques based on the intuition that "thinking harder" starts with "seeing harder" examples:

  1. Complexity-Based Prompting (Input Selection): Instead of choosing random examples or manually tuning a prompt, this method selects examples with the highest reasoning complexity—defined simply as the number of reasoning steps in the solution. The hypothesis is that complex examples "subsume" simpler ones, teaching the model to handle intricate logic that then generalizes down to easier cases.
  2. Complexity-Based Consistency (Output Selection): This extends the standard "Self-Consistency" method (where a model generates multiple answers and takes a majority vote). Instead of voting across all generated reasoning chains, this approach only considers the top $K$ most complex chains. This discourages the model from taking shortcuts or providing overly simplistic, incorrect answers.
Overview of Complexity-Based Prompting and Consistency

Key Insights and Results

The study evaluated these methods on GPT-3 and Codex across rigorous benchmarks, including Math Word Problems (GSM8K, MathQA), Commonsense Reasoning (StrategyQA), and BigBenchHard tasks.

  • Complexity Generalizes Downward: Surprisingly, prompting with complex examples doesn't just help with hard questions; it significantly improves performance on simple questions too. The model learns a more robust reasoning procedure that it applies universally.
  • Steps > Length: A confounder analysis revealed that the number of reasoning steps is the critical factor for performance, not just the total character count of the prompt.
  • State-of-the-Art Accuracy: The approach achieved new SOTA performance for prompting-based models. For instance, it reached 82.9% accuracy on GSM8K using Codex (a massive jump from the original CoT's ~60%) and 60.0% on MathQA. Across math tasks, the method provided an average boost of +5.3 points for GPT-3 and +6.2 points for Codex compared to standard handcrafted prompts.
GSM8K accuracy increases with prompt complexity
  • Emergent Ability: This "complexity benefit" only appears in very large models (100B+ parameters). In smaller models like Flan-T5 (11B), using complex prompts actually decreased performance, suggesting that only massive models have the capacity to digest and mirror complex logic.
  • Annotation Efficiency: Because only a few complex examples (typically 8) are needed to create a high-performing prompt, this method is much cheaper and faster than retrieval-based methods that require annotating thousands of training instances.

Limitations and Future Work

While the paper proves that complexity helps, the underlying theoretical mechanism of why LLMs mirror this complexity so effectively remains an open question for future study. Furthermore, there is likely an upper bound to this benefit; if a prompt is too convoluted, it might exceed the model's context window or lead to hallucinations. Future research will need to explore the optimal "sweet spot" of complexity for various downstream tasks.

Summary updated

BibTeX
@inproceedings{fu2023complexity,
  author = {Yao Fu and Hao Peng and Ashish Sabharwal and Peter Clark and Tushar Khot},
  title = {{Complexity-Based Prompting for Multi-step Reasoning}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=yf1icZHC-l9},
}
Figure