Chain-of-thought prompting combined with pre-trained large language models has achieved encouraging results on complex reasoning tasks. In this paper, we propose a new decoding strategy, self-consistency, to replace the naive greedy decoding used in chain-of-thought prompting. It first samples a diverse set of reasoning paths instead of only taking the greedy one, and then selects the most consistent answer by marginalizing out the sampled reasoning paths. Self-consistency leverages the intuition that a complex reasoning problem typically admits multiple different ways of thinking leading to its unique correct answer. Our extensive empirical evaluation shows that self-consistency boosts the performance of chain-of-thought prompting with a striking margin on a range of popular arithmetic and commonsense reasoning benchmarks, including GSM8K (+17.9%), SVAMP (+11.0%), AQuA (+12.2%), StrategyQA (+6.4%) and ARC-challenge (+3.9%).
翻译:在复杂的推理任务中,我们提出了一种新的解码策略,即自我一致性,以取代在思索链中所使用的天真的贪婪解码。它首先抽样一组不同的推理路径,而不是只采用贪婪的路径,然后通过将抽样推理路径边缘化而选择最一致的答案。自相矛盾的直觉利用了一种直觉,即复杂的推理问题通常会接受多种不同的思维方式,导致其独特的正确答案。我们广泛的实证评估表明,自相矛盾促进了思维链的性能,在一系列流行的算术和常识推理基准上有着惊人的优势,包括GSM8K(+17.9%)、SVAMP(+11.0%)、AUA(+12.2%)、战略QA(+6.4%)和ARC-Challenge (+3.9%)。</s>