{"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/selfcheck-using-llms-to-zero-shot-check-their","title":"SelfCheck: Using LLMs to Zero-Shot Check Their Own Step-by-Step Reasoning","arxiv_id":"2308.00436","date":"2023-08-01","proceeding":null,"authors":["Ning Miao","Yee Whye Teh","Tom Rainforth"],"abstract":"The recent progress in large language models (LLMs), especially the invention of chain-of-thought prompting, has made it possible to automatically answer questions by stepwise reasoning. However, when faced with more complicated problems that require non-linear thinking, even the strongest LLMs make mistakes. To address this, we explore whether LLMs are able to recognize errors in their own step-by-step reasoning, without resorting to external resources. To this end, we propose SelfCheck, a general-purpose zero-shot verification schema for recognizing such errors. We then use the results of these checks to improve question-answering performance by conducting weighted voting on multiple solutions to the question. We test SelfCheck on three datasets (GSM8K, MathQA, and MATH) and find that it successfully recognizes errors and, in turn, increases final answer accuracies.","url_abs":"https://arxiv.org/abs/2308.00436v3","url_pdf":"https://arxiv.org/pdf/2308.00436v3.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":"selfcheck-using-llms-to-zero-shot-check-their","repo_url":"https://github.com/ningmiao/selfcheck","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok"}}],"tasks":[{"task_slug":"gsm8k","task_name":"GSM8K"},{"task_slug":"math","task_name":"Math"},{"task_slug":"question-answering","task_name":"Question Answering"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2308.00436","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2308.00436"}},"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/ningmiao/selfcheck","reach":{"status":"ok"}}],"summary":{"ran":14,"unverified":2},"by_repo_kind":{"official":{"samples":16,"ran":14,"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":16,"samples":[{"code_sha256_prefix":"c9d0417e3e64a048","entry":"get_exact_answer","repo":"ningmiao/selfcheck","repo_kind":"official","path":"src/arithmatic_problem_utils.py","file_url":"https://github.com/ningmiao/selfcheck/blob/HEAD/src/arithmatic_problem_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c9d0417e3e64a048"}},{"code_sha256_prefix":"3c73c002559c8c87","entry":"get_last_expression","repo":"ningmiao/selfcheck","repo_kind":"official","path":"src/str2arithmatic.py","file_url":"https://github.com/ningmiao/selfcheck/blob/HEAD/src/str2arithmatic.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3c73c002559c8c87"}},{"code_sha256_prefix":"3cad79c9bc67cca1","entry":"get_response_chat","repo":"ningmiao/selfcheck","repo_kind":"official","path":"src/gpt.py","file_url":"https://github.com/ningmiao/selfcheck/blob/HEAD/src/gpt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3cad79c9bc67cca1"}},{"code_sha256_prefix":"026ecf76275bc182","entry":"get_response_text","repo":"ningmiao/selfcheck","repo_kind":"official","path":"src/gpt.py","file_url":"https://github.com/ningmiao/selfcheck/blob/HEAD/src/gpt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"026ecf76275bc182"}},{"code_sha256_prefix":"f5e4834f5d25c4d8","entry":"get_string_between_bracket","repo":"ningmiao/selfcheck","repo_kind":"official","path":"src/str2arithmatic.py","file_url":"https://github.com/ningmiao/selfcheck/blob/HEAD/src/str2arithmatic.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f5e4834f5d25c4d8"}},{"code_sha256_prefix":"31b1e5e99c4d8eb7","entry":"get_unit","repo":"ningmiao/selfcheck","repo_kind":"official","path":"src/str2arithmatic.py","file_url":"https://github.com/ningmiao/selfcheck/blob/HEAD/src/str2arithmatic.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"31b1e5e99c4d8eb7"}},{"code_sha256_prefix":"8bd18a209a72b613","entry":"get_weight_1","repo":"ningmiao/selfcheck","repo_kind":"official","path":"script/evaluate-checking.py","file_url":"https://github.com/ningmiao/selfcheck/blob/HEAD/script/evaluate-checking.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8bd18a209a72b613"}},{"code_sha256_prefix":"45cfa55415870fb6","entry":"get_weight_2","repo":"ningmiao/selfcheck","repo_kind":"official","path":"script/evaluate-checking.py","file_url":"https://github.com/ningmiao/selfcheck/blob/HEAD/script/evaluate-checking.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"45cfa55415870fb6"}},{"code_sha256_prefix":"5fca40e8cb3dace0","entry":"load_GSM8K","repo":"ningmiao/selfcheck","repo_kind":"official","path":"src/dataset.py","file_url":"https://github.com/ningmiao/selfcheck/blob/HEAD/src/dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5fca40e8cb3dace0"}},{"code_sha256_prefix":"8e85162d2f0494e1","entry":"load_MathQA","repo":"ningmiao/selfcheck","repo_kind":"official","path":"src/dataset.py","file_url":"https://github.com/ningmiao/selfcheck/blob/HEAD/src/dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8e85162d2f0494e1"}},{"code_sha256_prefix":"136ff6959b00109f","entry":"load_dataset","repo":"ningmiao/selfcheck","repo_kind":"official","path":"src/dataset.py","file_url":"https://github.com/ningmiao/selfcheck/blob/HEAD/src/dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"136ff6959b00109f"}},{"code_sha256_prefix":"553f04e6b7bed21c","entry":"transform2verifierformat","repo":"ningmiao/selfcheck","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/ningmiao/selfcheck/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"553f04e6b7bed21c"}},{"code_sha256_prefix":"50f437e243ace864","entry":"verify_format","repo":"ningmiao/selfcheck","repo_kind":"official","path":"src/rule.py","file_url":"https://github.com/ningmiao/selfcheck/blob/HEAD/src/rule.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"50f437e243ace864"}},{"code_sha256_prefix":"657a47aed803ffa4","entry":"verify_middle","repo":"ningmiao/selfcheck","repo_kind":"official","path":"src/rule.py","file_url":"https://github.com/ningmiao/selfcheck/blob/HEAD/src/rule.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"657a47aed803ffa4"}},{"code_sha256_prefix":"82c1d9826986afae","entry":"check","repo":"ningmiao/selfcheck","repo_kind":"official","path":"src/multiprocess.py","file_url":"https://github.com/ningmiao/selfcheck/blob/HEAD/src/multiprocess.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":"82c1d9826986afae"}},{"code_sha256_prefix":"cd995ccec25fdd48","entry":"get_predicted_dict","repo":"ningmiao/selfcheck","repo_kind":"official","path":"script/evaluate-checking.py","file_url":"https://github.com/ningmiao/selfcheck/blob/HEAD/script/evaluate-checking.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":"cd995ccec25fdd48"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}