{"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/large-language-models-are-zero-shot-reasoners","title":"Large Language Models are Zero-Shot Reasoners","arxiv_id":"2205.11916","date":"2022-05-24","proceeding":null,"authors":["Takeshi Kojima","Shixiang Shane Gu","Machel Reid","Yutaka Matsuo","Yusuke Iwasawa"],"abstract":"Pretrained large language models (LLMs) are widely used in many sub-fields of natural language processing (NLP) and generally known as excellent few-shot learners with task-specific exemplars. Notably, chain of thought (CoT) prompting, a recent technique for eliciting complex multi-step reasoning through step-by-step answer examples, achieved the state-of-the-art performances in arithmetics and symbolic reasoning, difficult system-2 tasks that do not follow the standard scaling laws for LLMs. While these successes are often attributed to LLMs' ability for few-shot learning, we show that LLMs are decent zero-shot reasoners by simply adding \"Let's think step by step\" before each answer. Experimental results demonstrate that our Zero-shot-CoT, using the same single prompt template, significantly outperforms zero-shot LLM performances on diverse benchmark reasoning tasks including arithmetics (MultiArith, GSM8K, AQUA-RAT, SVAMP), symbolic reasoning (Last Letter, Coin Flip), and other logical reasoning tasks (Date Understanding, Tracking Shuffled Objects), without any hand-crafted few-shot examples, e.g. increasing the accuracy on MultiArith from 17.7% to 78.7% and GSM8K from 10.4% to 40.7% with large InstructGPT model (text-davinci-002), as well as similar magnitudes of improvements with another off-the-shelf large model, 540B parameter PaLM. The versatility of this single prompt across very diverse reasoning tasks hints at untapped and understudied fundamental zero-shot capabilities of LLMs, suggesting high-level, multi-task broad cognitive capabilities may be extracted by simple prompting. We hope our work not only serves as the minimal strongest zero-shot baseline for the challenging reasoning benchmarks, but also highlights the importance of carefully exploring and analyzing the enormous zero-shot knowledge hidden inside LLMs before crafting finetuning datasets or few-shot exemplars.","url_abs":"https://arxiv.org/abs/2205.11916v4","url_pdf":"https://arxiv.org/pdf/2205.11916v4.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":"large-language-models-are-zero-shot-reasoners","repo_url":"https://github.com/kojima-takeshi188/zero_shot_cot","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"large-language-models-are-zero-shot-reasoners","repo_url":"https://github.com/nicolay-r/reasoning-for-sentiment-analysis-framework","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"large-language-models-are-zero-shot-reasoners","repo_url":"https://github.com/skytliang/multi-agents-debate","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"GPL-3.0"}},{"paper_slug":"large-language-models-are-zero-shot-reasoners","repo_url":"https://github.com/zongqianwu/st-cot","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"arithmetic-reasoning","task_name":"Arithmetic Reasoning"},{"task_slug":"common-sense-reasoning","task_name":"Common Sense Reasoning"},{"task_slug":"date-understanding","task_name":"Date Understanding"},{"task_slug":"few-shot-learning","task_name":"Few-Shot Learning"},{"task_slug":"gsm8k","task_name":"GSM8K"},{"task_slug":"logical-reasoning","task_name":"Logical Reasoning"},{"task_slug":"math-word-problem-solving","task_name":"Math Word Problem Solving"}],"methods":[{"method_slug":"palm","method_name":"PaLM"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/arithmetic-reasoning-on-gsm8k","task":"Arithmetic Reasoning","dataset":"GSM8K","model":"PaLM-540B (few-Shot-cot)","rank_in_archive_order":120,"of":164,"metrics":{"Accuracy":"58.1","Parameters (Billion)":"540"},"uses_additional_data":true},{"leaderboard":"/sota/arithmetic-reasoning-on-gsm8k","task":"Arithmetic Reasoning","dataset":"GSM8K","model":"Finetuned GPT-3 175B + verifier","rank_in_archive_order":127,"of":164,"metrics":{"Accuracy":"55.0","Parameters (Billion)":"175"},"uses_additional_data":true},{"leaderboard":"/sota/arithmetic-reasoning-on-gsm8k","task":"Arithmetic Reasoning","dataset":"GSM8K","model":"Text-davinci-002-175B (zero-plus-few-Shot-cot (8 samples))","rank_in_archive_order":133,"of":164,"metrics":{"Accuracy":"51.5","Parameters (Billion)":"175"},"uses_additional_data":true},{"leaderboard":"/sota/arithmetic-reasoning-on-gsm8k","task":"Arithmetic Reasoning","dataset":"GSM8K","model":"text-davinci-002 175B (2-shot, CoT)","rank_in_archive_order":138,"of":164,"metrics":{"Accuracy":"41.3","Parameters (Billion)":"175"},"uses_additional_data":true},{"leaderboard":"/sota/arithmetic-reasoning-on-gsm8k","task":"Arithmetic Reasoning","dataset":"GSM8K","model":"text-davinci-002 175B (0-shot, CoT)","rank_in_archive_order":140,"of":164,"metrics":{"Accuracy":"40.7","Parameters (Billion)":"175"},"uses_additional_data":true},{"leaderboard":"/sota/arithmetic-reasoning-on-gsm8k","task":"Arithmetic Reasoning","dataset":"GSM8K","model":"PaLM 540B (few-shot)","rank_in_archive_order":153,"of":164,"metrics":{"Accuracy":"17.9","Parameters (Billion)":"540"},"uses_additional_data":true},{"leaderboard":"/sota/arithmetic-reasoning-on-gsm8k","task":"Arithmetic Reasoning","dataset":"GSM8K","model":"Text-davinci-002-175B (0-shot)","rank_in_archive_order":160,"of":164,"metrics":{"Accuracy":"10.4","Parameters (Billion)":"175"},"uses_additional_data":true},{"leaderboard":"/sota/arithmetic-reasoning-on-multiarith","task":"Arithmetic Reasoning","dataset":"MultiArith","model":"Text-davinci-002 (175B)(zero-shot-cot)","rank_in_archive_order":1,"of":2,"metrics":{"Accuracy":"78.7"},"uses_additional_data":false},{"leaderboard":"/sota/arithmetic-reasoning-on-multiarith","task":"Arithmetic Reasoning","dataset":"MultiArith","model":"Text-davinci-002 (175B) (zero-shot)","rank_in_archive_order":2,"of":2,"metrics":{"Accuracy":"17.7"},"uses_additional_data":false},{"leaderboard":"/sota/common-sense-reasoning-on-record","task":"Common Sense Reasoning","dataset":"ReCoRD","model":"GPT-3 175B (one-shot)","rank_in_archive_order":40,"of":45,"metrics":{"F1":"90.2"},"uses_additional_data":false},{"leaderboard":"/sota/math-word-problem-solving-on-svamp","task":"Math Word Problem Solving","dataset":"SVAMP","model":"PaLM (zero-shot, CoT)","rank_in_archive_order":14,"of":26,"metrics":{"Execution Accuracy":"62.1"},"uses_additional_data":false},{"leaderboard":"/sota/math-word-problem-solving-on-svamp","task":"Math Word Problem Solving","dataset":"SVAMP","model":"PaLM (zero-shot)","rank_in_archive_order":15,"of":26,"metrics":{"Execution Accuracy":"58.8"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2205.11916","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2205.11916"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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/zongqianwu/st-cot","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/skytliang/multi-agents-debate","reach":{"status":"ok","spdx":"GPL-3.0"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/kojima-takeshi188/zero_shot_cot","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/nicolay-r/reasoning-for-sentiment-analysis-framework","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":4},"by_repo_kind":{"official":{"samples":1,"ran":0,"repositories":1},"listed":{"samples":3,"ran":0,"repositories":1}},"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":1,"samples":[{"code_sha256_prefix":"2a69062c931fd044","entry":"decoder_for_gpt3","repo":"kojima-takeshi188/zero_shot_cot","repo_kind":"official","path":"utils.py","file_url":"https://github.com/kojima-takeshi188/zero_shot_cot/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2a69062c931fd044"}},{"code_sha256_prefix":"019cef4a931d36cf","entry":"find_by_prefix","repo":"nicolay-r/reasoning-for-sentiment-analysis-framework","repo_kind":"listed","path":"src/utils.py","file_url":"https://github.com/nicolay-r/reasoning-for-sentiment-analysis-framework/blob/HEAD/src/utils.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":"019cef4a931d36cf"}},{"code_sha256_prefix":"12eff61056f9a673","entry":"format_model_name","repo":"nicolay-r/reasoning-for-sentiment-analysis-framework","repo_kind":"listed","path":"src/utils.py","file_url":"https://github.com/nicolay-r/reasoning-for-sentiment-analysis-framework/blob/HEAD/src/utils.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":"12eff61056f9a673"}},{"code_sha256_prefix":"663cefba5b844a67","entry":"parse_filepath","repo":"nicolay-r/reasoning-for-sentiment-analysis-framework","repo_kind":"listed","path":"src/utils.py","file_url":"https://github.com/nicolay-r/reasoning-for-sentiment-analysis-framework/blob/HEAD/src/utils.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":"663cefba5b844a67"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}