Problem
Complex tasks require careful planning but straightforward execution. Using an expensive model for all steps is wasteful; using a cheap model to plan produces poor plans.
Solution
Use a powerful model (GPT-6.1 Sol, Claude Sonnet 5.5) to generate a complete step-by-step plan, then execute each step with a cheaper, faster model (GPT-6 Luna, Claude Haiku 5.5).
Implementation
- Plan: Call the planner model with: "Generate a detailed step-by-step plan to [goal]. Return as a JSON array of steps."
- Store plan: Persist the plan; allow human review if needed
- Execute: For each step, call the executor model with the step description + context from previous steps
- Replan trigger: If a step fails or produces unexpected results, call the planner model to revise the remaining plan
Trade-offs
- Pro: Lower cost than running every step on the expensive model; the saving depends on how much of the work the executor handles
- Pro: Plan is inspectable and modifiable before execution
- Con: Planner-executor mismatch: planner may assume capabilities the executor lacks
- Con: Replanning adds latency
When to use
Research tasks, code generation with multiple files, data analysis pipelines, content creation workflows.
When to avoid
Simple tasks where a single prompt suffices; tasks with highly dynamic, unpredictable steps.