arXiv:2506.04855cs.CL2025-06中稿 · IWSLT 2025被引 2

调整提示词可更好控制大模型翻译长度,提升质量

Prompting LLMs: Length Control for Isometric Machine Translation

  • 通过指令与示例匹配来调节输出长度
  • 极端示例能促使模型生成更短译文,常规示例效果差
  • 多输出综合提升长短平衡,适合对长度敏感场景

本研究在 IWSLT 2022 等距机器翻译共享任务背景下,考察了多种语言对(En→De、En→Fr、En→Es)下八种不同规模开源大语言模型(LLMs)的等距翻译表现。探究了不同提示策略、少样本示例数量及示例选择对翻译质量与长度控制的影响。实验发现,当指令表述与示例特性一致时,长度控制效果显著;仅在提供极端示例时,模型才倾向于生成更短译文,而常规等距示例常导致模型忽略长度约束。少样本提示总体提升翻译质量,但5、10、20样本间提升趋缓。综合多个输出结果可显著改善长度与质量权衡,部分语言对达到当前最优性能。

原文摘要 · Abstract (English)

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.

大模型翻译提示工程长度控制

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