arXiv:2502.13358cs.CL2025-02EMNLP被引 34

专为精准文本编辑设计,让大模型更懂代码和公式修改。

Bridging the Editing Gap in LLMs: FineEdit for Precise and Targeted Text Modifications

  • 用3万多个结构化任务训练专用编辑模型,聚焦代码、LaTeX等场景。
  • 在单轮编辑中比Gemini高10%,比Llama-3.2-3B高30%,超越Mistral超40%。
  • 支持多轮真实编辑,适合开发、学术写作等需要精确修改的用户。

大语言模型在文本生成、摘要和推理等任务上表现优异,近年来其在编程代码、LaTeX文档及结构化数据库语言等专业领域实现精准文本编辑的潜力受到关注。然而,现有先进模型在执行指令驱动的精确编辑时仍存在困难,尤其在保持结构准确性和遵循领域规范方面表现不佳。为此,我们提出InstrEditBench,一个包含超过3万条结构化编辑任务的自动化基准数据集,覆盖维基百科、LaTeX、源代码和数据库语言等多个领域。基于该基准,我们开发了FineEdit,一种专门针对上下文感知、精准文本修改而训练的编辑模型。实验表明,FineEdit在单轮编辑任务中相较Gemini提升约10%,较Llama-3.2-3B提升高达30%,在直接编辑任务中优于Mistral-7B-OpenOrca超过40%。此外,模型在多轮编辑场景中也表现出良好泛化能力,具备实际应用价值。为促进研究复现,我们已开源FineEdit及其数据集:https://github.com/StuRinDQB/FineEdit 与 https://huggingface.co/datasets/YimingZeng/FineEdit_bench。

原文摘要 · Abstract (English)

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.

文本编辑大模型代码生成精准修改

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。