Triplet-based contrastive method enhances the reasoning ability of large language models

被引:0
作者
Chen, Hongwei [1 ]
Zhu, Jiahui [1 ]
Wang, Wei [2 ]
Zhu, Yuan [3 ]
Xi, Liya [3 ]
机构
[1] Hubei Univ Technol, Sch Comp Sci, Wuhan 430086, Hubei, Peoples R China
[2] Hubei Univ Technol, Normal Sch Vocat Tech, Wuhan 430086, Hubei, Peoples R China
[3] Wuchang Shouyi Univ, Coll Informat Sci & Engn, Wuhan 430086, Hubei, Peoples R China
基金
中国国家自然科学基金;
关键词
Artificial intelligence; Large language model; Chain of thought; Contrastive learning;
D O I
10.1007/s11227-025-07056-6
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Prompting techniques play a crucial role in enhancing the capabilities of large pretrained language models (LLMs). While chain-of-thought (CoT) prompting, Wei (Adv Neural Inf Process Syst 35:24824-24837, 2022) has achieved remarkable success in improving LLM reasoning capabilities; its underlying mechanism is still not fully understood. Traditional CoT prompting often fails to inform the model adequately about what mistakes to avoid, which can increase the likelihood of reasoning errors. Inspired by human learning through contrastive examples and triplet knowledge enhancement, we propose a triplet-based contrastive chain-of-thought (CoT-TCP) method that provides both valid and invalid reasoning examples. By extracting triplets, this method helps guide models toward more accurate and less erroneous reasoning. The experiments in this paper show that this method improves performance across various reasoning tasks. For instance, using the GPT-3.5 model, the accuracy of the ADDSUB task increased from 29.9 to 90.6%, and the accuracy of the GSM8K task increased from 14.3 to 79.9%. The proposed method not only outperforms traditional zero-shot and few-shot CoT methods, but also integrates seamlessly with existing prompt techniques, yielding excellent results. In conclusion, by introducing contrastive prompts and generating logically consistent triplet examples, our method taps into the reasoning potential of LLMs and enhances their performance in various reasoning tasks.
引用
收藏
页数:20
相关论文
共 33 条
[1]  
Amatriain X, 2024, Arxiv, DOI [arXiv:2401.14423, DOI 10.48550/ARXIV.2401.14423]
[2]  
Brown TB, 2020, ADV NEUR IN, V33
[3]  
Chen T, 2020, PROC INT C MACHINE L, P1597
[4]  
Chen W., 2023, Transactions on Machine Learning Research
[5]  
Chia YK, 2023, Contrastive Chain-of-Thought Prompting
[6]  
Chu Z, 2024, PROCEEDINGS OF THE 62ND ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, VOL 1: LONG PAPERS, P1173
[7]  
Cobbe K, 2021, Arxiv, DOI [arXiv:2110.14168, DOI 10.48550/ARXIV.2110.14168]
[8]  
Gao Leo, P MACHINE LEARNING R
[9]  
Kim G., 2024, Advances in Neural Information Processing Systems, V36
[10]  
Kojima T, 2022, ADV NEUR IN