Explanation based In-Context Demonstrations Retrieval for Multilingual Grammatical Error Correction

Wei Li, Wen Luo, Guangyue Peng, Houfeng Wang


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. Our code and the constructed database will be publicly available after the paper is published.
Anthology ID:
2025.naacl-long.251
Volume:
Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers)
Month:
April
Year:
2025
Address:
Albuquerque, New Mexico
Editors:
Luis Chiruzzo, Alan Ritter, Lu Wang
Venue:
NAACL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
4881–4897
Language:
URL:
https://preview.aclanthology.org/fix-sig-urls/2025.naacl-long.251/
DOI:
Bibkey:
Cite (ACL):
Wei Li, Wen Luo, Guangyue Peng, and Houfeng Wang. 2025. Explanation based In-Context Demonstrations Retrieval for Multilingual Grammatical Error Correction. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pages 4881–4897, Albuquerque, New Mexico. Association for Computational Linguistics.
Cite (Informal):
Explanation based In-Context Demonstrations Retrieval for Multilingual Grammatical Error Correction (Li et al., NAACL 2025)
Copy Citation:
PDF:
https://preview.aclanthology.org/fix-sig-urls/2025.naacl-long.251.pdf