根据数据特征动态生成推理提示,提升大模型复杂任务准确率
CDW-CoT: Clustered Distance-Weighted Chain-of-Thoughts Reasoning
- 按数据相似性分组,为每类生成专属推理提示
- 在多个任务上平均提升25.34%准确率(LLaMA2)
- 适合需要高精度推理的复杂任务场景
大型语言模型通过思维链(CoT)提示在复杂推理任务中表现优异。然而,现有方法通常对全数据集使用相同提示,难以应对数据内部多样性。为此,我们提出聚类距离加权思维链(CDW-CoT)方法,结合聚类与提示优化技术,动态构建适配每个数据实例的提示。该方法先用聚类算法将数据划分为不同群体,从各群体中选取候选提示池以反映内在多样性;再为每个簇训练特定的最优提示概率分布;最后根据测试实例与簇中心的距离,动态生成唯一提示分布并用于推理。CDW-CoT在六个数据集(涵盖常识、符号和数学推理)上持续优于传统CoT方法。相较于人工设计的CoT,CDW-CoT在LLaMA2(13B)上平均准确率提升25.34%,在LLaMA3(8B)上提升15.72%。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have recently achieved impressive results in complex reasoning tasks through Chain of Thought (CoT) prompting. However, most existing CoT methods rely on using the same prompts, whether manually designed or automatically generated, to handle the entire dataset. This one-size-fits-all approach may fail to meet the specific needs arising from the diversities within a single dataset. To solve this problem, we propose the Clustered Distance-Weighted Chain of Thought (CDW-CoT) method, which dynamically constructs prompts tailored to the characteristics of each data instance by integrating clustering and prompt optimization techniques. Our method employs clustering algorithms to categorize the dataset into distinct groups, from which a candidate pool of prompts is selected to reflect the inherent diversity within the dataset. For each cluster, CDW-CoT trains the optimal prompt probability distribution tailored to their specific characteristics. Finally, it dynamically constructs a unique prompt probability distribution for each test instance, based on its proximity to cluster centers, from which prompts are selected for reasoning. CDW-CoT consistently outperforms traditional CoT methods across six datasets, including commonsense, symbolic, and mathematical reasoning tasks. Specifically, when compared to manual CoT, CDW-CoT achieves an average accuracy improvement of 25.34% on LLaMA2 (13B) and 15.72% on LLaMA3 (8B).
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。