arXiv:2410.23099cs.CLcs.AI2024-10被引 4

对比6种演示选择算法,发现效果差异大且不随数量提升。

Comparative Analysis of Demonstration Selection Algorithms for LLM In-Context Learning

  • 系统评估6种演示选择算法在不同任务中的表现
  • 部分方法比随机选还差,增加演示数未必更好
  • 揭示准确率与计算效率间的权衡,适合研究者参考

上下文学习能让大语言模型在无需额外训练的情况下适应新任务,但其性能高度依赖演示样本的质量。为此,研究者提出了多种演示选择算法,帮助用户根据测试输入挑选最优的k个输入-标签对,使模型能基于示例理解任务关系。然而,现有算法的效率与有效性尚不明确,限制了实际应用并阻碍了后续改进。本文重新评估了六种已提出算法,在五个数据集上从效率和有效性两方面进行实验。结果表明,不同任务中算法表现差异显著,某些场景下甚至不如随机选择;同时,增加演示数量并不总能提升性能,且准确率与计算效率常存在权衡。代码已公开于 https://github.com/Tizzzzy/Demonstration_Selection_Overview。

原文摘要 · Abstract (English)

In-context learning can help Large Language Models (LLMs) to adapt new tasks without additional training. However, this performance heavily depends on the quality of the demonstrations, driving research into effective demonstration selection algorithms to optimize this process. These algorithms assist users in selecting the best $k$ input-label pairs (demonstration examples) based on a given test input, enabling LLMs to in-context learn the relationship between the provided examples and the test inputs. Despite all the proposed demonstration selection algorithms, their efficiency and effectiveness remain unclear. This lack of clarity make it difficult to apply these algorithms in real-world scenarios and poses challenges for future research aimed at developing improved methods. This paper revisits six proposed algorithms, evaluating them on five datasets from both efficiency and effectiveness perspectives. Our experiments reveal significant variations in algorithm performance across different tasks, with some methods struggling to outperform random selection in certain scenarios. We also find that increasing the number of demonstrations does not always lead to better performance, and that there are often trade-offs between accuracy and computational efficiency. Our code is available at https://github.com/Tizzzzy/Demonstration_Selection_Overview.

提示工程LLM算法评估演示选择

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