๐ค AI Summary
Multilingual few-shot grammatical error correction (GEC) faces a key challenge: semantically similar sentences often exhibit divergent error patterns, rendering conventional semantic- or frequency-based example retrieval ineffective. To address this, we propose Grammar Error Explanation (GEE)-based retrievalโthe first approach to leverage large language models (LLMs) to automatically generate cross-lingual, fine-grained textual explanations of grammatical errors; these explanations serve as embedding anchors for example matching, enabling training-free, language-agnostic alignment of error patterns. Our method integrates GEE generation, embedding-based retrieval, and in-context learning. Evaluated on five languages, it substantially outperforms BM25 and semantic retrieval baselines across multilingual few-shot GEC tasks. It is compatible with both open- and closed-source LLMs and requires neither fine-tuning nor language-specific adaptation.
๐ Abstract
Grammatical error correction (GEC) aims to correct grammatical, spelling, and semantic errors in natural language text. With the growing of large language models (LLMs), direct text generation has gradually become the focus of the GEC methods, and few-shot in-context learning presents a cost-effective solution. However, selecting effective in-context examples remains challenging, as the similarity between input texts does not necessarily correspond to similar grammatical error patterns. In this paper, we propose a novel retrieval method based on natural language grammatical error explanations (GEE) to address this issue. Our method retrieves suitable few-shot demonstrations by matching the GEE of the test input with that of pre-constructed database samples, where explanations for erroneous samples are generated by LLMs. We conducted multilingual GEC few-shot experiments on both major open-source and closed-source LLMs. Experiments across five languages show that our method outperforms existing semantic and BM25-based retrieval techniques, without requiring additional training or language adaptation. This also suggests that matching error patterns is key to selecting examples.