ReAct (2023)
FreeReasoning + Acting interleaved — foundation of agent prompt design
About ReAct (2023)
ReAct is a novel prompting paradigm for large language models that synergizes reasoning and acting in an interleaved manner. Unlike traditional chain-of-thought prompting which focuses solely on reasoning, or action plan generation which focuses solely on acting, ReAct generates both reasoning traces and task-specific actions together. This allows the model to induce, track, and update action plans, handle exceptions, and interface with external knowledge bases or environments to gather additional information. The approach has been shown to overcome hallucination and error propagation issues in chain-of-thought reasoning on question answering and fact verification tasks, and outperforms imitation and reinforcement learning methods on interactive decision-making benchmarks like ALFWorld and WebShop by significant margins.
Key Features
Pros & Cons
- Overcomes hallucination and error propagation prevalent in chain-of-thought reasoning
- More interpretable than methods without reasoning traces
- Outperforms imitation and reinforcement learning methods by 34% and 10% on ALFWorld and WebShop respectively
- Requires only one or two in-context examples for prompting
- Generates human-like task-solving trajectories
- Requires access to external tools or APIs (e.g., Wikipedia) for full effectiveness
- Performance may depend on underlying LLM's capabilities
- Not a standalone product; requires implementation in a prompt engineering pipeline