Skip to content

ReAct, Plan-and-Solve and Reflexion with shared tasks and explicit limits

15 min reading

Compare ReAct, Plan-and-Solve and Reflexion without treating self-generated text as independent verification.

Page details

GenAI · Lesson 20 of 45 · 3 / 3.1

Sources · 15 min reading · 31 min with practice

Published · Last edited:

More
20px

Progress is saved in this browser when storage is available.

View guided paths and progress

Know first: When an agent is warranted; trace perceive → reason → act → evaluate. Optional help: GenAI foundations.

Optional background references

Hypothetical scenario. Northwind’s bounded loop receives a tool result that contradicts its initial plan. Maya needs the answer grounded in that observation. Dev considers another lookup or a revised plan, while Priya asks what would justify either choice.

Maya: “The new observation changes what we need to check.”

Dev: “We can interleave the next action, revise a plan or retain feedback for another trial.”

Priya: “Whichever process we choose, its explanation is still a proposal to verify.”

You will compare ReAct, Plan-and-Solve and Reflexion on a shared task, accounting for search work and independent acceptance conditions. Distinguish a changed control strategy from new evidence that the task is complete.

What changes when the plan meets a contradictory observation?

ReAct, by Yao and colleagues, interleaves generated reasoning with actions and observations. Plan-and-Solve, by Wang and colleagues, asks for a plan before executing its substeps. Reflexion, by Shinn and colleagues, uses feedback and reflective text retained across trials rather than a weight update. These are distinct process choices, not evidence that an internal explanation is true.

Hypothetical scenario. A task needs a source lookup and a calculation. A fixed plan lists both before execution; an interleaved strategy can inspect the lookup before choosing the calculation; a reflective retry can store why an earlier calculation failed. If two trials repeat an unsupported assumption, the second narrative has not verified the first. Compare all three under the same allowed tools, attempt budget and independent acceptance test. Store concise decisions and observable results rather than relying on hidden reasoning as an audit record.

A request that does not fit the usual route

Northwind's support workflow can handle an ordinary return through a fixed sequence: identify the order, inspect the applicable policy, obtain any required approval and submit the authorized action. An unusual request combines a damaged item, an incomplete delivery and a supplier dispute. Priya needs the assistant to investigate, but the investigation might discover that different evidence is needed. Writing one increasingly complicated prompt makes that control decision difficult to inspect.

Begin by separating the outcome from a proposed method. “Prepare a supported recommendation about this order” is an outcome that can be reviewed. “Open five tools, then summarize” specifies activity without establishing why those tools are needed. A useful plan names the intermediate observations that would justify a next step. Its stopping condition describes a decision that someone can check against evidence.

Compare search over plans with permission to execute

Hypothetical scenario. A ReAct-style loop interleaves proposals and observations, while plan-and-execute records a proposed decomposition and tree search explores alternatives. These are control strategies, not different sources of action authority.

Compare search over plans with permission to execute
ArtifactConcrete evidenceDecision boundary
Plan branchbranch ID, parent, proposed stepsUncommitted hypothesis
Committed steptask, approved operation, versionExecution authority
Search budgetmodel work, branches, remaining timeShared bound
Bounded exploration: Task / budget → Plan alternatives.Bounded exploration: Task / budget → Plan alternatives. Task / budget to Plan alternatives: bounded exploration; Plan alternatives to Approved next step: validate selected transition.Task / budgetPlan alternativesApproved next stepbounded explorationvalidate selected transition
Bounded exploration: Task / budget → Plan alternatives. Enlarge the diagram to inspect its labels; the surrounding records and explanation give the text alternative.

Keep each explored branch separate from committed workflow state. A simulated purchase or code change must not execute merely because a planner evaluates it. Search cost includes discarded model calls and tool simulations; stopping needs a shared task budget rather than an independent allowance per branch. Evaluate whether planning improves the accepted outcome on the same cases, including tasks where a short fixed path is sufficient.

Why a plausible sequence is insufficient

A model can produce a sequence whose individual sentences sound reasonable while its dependencies are impossible. It might propose checking a shipment before identifying the order, or refunding an invoice before confirming that Northwind is authorized to act. The error is in the transition relation, not necessarily in the wording of any single step.

Distinguish three questions. Is the proposed action applicable in the current state? Is its result useful for the task? Is the actor allowed to request its effects? A language model can help propose candidates, while deterministic application rules enforce known preconditions and permissions. An external result then changes what is observed. The next decision should use that observation rather than treating the original plan as an unchangeable script.

