Large language models (LLMs) have exhibited remarkable capabilities in learning from explanations in prompts. Yet, there has been limited understanding of what makes explanations effective for in-context learning. This work aims to better understand the mechanisms by which explanations are used for in-context learning. We first study the impact of two different factors on prompting performance when using explanations: the computation trace (the way the solution is decomposed) and the natural language of the prompt. By perturbing explanations on three controlled tasks, we show that both factors contribute to the effectiveness of explanations, indicating that LLMs do faithfully follow the explanations to some extent. We further study how to form maximally effective sets of explanations for solving a given test query. We find that LLMs can benefit from the complementarity of the explanation set as they are able to fuse different reasoning specified by individual exemplars in prompts. Additionally, having relevant exemplars also contributes to more effective prompts. Therefore, we propose a maximal-marginal-relevance-based exemplar selection approach for constructing exemplar sets that are both relevant as well as complementary, which successfully improves the in-context learning performance across three real-world tasks on multiple LLMs.
翻译:大型语言模型(LLMS)在从快速的解释中学习,表现了惊人的能力;然而,对解释对内通学习的效果的认识有限,这项工作旨在更好地了解解释用于内通学习的机制;我们首先研究两个不同因素对在使用解释时促进业绩的影响:计算痕量(解决办法的分解方式)和快速的自然语言;通过对三种受控任务进行粗略的解释,我们表明这两个因素都有助于解释的有效性,表明LLMS在某种程度上忠实地遵循解释;我们进一步研究如何为解决特定测试询问形成最有效的解释组合;我们发现LMS可以受益于解释组合的互补性,因为它们能够迅速结合个别Explator具体规定的不同推理;此外,有相关的Explaters也有助于更有效的迅速。因此,我们提议一种基于最大-marginal-legal-respal Exmplar 选择方法,用于建造既具有相关性又具有多重互补性的外通版。