{"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/can-large-language-models-reason-about","title":"Can large language models reason about medical questions?","arxiv_id":"2207.08143","date":"2022-07-17","proceeding":null,"authors":["Valentin Liévin","Christoffer Egeberg Hother","Andreas Geert Motzfeldt","Ole Winther"],"abstract":"Although large language models (LLMs) often produce impressive outputs, it remains unclear how they perform in real-world scenarios requiring strong reasoning skills and expert domain knowledge. We set out to investigate whether close- and open-source models (GPT-3.5, LLama-2, etc.) can be applied to answer and reason about difficult real-world-based questions. We focus on three popular medical benchmarks (MedQA-USMLE, MedMCQA, and PubMedQA) and multiple prompting scenarios: Chain-of-Thought (CoT, think step-by-step), few-shot and retrieval augmentation. Based on an expert annotation of the generated CoTs, we found that InstructGPT can often read, reason and recall expert knowledge. Last, by leveraging advances in prompt engineering (few-shot and ensemble methods), we demonstrated that GPT-3.5 not only yields calibrated predictive distributions, but also reaches the passing score on three datasets: MedQA-USMLE 60.2%, MedMCQA 62.7% and PubMedQA 78.2%. Open-source models are closing the gap: Llama-2 70B also passed the MedQA-USMLE with 62.5% accuracy.","url_abs":"https://arxiv.org/abs/2207.08143v4","url_pdf":"https://arxiv.org/pdf/2207.08143v4.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":"can-large-language-models-reason-about","repo_url":"https://github.com/vlievin/medical-reasoning","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":null,"task_name":"MedQA"},{"task_slug":"multiple-choice-qa","task_name":"Multiple Choice Question Answering (MCQA)"},{"task_slug":"multiple-choice","task_name":"Multiple-choice"},{"task_slug":"prompt-engineering","task_name":"Prompt Engineering"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"reading-comprehension","task_name":"Reading Comprehension"},{"task_slug":"retrieval","task_name":"Retrieval"}],"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":"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":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/multiple-choice-question-answering-mcqa-on-21","task":"Multiple Choice Question Answering (MCQA)","dataset":"MedMCQA","model":"Codex 5-shot CoT","rank_in_archive_order":5,"of":22,"metrics":{"Dev Set (Acc-%)":"0.597","Test Set (Acc-%)":"0.627"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-medqa-usmle","task":"Question Answering","dataset":"MedQA","model":"Codex 5-shot CoT","rank_in_archive_order":13,"of":27,"metrics":{"Accuracy":"60.2"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-pubmedqa","task":"Question Answering","dataset":"PubMedQA","model":"Codex 5-shot CoT","rank_in_archive_order":7,"of":30,"metrics":{"Accuracy":"78.2"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2207.08143","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2207.08143"}},"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/vlievin/medical-reasoning","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":10},"by_repo_kind":{"official":{"samples":10,"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":0,"samples":[{"code_sha256_prefix":"e00ec4061635a1a5","entry":"apply_nested","repo":"vlievin/medical-reasoning","repo_kind":"official","path":"medical_reasoning/datasets/stats.py","file_url":"https://github.com/vlievin/medical-reasoning/blob/HEAD/medical_reasoning/datasets/stats.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e00ec4061635a1a5"}},{"code_sha256_prefix":"08223a733e27670c","entry":"cast_array","repo":"vlievin/medical-reasoning","repo_kind":"official","path":"medical_reasoning/indexes/base.py","file_url":"https://github.com/vlievin/medical-reasoning/blob/HEAD/medical_reasoning/indexes/base.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"08223a733e27670c"}},{"code_sha256_prefix":"b1696b58ac7e4489","entry":"extend_flows","repo":"vlievin/medical-reasoning","repo_kind":"official","path":"medical_reasoning/models/reasoner.py","file_url":"https://github.com/vlievin/medical-reasoning/blob/HEAD/medical_reasoning/models/reasoner.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b1696b58ac7e4489"}},{"code_sha256_prefix":"8b228645da52c2c6","entry":"flatten","repo":"vlievin/medical-reasoning","repo_kind":"official","path":"medical_reasoning/models/reasoner.py","file_url":"https://github.com/vlievin/medical-reasoning/blob/HEAD/medical_reasoning/models/reasoner.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8b228645da52c2c6"}},{"code_sha256_prefix":"c0f0d52e034a947f","entry":"format_option","repo":"vlievin/medical-reasoning","repo_kind":"official","path":"medical_reasoning/models/templates.py","file_url":"https://github.com/vlievin/medical-reasoning/blob/HEAD/medical_reasoning/models/templates.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c0f0d52e034a947f"}},{"code_sha256_prefix":"f2cf23afa58c83f0","entry":"format_option_2","repo":"vlievin/medical-reasoning","repo_kind":"official","path":"medical_reasoning/models/templates.py","file_url":"https://github.com/vlievin/medical-reasoning/blob/HEAD/medical_reasoning/models/templates.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f2cf23afa58c83f0"}},{"code_sha256_prefix":"afc1f30f1de37668","entry":"get_start_indices","repo":"vlievin/medical-reasoning","repo_kind":"official","path":"medical_reasoning/models/templates.py","file_url":"https://github.com/vlievin/medical-reasoning/blob/HEAD/medical_reasoning/models/templates.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"afc1f30f1de37668"}},{"code_sha256_prefix":"dbb023963ab5e75c","entry":"keep_only_alpha","repo":"vlievin/medical-reasoning","repo_kind":"official","path":"medical_reasoning/indexes/elasticsearch.py","file_url":"https://github.com/vlievin/medical-reasoning/blob/HEAD/medical_reasoning/indexes/elasticsearch.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"dbb023963ab5e75c"}},{"code_sha256_prefix":"79b2000863b40433","entry":"set_precision","repo":"vlievin/medical-reasoning","repo_kind":"official","path":"medical_reasoning/datasets/stats.py","file_url":"https://github.com/vlievin/medical-reasoning/blob/HEAD/medical_reasoning/datasets/stats.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"79b2000863b40433"}},{"code_sha256_prefix":"58f5668b6dbca399","entry":"summarize","repo":"vlievin/medical-reasoning","repo_kind":"official","path":"medical_reasoning/datasets/stats.py","file_url":"https://github.com/vlievin/medical-reasoning/blob/HEAD/medical_reasoning/datasets/stats.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"58f5668b6dbca399"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}