What is the ReAct pattern and how does the Agentforce Planner use it?
Suggested answer
ReAct (Reasoning and Acting) is a prompting framework for LLM agents that interleaves explicit reasoning steps with action calls. The cycle is:
1. Thought: The LLM reasons about the user's request and the current state — "The user wants to cancel an order. I need the order ID first."
2. Action: The LLM selects and invokes a tool/action with parameters — calling the "Get Order Details" Flow with the order number extracted from the user's message.
3. Observation: The result of the action is returned to the LLM — the order details record data. The cycle repeats: the LLM reasons about the observation, determines the next action, and continues until the user's goal is fulfilled or the agent determines it cannot proceed. The Agentforce Planner implements ReAct internally — it is not visible to the admin, but understanding it explains why well-described Topics and Actions are essential: the LLM's Thought steps depend on clear, accurate descriptions to make correct selections. It also explains why providing the wrong action description causes the agent to invoke the wrong action in the Acting step.
Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.
Community comments (0)
No comments yet.
Sign in or create a free account to add a comment. Comments are moderated before they appear.