arXiv:2504.06969cs.CL2025-04NAACL被引 37

通过多样化提示样式提升大模型对格式变化的鲁棒性

Towards LLMs Robustness to Changes in Prompt Format Styles

  • 用多种提示风格构建少样本示例,避免模型依赖特定格式
  • 在多个模型和数据集上显著降低格式变化带来的性能波动
  • 适合需要稳定推理效果的应用场景,如自动化系统

大型语言模型在各类应用中广受欢迎,但对提示格式的非语义变化敏感,微小格式调整即可引发性能剧烈波动,这一问题称为提示脆弱性。现有提示工程多聚焦于寻找最优提示,部分研究虽探索了提示脆弱性并提出量化方法,但仍缺乏简单有效的解决方案。本文提出混合格式(MOF)技术,通过在少样本示例中引入多样化的提示风格,增强模型对格式变化的鲁棒性。该思路受计算机视觉中使用多样风格数据集以防止模型绑定特定风格的启发。实验表明,MOF在多种大模型上均有效降低了风格引起的提示脆弱性,同时提升了在不同提示变体和数据集上的整体表现。

原文摘要 · Abstract (English)

Large language models (LLMs) have gained popularity in recent years for their utility in various applications. However, they are sensitive to non-semantic changes in prompt formats, where small changes in the prompt format can lead to significant performance fluctuations. In the literature, this problem is commonly referred to as prompt brittleness. Previous research on prompt engineering has focused mainly on developing techniques for identifying the optimal prompt for specific tasks. Some studies have also explored the issue of prompt brittleness and proposed methods to quantify performance variations; however, no simple solution has been found to address this challenge. We propose Mixture of Formats (MOF), a simple and efficient technique for addressing prompt brittleness in LLMs by diversifying the styles used in the prompt few-shot examples. MOF was inspired by computer vision techniques that utilize diverse style datasets to prevent models from associating specific styles with the target variable. Empirical results show that our proposed technique reduces style-induced prompt brittleness in various LLMs while also enhancing overall performance across prompt variations and different datasets.

大模型提示工程鲁棒性

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