{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/chain-of-thought-prompting-elicits-reasoning","title":"Chain-of-Thought Prompting Elicits Reasoning in Large Language Models","arxiv_id":"2201.11903","date":"2022-01-28","proceeding":null,"authors":["Jason Wei","Xuezhi Wang","Dale Schuurmans","Maarten Bosma","Brian Ichter","Fei Xia","Ed Chi","Quoc Le","Denny Zhou"],"abstract":"We explore how generating a chain of thought -- a series of intermediate reasoning steps -- significantly improves the ability of large language models to perform complex reasoning. In particular, we show how such reasoning abilities emerge naturally in sufficiently large language models via a simple method called chain of thought prompting, where a few chain of thought demonstrations are provided as exemplars in prompting. Experiments on three large language models show that chain of thought prompting improves performance on a range of arithmetic, commonsense, and symbolic reasoning tasks. The empirical gains can be striking. For instance, prompting a 540B-parameter language model with just eight chain of thought exemplars achieves state of the art accuracy on the GSM8K benchmark of math word problems, surpassing even finetuned GPT-3 with a verifier.","url_abs":"https://arxiv.org/abs/2201.11903v6","url_pdf":"https://arxiv.org/pdf/2201.11903v6.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/TianduoWang/MsAT","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/coldmist-lu/erroranalysis_prompt","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/guidance-ai/guidance","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/imnearth/coat","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":null},{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/infini-ai-lab/sirius","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/lupantech/chameleon-llm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":null},{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/mbzuai-clear/ioe-prompting","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":null},{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/microsoft/guidance","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/mrlab-ai/NL2Plan","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"GPL-3.0"}},{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/nicolay-r/thor-ecac","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/rlqja1107/torch-LLM4SGG","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/scofield7419/thor-isa","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/srush/minichain","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/sunlab-osu/understanding-cot","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/thu-keg/korc","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/thudm/chatglm2-6b","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/yinzhangyue/AoR","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/yinzhangyue/eot","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"chain-of-thought-prompting-elicits-reasoning","repo_url":"https://github.com/lastmile-ai/aiconfig","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"common-sense-reasoning","task_name":"Common Sense Reasoning"},{"task_slug":"gsm8k","task_name":"GSM8K"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"math","task_name":"Math"},{"task_slug":"question-answering","task_name":"Question Answering"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"cot-prompting","method_name":"CoT Prompting"},{"method_slug":"cosine-annealing","method_name":"Cosine Annealing"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"gpt-3","method_name":"GPT-3"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-cosine-annealing","method_name":"Linear Warmup With Cosine Annealing"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"weight-decay","method_name":"Weight Decay"}],"datasets_introduced":[{"slug":"lastletterconcat","name":"LastLetterConcat","full_name":""}],"methods_introduced":[{"slug":"cot-prompting","name":"CoT Prompting","full_name":"Chain-of-thought prompting"}],"results":[{"leaderboard":"/sota/common-sense-reasoning-on-commonsenseqa","task":"Common Sense Reasoning","dataset":"CommonsenseQA","model":"Chain of thought ASDiv","rank_in_archive_order":37,"of":38,"metrics":{"Accuracy":"28.6"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-webquestions","task":"Question Answering","dataset":"WebQuestions","model":"CoT","rank_in_archive_order":15,"of":37,"metrics":{"EM":"42.5"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2201.11903","atlas_url":"https://app.syntology.ai/?focus=2201.11903","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2201.11903"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/thudm/chatglm2-6b","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mbzuai-clear/ioe-prompting","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/thu-keg/korc","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/imnearth/coat","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mrlab-ai/NL2Plan","reach":{"status":"ok","spdx":"GPL-3.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/scofield7419/thor-isa","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/srush/minichain","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lastmile-ai/aiconfig","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/rlqja1107/torch-LLM4SGG","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/TianduoWang/MsAT","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sunlab-osu/understanding-cot","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/infini-ai-lab/sirius","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yinzhangyue/eot","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/microsoft/guidance","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/nicolay-r/thor-ecac","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lupantech/chameleon-llm","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/guidance-ai/guidance","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/chaochun/nlu-asdiv-dataset","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/coldmist-lu/erroranalysis_prompt","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yinzhangyue/AoR","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":4,"ran_draft_wrong":1,"unverified":2},"by_repo_kind":{"listed":{"samples":7,"ran":5,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"da9673a8a47a19c8","entry":"ChainOfThoughtCause","repo":"nicolay-r/thor-ecac","repo_kind":"listed","path":"src/cot_cause.py","file_url":"https://github.com/nicolay-r/thor-ecac/blob/HEAD/src/cot_cause.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"da9673a8a47a19c8"}},{"code_sha256_prefix":"ed156b3a46d11ab3","entry":"calculate_acc","repo":"TianduoWang/MsAT","repo_kind":"listed","path":"core/utils.py","file_url":"https://github.com/TianduoWang/MsAT/blob/HEAD/core/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ed156b3a46d11ab3"}},{"code_sha256_prefix":"2643a333e4f14f19","entry":"calculate_acc_code","repo":"TianduoWang/MsAT","repo_kind":"listed","path":"core/utils.py","file_url":"https://github.com/TianduoWang/MsAT/blob/HEAD/core/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2643a333e4f14f19"}},{"code_sha256_prefix":"cbf3e12d7057a165","entry":"count_parameters","repo":"TianduoWang/MsAT","repo_kind":"listed","path":"core/utils.py","file_url":"https://github.com/TianduoWang/MsAT/blob/HEAD/core/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cbf3e12d7057a165"}},{"code_sha256_prefix":"57cd245fea675806","entry":"get_combination_mask","repo":"TianduoWang/MsAT","repo_kind":"listed","path":"deductreasoner/model.py","file_url":"https://github.com/TianduoWang/MsAT/blob/HEAD/deductreasoner/model.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"57cd245fea675806"}},{"code_sha256_prefix":"5961e81f95a87056","entry":"get_batched_prediction_consider_multiple_m0","repo":"TianduoWang/MsAT","repo_kind":"listed","path":"deductreasoner/trainer.py","file_url":"https://github.com/TianduoWang/MsAT/blob/HEAD/deductreasoner/trainer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5961e81f95a87056"}},{"code_sha256_prefix":"10a9e1bd9dab41c9","entry":"get_train_dataloader","repo":"TianduoWang/MsAT","repo_kind":"listed","path":"deductreasoner/prepare_dataset.py","file_url":"https://github.com/TianduoWang/MsAT/blob/HEAD/deductreasoner/prepare_dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"10a9e1bd9dab41c9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}