The ReAct Framework
The ReAct framework, introduced by relevant research, enables large language models (LLMs) to generate reasoning trajectories and task-specific operations in an interleaved manner.
- Reasoning Trajectories: Capable of inducing, tracking, and updating operation plans, as well as handling exceptional situations.
- Task-Specific Operations: Allow interaction with external sources (such as knowledge bases or environments) to collect information. The ReAct framework supports LLMs in interacting with external tools to obtain additional information, thereby providing more reliable and practical responses. Experiments show that it outperforms several state-of-the-art baselines in language and decision-making tasks and improves the human interpretability and credibility of LLMs. Studies have found that combining ReAct with Chain of Thought (CoT) enables the use of both internal knowledge and acquired external information during reasoning.
Operational Mechanism
ReAct is inspired by the synergy between “action” and “reasoning,” which enables humans to learn new tasks and make decisions or inferences.
- Limitations of Chain of Thought (CoT): While it allows LLMs to execute reasoning trajectories to generate answers to problems involving arithmetic and commonsense reasoning, the lack of interaction with the external world or the inability to update knowledge can lead to issues such as factual hallucinations and error propagation.
- Characteristics of ReAct: As a general paradigm integrating reasoning and action with LLMs, it prompts LLMs to generate verbal reasoning trajectories and operations for tasks. This enables the system to perform dynamic reasoning to create, maintain, and adjust operation plans while supporting interaction with external environments (e.g., Wikipedia) to incorporate additional information into the reasoning process.