ReAct prompting
ReAct interleaves reasoning steps with tool actions, letting a model think, act, observe, and repeat until it answers.
ReAct ("Reason + Act") is a prompting pattern where the model alternates between writing a reasoning step ("Thought"), taking an action against a tool ("Action", e.g. a search or calculator call), and reading the result ("Observation"), looping until it has enough to answer. Unlike pure chain-of-thought, which reasons without external grounding, ReAct lets the model fetch facts mid-reasoning — reducing hallucination and enabling multi-step tasks like research, browsing, and database lookups. It is the backbone of most tool-using agents. Reliability comes from a clear action schema, a hard step cap, and an observation format the model can parse.
When to use react prompting
- Agents that must call tools (search, code, APIs) to answer.
- Multi-step tasks where facts must be fetched, not recalled.
- Reducing hallucination by grounding each step in real observations.
When not to use react prompting
- Closed-book questions the model can answer directly — the action loop is overhead.
- Latency-critical paths; each Thought-Action-Observation cycle is a round trip.
Example
Input: Q: Who won the 2022 final and what was the score? Thought: I should search. Action: search[...] Observation: ... Output: After one search-observe loop the model answers with the grounded result instead of guessing.
Common mistakes
- No step cap — the loop runs away on hard or ambiguous queries.
- Free-text actions the runtime can't parse; define a strict action schema.
- Using ReAct when chain-of-thought (no tools) already suffices.
FAQ
What is react prompting?
ReAct interleaves reasoning steps with tool actions, letting a model think, act, observe, and repeat until it answers.
When should I use react prompting?
Agents that must call tools (search, code, APIs) to answer. Multi-step tasks where facts must be fetched, not recalled. Reducing hallucination by grounding each step in real observations.
What are the most common mistakes with react prompting?
No step cap — the loop runs away on hard or ambiguous queries. Free-text actions the runtime can't parse; define a strict action schema. Using ReAct when chain-of-thought (no tools) already suffices.
Related terms
- Tree of Thought (ToT) — Tree of Thought prompts a model to branch into multiple reasoning paths, evaluate them, and search for the best one.
- Chain-of-thought prompting — Chain-of-thought (CoT) prompting tells a language model to write its reasoning steps before its final answer, increasing accuracy on multi-step problems.
- Few-shot prompting — Few-shot prompting supplies 2–10 input–output examples inside the prompt so the model imitates the pattern on a new input.
- Prompt engineering — Prompt engineering is the practice of designing input text that reliably steers a large language model toward a specific output.
Sources
Last updated: 2026-06-02. Raw markdown: https://promtable.com/glossary/react-prompting.md.