Bridging the Editing Gap in LLM s: F ine E dit for Precise and Targeted Text Modifications (2025)

Abstract: Large Language Models (LLMs) have significantly advanced natural language processing, demonstrating strong capabilities in tasks such as text generation, summarization, and reasoning. Recently, their potential for automating precise text editing tasks across specialized domains, such as programming code, LaTeX, and structured database languages, has gained attention. However, current state-of-the-art LLMs still struggle with executing precise, instruction-driven edits, particularly when structural accuracy and strict adherence to domain conventions are required.To address these challenges, we introduce InstrEditBench, an automated benchmark dataset comprising over 30,000 structured editing tasks spanning diverse domains, including Wikipedia articles, LaTeX documents, source code, and database languages. Using this benchmark, we develop FineEdit, a specialized editing model explicitly trained for accurate, context-aware text modifications. Experimental evaluations demonstrate that FineEdit outperforms state-of-the-art models, achieving improvements of approximately 10% over Gemini models on single-turn edits, up to 30% over Llama-3.2-3B, and exceeding Mistral-7B-OpenOrca performance by over 40% on direct editing tasks. FineEdit also effectively generalizes to realistic multi-turn editing scenarios, highlighting its practical applicability. To facilitate further research and reproducibility, we release FineEdit at https://github.com/StuRinDQB/FineEdit and https://huggingface.co/datasets/YimingZeng/FineEdit_bench .

## introduction large language models (llms) have brought transformative progress to the field of natural lan-* equal contribution. † corresponding author. despite this promise, current llms still face notable limitations when applied to tasks that demand direct editing, where the model must simultaneously understand the original text, follow the instruction precisely, and generate semantically aligned, high-quality edits. even powerful proprietary tools like chatgpt often struggle to fully understand user intent and reliably follow strict editing instructions, especially in long-context scenarios @xcite . particularly, llms' general editing capabilities in task-specific settings often fall short @xcite . they tend to generate incorrect outputs and stray from the given editing instructions. to address these challenges, we propose a more focused approach to editing with llms. our key insight is that narrowing the model's attention to two fundamental aspects, the exact location of the edit and the content to be modified, can significantly improve performance in direct editing tasks. per this intuition, we propose a dual approach consisting of a dedicated benchmark (instreditbench) for editing tasks and an editing-specific model @xcite . specifically, we design an automated workflow that focuses on accurately identifying and evaluating structured text edits. this workflow identifies precise differences and ensures correct edits through quality control. by reducing noise and focusing on meaningful modifications, this process produces a dedicated, high-quality benchmark. it directly addresses limitations in existing methods and aligns better with the practical demands of real-world editing tasks. notably, our approach is also generalized to multi-turn editing scenarios, a much more realistic user scenario, where instructions arrive iteratively and allow the model to refine its edits step by step. implementation and evaluation. we train the fineedit model on instreditbench benchmark, explicitly designed to optimize performance on direct, instruction-driven text editing tasks. the result shows that fineedit achieves an improvement of 10% over gemini 1.5 flash and gemini 2.0 flash @xcite in single-turn editing tasks, and up to 30% over llama-3.2-3b @xcite on diverse editing benchmarks, while outperforming mistral-7b-openorca @xcite @xcite ) over 40% on direct editing tasks. the main contributions of this work include: ## conclusion we introduce instreditbench, a benchmark of over 30k editing tasks spanning wiki, latex, code, and dsl, aimed at precise instruction-based text editing. to ensure supervision quality, we develop diffeval, an automated pipeline combining structural and semantic filters. we further validate our benchmark with fineedit, a model fine-tuned on instreditbench, achieving up to 10% gains over leading models. designed for both single-turn and multi-turn editing, our modular benchmark and pipeline enable broad applicability.