Large Language Models (LLMs) have shown strong in-context learning (ICL) abilities with a few demonstrations. However, one critical challenge is how to select demonstrations to elicit the full potential of LLMs. In this paper, we propose Curriculum Demonstration Selection (CDS), a novel demonstration selection method for ICL. Instead of merely using similarity, CDS additionally partitions samples by their complexity measurements. Following curriculum learning, CDS then selects demonstrations from easy to difficult. Thus the selected demonstrations cover a wide range of difficulty levels, enabling LLMs to learn from varied complexities within the training set. Experiments demonstrate that our CDS consistently outperforms baseline methods, achieving notable improvements across nine LLMs on three benchmarks. Moreover, CDS proves especially effective in enhancing LLM performance in solving challenging problems.
翻译:大型语言模型(LLMs)已展现出强大的上下文学习(ICL)能力,仅需少量演示示例即可实现高效学习。然而,如何选择演示示例以充分激发LLMs的潜力仍是一个关键挑战。本文提出课程演示选择(CDS),一种新颖的ICL演示选择方法。CDS不仅依据相似性,还通过复杂度度量对样本进行划分。遵循课程学习原则,CDS从易到难选择演示示例,使所选示例覆盖广泛的难度级别,从而让LLMs能够从训练集中学习不同复杂度的内容。实验表明,我们的CDS方法在三个基准测试中持续优于基线方法,在九种LLMs上均取得显著提升。此外,CDS在增强LLMs解决复杂问题方面的表现尤为突出。