Contrastive Chain-of-Thought Prompting

Yew Ken Chia, Guizhen Chen, Luu Anh Tuan, Soujanya Poria, Lidong Bing
11/15/2023
cs.CL

No official code found. Best implementation: DAMO-NLP-SG/contrastive-cot (69 stars, last commit 2023-11-18).

Abstract

Despite the success of chain of thought in enhancing language model reasoning, the underlying process remains less well understood. Although logically sound reasoning appears inherently crucial for chain of thought, prior studies surprisingly reveal minimal impact when using invalid demonstrations instead. Furthermore, the conventional chain of thought does not inform language models on what mistakes to avoid, which potentially leads to more errors. Hence, inspired by how humans can learn from both positive and negative examples, we propose contrastive chain of thought to enhance language model reasoning. Compared to the conventional chain of thought, our approach provides both valid and invalid reasoning demonstrations, to guide the model to reason step-by-step while reducing reasoning mistakes. To improve generalization, we introduce an automatic method to construct contrastive demonstrations. Our experiments on reasoning benchmarks demonstrate that contrastive chain of thought can serve as a general enhancement of chain-of-thought prompting.

View on arXivView PDF

Code Implementations(1)

Contrastive Chain-of-Thought Prompting

697PythonNov 17, 20232 years ago

Similar Papers

Cite this paper

@article{chia2023contrastive,
  title  = {Contrastive Chain-of-Thought Prompting},
  author = {Yew Ken Chia and Guizhen Chen and Luu Anh Tuan and Soujanya Poria and Lidong Bing},
  year   = {2023},
  eprint = {2311.09277},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.09277v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.09277.svg)](https://codeofpaper.com/paper/2311.09277)

Discussion