arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2506.04855cs.CL
收藏

提示大语言模型:等距机器翻译的长度控制

Prompting LLMs: Length Control for Isometric Machine Translation

Charles University, Faculty of Mathematics and Physics(查理大学数学与物理系);Sorbonne Université, CNRS, ISIR(索邦大学、CNRS、ISIR)

Dávid Javorský, Ondřej Bojar, François Yvon

AI总结:

本文研究在 IWSLT 等距翻译任务中,通过提示策略、少样本示例数量与选择来控制大语言模型输出长度,发现指令措辞与示例属性对齐至关重要,并利用多输出权衡长度与质量,在部分语言对上达到最优性能。

摘要:

在本研究中,我们在 IWSLT Isometric Shared Task 2022 的条件下,探索了等距机器翻译在多个语言对(英→德、英→法和英→西)上的有效性。使用八个不同规模的开源大语言模型(LLMs),我们研究了不同的提示策略、不同数量的少样本示例以及示例选择如何影响翻译质量和长度控制。我们发现,当指令的措辞与所提供的示例属性一致时,指令的表述方式在控制输出长度方面起着至关重要的作用。我们的实验表明,大语言模型只有在面对极端示例时才倾向于生成更短的翻译,而等距示例往往导致模型忽视长度约束。虽然少样本提示通常能提高翻译质量,但在 5、10 和 20 个示例的设置下,进一步的提升较为有限。最后,考虑多个输出可以显著改善长度与质量之间的整体权衡,在某些语言对上取得了最先进的性能。

英文摘要:

In this study, we explore the effectiveness of isometric machine translation across multiple language pairs (En$\to$De, En$\to$Fr, and En$\to$Es) under the conditions of the IWSLT Isometric Shared Task 2022. Using eight open-source large language models (LLMs) of varying sizes, we investigate how different prompting strategies, varying numbers of few-shot examples, and demonstration selection influence translation quality and length control. We discover that the phrasing of instructions, when aligned with the properties of the provided demonstrations, plays a crucial role in controlling the output length. Our experiments show that LLMs tend to produce shorter translations only when presented with extreme examples, while isometric demonstrations often lead to the models disregarding length constraints. While few-shot prompting generally enhances translation quality, further improvements are marginal across 5, 10, and 20-shot settings. Finally, considering multiple outputs allows to notably improve overall tradeoff between the length and quality, yielding state-of-the-art performance for some language pairs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