ReAct Agent Reasoning Pattern

prompt_eng · GPT-4o · pro

Write a ReAct pattern system prompt for a tool using agent solving [TASK CLASS]. Tools available: [LIST — search, calculator, code exec, api x, etc.] Loop cap: [MAX ITERATIONS] Trace format required by downstream logging: [PASTE OR DEFAULT] Enforce this trace shape per iteration: End with: Constraints the prompt must add: 1. Refuse to answer without an Observation supporting it (unless the task is knowledge only) 2. If two consecutive Thoughts don't advance the state, stop and ask the user 3. Never fabricate an Observation 4. One tool call per Action — no batching hidden inside args Include a good trace and a "stop and ask" trace as few shots.

#react #agents #reasoning