Enhancing LLM Medical Coding with Structured External Knowledge
Yidong GanDavid D. NguyenYang LinXu ZhongThanh VuLong DuongYuan-Fang Li
Yidong Gan
David D. Nguyen
Yang Lin
Xu Zhong
Thanh Vu
Long Duong
Yuan-Fang Li
+7
The paper introduces RAG-Coding, an agentic, training-free method that augments LLMs with structured external knowledge for medical coding instead of relying on internal model knowledge, which is prone to hallucination and lags behind guideline updates. The tabular list is encoded as a knowledge graph capturing hierarchical and instructional code relationships, and guidelines are distilled into concise, code-specific summaries rather than retrieved as raw text. On MDACE, RAG-Coding beats the strongest LLM-based baseline by 3–13\% micro-F1 and 1–8\% macro-F1 across five backbones; against supervised PLM-ICD it gains 11\% recall at 6\% lower precision. On the newly released MDACE-2025, an expert re-annotation under 2025 ICD-10-CM/PCS guidelines, it also leads all baselines in micro- and macro-F1, indicating generalisation to guideline updates, with ablations showing stepwise gains from the structured knowledge.

OpenReview ·
· September 11, 2026