ReAct – reasoning and acting in one prompt

ReAct (Reasoning and Acting)

A way of building prompts that combines reasoning and action in an interactive problem-solving loop. The model alternates between reasoning stages (analyzing the situation, planning) and actions (carrying out concrete steps).

AdvantagesDrawbacks
Handles complex, multi-step tasksCan be more time-consuming
Makes the decision-making process more transparentRequires a more elaborate prompt structure
Adapts to changing conditions in the taskCan make intermediate steps harder to interpret

Example of a ReAct prompt:

You are an AI assistant helping to plan a trip. Use the ReAct approach to help the user plan a week-long trip to Paris. At each stage:
1. Reasoning: analyze the current situation and decide on the next planning step.
2. Action: propose a specific action or ask the user a question.
3. Observation: evaluate the result of the action or the user's answer.

Start with a general question about the user's preferences and keep the process going until a full travel plan is in place.

Try it in GPTunneL