Table of Contents
Fetching ...

Fast-Slow-Thinking: Complex Task Solving with Large Language Models

Yiliu Sun, Yanfang Zhang, Zicheng Zhao, Sheng Wan, Dacheng Tao, Chen Gong

TL;DR

This work tackles the challenge of solving complex, constraint-rich tasks with large language models by proposing Fast-Slow-Thinking (FST), a coarse-to-fine task decomposition that couples Fast Thinking (FT) and Slow Thinking (ST) with an Output Inspection (OI) phase. The approach uses a general prompt template with Identity Setup, Task Simplification, and Answer Generation for FT; Constraint Reconsideration and Answer Improvement for ST; and Correctness and Other Checks for OI. Across math reasoning, long-content answering, and constrained story generation, FST consistently outperforms baselines and exhibits efficiency advantages, requiring far fewer LLM calls than some competing methods. The results suggest that explicitly integrating fast and slow cognitive processes into prompting can enhance both the accuracy and quality of LLM-generated solutions, with demonstrated robustness to prompt perturbations; code for reproduction is provided.

Abstract

Nowadays, Large Language Models (LLMs) have been gradually employed to solve complex tasks. To face the challenge, task decomposition has become an effective way, which proposes to divide a complex task into multiple simpler subtasks and then solve them separately so that the difficulty of the original task can be reduced. However, the performance of existing task decomposition methods can be suboptimal when the task contains overly complex logic and constraints. In this situation, the solution generated by LLMs may deviate from the original purpose of the task, or contain redundant or even erroneous content. Therefore, inspired by the fact that humans possess two thinking systems including fast thinking and slow thinking, this paper introduces a new task decomposition method termed ``Fast-Slow-Thinking'' (FST), which stimulates LLMs to solve tasks through the cooperation of Fast Thinking (FT) and Slow Thinking (ST) steps. Here FT focuses more on the general and concise aspect of the task, and ST focuses more on the details of the task. In FT, LLMs are prompted to remove the constraints of the original task, therefore simplifying it to a general and concise one. In ST, we recall the constraints removed in FT, so that LLMs can improve the answer generated in FT to meet the requirements of the original task. Therefore, our FST method enables LLMs to consider a complex problem via a human-like cognition process from coarse to fine, the effectiveness of which has been well demonstrated by the experiments on three types of tasks.

Fast-Slow-Thinking: Complex Task Solving with Large Language Models

TL;DR

This work tackles the challenge of solving complex, constraint-rich tasks with large language models by proposing Fast-Slow-Thinking (FST), a coarse-to-fine task decomposition that couples Fast Thinking (FT) and Slow Thinking (ST) with an Output Inspection (OI) phase. The approach uses a general prompt template with Identity Setup, Task Simplification, and Answer Generation for FT; Constraint Reconsideration and Answer Improvement for ST; and Correctness and Other Checks for OI. Across math reasoning, long-content answering, and constrained story generation, FST consistently outperforms baselines and exhibits efficiency advantages, requiring far fewer LLM calls than some competing methods. The results suggest that explicitly integrating fast and slow cognitive processes into prompting can enhance both the accuracy and quality of LLM-generated solutions, with demonstrated robustness to prompt perturbations; code for reproduction is provided.

Abstract

Nowadays, Large Language Models (LLMs) have been gradually employed to solve complex tasks. To face the challenge, task decomposition has become an effective way, which proposes to divide a complex task into multiple simpler subtasks and then solve them separately so that the difficulty of the original task can be reduced. However, the performance of existing task decomposition methods can be suboptimal when the task contains overly complex logic and constraints. In this situation, the solution generated by LLMs may deviate from the original purpose of the task, or contain redundant or even erroneous content. Therefore, inspired by the fact that humans possess two thinking systems including fast thinking and slow thinking, this paper introduces a new task decomposition method termed ``Fast-Slow-Thinking'' (FST), which stimulates LLMs to solve tasks through the cooperation of Fast Thinking (FT) and Slow Thinking (ST) steps. Here FT focuses more on the general and concise aspect of the task, and ST focuses more on the details of the task. In FT, LLMs are prompted to remove the constraints of the original task, therefore simplifying it to a general and concise one. In ST, we recall the constraints removed in FT, so that LLMs can improve the answer generated in FT to meet the requirements of the original task. Therefore, our FST method enables LLMs to consider a complex problem via a human-like cognition process from coarse to fine, the effectiveness of which has been well demonstrated by the experiments on three types of tasks.

Paper Structure

This paper contains 21 sections, 2 equations, 7 figures, 19 tables, 1 algorithm.

Figures (7)

  • Figure 1: Comparison between our method and other typical task decomposition methods. The texts highlighted in yellow denote the words that must be included in the story, and the red and underlined texts denote the illogical content. The story generated by FST contains all the specified words, and the content is also reasonable.
  • Figure 2: An illustration of our Fast-Slow-Thinking, which is inspired by the human thinking mode and consists of three steps: Fast Thinking, Slow Thinking, and Output Inspection. The texts highlighted in yellow denote the words that must be included in the story, and the red and underlined texts denote the illogical content. We prompt LLMs to simplify the original task to a concise and general one and complete the concise and general task in FT. In ST, LLMs need to reconsider the original task and improve the solution generated in FT to meet the requirements. In OI, LLMs are prompted to check the improved solution for potential mistakes.
  • Figure 3: Prompt of Boosting of Thoughts chen2024boosting used in the experiments.
  • Figure 4: Prompt of Solo Performance Prompting wang2024unleashing used in the experiments.
  • Figure 5: Prompt of Step-Back Prompting zheng2024take used in the experiments.
  • ...and 2 more figures