CDW-CoT: Clustered Distance-Weighted Chain-of-Thoughts Reasoning
Yuanheng Fang, Guoqing Chao, Wenqiang Lei, Shaobo Li, Dianhui Chu
Abstract
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).
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
2 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Synthetic Prompting: Generating Chain-of-Thought Demonstrations for Large Language Models cites Automatic Chain of Thought Prompting in Large Language Models
- Synthetic Prompting: Generating Chain-of-Thought Demonstrations for Large Language Models cites Large Language Models are Zero-Shot Reasoners
- Synthetic Prompting: Generating Chain-of-Thought Demonstrations for Large Language Models cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Automatic Chain of Thought Prompting in Large Language Models cites Large Language Models are Zero-Shot Reasoners
- Automatic Chain of Thought Prompting in Large Language Models cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Pragmatic Inference Chain (PIC) Improving LLMs' Reasoning of Authentic Implicit Toxic Language cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Large Language Models are Zero-Shot Reasoners cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- The CoT Encyclopedia: Analyzing, Predicting, and Controlling how a Reasoning Model will Think cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Large Language Models are Better Reasoners with Self-Verification cites Automatic Chain of Thought Prompting in Large Language Models
- Large Language Models are Better Reasoners with Self-Verification cites Large Language Models are Zero-Shot Reasoners
- Large Language Models are Better Reasoners with Self-Verification cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Cited by top-tier papers2
- Pragmatic Inference Chain (PIC) Improving LLMs' Reasoning of Authentic Implicit Toxic LanguageXi Chen, Shuo WangEMNLP 2025 · 7 citations
- The CoT Encyclopedia: Analyzing, Predicting, and Controlling how a Reasoning Model will ThinkSeongyun Lee, Seungone Kim, Minju Seo, Yongrae Jo et al.ICLR 2026 · 6 citations
Builds on14
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo et al.NeurIPS 2022 · 8,168 citations
- Automatic Chain of Thought Prompting in Large Language ModelsZhuosheng Zhang, Aston Zhang, Mu Li, Alex SmolaICLR 2023 · 234 citations
- Large Language Models are Better Reasoners with Self-VerificationYixuan Weng, Minjun Zhu, Fei Xia, Bin Li et al.EMNLP Findings 2023 · 110 citations
- Synthetic Prompting: Generating Chain-of-Thought Demonstrations for Large Language ModelsZhihong Shao, Yeyun Gong, Yelong Shen, Minlie Huang et al.ICML 2023 · 98 citations
Related papers
- Instance-adaptive Zero-shot Chain-of-Thought PromptingXiaosong Yuan, Chen Shen, Shaotian Yan, Xiaofeng Zhang et al.NeurIPS 2024 · 46 citations
- LaRS: Latent Reasoning Skills for Chain-of-Thought ReasoningZifan Xu, Haozhu Wang, Dmitriy Bespalov, Xian Wu et al.EMNLP Findings 2024 · 4 citations
- Why Prompt Design Matters and Works: A Complexity Analysis of Prompt Search Space in LLMsXiang Zhang, Juntai Cao, Chenyu You, Dujian DingACL 2025 · 21 citations
- Fewer is More: Boosting Math Reasoning with Reinforced Context PruningXijie Huang, Li Lyna Zhang, Kwang-Ting Cheng, Fan Yang et al.EMNLP 2024 · 7 citations
- Deciphering the Factors Influencing the Efficacy of Chain-of-Thought: Probability, Memorization, and Noisy ReasoningAkshara Prabhakar, Thomas L. Griffiths, R. Thomas McCoyEMNLP Findings 2024 · 14 citations
