arXiv:2502.08507cs.CL2025-02NAACL被引 3

用错误解释匹配法提升多语言纠错少样本效果。

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

  • 基于语法错误解释检索相似纠错案例,而非仅比对文本
  • 跨五种语言实验中优于传统语义与BM25方法
  • 无需训练即可适配新语言,适合多语言纠错场景

语法错误纠正(GEC)旨在修正自然语言文本中的语法、拼写和语义错误。随着大语言模型(LLMs)的发展,直接生成文本逐渐成为主流,少样本上下文学习提供了低成本解决方案。然而,如何选取有效上下文示例仍具挑战,因为输入文本的相似性未必对应相同的语法错误模式。本文提出一种基于自然语言语法错误解释(GEE)的新检索方法,通过匹配测试输入与预构建数据库样本的GEE来选择合适的少样本示范。错误样本的解释由大模型生成。我们在主要开源与闭源大模型上进行了多语言少样本GEC实验。跨五种语言的结果表明,该方法优于现有语义和BM25-based检索技术,且无需额外训练或语言适配。这说明匹配错误模式才是选择示例的关键。

原文摘要 · Abstract (English)

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.

语法纠错少样本学习多语言提示工程

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