Choose prescribed, proposed or searched control

A prescribed workflow is appropriate when the allowable transitions are known and the main variation is in the information flowing through them. Model-directed planning gives the model a bounded choice of next actions. Search makes alternative candidate paths explicit and spends a selected budget examining them. These are different control strategies; none is a synonym for intelligence or reliability.

In a LangGraph application, nodes and conditional routing can express the control structure. A node may ask a model for a proposed next action, while another component checks that proposal against current evidence and allowed transitions. The model does not have to own the complete graph. The graph can preserve mandatory approval and reconciliation boundaries while allowing flexible investigation between them.

Define what a search node represents before counting branches. It could represent a proposed action sequence, a verified application state or an untested model hypothesis. Those representations support different claims. Finding a promising text continuation is not the same as finding an executable plan whose preconditions have been established.

A branch is a candidate, not an accepted action

Follow the decision boundaries

Planning and Workflows: Choosing a Route Without Delegating AuthorityThe observed state branches to candidate routes and evidence checks before a verified decision is accepted.Observed stateCandidate routesEvidence or conflictVerified decision

The root represents an observed order state. Each branch proposes a next investigation. A verifier can reject a branch without executing its action. Keep proposal evaluation separate from effectful tool invocation so that exploring alternatives does not itself change the customer's account.

Work the search budget before selecting a strategy

Hypothetical scenario. Suppose an investigator considers three alternatives at every decision and examines three levels beyond the initial state. This is a chosen toy tree with no pruning and no merged states. Level one has 3 candidates. Level two has 3 × 3 = 9. Level three has 9 × 3 = 27. Including the root, the tree contains 1 + 3 + 9 + 27 = 40 nodes.

If the application allows only ten candidate evaluations, it cannot inspect the complete tree under those assumptions. After evaluating the three first-level candidates, seven evaluations remain. A priority rule must decide which successors receive attention. Breadth-first expansion, a heuristic ranking and a model-generated ranking can allocate the same budget differently. The chosen rule changes what the investigator has actually examined.

Now suppose each candidate evaluation is assigned two seconds of serial execution time. Ten evaluations account for 10 × 2 = 20 seconds. Add a selected three-second final verification step: 20 + 3 = 23 seconds of accounted work. This excludes network variation, queueing and any action execution. A 20-second deadline cannot contain all of those selected serial steps. The budget must shrink, some independent work must run concurrently, or the service must report that a complete decision is unavailable within the deadline.

Check a candidate against an explicit state

Write a small planning record in prose: current order identity, observed shipment status, missing evidence, proposed action, expected observation and a reason to stop. For a supplier dispute, an expected observation might be an authenticated response about the shipment. A generated assertion that the supplier agreed is not an acceptable substitute.

A precondition can become stale while a plan is being evaluated. Record the relevant document or order version with the candidate. Before an effectful action, compare it with the authoritative current version. If the evidence has changed, return to the appropriate investigation state rather than preserving a plan merely because it was expensive to produce.

Use evaluation examples that discriminate between control strategies. Include a routine request where a fixed workflow should win on clarity, a request with a genuinely unknown investigation route, and a case where the evidence never supports an allowed action. An agent that explores extensively but cannot abstain has not solved the third case.

In the wild: workflows and agents are distinct choices

Anthropic's Building effective agents distinguishes prescribed workflows from systems where a model directs its process and tool use. That first-party engineering account supports treating control structure as a design choice. It does not establish a general benchmark showing that more autonomous planning improves every task.

For Northwind, the inference is narrower: preserve the familiar return workflow where its transitions are sufficient, and evaluate flexible investigation on the unusual cases that require it. The company's scenario is hypothetical. The source is guidance about architectural patterns, not evidence that this fictional workflow has been deployed successfully.

The quality of a verifier bounds the value of search

Search can amplify a poor acceptance rule. If the verifier rewards confident answers without checking their evidence, examining more candidates can produce a more persuasive unsupported recommendation. Separate applicability checks, evidence support and final task quality. A candidate should not receive a high score merely because its own explanation says it is correct.

Some tasks have a cheap external check, such as validating a structured artifact against a known constraint. Others require judgment about an ambiguous recommendation. That difference affects how much search can help and which conclusions the final evaluation supports. A numerical score for a recommendation is an application measurement with a specified rubric, not a universal measure of reasoning.

Consider the alternative of improving task decomposition rather than increasing search depth. Splitting identification, evidence collection and recommendation into explicit responsibilities can expose a missing contract. More branching cannot repair an absent source of authoritative order identity.

