arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.12334cs.LGcs.SE
收藏

我哪里做错了?量化大型语言模型(LLMs)对提示工程的敏感性与一致性

What Did I Do Wrong? Quantifying LLMs' Sensitivity and Consistency to Prompt Engineering

NEC Italia(NEC意大利分公司);NEC Laboratories Europe(NEC欧洲实验室)

Federico Errica, Giuseppe Siracusano, Davide Sanvito, Roberto Bifulco

AI总结:

针对LLMs在提示微小变化下行为不一致的调试挑战,本文提出分类任务的敏感性(衡量提示重述时预测变化)与一致性(衡量同类元素预测变化)指标,经实证比较后可指导提示工程以获得鲁棒且高性能的LLMs。

摘要:

大型语言模型(LLMs)改变了我们设计和与软件系统交互的方式。它们处理和从文本中提取信息的能力大幅提升了多项日常任务的生产力。然而,希望将这些模型纳入其软件栈的开发者面临着一个严峻挑战:调试LLMs在提示的微小变化下表现出的不一致行为。因此,我们为分类任务引入了两个与任务性能互补的指标,即敏感性和一致性。首先,敏感性衡量提示重述时预测的变化,且不需要访问真实标签;而一致性衡量同一类别元素在提示重述时预测的变化情况。我们在文本分类任务上对这些指标进行了实证比较,将其作为理解LLM失效模式的指南。我们希望敏感性和一致性指标能帮助指导提示工程,从而获得兼顾鲁棒性与性能的LLMs。

英文摘要:

Large Language Models (LLMs) changed the way we design and interact with software systems. Their ability to process and extract information from text has drastically improved productivity in a number of routine tasks. Developers that want to include these models in their software stack, however, face a dreadful challenge: debugging LLMs' inconsistent behavior across minor variations of the prompt. We therefore introduce two metrics for classification tasks, namely sensitivity and consistency, which are complementary to task performance. First, sensitivity measures changes of predictions across rephrasings of the prompt, and does not require access to ground truth labels. Instead, consistency measures how predictions vary across rephrasings for elements of the same class. We perform an empirical comparison of these metrics on text classification tasks, using them as guideline for understanding failure modes of the LLM. Our hope is that sensitivity and consistency will be helpful to guide prompt engineering and obtain LLMs that balance robustness with performance.

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

↑