Enhancing LLM Medical Coding with Structured External Knowledge

Yidong Gan, David D. Nguyen, Yang Lin, Peter Zhong, Thanh Vu +2 more
4/9/2026
cs.CLcs.AIcs.IR
rag

No confident code implementation found for this paper.

Abstract

Accurate medical coding requires consulting authoritative resources such as the ICD tabular list and coding guidelines. Existing LLM-based automated methods largely rely on LLMs' internal knowledge, which is prone to hallucination and cannot keep pace with guideline updates.

Show full abstract

We introduce RAG-Coding, an agentic, training-free method that augments LLMs with structured external knowledge: the tabular list is encoded as a knowledge graph capturing hierarchical and instructional code relationships, and the guidelines are distilled into concise, code-specific summaries rather than retrieved as raw text. To enable our study, we also introduce MDACE-2025, expert re-annotations of the MDACE dataset under the 2025 ICD-10-CM/PCS guidelines, adding code sequencing and justification comments. On MDACE, RAG-Coding outperforms the best LLM-based baseline by 3--13\% in micro-F1 across five LLM backbones, and achieves comparable micro- and macro-F1 to the supervised state-of-the-art, with higher recall ($+$11\%) at the cost of precision ($-$6\%). On MDACE-2025, RAG-Coding outperforms all baselines, demonstrating effective generalisation to updated guidelines. Ablations confirm stepwise gains, highlighting the importance of integrating structured external knowledge for LLM-based medical coding.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{gan2026enhancing,
  title  = {Enhancing LLM Medical Coding with Structured External Knowledge},
  author = {Yidong Gan and David D. Nguyen and Yang Lin and Peter Zhong and Thanh Vu and Long Duong and Yuan-Fang Li},
  year   = {2026},
  eprint = {2605.27377},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.27377v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.27377.svg)](https://codeofpaper.com/paper/2605.27377)

Discussion