Use flexibility where the route is uncertain

Choose model-directed investigation when the set of relevant observations changes with what the system discovers, and when the actions can be bounded and inspected. Prefer prescribed transitions when business rules already define a compact, understandable route. A hybrid can let the model choose which evidence to inspect while leaving eligibility, approval and execution under fixed control.

Do not equate autonomy with removing people. A plan can end with a question for Priya, a request for missing evidence or a decision to stop. Those outcomes can be more useful than a forced final answer. Model the handoff as a supported result with the collected evidence attached, so another actor can continue without reconstructing the investigation from chat text.

Planning mistakes that survive a polished demonstration

A long plan is a complete plan. Length says little about established preconditions. Inspect dependency validity and the evidence needed at each transition.

A self-critique is an independent verifier. Another generated judgment can be useful, but independence and correctness require evaluation rather than a role label.

A successful final response validates every intermediate action. An attractive answer can conceal unnecessary disclosures or unauthorized tool use. Inspect the path as well as the final artifact.

Make the investigation explainable to its next owner

A useful continuation record should let Priya distinguish an untested suggestion from an accepted observation. Suppose the assistant proposes asking the supplier for a delivery record. Before the request is sent, that entry belongs to the candidate plan. After a response arrives, the result has its own source and identity. If the response is incomplete, the plan can change without rewriting the historical fact that the request was made.

Keep a compact distinction between the requested outcome and the current strategy. When the strategy fails, the application can select another route while preserving the same task identity. When the requested outcome changes, such as moving from advice to an actual refund, reassess the authority and evaluation contract. A new strategy does not automatically authorize a new kind of effect.

The reviewer should be able to answer why the task stopped. Perhaps the remaining candidates require unavailable evidence, perhaps the budget is exhausted, or perhaps a valid recommendation was accepted. Preserve that reason alongside the relevant observations. A transcript that ends with a confident paragraph is less useful than a structured account of the accepted result and its unresolved conditions.

These distinctions also improve evaluation. Label a task that should ask for clarification as successful only when the clarification is appropriate and informative. Otherwise a forced-answer benchmark can reward an investigator for crossing a stopping boundary that the real application needs to respect.

What this planning model leaves open

The tree arithmetic assumes a fixed branching factor and serial evaluation; real search can prune, merge states or spend uneven time on candidates. Model-directed proposals remain fallible, and a framework's graph representation does not validate business meaning. The verifier, permission boundary and stopping rules must be evaluated for the actual application. This chapter explains control choices without claiming that a generated reasoning trace reveals the model's internal process.

Test the plan branch boundary

Can every branch call the real payment tool to learn which plan works?

Reveal the design reasoning

No. Exploration must use permitted simulation or read-only evidence. Real effects need independently authorized operations and cannot be undone merely by discarding a branch.

Decision: Keep hypothetical search and committed execution in different states.

Defend a control strategy

The return rules are fixed, but the model writes fluent plans. Should it select the whole workflow?

Use the known transitions unless a demonstrated requirement needs a flexible route. The model can extract information and propose content inside those boundaries. Compare approaches on valid completion, unnecessary work and authority errors; fluent planning text alone does not justify a different execution policy.

Can ten evaluations establish that the best path was found in the 40-node toy tree?

No. The budget inspects only a subset unless additional bounds prove that unexplored candidates cannot improve the result. State the ranking policy and what was examined. A useful candidate within budget is a different claim from a globally best candidate.

A valid plan refers to an order version that changes before execution. What follows?

Recheck the relevant preconditions against the current authoritative version. Preserve unaffected evidence, but invalidate the part of the plan whose applicability depended on the old state. Executing a previously approved-looking sequence against a different state changes the decision.

Northwind decision log

  1. Separate the requested outcome from a proposed investigation strategy.
  2. Check action preconditions and authority outside generated planning text.
  3. Stop with evidence and a reason when the selected search budget ends.

Go deeper: supporting mechanisms

Related: Agentic systems · Retries and tool outcomes.

Check the mechanism in this lesson

Does a Reflexion note count as an independent verifier of the previous attempt?

Compare the explanation

No. It is retained generated feedback or interpretation, not automatically independent evidence. Use an external acceptance condition and preserve the actual observations that justify a changed action.

Carry the decision forward

Northwind can compare control strategies without confusing explanation with verification. Page 21 connects a proposed next step to an explicit tool operation, validated parameters and runtime authority.