arXiv:2609.10810cs.CLSep 2026

Manuscript Offprint

arXiv:2609.10810

Larger Context Window, Fewer Overcorrections: Optimizing Prompts and Batching for Minimal-Edit Grammatical Error Correction

Kateryna Karpo, Artem Chernodub

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Minimal-edit Grammatical Error Correction (GEC) is a challenging task for zero- and few-shot prompted Large Language Models (LLMs), which systematically overcorrect and degrade F0.5F_{0.5} by rewriting well-formed spans. While fine-tuning provides an effective solution, it imposes substantial infrastructure demands. We introduce a prompt-based approach that closes the gap to fine-tuned models through three advances in GEC prompting methodology. First, we introduce taxonomy-based instructions to enforce minimal-edit constraints with a comprehensive list of grammatical error rules, equipping the LLM with a bounded, metric-aligned scope of correctable edits, which benefits the strongest models while remaining model-dependent overall. Second, we show that batching multiple uncorrected sentences into a single input context acts as a targeted regularizer against overcorrection, systematically reducing the edit rate across diverse LLM families; we hypothesize this arises from attention dilution effect induced by the bounded capacity of self-attention scores. Finally, LLM-assisted Prompt Optimization refines these instructions. Powered by Gemini 3.1-Pro, our prompt achieves F0.5=78.32F_{0.5} = 78.32 on the BEA-2019 test set — establishing a new prompt-based SOTA while shrinking the gap to the fine-tuned single-model SOTA (Staruch et al., 2025) to a mere 0.38 points. Code, prompts, and outputs are publicly available. 12^{12}

1 Introduction

Grammatical Error Correction (GEC) has two evaluation paradigms (Bryant et al., 2019). Fluency-oriented correction permits extensive lexical substitution and stylistic restructuring to produce native-sounding text (Napoles et al., 2017). Minimal-edit correction instead addresses grammatical, spelling, and punctuation errors while preserving the original phrasing (Leacock et al., 2014). Such minimal, targeted corrections are essential in educational applications, where the goal is to guide learners in revising their own errors while preserving intent (Nicholls, 2003), and controlling LLMs to produce them remains difficult (Vajjala et al., 2026).

Earlier work on minimal-edit GEC relied on supervised fine-tuning of sequence taggers (Awasthi et al., 2019; Omelianchuk et al., 2020; Tarnavskyi et al., 2022) and sequence-to-sequence models (Junczys-Dowmunt et al., 2018; Grundkiewicz et al., 2019; Kiyono et al., 2019; Rothe et al., 2021). Both approaches face recall bottlenecks: taggers are bound by finite edit spaces, while sequence-to-sequence cross-attention induces a copying bias. Their conservative span-local bias still aligns naturally with the precision-weighted F0.5F_{0.5} objective and sets a strict behavioral baseline for prompt-based methods.

Alikaniotis and Raheja (2019) demonstrated that early GPT models could perform GEC without task-specific training. With the rise of instruction-tuned, decoder-only LLMs (Ouyang et al., 2022) such as ChatGPT, zero- and few-shot prompting became a widely adopted paradigm for text editing without task-specific fine-tuning. Out-of-the-box prompted LLMs rapidly reached state-of-the-art results on tasks that reward free-form rewriting, such as fluency GEC (Loem et al., 2023) and text simplification (Vadlamannati and Şahin, 2023). Applied to minimal-edit GEC with vanilla instructions (e.g., "Correct the grammatical errors"), the same models systematically overcorrect in both zero- and few-shot settings (Fang et al., 2023; Coyne et al., 2023), rewriting well-formed spans with synonym swaps, stylistic polishing, or clause rephrasings that add no actual value.

∗^{*}Accepted for publication at EMNLP 2026 (Findings).

†^{\dagger}First author.

1^{1}This work was conducted as part of Kateryna Karpo’s M.Sc. thesis at the Ukrainian Catholic University, Faculty of Applied Sciences.

