{"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/cod-towards-an-interpretable-medical-agent","title":"CoD, Towards an Interpretable Medical Agent using Chain of Diagnosis","arxiv_id":"2407.13301","date":"2024-07-18","proceeding":null,"authors":["Junying Chen","Chi Gui","Anningzhe Gao","Ke Ji","Xidong Wang","Xiang Wan","Benyou Wang"],"abstract":"The field of medical diagnosis has undergone a significant transformation with the advent of large language models (LLMs), yet the challenges of interpretability within these models remain largely unaddressed. This study introduces Chain-of-Diagnosis (CoD) to enhance the interpretability of LLM-based medical diagnostics. CoD transforms the diagnostic process into a diagnostic chain that mirrors a physician's thought process, providing a transparent reasoning pathway. Additionally, CoD outputs the disease confidence distribution to ensure transparency in decision-making. This interpretability makes model diagnostics controllable and aids in identifying critical symptoms for inquiry through the entropy reduction of confidences. With CoD, we developed DiagnosisGPT, capable of diagnosing 9604 diseases. Experimental results demonstrate that DiagnosisGPT outperforms other LLMs on diagnostic benchmarks. Moreover, DiagnosisGPT provides interpretability while ensuring controllability in diagnostic rigor.","url_abs":"https://arxiv.org/abs/2407.13301v2","url_pdf":"https://arxiv.org/pdf/2407.13301v2.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":"cod-towards-an-interpretable-medical-agent","repo_url":"https://github.com/freedomintelligence/chain-of-diagnosis","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"decision-making","task_name":"Decision Making"},{"task_slug":"diagnostic","task_name":"Diagnostic"},{"task_slug":"medical-diagnosis","task_name":"Medical Diagnosis"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2407.13301","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.13301"}},"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/freedomintelligence/chain-of-diagnosis","reach":{"status":"ok"}}],"summary":{"ran":3},"by_repo_kind":{"official":{"samples":3,"ran":3,"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":3,"samples":[{"code_sha256_prefix":"16587c0352201e81","entry":"construct_flatindex_from_embeddings","repo":"freedomintelligence/chain-of-diagnosis","repo_kind":"official","path":"retrieve_utils.py","file_url":"https://github.com/freedomintelligence/chain-of-diagnosis/blob/HEAD/retrieve_utils.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":"16587c0352201e81"}},{"code_sha256_prefix":"62fc247c87911474","entry":"index_retrieve","repo":"freedomintelligence/chain-of-diagnosis","repo_kind":"official","path":"retrieve_utils.py","file_url":"https://github.com/freedomintelligence/chain-of-diagnosis/blob/HEAD/retrieve_utils.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":"62fc247c87911474"}},{"code_sha256_prefix":"29b9c2936ad37d07","entry":"load_dataset","repo":"freedomintelligence/chain-of-diagnosis","repo_kind":"official","path":"retrieve_utils.py","file_url":"https://github.com/freedomintelligence/chain-of-diagnosis/blob/HEAD/retrieve_utils.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":"29b9c2936ad37d07"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}