Plan-then-Generate: Two-Stage Process
- Plan-then-Generate is an architectural approach that first creates an explicit intermediate plan to guide the generation process, enhancing controllability and coherence.
- It has been applied in various domains such as neural machine translation, data-to-text generation, automated planning, and CAD design through diverse planning representations.
- Empirical studies reveal that decoupling planning from realization leads to improved alignment quality, efficiency in training, and more interpretable outputs.
Searching arXiv for the specified paper and closely related plan-then-generate work to ground the article. Plan-then-generate is a family of generation architectures in which a model first produces an explicit intermediate plan and only then realizes a final output conditioned on that plan. Across the literature, the “plan” varies substantially in granularity and ontology: it may be a short-horizon alignment schedule for neural machine translation, an ordered list of slot keys or predicates for data-to-text generation, a sequence of question blueprints for grounded long-form writing, or a symbolic action sequence for automated planning. The common thread is a structural decomposition of generation into at least two stages—planning and realization—motivated by controllability, grounding, faithfulness, or long-horizon coordination rather than by direct end-to-end decoding alone (Gulcehre et al., 2017, Su et al., 2021, Fierro et al., 2024).
1. Conceptual scope and definitions
In the narrow sense used by "Plan, Attend, Generate: Character-Level Neural Machine Translation with Planning" (Gulcehre et al., 2017), plan-then-generate refers to planning future source-target alignments before or while generating the next target symbols. In that formulation, the plan is not a discourse outline or semantic sketch; it is a latent alignment schedule inside the decoder. The model first proposes a short-horizon alignment trajectory and then generates target characters while following or revising that plan (Gulcehre et al., 2017).
In broader text-generation work, the intermediate plan is often more interpretable. "Plan-then-Generate: Controlled Data-to-Text Generation via Planning" (Su et al., 2021) defines a content plan as an ordered list of slot keys or predicates, encoding both what content should be mentioned and in what order it should be expressed. "Learning to Plan and Generate Text with Citations" (Fierro et al., 2024) conceptualizes plans as a sequence of questions serving as blueprints of generated content and its organization. "Text-Blueprint" (Huot et al., 2023) likewise uses a sequence of question-answer pairs, or in the interactive variant a sequence of questions, as a blueprint plan for query-focused summarization.
A more formal variant appears in symbolic planning systems. "Plansformer" (Pallagani et al., 2022) treats classical automated planning as a sequence generation problem in which the explicit symbolic plan is itself the generated output. "Plan2Evolve" (Huang et al., 25 Sep 2025) places formal PDDL planning before natural-language rationale generation: a domain is generated, a symbolic plan is solved, a symbolic state-transition trace is constructed, and only then is a natural-language chain of thought produced. This suggests that plan-then-generate is better understood as a general design pattern for introducing a structured intermediate artifact between input and final output, rather than as a single architectural template.
2. Alignment planning in sequence-to-sequence models
The most technically specific early neural instantiation is PAG, introduced for character-level neural machine translation in (Gulcehre et al., 2017). The underlying motivation is that standard attention-based encoder-decoder models compute alignments locally at each decoding step, which can be limiting for long character sequences because the decoder must repeatedly rediscover alignment structure online. The proposed response is a planning-ahead mechanism: before generating future target symbols, the decoder constructs a plan of future alignments and decides how long to commit to it (Gulcehre et al., 2017).
PAG augments a standard attention-based sequence-to-sequence architecture with two planning states: an alignment plan matrix and a commitment plan vector. The alignment plan matrix stores proposed alignments for the current and several future decoding steps,
where row $0$ stores the alignment logits to use immediately and later rows encode a rolling horizon of future attentional decisions. The actual alignment is read from the first row,
The commitment vector
governs whether the decoder follows the current plan or recomputes a new one (Gulcehre et al., 2017).
The model’s recurrent backbone remains conventional:
What changes is the source of : attention is no longer recomputed purely myopically but is read from a planned structure. The paper also defines a candidate alignment plan , row summaries , and update gates that interpolate between old and new plans,
This is not merely additional decoder state; it is an explicit rolling representation of future attentional actions (Gulcehre et al., 2017).
The commitment mechanism discretizes a short planning schedule:
$0$0
with the first element acting as a switch $0$1. If $0$2, the model follows the current plan by shifting the plan forward,
$0$3
If $0$4, it recomputes the commitment vector and refreshes the alignment plan (Gulcehre et al., 2017). The paper regularizes this behavior with
$0$5
so that the model does not immediately collapse back to per-step replanning.
The paper also introduces rPAG, a cheaper variant that dispenses with the explicit $0$6 plan matrix and simply reuses the current alignment until the commitment switch triggers recomputation:
$0$7
when $0$8. PAG is thus an explicit short-horizon planner, whereas rPAG is a lighter reuse policy with an implicit planning mechanism (Gulcehre et al., 2017).
3. Training and empirical profile of early neural planning models
PAG is trained end to end with conditional negative log-likelihood,
$0$9
augmented by the commitment penalty. The use of Gumbel-Softmax and a straight-through estimator makes the commitment behavior differentiable in practice. The authors note that they tried REINFORCE but found Gumbel-Softmax performed better (Gulcehre et al., 2017).
The experiments are on WMT’15 character-level translation tasks—English 0 German, English 1 Czech, and English 2 Finnish—with BPE on the source side and character generation on the target side (Gulcehre et al., 2017). The planning models generally outperform the baseline on almost all language pairs, and the paper emphasizes two efficiency properties: PAG and rPAG were trained for 350K updates versus 680K for the baseline, and used about 4M fewer parameters than the baseline (Gulcehre et al., 2017). The reported qualitative signature is smoother and more intuitive alignments, with the baseline often placing too much attention on the final empty source token after the first few characters of a word, effectively switching into language-model mode once it has guessed the word. PAG and rPAG maintain more coherent source tracking (Gulcehre et al., 2017).
The later paper "Plan, Attend, Generate: Planning for Sequence-to-Sequence Models" (Dutil et al., 2017) extends the same core idea to broader sequence-to-sequence settings. Its abstract states that the model constructs a matrix of proposed future alignments and a commitment vector that governs whether to follow or recompute the plan; that the mechanism is inspired by the strategic attentive reader and writer (STRAW) model; and that it outperforms a strong baseline on character-level translation tasks from WMT’15, the algorithmic task of finding Eulerian circuits of graphs, and question generation from text (Dutil et al., 2017). However, the available supplementary fragment for (Dutil et al., 2017) does not contain the architecture, update equations, objective functions, or numeric results; what it directly shows is that the proposed model, called PAG, learns different and apparently better alignments than a baseline and that these alignments correlate with stronger qualitative translation outputs. This suggests continuity with the explicit alignment-planning mechanism detailed in (Gulcehre et al., 2017).
4. Content planning for controllable generation
A distinct line of work treats planning as an explicit content-ordering interface. "Plan-then-Generate: Controlled Data-to-Text Generation via Planning" (Su et al., 2021) formulates generation from structured data as a two-stage pipeline. The input dataset is
3
where 4 is linearized structured data, 5 is a reference content plan, and 6 is the reference text. For tabular inputs, each 7 is a slot key-value pair 8; for graph inputs, each 9 is an RDF triple 0. The content plan
1
is an ordered list of slot keys or predicates extracted heuristically by delexicalization,
2
This plan makes content selection and ordering explicit (Su et al., 2021).
The planner encodes candidate plan tokens with BERT-base and predicts their ordering with a linear-chain CRF:
3
followed by
4
The labels represent output positions, with 5 indicating omission of a candidate token. The generator, built on BART-base, conditions on the concatenation 6 and is trained with
7
To encourage sequence-level adherence to the plan, the paper adds reinforcement learning,
8
with the sampled output compared both to the reference text and, via delexicalization, to the desired structure (Su et al., 2021).
This design allows both automatic and user-specified plans. The empirical claim is not only higher quality but controllability over both intra-sentence and inter-sentence structure on ToTTo and WebNLG. On ToTTo hidden test, the model achieves BLEU 49.2, PARENT 58.7, and BLEURT 0.249; on WebNLG it reports BLEU 60.51 and METEOR 0.46, outperforming the reported baselines (Su et al., 2021). Human evaluation on ToTTo shows the controlled version is nearly as faithful and fluent as references, and shuffled plans substantially increase diversity while reducing plan-following accuracy, indicating that the plan is genuinely exerting control rather than functioning as a redundant side channel (Su et al., 2021).
EDU-based summarization provides another content-plan formulation. "Generating EDU Extracts for Plan-Guided Summary Re-Ranking" (Adams et al., 2023) defines a content plan as an ordered subset of source EDUs,
9
learned with a hierarchical BART-based planner trained by
0
A separate abstractor conditions on the source document marked with the selected EDUs, and the guided abstraction objective includes both a likelihood term under the oracle plan and an unlikelihood term under a random distractor plan:
1
The resulting plan-guided candidate set yields ROUGE-2 gains of 0.88 on CNN/DailyMail, 2.01 on NYT, and 0.38 on XSum relative to previously published reranking methods (Adams et al., 2023). This suggests that explicit content planning can be used not only for direct controllability but also as a structured diversity mechanism upstream of reranking.
5. Blueprint plans, grounded questions, and citation-aware generation
A closely related but more semantically legible representation treats plans as sequences of questions. "Text-Blueprint" (Huot et al., 2023) and "Learning to Plan and Generate Text with Citations" (Fierro et al., 2024) define a blueprint as an ordered sequence of questions, or question-answer pairs in earlier formulations, that specify what information should be covered and in what order. In "Text-Blueprint" (Huot et al., 2023), the input 2 is a query concatenated with one or more relevant documents, and the model generates the concatenation 3, where 4 is the blueprint and 5 is the summary. The end-to-end variant linearizes the blueprint as
6
while the interactive variant allows a question-only blueprint 7, making the plan user-editable. This plan is visible, editable, and aligned to generated summary spans, which shifts planning from an internal inductive bias to a control surface (Huot et al., 2023).
"Learning to Plan and Generate Text with Citations" (Fierro et al., 2024) uses the same high-level idea for retrieval-grounded long-form QA. Given a query 8 and retrieved passages
9
the model generates a summary
0
with citations, while introducing a blueprint
1
of ordered questions. The conceptual factorization is
2
implemented by decoding the concatenated sequence 3 with citation tokens. The paper explores two blueprint variants: an abstractive blueprint generated from scratch, and an extractive blueprint copied from question inventories attached to retrieved passages. The extractive variant performs best in-domain on AQuAMuSe, with ROUGE-L 72.98, ANLI 88.01, AutoAIS 74.35, and blueprint answerability 97.97 for the attributed model (Fierro et al., 2024). A striking result is that post-hoc filtering of unanswerable blueprint questions in the abstractive model raises AutoAIS from 74.16 to 81.25, showing that the explicit plan can be directly manipulated to improve grounding and citation quality (Fierro et al., 2024).
These blueprint systems illustrate a recurrent pattern in plan-then-generate research: an explicit plan often functions simultaneously as a semantic bottleneck, a grounding interface, and a controllability handle. This suggests that the value of planning is not limited to optimization or modularity; it can also make the generation process inspectable and correctable.
6. Plan-first symbolic systems and broader extensions
Some systems instantiate planning even more literally. "Plansformer" (Pallagani et al., 2022) fine-tunes CodeT5-base to map a serialized symbolic planning problem to a serialized action sequence. The input contains goal facts, initial facts, and action schemas marked with tokens such as <[GOAL](https://www.emergentmind.com/topics/goal)>, <INIT>, <ACTION>, <PRE>, and <EFFECT>. The model is evaluated both with string overlap metrics and with planner testing using VAL. On domain-specialized models, reported valid-plan rates are 90.04% for Blocksworld, 84.97% for Towers of Hanoi, 82.97% for Grippers, and 76.56% for Driverlog, with corresponding optimality rates of 88.44%, 82.58%, 69.47%, and 52.61% (Pallagani et al., 2022). Although the symbolic plan is itself the final output rather than an intermediate representation for a later generator, the paper clarifies the importance of execution-based evaluation over text overlap and shows how seq2seq models can act as explicit planning modules.
"Plan-and-Act" (Erdogan et al., 12 Mar 2025) separates a Planner from an Executor for long-horizon web tasks. The Planner emits structured high-level plans in a format such as 1 and the Executor maps these plans plus the current HTML and action history to grounded actions. Dynamic replanning after each step yields the strongest reported system, with 53.94% success on WebArena-Lite in the provided text, compared to 36.97% for a no-planner baseline with the best executor (Erdogan et al., 12 Mar 2025). This suggests that in dynamic environments the intermediate plan may need to be continually revised rather than produced once.
"PlanRAG" (Lee et al., 2024) applies the same structural idea to database decision making: first generate an explicit analysis plan, then perform iterative retrieval and reasoning conditioned on that plan. On its DQA benchmark, PlanRAG improves over iterative RAG by 15.8 points in the Locating scenario and 7.4 points in Building, while reducing missed data analysis from 3.3% to 1.3% in Locating and from 33.2% to 21.8% in Building (Lee et al., 2024). This suggests that planning can improve not only the final surface realization but the quality of retrieval trajectories themselves.
Plan-first pipelines now also appear beyond text. "Pointer-CAD v2" (Qi et al., 28 Jun 2026) decouples parameter reasoning from geometric construction by first producing a structured design plan with explicit metric parameters and then generating CAD commands by pointering into parameter and entity dictionaries. Its full loss combines plan-token cross-entropy, command-label cross-entropy, and contrastive retrieval losses:
4
with 5, 6, 7, and 8. "CADMorph" (Ma et al., 12 Dec 2025) uses a plan–generate–verify loop for geometry-driven CAD editing: P2S cross-attention identifies which sequence segments to mask, an MPP model infills the masks autoregressively,
9
and P2S latent distance verifies candidates via
0
The ablation removing planning reduces IoU from 0.687 to 0.447, underscoring that explicit localization before generation is not incidental but structurally important (Ma et al., 12 Dec 2025).
6. Evaluation themes, benefits, and limitations
A recurring empirical pattern across these papers is that explicit plans improve one or more of the following: controllability, grounding, candidate diversity, convergence speed, or long-horizon coordination. In PAG, planning improves alignment quality and efficiency in character-level translation (Gulcehre et al., 2017). In PlanGen for data-to-text, plans improve both automatic metrics and human-rated adherence to desired structure (Su et al., 2021). In blueprint and citation work, plans improve attribution quality and can be filtered or edited to further improve faithfulness (Fierro et al., 2024, Huot et al., 2023). In retrieval-heavy settings such as PlanRAG, planning reduces omitted analysis steps (Lee et al., 2024). In web agents, a strong planner can materially raise a weak executor’s performance (Erdogan et al., 12 Mar 2025).
At the same time, the literature is consistent that plans are not automatically beneficial. Poor plans can mislead downstream modules, and the gap between oracle and predicted plans is often substantial. In PlanGen, oracle plans greatly outperform predicted ones, indicating that planner quality is a major bottleneck (Su et al., 2021). In Plan-and-Act, early or weak planners underperform no-planner baselines until grounded synthetic supervision is added (Erdogan et al., 12 Mar 2025). PlanRAG shows that multiple re-plans often correlate with lower success, implying that plan repair becomes harder on more complex tasks even when it is necessary (Lee et al., 2024). Systems using extractive or source-tethered plans often obtain stronger attribution or fidelity but can become more computationally expensive or less flexible (Fierro et al., 2024).
A common misconception is that plan-then-generate always means a human-readable outline followed by text realization. The surveyed work suggests a broader taxonomy. Plans may be latent alignment schedules (Gulcehre et al., 2017), ordered content indices (Su et al., 2021), EDU subsets (Adams et al., 2023), question blueprints (Fierro et al., 2024), symbolic action sequences (Pallagani et al., 2022), structured web subgoals (Erdogan et al., 12 Mar 2025), database-analysis procedures (Lee et al., 2024), or typed geometric parameter dictionaries (Qi et al., 28 Jun 2026). What defines the paradigm is not the ontology of the plan but the insertion of a structured intermediate object that causally constrains later generation.
A plausible implication is that the most durable contribution of this line of work is methodological rather than domain-specific. These papers collectively show that useful planning can occur at many representational levels—attention, content order, retrieval policy, symbolic action, or geometric parameterization—and that explicit intermediate structures can improve not only quality but also observability and editability. In that sense, plan-then-generate is best understood as an architectural principle for decomposing generation into controllable stages, rather than as a fixed algorithm or a single type of planner (Gulcehre et al., 2017, Su et al., 2021, Fierro et al., 2024).