2^{2}https://github.com/katerynkarpo/llm-en-gec

Recent prompt-based efforts on minimal-edit GEC explored richer prompting strategies, from error-pattern-aware in-context example selection (Tang et al., 2024; Li et al., 2025) to detection-before-correction prompting (Li and Wang, 2024) and automatic prompt optimization (Chernodub et al., 2025). Even so, prompt-based systems still lag behind the supervised state of the art, so the mainstream route to enforcing the minimal-edit constraint remains infrastructure-heavy fine-tuning: Omelianchuk et al. (2024) adapt LLaMA-2 to reduce overcorrection, Liang et al. (2025) align the pretraining objective with the minimal-edit principle through edit-wise preference optimization for LLaMA2 and Mistral-v0.1, and Staruch et al. (2025) set the current single-model state of the art on BEA-2019 ( F0.5=78.70F_{0.5} = 78.70) by fine-tuning Gemma 2 with a schedule that progressively raises the share of unedited examples, reversing earlier sequence-to-sequence pipelines that filtered out error-free sentences (Junczys-Dowmunt et al., 2018; Grundkiewicz et al., 2019).

We aim to close the gap between fine-tuned GEC systems and prompt-based, API-accessed LLMs, which matters for individuals and organizations that cannot afford fine-tuning of open-source LLMs due to engineering or regulatory constraints. Our hypothesis is that the increased instruction-following capabilities of the latest LLMs are already sufficient to respect the minimal-edit GEC constraints without the need of weight updates. Recent results support this, but also expose its limit: with a declarative minimal-edit instructions, Claude Sonnet 4.5 reaches F0.5=64.91F_{0.5} = 64.91 on the BEA-2019 test set (Türker and Eryiğit, 2026), yet still trails the fine-tuned single-model SOTA by 13.79 points. We believe the declarative style is one of the reasons: it states a goal without saying which edits are admissible. Our taxonomy-based instructions supply that missing specification, bounding the edit space to the 25 metric-aligned ERRANT categories (Bryant et al., 2017). Once instructions reach this level of quality, we search for model-specific instruction refinements via LLM-assisted prompt optimization. Last but not least, we introduced batching to reduce latency and cost (Cheng et al., 2023), but unexpectedly yielded consistent quality improvements for minimal-edit GEC, motivating our systematic study of how batch size affects edit rates and correction quality. We evaluate our approach on six commercial LLMs and one open-weight model across two minimal-edit benchmarks.

Our primary contributions are:

  1. We set a new state of the art for prompt-based minimal-edit GEC. With Gemini 3.1-Pro and our best prompt A.6.4, we achieve F0.5=78.32F_{0.5} = 78.32 on the BEA-2019 test set, the first time an out-of-the-box prompted LLM has closed the gap to the best fine-tuned single model (Staruch et al., 2025) to a mere 0.38 F0.5F_{0.5} points. We also report a competitive F0.5=67.08F_{0.5} = 67.08 on the CoNLL-2014 test set.

  2. We introduce taxonomy-based GEC instructions layered on a minimal-edit baseline to provide a bounded, metric-aligned scope of edits that constrains the strongest models productively and acts as noise for the others. Defining errors via a concrete list addresses the limitations of both the vague “grammatical error” framing of vanilla GEC prompts and declarative “minimal edit” instructions that ask for conservative rewriting without explaining how to do so.

  3. We identify batching as a targeted regularizer against overcorrection: packing multiple sentences into a single context reduces the word-level edit rate and consistently improves F0.5F_{0.5} scores. We hypothesize this stems from an attention dilution effect induced by the bounded capacity of self-attention scores.

  4. We apply LLM-assisted Prompt Optimization, implemented as a reusable Claude Code agentic skill 2^{2}, on top of taxonomy-based instructions and batching. The agent iteratively clusters dev-set errors and greedily adopts prompt revisions that improve the F0.5F_{0.5} score.