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.
