A Constrained Text Revision Agent via Iterative Planning and Searching (2025)

Abstract: Existing text revision systems are capable of generating fluent and coherent text, but struggle with constrained text revision (CTR), which requires adherence to specific constraints. Furthermore, adapting these systems to diverse constraints is challenging. To bridge this gap, we introduce TRIPS, a Text Revision agent via Iterative Planning and Searching, focusing on CTR. TRIPS utilizes a planner, a reviser (i.e., a large language model), and adaptable tools to generate revisions tailored to different scenarios. Specifically, we propose an iterative self-training alignment method to construct the planner, which generates tool usage and text revision plans. Furthermore, we propose Tool-Guided Monte Carlo Tree Search (TG-MCTS), a novel CTR algorithm that extends MCTS with tool-guided expansion and evaluation, enabling the search for optimal revision strategies across various scenarios. To evaluate TRIPS, we introduce ConsTRev, a dataset with multi-level constrained instructions for paragraph-level revision. Experimental results show that TRIPS outperforms baselines in both constraint adherence and revision quality. Furthermore, TRIPS exhibits robust performance across diverse use cases, including plain text and LaTeX revision.

## introduction large language models (llms) excel at generating fluent and coherent text, motivating researchers to develop various text revision systems @xcite . in practice, users expect text revision systems to revise entire passages while adhering to specific constraints, such as word limits or keyword constraints @xcite . we define this task as constrained text revision (ctr), a subtask of constrained text generation (ctg) @xcite . ## cord cord is constructed in two steps: data selection and constrained instruction generation. include the keyword 'joker' and refine the text within15 sentences. whether you love it or hate it, jared leto's take on the joker has become a hot topic on the internet …… c) create constraints a) revise b) extract features constrained instruction d) instruction rendering gpt-4o ## analysis in this section, we refer to the best-performing gpt-4o baseline, gpt-4o (iter), as gpt-4o for brevity. llm-as-a-judge. text revision is subjective, and traditional metrics may fail to capture quality accurately. while human evaluations provide insights, they are biased and irreproducible. prior research @xcite shows that gpt-4 closely aligns with human judgments on fluency, coherence, and grammaticality. we compare the revision quality of craft-4o and gpt-4o by randomly selecting 100 outputs from each system. following @xcite , we score the fluency (f), grammaticality (g), and coherence (c) of the revision with gpt-4. as shown in ## conclusion this paper introduces the ctr task, which better reflects real-world text revision scenarios. to support this task, we developed the cord dataset, a comprehensive benchmark for evaluating systems on constrained text revisions. furthermore, we conceptualize ctr as an iterative planning and searching problem and propose craft to address the complexities of paragraph-level text revisions under diverse constraints. experimental results demonstrate that craft consistently outperforms baseline approaches and exhibits robustness across various text revision scenarios.