Planning & Control Flow

Incremental Model Querying

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

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.

Solution

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.

When to use

  • Plans depend on observations not available at planning time.
  • Cost of N× model calls is acceptable for the adaptivity gain.
  • Steps cannot be parallelized in advance.

Open the full interactive page

Diagram, neighbourhood map, code examples, related patterns and full provenance.

Related