Skip to main content

ReAct Prompting

ReAct prompting is a technique that interleaves Reasoning and Acting: the model writes a short reasoning trace about what to do next, takes an action (typically a tool call such as a search or calculation), observes the result, and then reasons again before the next step. This explicit thought-action-observation loop lets the model ground its reasoning in real-world results from tools instead of relying only on internal knowledge, which reduces hallucinations on tasks that need up-to-date facts or external computation. ReAct is one of the foundational patterns behind modern tool-using agents.

Example

Asked to calculate a company's year-over-year revenue growth, a ReAct agent might output: Thought: I need this year's and last year's revenue figures; I will look them up. Action: search("Acme Corp annual revenue"). Observation: [search results returned by the tool]. Thought: Now I can compute the growth rate. Action: calculator("(this_year - last_year) / last_year"). Observation: [numeric result]. Answer: ... The agent alternates reasoning and tool calls until it has enough grounded information to answer.

Put this into practice

Build polished, copy-ready prompts in under 60 seconds with SurePrompts.

Try SurePrompts