II · Planning & Control FlowMature★★

Incremental Model Querying

also known as Step-By-Step Plan Generation, Sequential Model Plan

Generate plan steps by sequentially querying the model at each step rather than producing the whole plan upfront in one call.

Context

A team has an agent that must produce a multi-step plan to achieve a goal. The team has the choice of either querying the model once for the full plan (one-shot) or querying step-by-step (incremental).

Problem

One-shot plan generation forces the model to commit to all steps before seeing the consequences of any. When the world is uncertain or earlier steps reveal new information, the one-shot plan is wrong from step 2 onward. Incremental querying is better but is often unnamed as a deliberate alternative.

Forces

  • Incremental querying is N× more model calls than one-shot.
  • Per-step context grows as prior step results accumulate.
  • Some tasks need a complete plan upfront (commitment, parallelization).

Example

A debugging agent troubleshoots a flaky test. With one-shot planning, it generates 8 steps upfront based on the initial error message; steps 4-8 turn out wrong once step 1 reveals the actual root cause. With incremental querying, the agent runs step 1 (read the test), observes (sees an undocumented dependency), then asks the model 'next step?' which adjusts to investigate the dependency. The plan adapts to what the world reveals.

Diagram

Solution

Therefore:

At each plan step, query the model with (goal, history-of-steps-so-far, current-observation) and receive only the next step. Execute the step. Observe. Repeat until goal-met or budget exhausted. Distinct from one-shot model querying (whole plan in one call) and from multi-path plan generation (which generates multiple next-step candidates at each node). Pair with single-path-plan-generator, multi-path-plan-generator, react, plan-and-execute.

What this pattern forbids. The model never sees beyond the current step in its planning context; one-shot whole-plan queries are excluded.

And the patterns that stand alongside it, or against it —

  • complementsReAct★★Interleave a single thought, a single tool call, and a single observation per step so the agent reasons over fresh evidence.
  • alternative-toPlan-and-Execute★★Plan all the steps once with a strong model, then execute each step with a cheaper model under the plan.
  • complementsSingle-Path Plan Generator★★Generate one linear sequence of intermediate steps from current state to goal — the lightweight planning alternative to tree-of-thoughts and multi-path generation.
  • complementsMulti-Path Plan Generator★★Generate multiple candidate next-steps at each plan node enabling later selection — the planning generator pattern paired with tree-of-thoughts / LATS-style search.
  • complementsReplan on Failure★★Trigger a fresh planning step when execution evidence contradicts the current plan.

Neighbourhood

Click any neighbour to follow the language. Scroll to zoom, drag to pan.

References

Provenance