技能背景提示:解鎖大型語言模型中的組合性
Skills-in-Context Prompting: Unlocking Compositionality in Large Language Models
August 1, 2023
作者: Jiaao Chen, Xiaoman Pan, Dian Yu, Kaiqiang Song, Xiaoyang Wang, Dong Yu, Jianshu Chen
cs.AI
摘要
我們考慮如何引發大型語言模型(LLMs)中的組合泛化能力問題,並提出一種新型提示策略。組合泛化使LLMs能夠解決比它們見過的更難的問題(即易到難的泛化),這是類似人類智能的關鍵推理能力。然而,即使是當前最先進的LLMs仍然在這種推理形式上遇到困難。為了彌補這一差距,我們提出了技能上下文(SKiC)提示,指導LLMs如何組合基本技能來解決更複雜的問題。我們發現,在同一提示上下文中展示技能和組合示例至關重要。通過僅有兩個範例,我們的SKiC提示激發了技能和其組合能力之間的強大協同作用。值得注意的是,它使LLMs能夠解決需要創新技能組合的未見問題,在廣泛的具有挑戰性的組合任務上實現了近乎完美的泛化。有趣的是,SKiC提示揭示了LLMs的潛在潛力,使它們能夠利用在早期預訓練階段獲得的內部技能,即使這些技能在提示上下文中並未明確呈現。這使得LLMs能夠通過激活和組合內部能力來解決未見的複雜問題。憑藉這些卓越特點,SKiC提示能夠在具有挑戰性的數學推理基準測試(例如MATH)上實現最先進的性能。
English
We consider the problem of eliciting compositional generalization
capabilities in large language models (LLMs) with a novel type of prompting
strategy. Compositional generalization empowers the LLMs to solve problems that
are harder than the ones they have seen (i.e., easy-to-hard generalization),
which is a critical reasoning capability of human-like intelligence. However,
even the current state-of-the-art LLMs still struggle with this form of
reasoning. To bridge this gap, we propose skills-in-context (SKiC) prompting,
which instructs LLMs how to compose basic skills to resolve more complex
problems. We find that it is crucial to demonstrate both the skills and the
compositional examples within the same prompting context. With as few as two
examplars, our SKiC prompting initiates strong synergies between skills and
their composition capabilities. Notably, it empowers LLMs to solve unseen
problems that require innovative skill compositions, achieving near-perfect
generalization on a broad range of challenging compositionality tasks.
Intriguingly, SKiC prompting unlocks the latent potential of LLMs, enabling
them to leverage pre-existing internal skills acquired during earlier
pre-training stages, even when these skills are not explicitly presented in the
prompting context. This results in the capability of LLMs to solve unseen
complex problems by activating and composing internal competencies. With such
prominent features, SKiC prompting is able to achieve state-of-the-art
performance on challenging mathematical reasoning benchmarks (e.g., MATH).