Over-Generation and Compaction: A Prompting Strategy for Procedural Text Adaptation with Large Language Models (2025)

Abstract: Procedural text adaptation—such as modifying recipes or revising instructional guides—has traditionally relied on specialized models extensively fine‐tuned for specific domains. To address the scalability limitations of such approaches, recent research has increasingly turned to general‐purpose large language models (LLMs). However, existing prompting strategies for LLMs often yield superficial or erroneous adaptations due to alignment‐induced biases and the inherent complexity of procedural editing. To overcome these challenges, we propose the Over‐generation‐and‐Compaction (OC) prompting strategy, which first elicits an exhaustive set of procedural details to leverage the model’s latent knowledge, and subsequently compacts them into concise, coherent adaptations. We further introduce Recipe Consistency & Feasibility (RCF), a novel metric for systematically assessing procedural validity and practicality in cooking recipe adaptations. Experiments on public datasets demonstrate that OC significantly improves adaptation consistency and feasibility compared to baseline prompting methods, without the need for additional fine-tuning or curated training resources.

## introduction procedural text adaptation-such as adjusting recipes for dietary needs or revising instructional guides for alternative components-is essential across various real-world domains. these tasks require constraint-aware editing that goes beyond surface-level changes, often demanding domain knowledge and structural coherence. prior work has explored hierarchical generation @xcite and graph-based ingredient substitution @xcite , but such approaches rely heavily on curated, domain-specific resources, limiting their scalability and generalization. recent advances in llms offer a more flexible alternative to specialized systems. unlike ## oc prompting strategy the strategy comprises two sequential stages: stage 1: over-generation. the llm generates extensive and detailed procedural variants, referred to as intermediate instructions, based on input parameters identical to those used in the baseline setting. an example of the over-generation prompt is shown in figure 2 (a). notably, this prompt does not impose any domain-specific constraints, require-ments, formatting or structural limitations. instead, it simply instructs the model to produce altered versions on the given topic while simultaneously eliciting as much instruction-relevant information as possible. stage 2: compaction. the generated intermediate instructions are subsequently condensed into concise and coherent outputs that conform to the format, coherence, and length constraints of the original base instruction. an example of the compaction prompt is illustrated in figure 2(b) . the complete oc workflow is illustrated in figure 2(d ). to ground our discussion, we revisit the running example of converting a recipe for steamed turbot into one for steamed hairy crab. using the same input parameters as the baseline, the oc prompt generates richly detailed procedural text procedural text tailored specifically to hairy crab, going far beyond a naïve 'find-and-replace' adaptation. for instance, the resulting intermediate instructions explicitly mention securely tying the crab's legs and claws before steaming, determining steaming time as a function of the crab's weight, and preparing a vinegar-ginger dipping sauce. such details are absent in baseline outputs, revealing latent knowledge that oc helps unlock. in the subsequent compaction stage, we provide both the [base instruction] and the [target outcome] as input parameters. the compaction prompt integrates the over-generated fragments into a structurally coherent instruction that adheres to the formatting and pragmatic constraints of the original. figure 2(c ) shows that the resulting instructions are concise yet retain professionally relevant detail. more formal description of the workflow along with complete prompt templates and intermediate outputs can be found in appendix a and b. ## evaluation we conduct our evaluation on two datasets that jointly cover distinct yet complementary settings of procedural text editing. the first dataset is the xiachufang recipe corpus @xcite . this corpus indirectly encodes substitution information in its structure: it provides the original recipe steps, the original recipe title, and an alternative recipe title in which one or more major ingredients have been replaced. because recipe titles in chinese cooking datasets typically list the key ingredients, these title modifications serve as a proxy for ingredient substitutions. thus, although the dataset does not explicitly instruct models to swap ingredients, the title pairs can be used to infer which edits should propagate through the recipe steps. after filtering, we retain approx. 2.5k chinese recipe pairs spanning 50 categories. a key limitation, however, is that the dataset does not include reference rewrites of the steps themselves. this motivates the introduction of the recipe consistency & feasibility (rcf) metric, an automatic evaluation measure based on the g-eval framework @xcite , which captures salient error types such as ingredient mismatch or omitted steps, thereby providing a scalable proxy for human judgment. full details are provided in appendix c. the second dataset is myfixit (nabizadeh et al., 2020), which focuses on repair instructions across diverse domains including clothing, consumer electronics, and automotive maintenance. unlike xiachufang, myfixit does not naturally include paired titles that indicate substitutions. to make it suitable for controlled evaluation, we used llms to generate plausible alternative part names (e.g., screws, cables, or modules) and paired each instruction with a version requiring a replacement part. this yields a dataset analogous in spirit to xiachufang, with approximately 500 paired instances. further construction details are provided in appendix c. because our primary metric adopts the llmas-judge paradigm, the choice of evaluator can influence absolute scores and even relative rankings. we therefore run evaluations with two independent llms under identical instructions and rubrics: chatgpt-4o and deepseek-v3. this dualevaluator protocol reduces evaluator-specific bias and increases robustness of conclusions. it is particularly important in our setting because chatgpt-4o is used during dataset preparation (e.g., for translating recipe titles or generating replacement part names in myfixit); relying on it as the sole evaluator risks circularity and inflated agreement. using deepseek-v3 as a second evaluator provides a principled cross-check without altering the evaluation prompts or grading criteria. results for both datasets are summarized in tables 1 and 2. for recipes, several trends emerge consistently across evaluators. baseline outputs often underperform the source, showing that naive rewriting can degrade fidelity despite surface-level plausibility. among baselines, d1 achieves the highest score and in some cases approaches the performance of advanced prompting strategies, suggesting potential benefits of larger reasoning models. however, its standing drops under deepseek-v3 evaluation, and manual inspection reveals tendencies toward potentially verbose outputs and unnecessary reasoning. these findings indicate that while d1 can appear strong in certain settings, its robustness and controllability remain open to question; further analysis is provided in appendix g. cot yields moderate gains over baseline for smaller models (e.g., 4o-mini), but these benefits diminish for larger ones such as 4o. critics improves upon baseline in many cases but tends to be conservative, frequently preserving redundant steps or only partially integrating intended ingredient changes. oc produces the most consistent improvements across model scales, with the most notable effect observed for 4o-mini, which achieves the strongest scores under both evaluators. under chatgpt-4o evaluation, critics with 4o is marginally higher (by about 0.01) than oc, yet oc remains competitive and continues to demonstrate strong adaptability across settings. finally, we observe that for recipes evaluated with chatgpt-4o, some smaller models (e.g., m) show slightly lower scores with oc compared to critics, whereas under deepseek-v3 evaluation oc remains consistently stronger. this discrepancy prompted a manual inspection, which revealed that the affected cases often arise when the compaction stage of oc requires faithful style transfer-a challenge that smaller models struggle to maintain consistently. mitigation strategies for this issue are discussed in appendix b. for repair instructions in the myfixit dataset, analogous patterns hold across its heterogeneous domains. baseline and cot offer limited or mixed improvements, with performance varying by model capacity and the complexity of the repair scenario. critics often yields cautious outputs but can leave vestigial steps unresolved. in contrast, oc consistently demonstrates robust adaptability: it delivers targeted yet coherent edits that correctly update repair procedures when a replacement part is introduced. as in the recipe setting, the strongest configuration involves oc with 4o-mini, under both evaluators, confirming that oc is particularly effective at eliciting strong performance from smaller to provide additional context, we conclude this section with two preliminary analyses that offer broader perspective on the challenges involved. first, we examine whether 4o demonstrates awareness of strategies resembling oc (appendix f). second, we explore why procedural text adaptation remains difficult for llms, focusing on their internal goals, prioritization patterns, and potential conflicts (appendix e). interested readers may refer to these appendices for further insight. ## related work procedural text adaptation. prior work on procedural text adaptation has largely focused on recipe adaptation, leveraging structured methods or domain-specific models. early approaches represented procedural steps and ingredient relations via flow graphs and embeddings @xcite . subsequent research employed knowledge graph-based substitutions @xcite , hierarchical editing @xcite , and user-guided critiquing @xcite . recent efforts integrate llms, often fine-tuned for narrow tasks such as counterfactual generation @xcite , phytochemical enrichment @xcite , recipe-grounded dialogue @xcite , and textual refinement @xcite . ## conclusion and future work we propose oc, a prompting strategy for procedural text adaptation, and evaluate it through a case study on recipe adaptation using a new metric, rcf. beyond cooking, our experiments also demonstrate that oc successfully adapts general repair instructions, indicating its broader applicability across domains. while the present study centers on procedural text, the approach may extend to non-procedural adaptation tasks as well. future research directions are discussed in appendix h. code, evaluation scripts, and full prompt templates are publicly available. 1